/* The insights site's wide frame and landing page (owner, 2026-11-15): loaded after insights.css and before the live
   theme (theme.css), so the theme's colours, radius and font still rule. The header that stays on top, the footer's
   columns, the rows of blocks side by side (page.html: .blocks > .cell), panels, the landing blocks (top stories,
   market tiles, top coins, sections, Learn) and the small moves. Colours come from the theme's variables only; right
   to left by logical properties; everything reads without the site's script (static/site.js only adds). */
:root {
    --g: 20px;
    --r: calc(var(--radius, 10px) + 6px);
    --second: #6366f1;
    --soft: color-mix(in srgb, var(--accent) 10%, transparent);
    --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 14px 32px -18px rgb(15 23 42 / .22);
    --wide: 1600px;
}
:root[data-theme="light"] { --up: #16a34a; --down: #dc2626; }
:root[data-theme="dark"] { --up: #22c55e; --down: #f87171; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { background-image: radial-gradient(900px 420px at 88% -90px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
                         radial-gradient(760px 380px at 4% -140px, color-mix(in srgb, var(--second) 12%, transparent), transparent 70%);
       background-repeat: no-repeat; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
bdi, .num, time { font-variant-numeric: tabular-nums; }
h1, h2, h3 { letter-spacing: -.015em; text-wrap: balance; }
[dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3 { letter-spacing: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-text);
        padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 10px; }

/* ---- the frame: widths ---- */
.wrap { max-width: var(--wide); padding: 0 24px; }
main.wrap { max-width: 880px; padding-top: 26px; padding-bottom: 64px; }
main.page-home, main.page-section, main.page-coins, main.page-archive, main.page-exchanges, main.page-exchange,
main.page-own { max-width: var(--wide); }
main.page-coin, main.page-heatmaps, main.page-options, main.page-headlines { max-width: 1100px; }

/* ---- the header ---- */
.site-head { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
             background: color-mix(in srgb, var(--panel) 84%, transparent);
             -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
             transition: box-shadow .2s ease; }
.site-head.scrolled { box-shadow: 0 10px 28px -20px rgb(0 0 0 / .55); }
.head-row { gap: 12px; padding-top: 12px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.3rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.head-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.tool { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line);
        border-radius: 999px; background: color-mix(in srgb, var(--panel) 60%, transparent); color: var(--text);
        font: inherit; font-size: .9rem; line-height: 1; cursor: pointer; transition: border-color .15s, color .15s; }
.tool:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.tool svg { flex: none; width: 17px; height: 17px; }
.search-link { margin: 0; min-width: 190px; color: var(--muted); }
.theme-toggle { width: 36px; padding: 0; justify-content: center; }
.settings-toggle { width: 36px; padding: 0; justify-content: center; }
.settings-toggle[hidden], .reader-settings[hidden] { display: none; }
.settings-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
/* the reader's look (owner, 2026-11-15): a panel under the header's tools, as algorizm's Profile > Display */
.settings-row { position: relative; }
.reader-settings { position: absolute; inset-inline-end: 24px; top: 4px; z-index: 60; width: min(340px, calc(100vw - 32px));
                   max-height: 75vh; overflow: auto; padding: 14px 16px; background: var(--panel); color: var(--text);
                   border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 40px -16px rgb(0 0 0 / .45); }
.reader-settings fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.reader-settings legend { font-weight: 700; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.reader-settings label { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 6px 0; font-size: .9rem; cursor: pointer; }
[dir=rtl] .reader-settings label { margin: 0 0 6px 12px; }
.reader-settings input { accent-color: var(--accent); margin: 0; }
.settings-note { margin: 0; color: var(--muted); font-size: .82rem; }
@media (max-width: 640px) { .reader-settings { inset-inline-end: 16px; } }
.theme-toggle[hidden], .to-top[hidden], .tabs[hidden], .tab-pane[hidden], .nav-arrow[hidden] { display: none; }
.theme-toggle .icon-sun, .theme-toggle[data-now="dark"] .icon-moon { display: none; }
.theme-toggle[data-now="dark"] .icon-sun { display: block; }
.lang { font-size: .9rem; border-radius: 999px; padding: 0 12px; }
.head-cta { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; font-size: .9rem;
            white-space: nowrap; }
.button { transition: transform .15s ease, box-shadow .15s ease, opacity .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px var(--accent); }
.nav-row { position: relative; }
.nav-grouped { overflow: visible; flex-wrap: wrap; position: relative; }
.nav-grouped .nav-home { align-self: center; }
.nav-group { position: relative; }
.nav-group > summary { list-style: none; cursor: pointer; padding: 5px 12px; border-radius: 999px; font-weight: 500;
                       color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 7px;
                              border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
                              transform: translateY(-2px) rotate(45deg); }
.nav-group > summary:hover, .nav-group[open] > summary { background: var(--soft); color: var(--text); }
.nav-group.here > summary { color: var(--text); }
.nav-drop { position: absolute; z-index: 40; top: calc(100% + 6px); inset-inline-start: 0; min-width: 220px;
            display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--panel);
            border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px;
            box-shadow: 0 14px 34px -16px rgba(0,0,0,.45); }
.nav-drop a { padding: 7px 10px; border-radius: 8px; white-space: nowrap; }
@media (max-width: 640px) {
  .nav-group { position: static; }
  .nav-drop { inset-inline: 0; min-width: 0; top: auto; margin-top: 6px; }
}
.nav { gap: 4px; padding-bottom: 8px; font-size: 1.02rem; scrollbar-width: none; scroll-behavior: smooth; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; padding: 5px 12px; border-radius: 999px; font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--soft); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--text); color: var(--bg); border-bottom: 0; }
.nav-arrow { position: absolute; top: 0; bottom: 8px; width: 44px; border: 0; padding: 0; cursor: pointer; color: var(--text);
             font: inherit; font-size: 1.1rem; display: flex; align-items: center; }
.nav-arrow.prev { inset-inline-start: max(0px, calc((100% - var(--wide)) / 2)); justify-content: flex-start; padding-inline-start: 10px;
                  background: linear-gradient(to right, var(--panel) 55%, transparent); }
.nav-arrow.next { inset-inline-end: max(0px, calc((100% - var(--wide)) / 2)); justify-content: flex-end; padding-inline-end: 10px;
                  background: linear-gradient(to left, var(--panel) 55%, transparent); }
[dir=rtl] .nav-arrow.prev { background: linear-gradient(to left, var(--panel) 55%, transparent); }
[dir=rtl] .nav-arrow.next { background: linear-gradient(to right, var(--panel) 55%, transparent); }
.header-centered .head-row { flex-direction: row; }
.header-minimal .site-head { background: color-mix(in srgb, var(--bg) 84%, transparent); }
.ticker-frame { background: transparent; }
.progress { position: fixed; top: 0; inset-inline-start: 0; z-index: 60; height: 3px; width: 100%; transform-origin: 0 50%;
            transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--second)); pointer-events: none; }
[dir=rtl] .progress { transform-origin: 100% 50%; }

/* ---- headings of a page ---- */
.intro { margin-bottom: 18px; }
.intro h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 6px; }
.intro .sub { margin: 0; max-width: 75ch; }
.page-home .intro { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 16px; }
.page-home .intro h1 { font-size: 1.05rem; letter-spacing: -.01em; margin: 0; }
.page-home .intro .sub { font-size: .95rem; }

/* ---- rows of blocks ---- */
.blocks { display: flex; flex-wrap: wrap; gap: var(--g); align-items: stretch; }
.cell { flex: 1 1 100%; min-width: 0; container-type: inline-size; }
.cell .block, .cell .cta { margin: 0; }
@media (min-width: 980px) {
    .w-two_thirds { flex: 2 1 calc((100% - 2 * var(--g)) / 3 * 2 + var(--g) - 1px); }
    .w-half { flex: 1 1 calc((100% - var(--g)) / 2 - 1px); }
    .w-third { flex: 1 1 calc((100% - 2 * var(--g)) / 3 - 1px); }
}
@media (min-width: 640px) and (max-width: 979px) {
    .w-third { flex: 1 1 calc((100% - var(--g)) / 2 - 1px); }
}
.panel, .hero-lead, .story-card, .hero-side, .tile { background: var(--panel); border: 1px solid var(--line);
                                                      border-radius: var(--r); box-shadow: var(--shadow); }
.panel { padding: 20px 22px; }
.panel svg.chart { border: 0; background: transparent; border-radius: 0; }
.panel .chart, .panel figure.chart { margin: 0; }
.panel > h2:first-child, .panel > section > h2:first-child { margin-top: 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.block-head h2 { margin: 0; font-size: 1.15rem; line-height: 1.3; padding-inline-start: 14px; position: relative; }
.block-head h2::before { content: ''; position: absolute; inset-inline-start: 0; top: .18em; bottom: .18em; width: 4px;
                         border-radius: 2px; background: linear-gradient(var(--accent), var(--second)); }
.block-head h2 a { color: inherit; }
.cell:not(.panel) > .block > .block-head h2 { font-size: 1.35rem; }
.see-all { flex: none; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.see-all::after { content: '\2192'; display: inline-block; margin-inline-start: 5px; transition: transform .15s; }
[dir=rtl] .see-all::after { content: '\2190'; }
.see-all:hover { text-decoration: none; }
.see-all:hover::after { transform: translateX(3px); }
[dir=rtl] .see-all:hover::after { transform: translateX(-3px); }
.read-at { margin-top: 10px; font-size: .78rem; }

/* ---- a story's small parts ---- */
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
[dir=rtl] .kicker { letter-spacing: 0; font-size: .8rem; }
.kicker + time::before { content: '\00b7\00a0'; }
.summary, .card > p:not(.meta) { color: var(--muted); margin: 0; overflow: hidden; display: -webkit-box;
                                 -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.card-cover { overflow: hidden; margin: 0; border-radius: var(--radius, 10px); }
.card-cover img { border-radius: 0; border: 0; transition: transform .45s ease; }
.cover-blank { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; padding: 12px; text-align: center;
               font-weight: 700; font-size: 1.05rem; color: var(--text);
               background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 24%, var(--panel)),
                                           color-mix(in srgb, var(--second) 20%, var(--panel))); }
:root[data-theme="dark"] .card-cover img, :root[data-theme="dark"] .story-cover { filter: brightness(.9); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .card-cover img, :root:not([data-theme="light"]) .story-cover { filter: brightness(.9); }
    :root:not([data-theme="light"]) { --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 14px 32px -18px rgb(0 0 0 / .7); }
}
:root[data-theme="dark"] { --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 14px 32px -18px rgb(0 0 0 / .7); }

/* ---- top stories ---- */
.hero { display: grid; gap: var(--g); grid-template-columns: minmax(0, 1.9fr) minmax(0, .9fr) minmax(0, .9fr); }
.hero-lead, .story-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s; }
.hero-lead .card-cover, .story-card .card-cover { border-radius: 0; border-bottom: 1px solid var(--line); }
.hero-lead:hover .card-cover img, .story-card:hover .card-cover img, .card:hover .card-cover img,
.strip-lead:hover .card-cover img { transform: scale(1.035); }
.hero-text { flex: 1; display: flex; flex-direction: column; padding: 18px 24px 22px; }
.hero-text .meta, .hero-text .summary { flex: none; }
.hero-more { margin: auto 0 0; padding-top: 14px; }
.hero-more .more::after { content: '\2192'; display: inline-block; margin-inline-start: 6px; transition: transform .15s; }
[dir=rtl] .hero-more .more::after { content: '\2190'; }
.hero-more .more:hover { text-decoration: none; }
.hero-more .more:hover::after { transform: translateX(3px); }
[dir=rtl] .hero-more .more:hover::after { transform: translateX(-3px); }
.hero-lead h2 { font-size: clamp(1.45rem, 2.3vw, 2.15rem); line-height: 1.14; letter-spacing: -.028em; margin: 8px 0 10px; }
.hero-lead h2 a, .story-card h3 a, .strip-lead h3 a, .card h3 a, .rail-link, .mini li > a, .featured h2 a { color: var(--text); }
.hero-lead h2 a:hover, .story-card h3 a:hover, .strip-lead h3 a:hover, .card h3 a:hover, .rail-link:hover,
.mini li > a:hover, .featured h2 a:hover { color: var(--link); text-decoration: none; }
.hero-lead .summary { font-size: 1.02rem; }
.hero-second { display: grid; gap: var(--g); grid-template-rows: 1fr 1fr; }
.story-card .meta { padding: 12px 16px 0; }
.story-card h3 { padding: 0 16px; margin: 4px 0 6px; font-size: 1.02rem; line-height: 1.32; }
.story-card .summary { padding: 0 16px; margin-bottom: 16px; font-size: .9rem; -webkit-line-clamp: 2; line-clamp: 2; }
.story-card:hover, .hero-lead:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hero-side { padding: 18px 20px 8px; }
.rail-title { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; font-size: .85rem; letter-spacing: .08em;
              text-transform: uppercase; }
[dir=rtl] .rail-title { font-size: 1rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 0 var(--down);
            animation: live 2s ease-out infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.rail { list-style: none; margin: 0; padding: 0; }
.rail li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.rail li:last-child { border-bottom: 0; }
.rail-link { display: block; font-weight: 600; line-height: 1.35; font-size: .96rem; margin-top: 2px; }
@media (max-width: 1099px) {
    .hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .hero-side { grid-column: 1 / -1; }
    .rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 var(--g); }
}
@media (max-width: 719px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero-second { grid-template-rows: none; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

/* ---- the market tiles ---- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--g); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; min-height: 132px; padding: 16px 18px; }
.tile::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; opacity: .9;
                background: linear-gradient(90deg, var(--accent), var(--second)); }
.tile-label { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .82rem;
              font-weight: 600; color: var(--muted); }
.tile-label a { color: inherit; }
.tile-label span { font-weight: 500; font-size: .7rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.tile-value { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-size: 1.55rem; font-weight: 700;
              letter-spacing: -.02em; line-height: 1.25; }
.chg { font-size: .8rem; font-weight: 700; letter-spacing: 0; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.chg.up { color: var(--up); background: color-mix(in srgb, var(--up) 14%, transparent); }
.chg.down { color: var(--down); background: color-mix(in srgb, var(--down) 14%, transparent); }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
                  vector-effect: non-scaling-stroke; }
.spark.up polyline { stroke: var(--up); }
.spark.down polyline { stroke: var(--down); }
.tile .spark { width: 100%; height: 38px; margin-top: auto; }
.tile .gauge { flex: none; display: block; height: 8px; border-radius: 4px; margin-top: auto; margin-bottom: 6px; }
.tile .gauge i { top: -5px; height: 18px; width: 5px; border: 1px solid var(--panel); box-sizing: content-box; }
.split { display: block; width: 100%; height: 8px; border-radius: 4px; margin-top: auto; margin-bottom: 6px; overflow: hidden; }
[dir=rtl] .split { transform: scaleX(-1); }
.split .a { fill: var(--accent); }
.split .b { fill: var(--muted); opacity: .55; }
.split.breadth .a { fill: var(--up); }
.split.breadth .b { fill: var(--down); opacity: 1; }
.tile-note { margin: 0; font-size: .8rem; color: var(--muted); }
.tile-note.up { color: var(--up); font-weight: 700; }
.tile-note.down { color: var(--down); font-weight: 700; }
@media (max-width: 1099px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .tile-value { font-size: 1.3rem; }
}

/* ---- lists inside panels ---- */
.mini li { padding: 10px 0; }
.mini li > a { font-weight: 600; line-height: 1.38; }
.mini .meta { margin-top: 2px; font-size: .8rem; }
.ranked li { display: grid; grid-template-columns: 2.1em minmax(0, 1fr); gap: 0 8px; padding: 11px 0; }
.ranked li::before { grid-row: 1 / span 2; font-size: 1.7rem; line-height: 1.05; font-weight: 700; min-width: 0;
                                font-variant-numeric: tabular-nums; color: transparent;
                                background: linear-gradient(160deg, var(--accent), var(--second)); -webkit-background-clip: text;
                                background-clip: text; }
.ranked li .meta { grid-column: 2; padding: 0; }
.strip-lead { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 16px; align-items: start;
              padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.strip-lead h3 { margin: 4px 0 6px; font-size: 1.08rem; line-height: 1.3; }
.strip-lead .summary { font-size: .92rem; }
.strip-lead:last-child { border-bottom: 0; padding-bottom: 0; }
@container (max-width: 470px) { .strip-lead { grid-template-columns: minmax(0, 1fr); } }
.headlines li > a { font-weight: 600; }

/* ---- gainers and losers ---- */
.movers .two { gap: 6px 22px; }
.movers h3 { margin: 0; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
[dir=rtl] .movers h3 { letter-spacing: 0; font-size: .85rem; }
.movers .mini li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; }
.movers .mini li > a.coin { color: var(--text); }
.movers .gainers bdi { color: var(--up); font-weight: 600; }
.movers .losers bdi { color: var(--down); font-weight: 600; }
@container (max-width: 470px) { .movers .two { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
.tabs { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 6px; border: 1px solid var(--line); border-radius: 999px;
        background: var(--bg); }
.tabs button { font: inherit; font-size: .85rem; font-weight: 600; border: 0; background: transparent; color: var(--muted);
               padding: 5px 16px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .16); }
.tabbed .two { display: block; }
.tabbed .tab-pane h3 { display: none; }

/* ---- the top coins ---- */
table.data .num { text-align: end; }
table.coins { background: transparent; font-size: .93rem; }
table.coins th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px 10px; }
[dir=rtl] table.coins th { letter-spacing: 0; font-size: .8rem; }
table.coins td { padding: 9px 8px; vertical-align: middle; }
table.coins tbody tr { transition: background .12s; }
table.coins tbody tr:hover { background: var(--soft); }
table.coins tbody tr:last-child td { border-bottom: 0; }
table.coins .rank { width: 2.6em; text-align: start; color: var(--muted); }
table.coins .name { color: var(--muted); font-size: .85rem; margin-inline-start: 6px; }
table.coins td.flat { color: var(--muted); }
table.coins td.up, table.coins td.down { font-weight: 600; }
table.coins .line { width: 132px; text-align: end; }
table.coins .line .spark { display: inline-block; width: 120px; height: 30px; vertical-align: middle; }
@container (max-width: 620px) { table.coins .cap, table.coins .name { display: none; } }

/* ---- story cards ---- */
.cards { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: var(--g); }
.card { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: var(--r); box-shadow: var(--shadow);
        transition: transform .2s ease, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card .card-cover { border-radius: 0; border-bottom: 1px solid var(--line); }
.card .meta { padding: 12px 16px 0; }
.card h3 { padding: 0 16px; margin: 4px 0 6px; font-size: 1.03rem; line-height: 1.32; }
.card > p:not(.meta) { padding: 0 16px; margin: 0 0 16px; font-size: .92rem; }
.cards-lined .card, .cards-flat .card { box-shadow: none; }
.featured { border-radius: var(--r); box-shadow: var(--shadow); }
.market-strip { border-radius: var(--r); box-shadow: var(--shadow); }

/* ---- coin logos and small lines in lists (I31) ---- */
.mark { display: inline-block; width: 20px; height: 20px; border-radius: 50%; vertical-align: middle; margin-inline-end: 6px;
        flex: none; }
.mark-letter { display: inline-grid; place-items: center; background: var(--line); color: var(--muted); font-size: .68rem;
               font-weight: 700; line-height: 1; }
.movers .mini li .who { flex: 1 1 auto; min-width: 0; }
.movers .mini li .spark { display: inline-block; width: 64px; height: 20px; flex: none; }
table.data .line .spark { display: inline-block; width: 120px; height: 30px; vertical-align: middle; }
.ticker .mark { width: 19px; height: 19px; margin-inline-end: 4px; }
.ticker .mark-letter { font-size: .66rem; }
.ticker .spark { display: inline-block; width: 52px; height: 17px; vertical-align: middle; margin-inline-start: 6px; }

/* ---- the calendar (I26) ---- */
.cal li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.cal-time { min-width: 3.2em; font-variant-numeric: tabular-nums; color: var(--muted); }
.cal .chip { font-size: .72rem; padding: 1px 8px; }
.cal-economic .chip { border-color: color-mix(in srgb, var(--second) 50%, var(--line)); }
.cal-high .chip { border-color: var(--down); color: var(--down); }
.cal li .coin { font-weight: 700; }

/* ---- ads and sponsored stories (I29) ---- */
.sponsored-tag { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font-size: .7rem;
                 text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ad-block h3 { margin: 6px 0; font-size: 1.02rem; }

/* ---- live coverage (I23): the bar under the header and the ticker's first item ---- */
.breaking-bar { display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: color-mix(in srgb, var(--down) 14%, var(--panel));
                border-bottom: 1px solid var(--down); color: var(--text); font-weight: 600; overflow: hidden; }
.breaking-bar:hover { text-decoration: none; color: var(--link); }
.breaking-tag { background: var(--down); color: #fff; border-radius: 4px; padding: 1px 7px; font-size: .75rem;
                                text-transform: uppercase; letter-spacing: .04em; flex: none; }
.breaking-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---- the index, Algorizm 20 (I22) ---- */
.index-value { font-size: 2.2rem; font-weight: 700; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.index-value .meta { font-size: .85rem; font-weight: 400; }
.index-changes .up { color: var(--up); } .index-changes .down { color: var(--down); }

/* ---- strength vs BTC (I39) ---- */
.strength .st-leading { border-color: var(--up); color: var(--up); }
.strength .st-lagging { border-color: var(--down); color: var(--down); }
table.strength td.up { color: var(--up); } table.strength td.down { color: var(--down); }

/* ---- section boxes (I28): 2 to 4 a row, 1 on a phone ---- */
.boxes { display: grid; gap: var(--g); grid-template-columns: repeat(var(--per, 3), minmax(0, 1fr)); }
.boxes.per-2 { --per: 2; } .boxes.per-3 { --per: 3; } .boxes.per-4 { --per: 4; }
@media (max-width: 1099px) { .boxes.per-4 { --per: 2; } .boxes.per-3 { --per: 2; } }
@media (max-width: 719px) { .boxes { --per: 1; } .boxes.per-2, .boxes.per-3, .boxes.per-4 { --per: 1; } }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.box > h2:first-child { margin-top: 0; }
.box-lead { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.box-lead h3 { margin: 4px 0 0; font-size: 1.08rem; line-height: 1.3; }
.box-lead h3 a { color: var(--text); }
.box-lead h3 a:hover { color: var(--link); text-decoration: none; }

/* ---- every section as a tile, and the Learn tiles ---- */
.topic-grid, .term-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.topic-grid { display: flex; flex-wrap: wrap; }
.topic-grid li { flex: 1 1 200px; min-width: 0; }
.topic { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px;
         background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--text);
         transition: transform .2s ease, border-color .2s; }
.topic::after { content: ''; position: absolute; inset-inline-end: -28px; top: -28px; width: 84px; height: 84px; border-radius: 50%;
                background: linear-gradient(135deg, var(--accent), var(--second)); opacity: .12; transition: transform .3s ease, opacity .3s; }
.topic:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.topic:hover::after { transform: scale(1.5); opacity: .22; }
.topic b { font-size: 1.04rem; }
.topic-latest { margin-top: 8px; font-size: .88rem; color: var(--muted); overflow: hidden; display: -webkit-box;
                -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.term-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.term { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius, 10px);
        background: var(--bg); color: var(--text); transition: border-color .15s, background .15s; }
.term:hover { border-color: var(--accent); background: var(--soft); text-decoration: none; }
.term b { display: block; }
.term span { font-size: .84rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical;
             -webkit-line-clamp: 2; line-clamp: 2; }

/* ---- the sign-up band ---- */
.cta { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
       gap: 18px 28px; margin-top: 28px; padding: 34px 40px; text-align: start; border: 0; border-radius: calc(var(--r) + 4px);
       color: #fff;
       background: radial-gradient(520px 260px at 92% 0%, rgb(255 255 255 / .2), transparent 62%),
                   linear-gradient(120deg, color-mix(in srgb, var(--accent) 45%, #020617),
                                           color-mix(in srgb, var(--accent) 78%, #020617) 52%, #4338ca); }
[dir=rtl] .cta { background: radial-gradient(520px 260px at 8% 0%, rgb(255 255 255 / .2), transparent 62%),
                             linear-gradient(240deg, color-mix(in srgb, var(--accent) 45%, #020617),
                                                     color-mix(in srgb, var(--accent) 78%, #020617) 52%, #4338ca); }
.cta-text { flex: 1 1 320px; min-width: 0; }
.cta h2 { margin: 0 0 6px; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.2; }
.cta p { margin: 0; max-width: 62ch; color: rgb(255 255 255 / .86); }
.cta .button { flex: none; background: #fff; color: #0f172a; padding: 12px 24px; border-radius: 999px; }
.cta .button:hover { box-shadow: 0 10px 24px -10px rgb(0 0 0 / .6); }

/* ---- other pages inside the wide frame ---- */
.story { border-radius: var(--r); box-shadow: var(--shadow); padding: 28px 32px; }
.story h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -.025em; }
.related { border-radius: var(--r); }
.coin-grid li { border-radius: var(--radius, 10px); }
.pager a, .pager span { border-radius: 999px; padding: 3px 12px; }
.chip { transition: border-color .15s; }
a.chip:hover { border-color: var(--accent); text-decoration: none; }

/* ---- the footer ---- */
.site-foot { margin-top: 24px; padding: 44px 0 28px; font-size: .9rem; background: color-mix(in srgb, var(--panel) 70%, transparent); }
.foot-grid { display: grid; gap: 28px 40px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2.2fr) minmax(0, .9fr) minmax(0, .9fr); }
.foot-brand p { max-width: 34ch; margin: 12px 0; }
.foot-col h2 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
[dir=rtl] .foot-col h2 { letter-spacing: 0; font-size: .95rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-wide ul { columns: 3; column-gap: 24px; }
.foot-col li { padding: 4px 0; break-inside: avoid; }
.foot-col a, .foot-links a { margin: 0; color: var(--muted); }
.foot-col a:hover { color: var(--link); text-decoration: none; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 30px; padding-top: 16px;
             border-top: 1px solid var(--line); font-size: .8rem; }
.foot-base p { margin: 0; }
.to-top { position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
          border: 1px solid var(--line); background: var(--panel); color: var(--text); box-shadow: var(--shadow); cursor: pointer;
          display: flex; align-items: center; justify-content: center; transition: transform .15s, border-color .15s; }
.to-top:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.to-top svg { width: 20px; height: 20px; }

/* ---- blocks come in as they are reached (only when the script runs and the reader has not asked for less motion) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
    .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .live-dot { animation: none; }
    .card, .topic, .hero-lead, .story-card, .card-cover img, .button, .to-top { transition: none; }
}

/* ---- narrow screens ---- */
@media (max-width: 899px) {
    .search-link span { display: none; }
    .search-link { min-width: 0; width: 36px; padding: 0; justify-content: center; }
    .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .foot-brand, .foot-wide { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
    :root { --g: 14px; }
    .wrap { padding: 0 14px; }
    .panel { padding: 16px; }
    .head-cta { display: none; }
    .brand { font-size: 1.12rem; }
    .cta { padding: 24px 20px; }
    .story { padding: 18px 16px; }
    .hero-text { padding: 14px 16px 18px; }
    .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .foot-wide ul { columns: 2; }
    table.coins .line { display: none; }
}

/* ---- the readers' polish (owner, 2026-11-16: "many pages have very bad css ... make the site look much better"):
   three widths only - wide (home, sections, lists), data (every table and chart page, 1100px, was 880px and cramped),
   reading (a story, Learn and the about pages, 860px); every data table in a panel like the home page's; a story's
   own lists without a box inside the box; the empty pages; on a phone the text pages full width and a shadow at
   the edge of a table that scrolls sideways. Colours from the theme's variables only. ---- */
main.wrap { max-width: 1100px; }
main.page-home, main.page-section, main.page-coins, main.page-archive, main.page-exchanges, main.page-exchange,
main.page-own, main.page-latest { max-width: var(--wide); }
main.wrap:has(> article.story), main.page-search { max-width: 860px; }
.crumbs { margin: 0 0 12px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--link); text-decoration: none; }
.intro { margin-bottom: 22px; }
.intro .sub { font-size: 1.02rem; }
main > p.meta, main > p.note { margin: 10px 0; }

/* data tables: a panel, the head as the home page's top coins, a row lit under the pointer */
.table-wrap { margin: 16px 0 20px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r);
              box-shadow: var(--shadow);
              background: linear-gradient(to right, var(--panel) 30%, transparent) left / 40px 100% no-repeat local,
                          linear-gradient(to left, var(--panel) 30%, transparent) right / 40px 100% no-repeat local,
                          radial-gradient(farthest-side at 0 50%, rgb(0 0 0 / .28), transparent) left / 12px 100% no-repeat scroll,
                          radial-gradient(farthest-side at 100% 50%, rgb(0 0 0 / .28), transparent) right / 12px 100% no-repeat scroll,
                          var(--panel); }
.panel .table-wrap, .box .table-wrap { margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.table-wrap table.data { background: transparent; }
table.data th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: 12px 10px 10px; }
[dir=rtl] table.data th { letter-spacing: 0; font-size: .8rem; }
table.data td { padding: 10px; vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--soft); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td .meta { font-size: .8rem; }
table.data td.up, table.data td.down { font-weight: 600; }

/* lists of lines on their own (the calendar's days, the latest stories, search results): in a panel */
.cal-day h2, .block > h2 { font-size: 1.1rem; margin: 26px 0 10px; }
.cal-day .cal, .latest-list, .results { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
                                        box-shadow: var(--shadow); padding: 4px 20px; }
.cal li { padding: 11px 0; }

/* a page with nothing in it yet */
.empty { margin: 16px 0; padding: 32px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r);
         background: color-mix(in srgb, var(--panel) 55%, transparent); }

/* a story and a text page: the lists inside it as parts of it, not boxes in a box; easier lines to read */
.story { margin-top: 4px; }
.story > p:not(.meta), .story section p, .story .lines li { font-size: 1.04rem; line-height: 1.72; }
.story .lead { font-size: 1.15rem; line-height: 1.6; color: var(--muted); }
.story h2 { margin-top: 30px; }
.story .related { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none;
                  padding: 6px 0 0; margin-top: 30px; }
.story .related h2 { margin: 16px 0 6px; font-size: 1.1rem; }
.story .related .mini li > a { font-weight: 600; }
.story .chart, .story figure.chart { margin: 22px 0; }
.story .cta { margin: 30px 0 10px; }
.story .risk { margin-top: 26px; }

@media (max-width: 599px) {
    main.wrap { padding-top: 18px; }
    .story { background: transparent; border: 0; box-shadow: none; padding: 0; }
    .story h1 { font-size: 1.55rem; }
    .table-wrap { margin-inline: -14px; padding: 2px 4px; border-radius: 0; border-inline: 0; }
    table.data th, table.data td { padding: 9px 7px; }
    .cal-day .cal, .latest-list, .results { padding: 2px 14px; }
}

/* ---- the daily magazine (owner, 2026-11-16: "a lot of words and look boring"; templates/magazine.html): a contents
   bar, the day in numbers, every section a card with its own icon and colour (--part), data lines as rows with the
   coin's logo and up / down in colour, the day's stories as link cards, the news as cards ---- */
.mag-sec, .mag-toc a { --part: var(--accent); }
.mag-market { --part: #3b82f6; } .mag-movers { --part: #22c55e; } .mag-signals { --part: #8b5cf6; }
.mag-futures { --part: #f97316; } .mag-book { --part: #14b8a6; } .mag-listings { --part: #eab308; }
.mag-news { --part: #ec4899; } .mag-trending { --part: #ef4444; }
.mag-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 8px; }
.mag-toc-title { width: 100%; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
                 color: var(--muted); }
[dir=rtl] .mag-toc-title { letter-spacing: 0; font-size: .85rem; }
.mag-toc a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 999px;
             border: 1px solid color-mix(in srgb, var(--part) 35%, var(--line)); color: var(--text); font-size: .88rem;
             font-weight: 600; background: color-mix(in srgb, var(--part) 8%, transparent); transition: border-color .15s; }
[dir=rtl] .mag-toc a { padding: 5px 6px 5px 12px; }
.mag-toc a:hover { border-color: var(--part); text-decoration: none; }
.mag-toc .mag-icon { width: 24px; height: 24px; }
.mag-toc .mag-icon svg { width: 14px; height: 14px; }
.mag-numbers h2 { font-size: 1.1rem; margin: 26px 0 12px; }
.mag-numbers .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mag-numbers .tile { min-height: 0; padding: 14px 16px; box-shadow: none; }
.mag-numbers .tile-value { font-size: 1.45rem; }
.tile-value.up { color: var(--up); } .tile-value.down { color: var(--down); }
.mag-icon { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
            color: var(--part); background: color-mix(in srgb, var(--part) 16%, transparent); }
.mag-icon svg { width: 20px; height: 20px; }
.mag-sec { position: relative; margin: 22px 0; padding: 18px 22px 16px; border: 1px solid var(--line); border-radius: var(--r);
           background: color-mix(in srgb, var(--part) 4%, var(--bg)); overflow: hidden; }
.mag-sec::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--part); }
.mag-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.story .mag-head h2 { margin: 0; font-size: 1.2rem; }
.mag-rows { list-style: none; margin: 0; padding: 0; }
.mag-rows li { display: flex; align-items: baseline; gap: 2px 8px; padding: 9px 0; border-bottom: 1px solid var(--line);
               line-height: 1.5; font-size: .98rem; }
.mag-rows li:last-child { border-bottom: 0; }
.mag-rows li > bdi, .mag-rows .mag-text { min-width: 0; }
.mag-rows .mark { align-self: center; }
.mag-rows .coin { font-weight: 700; }
.mag-rows li.up .mag-text, .mag-rows li.up > bdi { color: color-mix(in srgb, var(--up) 80%, var(--text)); }
.mag-rows li.down .mag-text, .mag-rows li.down > bdi { color: color-mix(in srgb, var(--down) 80%, var(--text)); }
.mag-rows li.up .coin, .mag-rows li.down .coin { color: var(--link); }
.mag-dot { flex: none; align-self: center; width: 7px; height: 7px; margin: 0 6px 0 7px; border-radius: 50%; background: var(--part); }
.mag-reads, .mag-out { list-style: none; margin: 12px 0 2px; padding: 0; display: grid; gap: 10px;
                        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mag-reads a, .mag-out a { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; height: 100%;
                            padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius, 10px);
                            background: var(--panel); color: var(--text); font-weight: 600; font-size: .92rem; line-height: 1.4;
                            transition: border-color .15s, transform .15s; }
.mag-reads a::after { content: '\2192'; flex: none; color: var(--part); }
[dir=rtl] .mag-reads a::after { content: '\2190'; }
.mag-out a > span { flex: none; color: var(--part); }
.mag-reads a:hover, .mag-out a:hover { border-color: var(--part); transform: translateY(-2px); text-decoration: none; }
.mag-out { grid-template-columns: minmax(0, 1fr); }
.mag-chart { margin: 4px 0 12px; }
.mag-chart svg.chart { background: var(--panel); }
.mag-split { margin: 2px 0 10px; }
.mag-split-bar { display: block; height: 12px; border-radius: 6px; overflow: hidden; background: var(--up); }
.mag-split-bar i { display: block; height: 100%; background: var(--down); }
.mag-split .meta { margin-top: 6px; }
.mag-split-bar .w-0 { width: 0%; } .mag-split-bar .w-5 { width: 5%; } .mag-split-bar .w-10 { width: 10%; } .mag-split-bar .w-15 { width: 15%; } .mag-split-bar .w-20 { width: 20%; } .mag-split-bar .w-25 { width: 25%; } .mag-split-bar .w-30 { width: 30%; } .mag-split-bar .w-35 { width: 35%; } .mag-split-bar .w-40 { width: 40%; } .mag-split-bar .w-45 { width: 45%; } .mag-split-bar .w-50 { width: 50%; } .mag-split-bar .w-55 { width: 55%; } .mag-split-bar .w-60 { width: 60%; } .mag-split-bar .w-65 { width: 65%; } .mag-split-bar .w-70 { width: 70%; } .mag-split-bar .w-75 { width: 75%; } .mag-split-bar .w-80 { width: 80%; } .mag-split-bar .w-85 { width: 85%; } .mag-split-bar .w-90 { width: 90%; } .mag-split-bar .w-95 { width: 95%; } .mag-split-bar .w-100 { width: 100%; }
@media (max-width: 599px) {
    .mag-numbers .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mag-sec { padding: 14px 14px 12px; margin: 16px 0; }
    .mag-reads { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .mag-reads a, .mag-out a { transition: none; } }

/* Charts are drawn left to right in both languages (their own style attribute is not allowed by the site's headers,
   so the rule is here): "-2.0%" stays "-2.0%" on the Arabic pages. */
svg.chart, svg.chart text { direction: ltr; }

/* ---- the installable app (insights/in_app.py, static/app.js) ----
   "Get the app" (shown by app.js only where this browser can install the site); in the installed app only: the back
   arrow before the logo, the tab bar at the bottom at phone width, pull down to refresh. The iPhone's install guide
   and the offline page. */
.app-install[hidden], .app-back[hidden] { display: none; }
.app-back, .app-tabs { display: none; }
html.app-installed .app-back { display: inline-flex; }
@media (display-mode: standalone) { .app-back { display: inline-flex; } }
.app-back { align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; margin-inline-start: -8px;
            color: var(--text); border-radius: 999px; }
.app-back:hover { color: var(--accent); background: color-mix(in srgb, var(--panel) 70%, transparent); text-decoration: none; }
.app-back svg { width: 24px; height: 24px; }
[dir="rtl"] .app-back svg { transform: scaleX(-1); }
@media (max-width: 899px) {
    .app-install span { display: none; }
    .app-install { width: 36px; padding: 0; justify-content: center; }
}
html.app-installed, html.app-installed body { overscroll-behavior-y: none; }

/* a phone's header is full: "Get the app" is the bar at the bottom there (closed by the reader for 30 days), and below
   400 px the light / dark button leaves the header (it is also in Settings) */
.app-banner[hidden] { display: none; }
.app-banner { position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 55;
              display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border: 1px solid var(--line);
              border-radius: 16px; background: var(--panel); box-shadow: 0 12px 30px -12px rgb(0 0 0 / .5); }
.app-banner img { flex: none; border-radius: 10px; }
.app-banner p { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; margin: 0; font-size: .85rem; line-height: 1.3; }
.app-banner p span { color: var(--muted); }
.app-banner .button { flex: none; padding: 8px 14px; }
.app-banner .button, .app-guide .button, .app-offline .button { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.app-banner-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
                    padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.app-banner-close:hover { color: var(--text); }
.app-banner-close svg { width: 18px; height: 18px; }
@media (min-width: 600px) { .app-banner { display: none; } }
@media (max-width: 599px) { .tool.app-install { display: none; } }
.lang .lang-short { display: none; }
@media (max-width: 399px) {
    .theme-toggle { display: none; }
    .head-row { gap: 8px; }
    .head-tools { gap: 6px; }
    .lang { padding: 0 8px; }
    .brand { font-size: 1rem; gap: 8px; }
    .lang { min-width: 36px; justify-content: center; }
    .lang .lang-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .lang .lang-short { display: inline; }
}

@media (max-width: 899px) {
    html.app-installed .app-tabs { display: flex; }
    html.app-installed .search-link { display: none; }          /* Search is a tab */
    html.app-installed body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    html.app-installed .to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 899px) and (display-mode: standalone) {
    .app-tabs { display: flex; }
    .search-link { display: none; }
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
.app-tabs { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; justify-content: space-around;
            padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
            background: color-mix(in srgb, var(--panel) 92%, transparent);
            -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); }
.app-tabs a { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
              padding: 4px 2px; color: var(--muted); font-size: .72rem; line-height: 1.1; text-align: center; }
.app-tabs a:hover { text-decoration: none; color: var(--text); }
.app-tabs a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.app-tabs svg { width: 22px; height: 22px; }
.app-tabs span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-pull { position: fixed; top: -44px; left: 50%; z-index: 70; display: flex; align-items: center; justify-content: center;
            width: 40px; height: 40px; margin-left: -20px; border: 1px solid var(--line); border-radius: 50%;
            background: var(--panel); color: var(--muted); box-shadow: 0 4px 14px rgb(0 0 0 / .25); opacity: 0;
            transform: translateY(var(--pull, 0px)) rotate(var(--pull-turn, 0deg)); pointer-events: none; }
.app-pull.is-shown { opacity: 1; }
.app-pull:not(.is-shown) { transition: transform .2s ease, opacity .2s ease; }
.app-pull.is-ready, .app-pull.is-spinning { color: var(--accent); }
.app-pull svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-pull.is-spinning svg { animation: app-pull-spin .8s linear infinite; }
@keyframes app-pull-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .app-pull.is-spinning svg { animation-duration: 2s; } }

.app-guide { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: 16px;
             background: var(--panel); color: var(--text); }
.app-guide::backdrop { background: rgb(0 0 0 / .55); }
.app-guide h2 { margin: 0 0 6px; font-size: 1.2rem; }
.app-guide ol { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.app-guide li { display: flex; gap: 12px; align-items: flex-start; }
.app-guide li > svg, .app-guide-add { flex: none; width: 36px; height: 36px; padding: 6px; border-radius: 10px;
                                      border: 1px solid var(--line); color: var(--accent); }
.app-guide-add { display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: .75rem; font-weight: 700; }
.app-guide li div { display: grid; gap: 2px; }
.app-guide li span { color: var(--muted); font-size: .9rem; }

.app-offline { max-width: 640px; padding-top: 48px; padding-bottom: 48px; text-align: center; }
.app-offline-mark { border-radius: 16px; }
.app-offline-kept { margin-top: 28px; text-align: start; }
.app-offline-kept ul { padding-inline-start: 20px; }
.app-offline-kept li { margin: 6px 0; }

/* the market regime now (owner, 2026-11-18): a box on /regime/ with its rule in one line */
.regime-now { border: 1px solid var(--line); border-inline-start: 4px solid var(--muted); border-radius: 14px;
              padding: 16px 18px; background: var(--panel); }
.regime-now p { margin: 4px 0; }
.regime-now .regime-label { font-size: 1.6rem; font-weight: 700; text-transform: capitalize; }
.regime-up { border-inline-start-color: var(--up); } .regime-up .regime-label { color: var(--up); }
.regime-down, .regime-panic { border-inline-start-color: var(--down); }
.regime-down .regime-label, .regime-panic .regime-label { color: var(--down); }
.top-setups .chip.up { color: var(--up); } .top-setups .chip.down { color: var(--down); }
.tabs-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tabs-row .chip { text-decoration: none; }
.tabs-row .chip.on { background: var(--text); color: var(--bg); }
.chip.up { color: var(--up); } .chip.down { color: var(--down); }
td.up { color: var(--up); } td.down { color: var(--down); }
