/* ==========================================================================
   Crypto Daily Watch – dashboard design system
   Soft grey canvas, white rounded cards, green accent, Inter.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --outer: #ebebeb;
  --frame: #ffffff;
  --panel: #f5f5f5;
  --card: #ffffff;
  --tile: #f5f5f5;
  --tile-2: #ececec;
  --line: #e8e8e8;

  --ink: #111413;
  --ink-2: #464e4a;
  --ink-3: #66706b;

  --green: #087d45;
  --green-2: #3fb67e;
  --green-ink: #08703f;
  --green-soft: #e3f3ea;
  --red: #c8352a;
  --red-soft: #fdeceb;
  --black: #111413;

  --shadow: 0 8px 28px -10px rgba(17, 20, 19, .22);

  /* heatmap buckets */
  --hu3-bg: #087d45; --hu3-fg: #ffffff;
  --hu2-bg: #5bc08c; --hu2-fg: #052b17;
  --hu1-bg: #cdeedc; --hu1-fg: #10281b;
  --hf-bg:  #e9ebea; --hf-fg:  #2b302e;
  --hd1-bg: #fbd9d5; --hd1-fg: #3a110c;
  --hd2-bg: #ee8e83; --hd2-fg: #2e0a06;
  --hd3-bg: #c8352a; --hd3-fg: #ffffff;

  /* fear & greed zones (fills) and text-safe variants */
  --z-xfear: #c8352a; --z-fear: #e8803a; --z-neutral: #d3b94a; --z-greed: #4db37f; --z-xgreed: #0a8449;
  --zt-xfear: #b02a20; --zt-fear: #a84a14; --zt-neutral: #75660f; --zt-greed: #2b7240; --zt-xgreed: #0a6a42;

  --r-card: 20px;
  --r-tile: 14px;
  --gap: 16px;
}

:root[data-theme="dark"] {
  --outer: #090b0a;
  --frame: #121513;
  --panel: #0d100f;
  --card: #171b19;
  --tile: #1e2321;
  --tile-2: #262c29;
  --line: #262c29;

  --ink: #edf2ef;
  --ink-2: #b4bdb8;
  --ink-3: #8a948f;

  --green: #34d08a;
  --green-2: #1f8f5c;
  --green-ink: #4be09b;
  --green-soft: #12301f;
  --red: #ff7a6c;
  --red-soft: #3a1815;
  --black: #edf2ef;

  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .8);

  --hu3-bg: #1fb877; --hu3-fg: #03150b;
  --hu2-bg: #1f7a54; --hu2-fg: #eafaf1;
  --hu1-bg: #1b4a36; --hu1-fg: #d6f1e3;
  --hf-bg:  #2a2f2c; --hf-fg:  #d8ddd9;
  --hd1-bg: #51251f; --hd1-fg: #fbdcd7;
  --hd2-bg: #a23327; --hd2-fg: #fff1ee;
  --hd3-bg: #e4513f; --hd3-fg: #1d0603;

  --z-xfear: #ff6a5a; --z-fear: #ff9a5c; --z-neutral: #e0c85a; --z-greed: #6fcf98; --z-xgreed: #34d08a;
  --zt-xfear: #ff6a5a; --zt-fear: #ff9a5c; --zt-neutral: #e0c85a; --zt-greed: #7fd098; --zt-xgreed: #3fd08f;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--outer); color: var(--ink);
  font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
small { font-size: .8em; color: var(--ink-3); font-weight: 500; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--black); color: var(--frame); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--ink-3); }
.chg { font-weight: 600; white-space: nowrap; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.i { width: 20px; height: 20px; flex: none; }
.i-xs { width: 12px; height: 12px; }

/* ---------- frame / shell ---------- */
.frame {
  display: flex; gap: 16px; max-width: 1560px; margin: 24px auto; padding: 16px;
  background: var(--frame); border-radius: 32px;
}
.shell { flex: 1; min-width: 0; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 248px; flex: none; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 40px; align-self: flex-start; height: calc(100vh - 80px); min-height: 560px; max-height: 940px;
  padding: 4px 4px 0; overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 4px 8px 16px; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark rect { fill: var(--green); }
.brand-mark g { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.brand-mark g rect { fill: #fff; stroke: none; }
:root[data-theme="dark"] .brand-mark > rect { fill: var(--green-2); }
.brand-text { font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-label { font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; padding: 14px 12px 6px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px;
  border: 0; background: none; border-radius: 14px; color: var(--ink-2); font-weight: 500; font-size: 14.5px;
  text-decoration: none; text-align: left; width: 100%; transition: background .15s, color .15s;
}
.side-link:hover { background: var(--tile); color: var(--ink); }
.side-link.is-active { background: var(--green-soft); color: var(--green-ink); }
.side-link.is-active::before { content: ""; position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--green); }
.badge { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center; border-radius: 13px; background: var(--tile-2); color: var(--ink-2); }
.switch { margin-left: auto; width: 34px; height: 20px; border-radius: 999px; background: var(--tile-2); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--frame); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s; }
[aria-pressed="true"] > .switch { background: var(--green); }
[aria-pressed="true"] > .switch::after { transform: translateX(14px); }

.mood-card {
  margin-top: auto; display: grid; gap: 4px; padding: 18px; border-radius: 20px; text-decoration: none; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, #16a864 0%, transparent 55%), linear-gradient(160deg, #0a8449, #064d2b);
  transition: transform .2s;
}
.mood-card:hover { transform: translateY(-2px); }
.mood-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.mood-val { font-size: 38px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; }
.mood-val small { color: #fff; font-size: 15px; font-weight: 600; }
.mood-sub { font-size: 13px; opacity: .92; margin-bottom: 8px; }
.mood-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 999px; background: #fff; color: #08703f; font-weight: 600; font-size: 14px; }
.mood-btn .i { width: 18px; height: 18px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px 4px; }
.brand-sm { display: none; padding: 0; }
.search {
  display: flex; align-items: center; gap: 10px; flex: 1; max-width: 400px; height: 44px; padding: 0 14px;
  background: var(--tile); border-radius: 999px; color: var(--ink-3); border: 1px solid transparent;
}
.search:focus-within { border-color: var(--green); background: var(--card); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14.5px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { appearance: none; }
.search kbd { font: 600 11px/1 var(--font); padding: 5px 8px; border-radius: 8px; background: var(--card); color: var(--ink-3); border: 1px solid var(--line); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.upd { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--tile); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-2) 60%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--tile);
  color: var(--ink); text-decoration: none; transition: background .15s, transform .15s;
}
.icon-btn:hover { background: var(--tile-2); }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }

/* pill navigation for tablets & phones */
.pillnav { display: none; }

/* ---------- panel + page head ---------- */
.panel { background: var(--panel); border-radius: 24px; padding: 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.page-title { flex: 1 1 420px; min-width: 0; }
.page-head h1 { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.22; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.page-head h1 em { font-style: normal; padding: 1px 10px 3px; border-radius: 10px; white-space: nowrap; }
.page-head h1 em.up { background: var(--green-soft); color: var(--green-ink); }
.page-head h1 em.down { background: var(--red-soft); color: var(--red); }
.page-head h1 em.flat { background: var(--tile-2); color: var(--ink-2); }
.page-sub { margin-top: 8px; color: var(--ink-3); font-size: 14px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 500; white-space: nowrap; }
.date-pill .i { width: 18px; height: 18px; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: 999px; font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: filter .15s, transform .15s; }
.btn .i { width: 18px; height: 18px; }
.btn:hover { filter: brightness(1.08); }
.btn-dark { background: var(--black); color: var(--frame); }
.btn-green { background: var(--green); color: #fff; }
:root[data-theme="dark"] .btn-green { background: #2bbf7a; color: #04170d; }
.btn-gray { background: var(--tile-2); color: var(--ink); }

/* ---------- grid + cards ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; min-width: 0; }
.c-market { grid-column: 1 / 5; grid-row: 1 / 3; }
.c-fng { grid-column: 5 / 9; }
.c-dom { grid-column: 9 / 13; }
.c-market + .c-dom { grid-column: 5 / 13; }
.c-heat { grid-column: 5 / 13; }
.c-wide { grid-column: 1 / -1; container-type: inline-size; }
.c-third { grid-column: span 4; }
.c-chart { grid-column: span 8; }
.c-side { grid-column: span 4; }
.grid-note { grid-column: 1 / -1; margin-top: -4px; padding-inline: 8px; font-size: 12.5px; color: var(--ink-3); }

.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 40px; }
.ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--tile); color: var(--ink); }
.ico .i { width: 20px; height: 20px; }
.card-h h2 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; flex: 1; min-width: 0; }
.card-h-r { margin-left: auto; flex: none; }
.sel { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--tile); color: var(--ink-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.card-sub { margin: -6px 0 14px; color: var(--ink-3); font-size: 13px; }
.card-text { color: var(--ink-2); font-size: 14px; line-height: 1.65; }

.big { font-size: clamp(28px, 2.9vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.big small { font-size: 14px; letter-spacing: 0; }
.delta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink-3); }

.pill { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--tile); color: var(--ink-3); }
.pill.up { background: var(--green-soft); color: var(--green-ink); }
.pill.down { background: var(--red-soft); color: var(--red); }

/* market card */
.brief { margin: 18px 0 16px; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 140px; }
.sub-h { margin: 22px 0 10px; font-size: 14.5px; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile-s { display: grid; gap: 2px; padding: 14px; border-radius: var(--r-tile); background: var(--tile); }
.t-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.t-val { font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.t-val small { font-size: 13px; }
.t-sub { font-size: 12.5px; font-weight: 500; }
.t-sub.muted { color: var(--ink-3); }

/* fear & greed card */
.fng-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zone { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--tile); background: color-mix(in srgb, var(--zc) 14%, transparent); color: var(--zc); }
.gauge-wrap { max-width: 250px; margin: 6px auto 0; }
.gauge .arcs path { stroke: currentColor; }
.gauge .z-xfear { color: var(--z-xfear); } .gauge .z-fear { color: var(--z-fear); } .gauge .z-neutral { color: var(--z-neutral); }
.gauge .z-greed { color: var(--z-greed); } .gauge .z-xgreed { color: var(--z-xgreed); }
.gauge .needle { fill: var(--ink); }
.gauge .needle circle { fill: var(--ink); stroke: var(--card); stroke-width: 2.5; }
.z-xfear { --zc: var(--zt-xfear); } .z-fear { --zc: var(--zt-fear); } .z-neutral { --zc: var(--zt-neutral); } .z-greed { --zc: var(--zt-greed); } .z-xgreed { --zc: var(--zt-xgreed); }
.fng-compare { margin-top: 6px; display: grid; gap: 6px; }
.fng-compare > div { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: var(--tile); font-size: 13px; }
.fng-compare dt { color: var(--ink-3); }
.fng-compare dd { font-weight: 500; }
.fng-compare dd b { color: var(--zc); margin-right: 4px; }

/* dominance card */
.stack { display: flex; gap: 3px; height: 12px; margin: 18px 0 14px; }
.stack i { display: block; height: 100%; border-radius: 999px; min-width: 6px; }
.s-btc { background: var(--green); } .s-eth { background: var(--green-2); } .s-oth { background: var(--tile-2); }
:root[data-theme="dark"] .s-btc { background: #34d08a; } :root[data-theme="dark"] .s-eth { background: #1f8f5c; } :root[data-theme="dark"] .s-oth { background: #3a413e; }
.legend-list { display: grid; gap: 8px; }
.legend-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.legend-list li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend-list b { margin-left: auto; color: var(--ink); font-weight: 600; }

/* ---------- heatmap ---------- */
.seg, .chips { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--tile); }
.seg button, .chips button { border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s; }
.seg button:hover, .chips button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .chips button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.chips { flex-wrap: wrap; border-radius: 16px; }

.hm-box { container-type: inline-size; position: relative; }
.hm { position: relative; width: 100%; background: var(--card); overflow: hidden; border-radius: 14px; }
.hm-wide { aspect-ratio: 8 / 5; }
.hm-tall { aspect-ratio: 10 / 11; display: none; }
@container (max-width: 540px) { .hm-wide { display: none; } .hm-tall { display: block; } }
.tile {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .1em;
  border: 2px solid var(--card); border-radius: 12px; background-clip: padding-box; overflow: hidden; line-height: 1;
  font-size: clamp(9px, calc(var(--s) * .2cqw), 40px);
  background-color: var(--tb); color: var(--tf);
  transition: background-color .5s ease, color .5s ease, filter .15s;
  animation: tile-in .5s ease both; animation-delay: calc(var(--i) * 12ms);
}
@keyframes tile-in { from { opacity: 0; transform: scale(.96); } }
.tile:hover { filter: brightness(1.06) saturate(1.08); z-index: 2; }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; z-index: 3; }
.tile b { font-weight: 700; letter-spacing: .01em; }
.tile span { font-weight: 500; font-size: max(9px, .62em); }
.tile.xs b, .tile.xs span { display: none; }
.tile.s span, .tile.m span { display: none; }
.tile.xl b { font-size: 1.6em; } .tile.xl span { font-size: max(10px, .7em); }

.hu3, .hu2, .hu1, .hf, .hd1, .hd2, .hd3 { --tb: var(--hf-bg); --tf: var(--hf-fg); }
.hu3 { --tb: var(--hu3-bg); --tf: var(--hu3-fg); } .hu2 { --tb: var(--hu2-bg); --tf: var(--hu2-fg); } .hu1 { --tb: var(--hu1-bg); --tf: var(--hu1-fg); }
.hf { --tb: var(--hf-bg); --tf: var(--hf-fg); }
.hd1 { --tb: var(--hd1-bg); --tf: var(--hd1-fg); } .hd2 { --tb: var(--hd2-bg); --tf: var(--hd2-fg); } .hd3 { --tb: var(--hd3-bg); --tf: var(--hd3-fg); }
.legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.legend i { width: 26px; height: 10px; border-radius: 3px; background: var(--tb); }
.legend span:first-child { margin-right: 6px; } .legend span:last-child { margin-left: 6px; }
.legend i.hu3 { --tb: var(--hu3-bg); } .legend i.hu2 { --tb: var(--hu2-bg); } .legend i.hu1 { --tb: var(--hu1-bg); } .legend i.hf { --tb: var(--hf-bg); }
.legend i.hd1 { --tb: var(--hd1-bg); } .legend i.hd2 { --tb: var(--hd2-bg); } .legend i.hd3 { --tb: var(--hd3-bg); }

.hm-tip {
  position: absolute; z-index: 10; pointer-events: none; transform: translate(-50%, calc(-100% - 8px));
  background: var(--black); color: var(--frame); padding: 7px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; box-shadow: var(--shadow);
}

/* ---------- coins ---------- */
.coin-img, .coin-ph { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--tile-2); object-fit: cover; }
.coin-ph { display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.coin-name { display: grid; line-height: 1.25; min-width: 0; }
.coin-name .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-name .s { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.spark { overflow: visible; }
.spark path { fill: none; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark.up path { stroke: var(--green-2); } .spark.down path { stroke: var(--red); }
:root[data-theme="dark"] .spark.up path { stroke: #34d08a; }

/* majors */
.majors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.major { display: grid; gap: 8px; padding: 16px; border-radius: 16px; background: var(--tile); transition: transform .2s, box-shadow .2s; }
.major:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.major-top { display: flex; align-items: center; gap: 10px; }
.major-top .coin-name { flex: 1; }
.major-top .coin-img, .major-top .coin-ph { width: 32px; height: 32px; }
.major-price { font-size: 24px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.major-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.major .spark { width: 100%; height: 36px; }
@container (max-width: 940px) {
  .majors { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .major { grid-column: span 2; }
  .major:nth-child(n + 4) { grid-column: span 3; }
}
@container (max-width: 560px) {
  .majors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .major, .major:nth-child(n + 4) { grid-column: auto; }
  .major:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@container (max-width: 380px) { .majors { grid-template-columns: 1fr; } }

/* movers */
.mv { display: grid; gap: 8px; }
.mv li { display: grid; grid-template-columns: 18px 32px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--tile); font-size: 14px; }
.mv .coin-img, .mv .coin-ph { width: 32px; height: 32px; }
.mv-n { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.mv-name { display: grid; line-height: 1.25; min-width: 0; }
.mv-name b { font-weight: 700; }
.mv-name i { font-style: normal; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-price { color: var(--ink-2); font-size: 13px; text-align: right; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; }
.mkt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.mkt th, .mkt td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.mkt thead th { font-size: 12.5px; font-weight: 500; color: var(--ink-3); background: var(--tile); border-bottom: 0; white-space: nowrap; }
.mkt thead th:first-child { border-radius: 12px 0 0 12px; } .mkt thead th:last-child { border-radius: 0 12px 12px 0; }
.mkt tbody tr { transition: background .15s; }
.mkt tbody tr:hover > * { background: var(--tile); }
.mkt tbody tr:last-child > * { border-bottom: 0; }
.mkt .num { text-align: right; white-space: nowrap; }
.mkt .rank { color: var(--ink-3); width: 48px; font-size: 13px; }
.mkt th.coin { font-weight: inherit; min-width: 180px; }
.mkt thead th.coin { font-weight: 500; }
.coin-cell { display: flex; align-items: center; gap: 12px; }
.mkt .price { font-weight: 600; }
.mkt .spark-cell { width: 120px; }
.mkt .spark { width: 96px; height: 28px; margin-left: auto; }
.mkt thead .spark-cell { text-align: right; }
.js-ready .mkt:not(.expanded):not(.searching) tr.extra { display: none; }
.js-ready #mkt:not(.expanded):not(.searching) tbody tr:nth-child(20) > * { border-bottom: 0; }
.mkt tr.nomatch { display: none; }
.more-btn { display: block; margin: 16px auto 0; height: 42px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--tile); font-weight: 600; font-size: 14px; transition: background .15s; }
.more-btn:hover { background: var(--tile-2); }
@container (max-width: 1000px) { .c-1h, .c-vol { display: none; } }
@container (max-width: 720px) { .c-mcap, .c-7d { display: none; } .mkt th, .mkt td { padding: 12px 9px; } .mkt th.coin { min-width: 0; } .coin-name .n { max-width: 18ch; } }
@container (max-width: 480px) { .spark-cell { display: none; } .mkt .rank { width: 30px; } }
@container (max-width: 380px) { .mkt .rank, .mkt thead th.num:first-child { display: none; } .coin-cell { gap: 8px; } .coin-cell .coin-img, .coin-cell .coin-ph { width: 24px; height: 24px; } .coin-name .n { max-width: 12ch; } .mkt th, .mkt td { padding: 11px 6px; } }

/* ---------- sentiment bars ---------- */
.bars-wrap { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; height: 250px; padding-top: 6px; }
.bars-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--ink-3); text-align: right; line-height: 1; padding: 0 0 1px; }
.bars {
  position: relative; display: flex; align-items: flex-end; gap: 6px; height: 100%;
  background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat,
              repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%);
}
.bars li {
  position: relative; flex: 1; min-width: 0; height: var(--h); min-height: 4px; border-radius: 8px 8px 3px 3px;
  background: var(--bar); /* fallback without color-mix */
  background: linear-gradient(180deg, color-mix(in srgb, var(--bar) 62%, transparent), color-mix(in srgb, var(--bar) 8%, transparent));
}
.bars .z-xfear { --bar: var(--z-xfear); } .bars .z-fear { --bar: var(--z-fear); } .bars .z-neutral { --bar: var(--z-neutral); }
.bars .z-greed { --bar: var(--z-greed); } .bars .z-xgreed { --bar: var(--z-xgreed); }
.bars li.now { background: var(--bar); }
.bars li.now::before { content: ""; position: absolute; top: -6px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--bar); border: 2.5px solid var(--card); }
.bars li::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); z-index: 3;
  padding: 8px 12px; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.bars li:nth-child(-n + 4)::after { left: -4px; transform: none; }
.bars li:nth-last-child(-n + 4)::after { left: auto; right: -4px; transform: none; }
.bars li.now::after, .bars li:hover::after { opacity: 1; }
.bars:hover li.now:not(:hover)::after { opacity: 0; }
.bars li:hover { filter: brightness(.95); }
.bars-x { display: flex; justify-content: space-between; margin: 10px 0 0 40px; font-size: 12px; color: var(--ink-3); }
.sent-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.sent-stats > div { background: var(--tile); border-radius: var(--r-tile); padding: 12px; text-align: center; }
.sent-stats dt { font-size: 12.5px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.sent-stats dd { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; color: var(--zc); }

/* ---------- news ---------- */
.news-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.news-card { background: var(--tile); border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.news-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.news-img { display: block; aspect-ratio: 16 / 9; background: var(--tile-2); overflow: hidden; margin: 8px 8px 0; border-radius: 12px; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-img img { transform: scale(1.04); }
.news-img.ph { background: repeating-linear-gradient(135deg, var(--tile-2) 0 10px, color-mix(in srgb, var(--tile-2) 75%, var(--line)) 10px 11px); }
.news-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.tag { align-self: flex-start; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); }
.news-card h3 { font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; text-wrap: balance; }
.news-card p { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { margin-top: auto; padding-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.news-meta b { color: var(--ink-2); font-weight: 600; }
.js-ready .news-card.over { display: none; }
.news-empty { padding: 28px 0; text-align: center; color: var(--ink-3); }

/* ---------- about ---------- */
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.foot-brand { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.about .label { margin-bottom: 8px; }
.about .muted { font-size: 13.5px; line-height: 1.65; }
.copy { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }

/* ---------- entrance motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.card { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.card:nth-child(2) { animation-delay: .05s; } .card:nth-child(3) { animation-delay: .1s; } .card:nth-child(4) { animation-delay: .15s; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* tablets + phones: no sidebar, pill navigation under the top bar */
@media (max-width: 1099px) {
  body { background: var(--frame); }
  .frame { display: block; margin: 0; padding: 0; border-radius: 0; max-width: none; width: auto; }
  .sidebar { display: none; }
  .brand-sm { display: flex; }
  .topbar { padding: 12px 16px; }
  .search { max-width: none; }
  .pillnav {
    display: flex; gap: 8px; position: sticky; top: 0; z-index: 40; padding: 8px 16px 10px; overflow-x: auto; scrollbar-width: none;
    background: var(--frame); background: color-mix(in srgb, var(--frame) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .pillnav::-webkit-scrollbar { display: none; }
  .pillnav a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--tile); color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; flex: none; }
  .pillnav a .i { width: 16px; height: 16px; }
  .pillnav a.is-active { background: var(--green-soft); color: var(--green-ink); }
  .panel { margin: 0 8px 8px; padding: 14px; border-radius: 22px; }
  [id] { scroll-margin-top: 64px; }
  .upd { display: none; }

  /* 6-column grid */
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .c-market, .c-heat, .c-wide, .c-chart, .c-side { grid-column: 1 / -1; grid-row: auto; }
  .c-fng, .c-dom { grid-column: span 3; }
  .c-market + .c-dom { grid-column: 1 / -1; }
  .c-third { grid-column: span 3; }
  .c-third.c-trend { grid-column: 1 / -1; }
  .mv-price { display: none; }
  .mv li { grid-template-columns: 18px 32px minmax(0, 1fr) auto; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .c-fng, .c-dom, .c-third, .c-third.c-trend { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; }
  .panel { padding: 10px; }
  .mv-price { display: block; }
  .mv li { grid-template-columns: 18px 32px minmax(0, 1fr) auto auto; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .brand-text { font-size: 15px; }
  .search kbd { display: none; }
  .top-actions .icon-btn[href] { display: none; }
  .bars-wrap { height: 200px; }
  .bars { gap: 3px; }
  .bars li { border-radius: 5px 5px 2px 2px; }
}

@media (max-width: 420px) {
  .page-head h1 { font-size: 21px; }
  .date-pill { width: 100%; justify-content: center; }
  .mv li { grid-template-columns: 16px 30px minmax(0, 1fr) auto; }
  .mv-price { display: none; }
  .brand-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .sidebar, .topbar, .pillnav, .seg, .chips, .more-btn, .head-actions { display: none; } .frame { margin: 0; padding: 0; } }


/* ==========================================================================
   QA fixes (appended: later rules win)
   ========================================================================== */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* the grey canvas stays visible around the white frame on laptops */
@media (min-width: 1100px) { .frame { width: calc(100% - 48px); } }

/* every card is a container: headers, rows and tiles adapt to the card's own width */
.card { container-type: inline-size; }
.card-h { flex-wrap: wrap; }
.card-h h2 { overflow-wrap: anywhere; }
.card-h-r { flex: 0 1 auto; min-width: 0; max-width: 100%; }
@media (max-width: 760px) { .card-h-r:has(.chips) { flex: 1 1 100%; margin-left: 0; } }
@container (max-width: 300px) {
  .card-h .sel { display: none; }
  .mv li { grid-template-columns: 18px 32px minmax(0, 1fr) auto; }
  .mv-price { display: none; }
  .tiles { grid-template-columns: 1fr; }
}
.mv { grid-template-columns: minmax(0, 1fr); }
.tile-s { min-width: 0; }
.t-val { overflow-wrap: anywhere; }

/* top bar: the search pill shrinks instead of pushing the buttons off-screen */
.search { min-width: 0; }
.search input { width: 100%; }

/* 1100-1279px: sidebar + 12 columns leave 4-column cards too narrow for the mover rows */
@media (min-width: 1100px) and (max-width: 1279px) {
  .c-third { grid-column: span 6; }
  .c-third.c-trend { grid-column: 1 / -1; }
}

/* sidebar on short laptop screens: drop the promo card, tighten the nav */
@media (min-width: 1100px) and (max-height: 965px) { .mood-card { display: none; } } /* eleven nav links (ETF flows and the tools added) need ~965px for the promo card too */
@media (min-width: 1100px) and (max-height: 700px) {
  .side-link { height: 38px; } .side-label { padding-top: 8px; } .brand { padding-bottom: 8px; }
}

@media (min-width: 1100px) and (max-height: 780px) {
  .side-link { height: 36px; } .side-label { padding: 8px 12px 4px; } .brand { padding-bottom: 6px; }
}

/* market card: key figures sit at the bottom instead of leaving a gap under the buttons */
.c-market { display: flex; flex-direction: column; }
.c-market .sub-h { margin-top: auto; padding-top: 22px; }
.tiles.tiles-2 { margin-top: 18px; }

/* majors: consistent two-column label/value rows */
.major-row { display: grid; grid-template-columns: minmax(30px, max-content) auto; align-items: center; justify-content: start; column-gap: 8px; row-gap: 6px; }
.major-row .lbl { font-size: 12px; color: var(--ink-3); font-weight: 500; }
/* the three majors cards sit in one block (one nav anchor + scroll-spy target) */
.majors-group { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
/* a tile without a chart keeps its rows aligned with its siblings instead of stretching */
.major { align-content: start; }
/* the cards share one title: their period pill (7/30/365-day) must stay visible even in narrow cards,
   and drops to its own row when title + pill no longer fit side by side */
.card-h .sel.sel-keep { display: inline-flex; }
@container (max-width: 270px) { .card-h-r:has(.sel-keep) { flex: 1 1 100%; margin-left: 0; } }

/* focus visibility */
.news-card a:focus-visible { outline-offset: -3px; border-radius: 16px; }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; box-shadow: inset 0 0 0 4px var(--card); }
.mkt tbody tr:hover .pill:not(.up):not(.down) { background: var(--tile-2); }

/* printing: always light tokens, keep tile colours */
@media print {
  :root, :root[data-theme="dark"] { --ink: #111413; --ink-2: #464e4a; --ink-3: #66706b; --card: #fff; --frame: #fff; --panel: #fff; --tile: #f5f5f5; --outer: #fff; --black: #111413; }
  .tile, .pill, .tag, .hm, .zone, .stack i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ==========================================================================
   Bitcoin ETF flows: verdict card + daily / weekly / monthly bar chart
   ========================================================================== */
/* both cards sit in one block (nav anchor + scroll-spy target) that repeats the page grid's 12 / 6 / 1 columns */
.etf-group { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1099px) { .etf-group { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) { .etf-group { grid-template-columns: minmax(0, 1fr); } }

/* the period switch needs JavaScript: without it the daily view simply stays */
.seg-js { display: none; }
.js-ready .seg-js { display: inline-flex; }

.c-etf .delta { flex-wrap: wrap; margin-top: 12px; }
.c-etf .brief { margin: 14px 0 0; }
.c-etf .tiles { margin-top: 18px; }
.c-etf .t-val { white-space: nowrap; overflow-wrap: normal; }
@container (max-width: 300px) { .c-etf .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .c-etf .tile-s { padding: 11px 10px; } .c-etf .t-val { font-size: 17px; } }
@container (max-width: 230px) { .c-etf .tiles { grid-template-columns: minmax(0, 1fr); } }
.c-flow .sub-h { margin: 20px 0 10px; }
.fund-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fund-chips li { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--tile); font-size: 12.5px; }
.fund-chips b { font-weight: 700; }
.fund-chips li > span:not(.sr) { font-weight: 600; white-space: nowrap; }

/* bars rise above the zero line for inflows and hang below it for outflows; all positions are inline percentages */
.c-flow { display: flex; flex-direction: column; }
.flow-view:not([hidden]) { flex: 1; display: flex; flex-direction: column; }
.flow-chart { flex: 1; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; min-height: 300px; padding: 10px 14px 30px 0; }
.flow-y { position: relative; font-size: 12px; color: var(--ink-3); }
.flow-y li { position: absolute; right: 0; transform: translateY(-50%); line-height: 1; white-space: nowrap; }
.flow-plot { position: relative; }
.flow-grid { position: absolute; inset: 0; }
.flow-grid i { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.flow-grid i.zero { background: var(--ink-3); opacity: .55; }
.flow-bars { position: absolute; inset: 0; display: flex; gap: 4px; }
.flow-bars li { position: relative; flex: 1; min-width: 0; --c: var(--green); border-radius: 6px; transition: background .15s; }
.flow-bars li.out { --c: var(--red); }
.flow-bars li:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.flow-bars .b { position: absolute; left: 0; right: 0; min-height: 2px; background: var(--c); border-radius: 4px 4px 0 0; transition: filter .15s; }
.flow-bars li.out .b { border-radius: 0 0 4px 4px; }
.flow-bars li:hover .b { filter: brightness(1.12); }
/* a period that can still change (week or month to date) is hatched, so it is not told apart by colour alone */
.flow-bars li.part .b { background: repeating-linear-gradient(135deg, var(--c) 0 4px, color-mix(in srgb, var(--c) 35%, transparent) 4px 8px); }
.flow-bars .x { position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink-3); white-space: nowrap; pointer-events: none; }
.flow-bars li::after {
  content: attr(data-tip); display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 3;
  width: max-content; max-width: min(260px, 60vw); padding: 8px 12px; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 600; line-height: 1.4; pointer-events: none;
}
.flow-bars li.tl::after { left: -4px; transform: none; }
.flow-bars li.tr::after { left: auto; right: -4px; transform: none; }
.flow-bars li:hover::after { display: block; }
@container (max-width: 420px) {
  .flow-bars .x-minor { display: none; }
  .flow-chart { grid-template-columns: 46px minmax(0, 1fr); gap: 6px; }
  .flow-legend { margin-left: 52px; }
}
@container (max-width: 540px) { [data-flow-view="m"] .flow-bars .x-minor { display: none; } }
/* narrow card: the period switch drops under the title instead of squeezing it */
@container (max-width: 480px) {
  .card-h-r:has(.seg-js) { flex: 1 1 100%; margin-left: 0; }
  .seg-js { display: none; }
  .js-ready .seg-js { display: flex; }
  .seg-js button { flex: 1; }
}
.flow-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 0 62px; font-size: 12px; color: var(--ink-3); }
.flow-legend li { display: inline-flex; align-items: center; gap: 6px; }
.flow-legend .k { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.flow-legend .k.in { --c: var(--green); } .flow-legend .k.out { --c: var(--red); }
.flow-legend .k.part { background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--ink-3); }
.flow-source { margin-top: 14px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
@media (max-width: 760px) {
  .flow-chart { min-height: 290px; }
  .flow-bars { gap: 2px; }
  .flow-bars .b { border-radius: 3px 3px 0 0; } .flow-bars li.out .b { border-radius: 0 0 3px 3px; }
}
@media print {
  .flow-view[hidden] { display: none; } .flow-bars li::after { display: none; }
  .flow-bars .b, .flow-legend .k, .flow-grid i, .c-etf .tile-s, .fund-chips li { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- cookie banner + footer links ---------- */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 18px; background: var(--card); color: var(--ink);
  border-radius: var(--r-card); box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.5;
}
.cookie-bar p { flex: 1 1 280px; color: var(--ink-2); }
.cookie-bar a { color: var(--ink); font-weight: 600; }
.cookie-actions { display: flex; gap: 10px; flex: 1 1 100%; }
.btn-cookie { flex: 1 1 0; height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--black); color: var(--frame); font-weight: 600; font-size: 14px; transition: filter .15s; }
.btn-cookie:hover { filter: brightness(1.12); }
@media (min-width: 640px) { .cookie-actions { flex: 0 0 auto; } .btn-cookie { flex: 0 0 auto; min-width: 150px; } }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }

/* ---------- legal pages (privacy, terms) ---------- */
.legal { max-width: 760px; margin: 0 auto; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.legal h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin: 14px 0 6px; }
.legal h2 { font-size: 17px; line-height: 1.3; color: var(--ink); margin: 28px 0 8px; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal ul { list-style: disc; padding-left: 22px; }
.legal li { margin-bottom: 4px; }
.legal a { color: var(--ink); font-weight: 600; }
.legal .meta { color: var(--ink-3); font-size: 13px; margin: 0 0 20px; }
.legal .back-link { display: inline-block; font-size: 13.5px; color: var(--ink-3); text-decoration: none; }
.legal .back-link:hover { color: var(--ink); }
.legal .wrap { overflow-x: auto; margin: 6px 0 16px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.legal .copy { margin-top: 32px; }
