/* The Verge–inspired long-read. Tokens from theverge/DESIGN.md.
   Anton stands in for Manuka (line-height loosened to .95), Space Grotesk for PolySans, Space Mono for PolySans Mono. */
:root {
  --canvas: #ffffff; --slate: #f2f2f2; --frame: #e3e3e3; --ink: #131313;
  --mint: #3cffd0; --mint-dark: #309875; --uv: #5200ff; --uv-rule: #3d00bf;
  --yellow: #ffe600; --pink: #ff5ea8; --orange: #ff7a1a;
  --text: #131313; --text-2: #6b6b6b; --text-muted: #2b2b2b; --link-hover: #3860be; --focus: #1eaedb;
  --display: Anton, Impact, "Arial Narrow", sans-serif;
  --sans: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Space Mono", "Courier New", Courier, monospace;
  --measure: 680px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 500 16px/1.6 var(--sans); }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.mono { font: 600 12px/2 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--mint); padding: 8px 12px; }
.skip-link:focus { left: 8px; z-index: 10; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; border-bottom: 1px solid var(--frame); }
.brand { font: 400 22px/1 var(--display); letter-spacing: 1px; text-decoration: none; color: var(--text); }
.brand span { color: var(--uv); }
.topnav { display: flex; align-items: center; gap: 22px; font: 400 12px/1.3 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; }
.topnav a { text-decoration: none; color: var(--text); }
.topnav a:hover { color: var(--link-hover); }
.topnav .pill { border: 1px solid var(--ink); color: var(--ink); padding: 8px 14px; border-radius: 30px; transition: background .15s, color .15s; }
.topnav .pill:hover { background: var(--ink); color: var(--mint); }

/* Hero — whisper above, shout below */
.hero { position: relative; max-width: 1100px; margin: 0 auto; padding: 64px 24px 48px; overflow: hidden; }
.whisper { margin: 0 0 18px; font: 300 19px/1.2 var(--sans); letter-spacing: 1.9px; text-transform: uppercase; color: var(--text-muted); animation: rise .6s ease both; }
.shout {
  margin: 0; max-width: 14ch;
  font: 400 clamp(56px, 10vw, 107px)/0.95 var(--display); letter-spacing: 1.07px; text-transform: uppercase;
  animation: rise .7s .08s ease both;
}
.shout::selection { background: var(--uv); }
.deck { max-width: 42em; margin: 28px 0 0; font: 300 clamp(18px, 2.2vw, 22px)/1.4 var(--sans); color: var(--text-muted); animation: rise .7s .16s ease both; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; color: var(--text-2); animation: rise .7s .24s ease both; }
.hero-meta .draft { color: var(--uv); }
.hazard { position: absolute; right: -40px; top: 40px; width: 220px; height: 220px; border-radius: 50%; background: var(--uv); opacity: 1; z-index: -1; animation: drift 9s ease-in-out infinite alternate; }
.hazard::after { content: ""; position: absolute; left: -120px; top: 150px; width: 120px; height: 120px; border-radius: 50%; background: var(--mint); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-30px, 24px); } }
@media (prefers-reduced-motion: reduce) { .whisper, .shout, .deck, .hero-meta, .hazard { animation: none; } html { scroll-behavior: auto; } }

/* Layout */
.layout { max-width: 1100px; margin: 0 auto; padding: 24px 24px 96px; display: grid; grid-template-columns: 240px var(--measure); gap: 64px; justify-content: center; }

/* StoryStream rail for contents */
.stream { position: sticky; top: 24px; align-self: start; }
.stream-label { margin: 0 0 12px; color: var(--text-2); }
.stream ol { margin: 0; padding: 0 0 0 18px; list-style: none; border-left: 1px solid var(--uv-rule); }
.stream li { position: relative; padding: 6px 0; display: flex; gap: 12px; align-items: baseline; }
.stream li::before { content: ""; position: absolute; left: -22px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--canvas); border: 1px solid var(--uv-rule); }
.stream li:hover::before { background: var(--uv); border-color: var(--uv); }
.stamp { font: 600 11px/1.2 var(--mono); letter-spacing: 1.1px; color: var(--text-2); flex: 0 0 auto; }
.stream a { font: 500 15px/1.3 var(--sans); color: var(--text); text-decoration: none; }
.stream a:hover { color: var(--link-hover); }

/* Article body */
.article { font: 500 17px/1.65 var(--sans); }
.article > * + * { margin-top: 1.15em; }
.article > p:first-of-type { font-size: 20px; line-height: 1.5; font-weight: 300; color: var(--text-muted); }
.article h3 { margin-top: 2em; font: 700 24px/1.05 var(--sans); }
.article h2 + p, .article h3 + p { margin-top: .6em; }
.article a { color: var(--uv); text-decoration: underline; text-decoration-color: rgba(82,0,255,.35); text-underline-offset: 3px; }
.article a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
.article strong { font-weight: 700; color: #000; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: .5em; }
.article li::marker { color: var(--uv); }

/* Section heads as color-block tiles */
.article h2.tile {
  margin-top: 3em; padding: 22px 24px 20px; border-radius: 20px;
  display: flex; flex-direction: column; gap: 10px; color: #131313;
  transition: transform .2s ease;
}
.article h2.tile:hover { transform: translateX(6px); }
.article h2.tile:first-child { margin-top: .5em; }
.tile .kicker { font: 600 12px/1.3 var(--mono); letter-spacing: 1.8px; text-transform: uppercase; opacity: .75; }
.tile .tile-title { font: 700 clamp(26px, 3.4vw, 34px)/1 var(--sans); letter-spacing: -.2px; }
.tile-mint { background: var(--mint); }
.tile-purple { background: var(--uv); color: #fff !important; }
.tile-yellow { background: var(--yellow); }
.tile-pink { background: var(--pink); }
.tile-orange { background: var(--orange); }
.tile-white { background: #fff; border: 1px solid var(--ink); }

/* Pull quotes — serif exception, print voice */
.article blockquote {
  margin: 1.8em 0; padding: 18px 22px; border-left: 4px solid var(--mint); background: var(--slate); border-radius: 0 20px 20px 0;
  font: 400 20px/1.3 Georgia, "Times New Roman", serif; letter-spacing: -.16px; color: var(--text-muted);
}
.article blockquote p { margin: 0; }

/* Code — mono, slate surface, framed */
.article code { font: 400 .86em/1.4 var(--mono); background: var(--slate); padding: .12em .4em; border-radius: 6px; color: var(--ink); }
.article pre { margin: 1.6em 0; padding: 16px 18px; overflow-x: auto; background: var(--slate); border: 1px solid var(--frame); border-radius: 20px; font-size: 13.5px; line-height: 1.6; }
.article pre code { background: none; padding: 0; font-size: inherit; }

/* Tables */
.article table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6em 0; font-size: 15px; display: block; overflow-x: auto; border: 1px solid var(--frame); border-radius: 20px; }
.article th, .article td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--frame); vertical-align: top; }
.article tr:last-child td { border-bottom: 0; }
.article thead th { font: 600 11px/1.3 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-2); }
.article td:first-child { font: 600 11px/1.5 var(--mono); letter-spacing: 1.1px; text-transform: uppercase; color: var(--uv); white-space: nowrap; }

.article hr.rule { border: 0; height: 1px; margin: 3em 0; background: var(--frame); }

/* Footer */
.foot { background: var(--ink); color: #fff; }
.foot-inner { max-width: 1100px; margin: 0 auto; padding: 32px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { text-decoration: none; color: #fff; }
.foot nav a:hover { color: var(--link-hover); }
.fine { color: #949494; }
.foot .brand { color: #fff; }
.foot .brand span { color: var(--mint); }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, var(--measure)); gap: 28px; }
  .stream { position: static; }
  .hazard { width: 160px; height: 160px; top: 20px; }
}
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .topnav { gap: 14px; }
  .topnav a:not(.pill) { display: none; }
  .hero { padding: 40px 16px 32px; }
  .layout { padding: 16px 16px 72px; }
  .article { font-size: 16px; }
  .article h2.tile { padding: 18px; border-radius: 16px; }
  .article h2.tile:hover { transform: none; }
}
