/* The site's shared colors, type, spacing and base styles: the front page, the story pages and
   the directory all link this, so there's one copy. Page-specific styles live in each page's own
   stylesheet (story.css, directory.css) or, on the front page, inline. */
:root {
  --paper: #ffffff;
  --paper2: #fef3eb;
  --ink: #1f1a17;
  --text: #4d453e;
  --wash: #fce9dc;
  --muted: #675d54;
  --rule: #cbc1b7;
  --line: #75695f; /* the heavier lines; softer than --ink */
  --accent: #c44900;
  --accent-hover: #9e3a00;
  --accent-text: #9e3a00; /* orange for small text; --accent is too light for it on the tan */
  --on-accent: #ffffff;
  --up: #047857; /* gains, losses and warnings: the same as the front page's */
  --down: #be123c;
  --warn: #c2410c;
  --band: #1f1a17;
  --on-band: #fef3eb;

  --serif: "Gelasio", Georgia, "Times New Roman", serif;
  --mono: "Ubuntu Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-12: 0.75rem; --fs-14: 0.875rem; --fs-16: 1rem; --fs-18: 1.125rem;
  --fs-24: 1.5rem; --fs-32: 2rem; --fs-40: 2.5rem;

  --s1: 8px; --s2: 12px; --s3: 20px; --s4: 24px; --s5: 40px; --s6: 48px; --s7: 80px;
  --r-sm: 4px; --r-md: 8px;
  --col-gap: 30px;
  --pad-y: 30px;
  --max: 1264px; /* content column width, the same on every page */
  --gutter: 16px; /* space between the column and the window's edges; 32px from 720px up */
}
/* Dark version: theme.js sets data-theme from the reader's choice in the footer switch */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c1c1c;
  --paper2: #141414;
  --ink: #cdc6bd;
  --text: #b3b3b3;
  --wash: #1c1c1c;
  --muted: #8f8f8f;
  --rule: #2e2e2e;
  --line: #666666;
  --accent: #c9621c;
  --accent-hover: #d98a4e;
  --accent-text: #d98a4e;
  --on-accent: #141414;
  --up: #10b981;
  --down: #f87171;
  --warn: #fbbf24;
  --band: #1c1c1c;
  --on-band: #cdc6bd;
  --art-brightness: 0.85;
}
:root { color-scheme: light; }
/* Always reserve the scrollbar's space, so short pages line up with long ones */
html { scrollbar-gutter: stable; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; /* no browser margin: the ticker and full-width bands reach the window's edges */
  background: var(--paper2);
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--fs-14);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

@media (min-width: 720px) { :root { --gutter: 32px; } }

/* The content column on every page: --max wide, centered, with the gutter as padding so bands can
   run their background to the window's edges */
.wrap {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.label {
  font-family: var(--mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker {
  font-family: var(--mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
}
.byline { font-family: var(--mono); font-size: var(--fs-12); color: var(--muted); }
.byline b { color: inherit; font-weight: 400; }
.author-link:hover b { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); top: 8px; z-index: 20; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-sm); }
