/* Pound Arc — Daylight Paper for the web.
   Layout: one calm reading column (about 68ch) with wider bands for the episode
   and tool sections; paper surfaces on a warm canvas; ink navy text.
   Tokens are sampled from the 2D episodes so the site and videos match. */

@font-face { font-family: "Figtree"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 800; font-style: normal; font-display: swap;
  src: url("fonts/figtree-latin-800-normal.woff2") format("woff2"); }

:root {
  /* colour */
  --canvas: #F4EDE3;      /* the walls, in shade */
  --paper: #FCF9F4;       /* card surface */
  --linen: #EDE3D6;       /* second tone */
  --ink: #22304C;         /* text, from Alex's jumper */
  --sub: #4F5A6D;         /* secondary text */
  --sage: #3C7A68;        /* pay, money in, favourable */
  --sage-text: #33695A;
  --denim: #4D6D9C;       /* prices, the reference series */
  --clay: #A65A2C;        /* adverse marks only, never small text */
  --grid: #E4DACC;
  --ghost: #CDBBA3;
  --glass: rgba(252, 249, 244, 0.72);
  --shadow: 0 22px 44px rgba(84, 64, 40, 0.14), 0 3px 8px rgba(84, 64, 40, 0.08);
  --shadow-soft: 0 10px 24px rgba(84, 64, 40, 0.10), 0 2px 5px rgba(84, 64, 40, 0.06);
  --on-chip: #FCF9F4;
  --focus: #4D6D9C;
  /* type */
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --step-4: clamp(2.4rem, 1.5rem + 4vw, 4.25rem);
  /* space */
  --radius: 22px;
  --measure: 68ch;
  --wide: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0E1830; --paper: #16233F; --linen: #1C2C4D; --ink: #EEE7DC; --sub: #B6BCC8;
    --sage: #6FB39E; --sage-text: #8CC7B4; --denim: #8FA9D6; --clay: #D9935F;
    --grid: #2A3A5C; --ghost: #4A5A7A; --glass: rgba(14, 24, 48, 0.72);
    --shadow: 0 22px 44px rgba(0, 0, 0, 0.35), 0 3px 8px rgba(0, 0, 0, 0.25);
    --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.28), 0 2px 5px rgba(0, 0, 0, 0.2);
    --on-chip: #0E1830; --focus: #8FA9D6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0E1830; --paper: #16233F; --linen: #1C2C4D; --ink: #EEE7DC; --sub: #B6BCC8;
  --sage: #6FB39E; --sage-text: #8CC7B4; --denim: #8FA9D6; --clay: #D9935F;
  --grid: #2A3A5C; --ghost: #4A5A7A; --glass: rgba(14, 24, 48, 0.72);
  --shadow: 0 22px 44px rgba(0, 0, 0, 0.35), 0 3px 8px rgba(0, 0, 0, 0.25);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.28), 0 2px 5px rgba(0, 0, 0, 0.2);
  --on-chip: #0E1830; --focus: #8FA9D6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--denim); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); top: 8px; }

/* gutters */
.wrap {
  width: 100%;
  max-width: calc(var(--wide) + 2 * 24px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* header: the one glass surface */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--grid);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); line-height: 1; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--linen); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--canvas); }

main { display: block; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section + .section { padding-top: 0; }
.eyebrow { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); }
.lede { font-size: var(--step-1); color: var(--sub); max-width: 52ch; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }

/* home hero */
.hero { padding-block: clamp(48px, 8vw, 96px) clamp(32px, 5vw, 56px); display: grid; gap: 22px; }
.hero h1 { font-size: var(--step-4); max-width: 16ch; }
.hero .arcline { color: var(--sage-text); }

/* paper surfaces */
.paper { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.tile { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 24px; display: grid; gap: 10px; align-content: start; text-decoration: none; min-width: 0; }
a.tile:hover { box-shadow: var(--shadow); }
.tile h3 { font-size: var(--step-1); }
.tile p { color: var(--sub); }
.tile .more { font-weight: 700; color: var(--ink); margin-top: 4px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; overflow: hidden; }
.feature .poster { aspect-ratio: 16 / 9; max-width: 100%; }
.feature .body { padding: clamp(22px, 3vw, 36px); display: grid; gap: 12px; align-content: center; min-width: 0; }
.feature h2 { font-size: var(--step-2); }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--denim); width: fit-content; }
.pill.soon { border-color: var(--ghost); color: var(--sub); }
.pill.draft { border-color: var(--clay); }

/* video poster (placeholder until the YouTube ID exists) */
.poster {
  position: relative; display: grid; place-items: center; width: 100%;
  background:
    radial-gradient(120% 90% at 20% 15%, var(--paper) 0%, var(--linen) 60%, var(--canvas) 100%);
  border-radius: 0; overflow: hidden;
}
.poster svg.arcs { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster .play { position: relative; display: grid; place-items: center; gap: 10px; text-align: center; color: var(--ink); padding: 16px; }
.poster .play span.btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-soft); }
.video { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video button.poster { border: 0; cursor: pointer; font: inherit; aspect-ratio: 16 / 9; }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* article */
.article-head { padding-block: clamp(40px, 6vw, 72px) 28px; display: grid; gap: 16px; }
.article-head h1 { font-size: var(--step-3); max-width: 22ch; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--sub); font-size: var(--step--1); font-weight: 700; }
.prose { max-width: var(--measure); display: grid; gap: 1.05em; }
.prose h2 { font-size: var(--step-2); margin-top: 1.1em; }
.prose h2 .ts { font-size: var(--step--1); color: var(--sub); font-weight: 700; margin-left: 8px; letter-spacing: 0.02em; }
.prose p.todo { color: var(--sub); border-left: 3px solid var(--ghost); padding-left: 14px; font-size: 0.97rem; }
.toc { display: grid; gap: 6px; padding: 20px 22px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-soft); max-width: var(--measure); }
.toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc .ts { color: var(--sub); font-variant-numeric: tabular-nums; margin-right: 6px; }

.sources { max-width: var(--measure); display: grid; gap: 10px; }
.sources ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.sources li span { color: var(--sub); }

.disclaimer { max-width: var(--measure); font-size: 0.95rem; color: var(--sub); padding: 16px 18px; border-radius: 14px; background: var(--linen); }

/* tool frame */
.tool-band { padding-block: clamp(36px, 5vw, 64px); }
.tool { padding: clamp(20px, 3vw, 36px); display: grid; gap: 26px; }
.tool-head { display: grid; gap: 8px; }
.tool-head h2 { font-size: var(--step-2); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (max-width: 860px) { .tool-grid { grid-template-columns: 1fr; } }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
legend { font-weight: 800; font-size: var(--step-1); padding: 0; margin-bottom: 4px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 12px; }
.field label { font-weight: 700; line-height: 1.3; }
.field label small { display: block; font-weight: 500; color: var(--sub); font-size: 0.85rem; }
.input { display: flex; align-items: center; background: var(--canvas); border: 1.5px solid var(--grid); border-radius: 12px; padding: 0 10px; }
.input:focus-within { border-color: var(--denim); }
.input span { color: var(--sub); font-weight: 700; }
.input input { width: 100%; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink); padding: 10px 6px; font-variant-numeric: tabular-nums; text-align: right; min-width: 0; }
.input input:focus { outline: none; }
.rate { font-size: 0.8rem; color: var(--sub); font-variant-numeric: tabular-nums; }
.rate.ph { color: var(--clay); font-weight: 700; }
@media (max-width: 420px) { .field { grid-template-columns: minmax(0, 1fr) 130px; } }

.result { background: var(--canvas); border-radius: 18px; padding: clamp(18px, 2.5vw, 28px); display: grid; gap: 20px; }
.verdict { display: grid; gap: 6px; }
.verdict .chip { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 1.05rem; }
.chip.worse { background: var(--clay); color: var(--on-chip); }
.chip.better { border: 2px solid var(--sage-text); color: var(--sage-text); }
.chip.same { border: 2px solid var(--denim); color: var(--ink); }
.verdict h3 { font-size: var(--step-2); }
.verdict p { color: var(--sub); }

.bars { display: grid; gap: 14px; }
.bar-row { display: grid; gap: 6px; }
.bar-row .label { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 0.95rem; }
.bar-row .label b { font-variant-numeric: tabular-nums; font-weight: 800; }
.track { height: 16px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 999px; transition: width 0.45s cubic-bezier(.2,.7,.2,1); }
.track i.pay { background: var(--sage); }
.track i.prices { background: var(--denim); }

.money { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money div { background: var(--paper); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; min-width: 0; }
.money span { color: var(--sub); font-size: 0.85rem; font-weight: 700; }
.money b { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.mix { display: grid; gap: 8px; }
.mix .strip { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--grid); }
.mix .strip i { display: block; height: 100%; }
.mix ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.85rem; color: var(--sub); }
.mix li { display: inline-flex; align-items: center; gap: 6px; }
.mix li i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.draft-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; border: 2px dashed var(--clay); font-size: 0.92rem; }
.draft-banner b { font-weight: 800; }

.btn-text { font: inherit; font-weight: 700; background: none; border: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--denim); text-underline-offset: 3px; cursor: pointer; padding: 0; width: fit-content; }

/* footer */
.site-footer { border-top: 1px solid var(--grid); margin-top: clamp(40px, 6vw, 72px); }
.site-footer .wrap { padding-block: 32px 40px; display: grid; gap: 14px; color: var(--sub); font-size: 0.92rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { font-weight: 700; color: var(--ink); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* article details */
.prose p.intro { font-size: var(--step-1); line-height: 1.55; }
.prose p.next { font-weight: 700; padding-top: 0.6em; border-top: 1px solid var(--grid); }
.example { background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-soft); padding: 18px 20px; display: grid; gap: 12px; min-width: 0; }
.example table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.example th, .example td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--grid); font-weight: 500; }
.example thead th { font-size: var(--step--1); color: var(--sub); font-weight: 700; }
.example td { text-align: right; font-weight: 700; white-space: nowrap; }
.example tbody th { font-weight: 700; }
.example tr.total th, .example tr.total td { border-bottom: 0; font-weight: 800; }
.example .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.example .pair > div { background: var(--canvas); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.example h3 { font-size: var(--step-1); }
.example ul { margin: 0; padding-left: 1.1em; display: grid; gap: 2px; }
.example .note { font-weight: 700; }
.example .source { font-size: var(--step--1); color: var(--sub); }
.up, .down { color: var(--clay); font-weight: 800; }
.fall { color: var(--sage-text); font-weight: 800; }
.example thead th:not(:first-child) { text-align: right; }
.asof { font-size: 0.85rem; font-weight: 700; color: var(--sub); font-variant-numeric: tabular-nums; }
.asof a { color: var(--ink); }
