/* The Wrong End — design tokens. Light is default; dark via [data-theme="dark"] or OS preference. */
:root{
  --font-display:'Fraunces',Georgia,serif;
  --font-body:'Literata',Georgia,serif;
  --font-meta:'Space Mono',ui-monospace,Menlo,monospace;

  --bg:#F4F1E9; --raised:#FBF9F4; --ink:#1C1B18; --ink-2:#3F3C35; --muted:#5E5A50;
  --rule:#D8D2C3; --placeholder:#E7E1D3; --hatch:rgba(28,27,24,.06); --field:#FFFFFF;
  --accent:#B23A1E;
  --code-bg:#EBE6DA; --mark:rgba(178,58,30,.16);

  --measure:680px; --container:1240px;
  --gutter:clamp(20px,4vw,48px);
  --rule-thin:1px; --rule-heavy:3px;
  --tap:44px;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#171613; --raised:#201E1A; --ink:#ECE6D9; --ink-2:#C9C2B3; --muted:#A39C8D;
    --rule:#3B3833; --placeholder:#26241F; --hatch:rgba(236,230,217,.07); --field:#201E1A;
    --accent:#EE7A58; --code-bg:#201E1A; --mark:rgba(238,122,88,.28);
  }
}
:root[data-theme="dark"]{
  --bg:#171613; --raised:#201E1A; --ink:#ECE6D9; --ink-2:#C9C2B3; --muted:#A39C8D;
  --rule:#3B3833; --placeholder:#26241F; --hatch:rgba(236,230,217,.07); --field:#201E1A;
  --accent:#EE7A58; --code-bg:#201E1A; --mark:rgba(238,122,88,.28);
}

/* Type scale (desktop → mobile) */
:root{
  --t-masthead:clamp(52px,8vw,116px);   /* mobile home: 66px, two lines */
  --t-feature:clamp(44px,6.4vw,88px);   /* mobile: 40px */
  --t-article-title:clamp(46px,7vw,96px);/* mobile: 40px */
  --t-stream-headline:clamp(32px,3.6vw,46px); /* mobile: 31px */
  --t-h2:32px;                           /* mobile: 26px */
  --t-body:20px;  --lh-body:1.65;        /* mobile: 18px */
  --t-observation:20px; --lh-observation:1.6; /* mobile: 18px */
  --t-meta:12px;                          /* mobile: 11px, uppercase */
}

/* Content-block widths (article body) */
:root{
  --w-column:min(680px, calc(100% - 2 * var(--gutter)));
  --w-wide:min(1040px, calc(100% - 2 * var(--gutter)));
  --w-full:100%;
}
