/* Cyclesolved v2: the design layer (2026-11-02, release/v2). Loaded after style.css on every page
   (_head_seo.html), so it restyles the old classes in place and adds the v2 components below.
   Direction (Corey, 2026-11-02): sharp, sleek, few words; anything that is not essential sits behind an (i).
   Tokens are the design board's (docs/DESIGN_BOARD_STATE_2026_10.md, section 5). No external fonts: the
   system UI face (SF on Apple, Segoe on Windows) and its monospace for figures. */

/* The hidden attribute always wins: a component that sets display (e.g. .sg-card flex) would otherwise
   keep "hidden" elements on screen (the Signals filters, 2026-11-03). */
[hidden] { display: none !important; }


:root {
    --bg: #0A0D13;
    --nav: #0C1017;
    --surface: #12161F;
    --raised: #1A1F2B;
    --line: #1E2430;
    --line-soft: #171C26;
    --line-strong: #2A3141;
    --text: #ECEEF3;
    --dim: #98A2B3;
    --muted: #68717F;
    --blue: #3B82F6;
    --blue-soft: rgba(59, 130, 246, .14);
    --teal: #2DD4BF;
    --amber: #FBBF24;
    --clay: #FB7185;
    --green: #34D399;
    --up: #34D399;
    --down: #FB7185;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -18px rgba(0, 0, 0, .7);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------------------------------------------------------------- base */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}
body::before {               /* a faint glow at the top of every page */
    content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; pointer-events: none; z-index: -1;
    background: radial-gradient(900px 300px at 50% -120px, rgba(59, 130, 246, .13), transparent 70%);
}
:where(a, a:visited) { color: #8AB4FF; text-decoration: none; }
:where(a:hover) { color: #B9D2FF; }
.container { max-width: 1200px; padding: 0 20px; }
.muted { color: var(--dim); }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.pos { color: var(--up) !important; }
.neg { color: var(--down) !important; }
::selection { background: rgba(59, 130, 246, .35); }
h1, h2, h3 { letter-spacing: -.02em; }
hr, .guide-divider { border: 0; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- header + nav */
body > header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 13, 19, .82);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line-soft);
    padding: 0; margin-bottom: 28px;
}
.v2-nav { display: flex; align-items: center; gap: 22px; height: 60px; }
.v2-brand { display: flex; align-items: center; gap: 9px; color: var(--text) !important; font-weight: 700;
            font-size: 17px; letter-spacing: -.02em; flex: none; }
.v2-brand img { width: 26px; height: 26px; border-radius: 7px; }
.v2-brand b { font-weight: 700; color: #7FB0FF; }
.v2-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.v2-links > a, .v2-more > summary {
    color: var(--dim) !important; font-size: 14px; font-weight: 500; padding: 7px 11px; border-radius: 8px;
    white-space: nowrap; cursor: pointer; list-style: none; transition: color .15s, background .15s;
}
.v2-more > summary::-webkit-details-marker { display: none; }
.v2-links > a:hover, .v2-more > summary:hover { color: var(--text) !important; background: var(--raised); }
.v2-links > a.active, .v2-more.active > summary { color: var(--text) !important; background: var(--raised); }
.v2-links .v2-new { font-size: 10px; font-weight: 700; color: var(--teal); margin-left: 4px; vertical-align: 1px;
                    letter-spacing: .04em; }
.v2-more { position: relative; }
.v2-menu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow);
    display: grid; gap: 1px;
}
.v2-menu a { display: grid; padding: 9px 11px; border-radius: 8px; color: var(--text) !important; font-size: 14px; }
.v2-menu a small { color: var(--muted); font-size: 12px; }
.v2-menu a:hover { background: var(--raised); }
.v2-right { display: flex; align-items: center; gap: 8px; flex: none; }
.v2-btn, .v2-btn:visited {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 15px;
    border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--raised);
    border: 1px solid var(--line-strong); cursor: pointer; white-space: nowrap; transition: transform .1s, background .15s;
    font-family: inherit;
}
.v2-btn:hover { background: #222838; color: #fff; }
.v2-btn:active { transform: translateY(1px); }
.v2-btn-primary, .v2-btn-primary:visited {
    color: #fff; border-color: transparent;
    background: linear-gradient(180deg, #4C8DF8, #2F6FE4);
    box-shadow: 0 8px 22px -10px rgba(59, 130, 246, .8), 0 1px 0 rgba(255, 255, 255, .18) inset;
}
.v2-btn-primary:hover { background: linear-gradient(180deg, #5B98FA, #3779EC); color: #fff; }
.v2-btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.v2-btn-ghost { background: transparent; border-color: transparent; color: var(--dim); }
.v2-account { position: relative; }
.v2-account > summary { list-style: none; }
.v2-account > summary::-webkit-details-marker { display: none; }
.v2-account .v2-menu { left: auto; right: 0; }
.v2-account-email { color: var(--muted); font-size: 12px; padding: 8px 11px 6px; overflow: hidden; text-overflow: ellipsis; }
.v2-account form button { width: 100%; text-align: left; background: none; border: 0; color: var(--clay);
                          font: inherit; font-size: 14px; padding: 9px 11px; border-radius: 8px; cursor: pointer; }
.v2-account form button:hover { background: var(--raised); }
.v2-burger { display: none; }

@media (max-width: 980px) {
    .v2-links > a.v2-hide-md { display: none; }
}
@media (max-width: 760px) {
    .v2-nav { gap: 10px; }
    .v2-links { display: none; }
    .v2-burger { display: block; }
    .v2-burger > summary { list-style: none; }
    .v2-burger > summary::-webkit-details-marker { display: none; }
    .v2-burger .v2-menu { left: auto; right: 0; min-width: 250px; }
    .v2-hide-sm { display: none !important; }
}

/* ---------------------------------------------------------------- page heads */
.v2-head { margin: 8px 0 26px; }
.v2-kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7FB0FF; margin-bottom: 8px; }
.v2-head h1, .guide-h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 750; line-height: 1.08; letter-spacing: -.03em; color: #fff; }
.v2-head p.v2-lead { color: var(--dim); font-size: 16px; margin-top: 10px; max-width: 640px; }
.v2-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.guide-h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.v2-h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: #fff; display: flex; align-items: center; gap: 8px; }
.v2-section { margin: 34px 0; }
.v2-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.v2-section-head a { font-size: 14px; font-weight: 600; }

/* ---------------------------------------------------------------- cards + grids */
.v2-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0)) , var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.v2-card-tight { padding: 14px; }
.v2-grid { display: grid; gap: 14px; }
.v2-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .v2-grid-3, .v2-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .v2-grid-2, .v2-grid-3, .v2-grid-4 { grid-template-columns: 1fr; } }
.v2-kpi-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
                display: flex; align-items: center; gap: 6px; }
.v2-kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; color: #fff; }
.v2-kpi-sub { color: var(--dim); font-size: 13px; margin-top: 2px; }

/* old cards, lifted to the same surface */
.stat, .pf-stat, .auth-card, .arc-card, .market-context, .pf-section, .guide-card {
    background: var(--surface); border-color: var(--line) !important; border-radius: var(--radius);
}
.stat-label, .pf-stat-label { color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.stat-value, .pf-stat-value { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- chips + pills */
.v2-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
           font-size: 12.5px; font-weight: 600; background: var(--raised); color: var(--dim); border: 1px solid var(--line-strong); }
.v2-chip-up { color: var(--up); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .25); }
.v2-chip-down { color: var(--down); background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .25); }
.v2-chip-blue { color: #8AB4FF; background: var(--blue-soft); border-color: rgba(59, 130, 246, .3); }
.v2-chip-amber { color: var(--amber); background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .25); }
.v2-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
               animation: v2-pulse 1.8s infinite; display: inline-block; }
@keyframes v2-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* Quality chip: colour by fifth of today's board (Corey's go, 2026-11-02: Quality fifths, top = teal) */
.v2-q { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 26px; padding: 0 8px;
        border-radius: 8px; font-weight: 750; font-size: 13.5px; font-variant-numeric: tabular-nums; color: #0A0D13; }
.v2-q-5 { background: var(--teal); }
.v2-q-4 { background: var(--green); }
.v2-q-3 { background: var(--amber); }
.v2-q-2 { background: #FB923C; }
.v2-q-1 { background: var(--clay); }
.v2-q-0 { background: var(--raised); color: var(--muted); }

/* old score badges keep their band colours, with the new shape */
.score-badge { border-radius: 8px; font-weight: 750; }

/* ---------------------------------------------------------------- tables */
.v2-table, table.coin-table, table.coin-index, table.metric-table, .pf-table {
    width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px;
}
.v2-table th, table.coin-table th, table.coin-index th, table.metric-table th {
    color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
    padding: 10px 12px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; white-space: nowrap;
}
.v2-table th.num, table.coin-table th.num, table.coin-index th.num { text-align: right; }
.v2-table td, table.coin-table td, table.coin-index td, table.metric-table td {
    padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
.v2-table tbody tr, table.coin-table tbody tr, table.coin-index tbody tr { transition: background .12s; }
.v2-table tbody tr:hover, table.coin-table tbody tr:hover, table.coin-index tbody tr:hover { background: rgba(255, 255, 255, .025); }
.v2-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.v2-table-wrap table th:first-child, .v2-table-wrap table td:first-child { padding-left: 16px; }
.v2-table-wrap table th:last-child, .v2-table-wrap table td:last-child { padding-right: 16px; }
.v2-table-wrap tbody tr:last-child td { border-bottom: 0; }
.coin-symbol { color: var(--muted); font-size: 12px; font-weight: 600; margin-left: 4px; }
.v2-coin { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; font-weight: 600; }
.v2-coin img { width: 24px; height: 24px; border-radius: 50%; flex: none; }

/* ---------------------------------------------------------------- old buttons, restyled */
.cta-button, .plan-cta-primary, a.cta-button, button.cta-button {
    background: linear-gradient(180deg, #4C8DF8, #2F6FE4) !important; color: #fff !important; border: 0 !important;
    border-radius: 11px !important; font-weight: 650; box-shadow: 0 8px 22px -10px rgba(59, 130, 246, .8);
}
.btn-secondary, .plan-cta-secondary, .scanner-top-btn {
    background: var(--raised) !important; color: var(--text) !important; border: 1px solid var(--line-strong) !important;
    border-radius: 10px !important;
}
.scanner-top-btn.active { background: var(--blue-soft) !important; border-color: rgba(59, 130, 246, .45) !important; color: #CFE0FF !important; }
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea {
    background: var(--nav); border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(59, 130, 246, .5); outline-offset: 1px; }

/* ---------------------------------------------------------------- the (i) popover */
.i-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none;
    border-radius: 50%; border: 1px solid var(--line-strong); background: var(--raised); color: var(--dim);
    font: 700 11px/1 Georgia, "Times New Roman", serif; font-style: italic; cursor: pointer; padding: 0;
    vertical-align: middle; transition: color .15s, border-color .15s, background .15s;
}
.i-btn:hover, .i-btn:focus-visible { color: #fff; border-color: var(--blue); background: var(--blue-soft); }
.i-pop {
    margin: auto; max-width: min(460px, calc(100vw - 32px)); max-height: min(70vh, 640px); overflow: auto;
    background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 16px;
    padding: 22px 22px 18px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); font-size: 14.5px; line-height: 1.6;
}
.i-pop::backdrop { background: rgba(5, 7, 11, .6); backdrop-filter: blur(3px); }
.i-pop h4 { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: #fff; letter-spacing: -.01em; }
.i-pop p { color: #C7CEDA; margin: 0 0 10px; }
.i-pop p:last-child { margin-bottom: 0; }
.i-pop ul { margin: 0 0 10px 18px; color: #C7CEDA; }
.i-pop .i-close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 8px; border: 0;
                  background: var(--raised); color: var(--dim); cursor: pointer; font-size: 16px; line-height: 1; }
.i-pop .i-close:hover { color: #fff; }

/* ---------------------------------------------------------------- locks + empty states */
.v2-lock { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.v2-lock svg { width: 13px; height: 13px; }
.v2-empty { text-align: center; padding: 34px 18px; color: var(--dim); }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 64px; padding: 30px 0 40px; background: transparent; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.site-footer-links a { color: var(--muted) !important; }
.site-footer-links a:hover { color: var(--text) !important; }
.site-footer-sep { display: none; }

/* ---------------------------------------------------------------- live price flash */
@keyframes live-up { from { background: rgba(52, 211, 153, .26); } to { background: transparent; } }
@keyframes live-down { from { background: rgba(251, 113, 133, .26); } to { background: transparent; } }
.live-up { animation: live-up .9s ease-out; border-radius: 4px; }
.live-down { animation: live-down .9s ease-out; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .live-up, .live-down, .v2-live-dot { animation: none; } }

/* Any <header> inside a page (page heads, card heads) is not the site header: the old stylesheet's bare
   `header` rule (bar background, border, padding) must not reach it. */
main header, article header, section header { background: transparent; border-bottom: 0; padding: 0; margin-bottom: 0; position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
