:root {
  --paper: #f2ede1;
  --paper-deep: #e5ddc9;
  --ink: #1c1a16;
  --ink-soft: #4a453c;
  --rule: #9a9182;
  --press-red: #b3311b;
  --phosphor: #43d9a8;
  --phosphor-deep: #0d6b5c;

  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --sp-1: .5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: 6rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(28, 26, 22, .045) 1px, transparent 1.3px);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.05rem, .98rem + .3vw, 1.2rem);
  line-height: 1.6;
  font-optical-sizing: auto;
}

h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 var(--sp-2); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--press-red); }
:focus-visible { outline: 3px solid var(--press-red); outline-offset: 3px; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .82em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: var(--sp-2); top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: var(--sp-1) var(--sp-2);
  font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.skip:focus { top: var(--sp-1); color: var(--paper); }

.wrap { width: min(100% - 2rem, 78rem); margin-inline: auto; }

.label {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; font-size: .85rem; color: var(--press-red); margin-bottom: var(--sp-1);
}
.label--light { color: var(--phosphor); }
.section-title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: .9; letter-spacing: .01em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  text-transform: uppercase; letter-spacing: .12em;
  padding: .7rem 1.2rem; border: 2px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--press-red); border-color: var(--press-red); color: var(--paper); box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost:hover { background: var(--paper-deep); }
.btn--red { background: var(--press-red); border-color: var(--press-red); color: #fff; }
.btn--red:hover { box-shadow: 3px 3px 0 var(--ink); color: #fff; }
.btn--small { padding: .3rem .7rem; font-size: .85rem; }

/* Masthead */
.masthead { padding-top: var(--sp-2); }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2);
  border-bottom: 1px solid var(--ink); padding-bottom: var(--sp-1);
}
.topbar__meta {
  margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: .8rem; color: var(--ink-soft);
}
.nav-toggle {
  display: none; align-items: center; gap: .5rem;
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  background: var(--ink); color: var(--paper); border: 0; padding: .55rem .8rem; cursor: pointer; fill: currentColor;
}
.js .nav-toggle { display: inline-flex; }

.brand {
  display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vw, 1.25rem);
  text-decoration: none; color: var(--ink); padding: var(--sp-3) 0 var(--sp-2);
}
.brand:hover { color: var(--ink); }
.brand__mark { width: clamp(2.6rem, 9vw, 7rem); height: auto; flex: none; transition: transform .25s ease; }
.brand:hover .brand__mark { transform: rotate(-6deg); }
.brand__name {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.9rem, 13vw, 10rem); line-height: .82; letter-spacing: -.005em; white-space: nowrap;
}

.dateline {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem var(--sp-2);
  border-top: 4px double var(--ink); border-bottom: 1px solid var(--ink);
  padding: .45rem 0; font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: .82rem;
}
.dateline__mid { font-family: var(--text); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 1rem; }

.site-nav ul {
  list-style: none; margin: 0; padding: var(--sp-1) 0;
  display: flex; flex-direction: column;
}
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }
.site-nav a {
  display: block; padding: .6rem 0; text-decoration: none;
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  border-bottom: 1px solid var(--paper-deep);
}
.site-nav a[aria-current="page"] { color: var(--press-red); }

/* Build log strip */
.buildlog {
  background: var(--ink); color: var(--paper); margin-top: var(--sp-2);
  overflow-x: auto; scrollbar-width: thin;
}
.buildlog__list {
  list-style: none; margin: 0; padding: .55rem 1rem; display: flex; gap: 1.6rem;
  width: max-content; margin-inline: auto;
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .9rem;
}
.buildlog__list li { display: flex; align-items: center; gap: 1.6rem; white-space: nowrap; }
.buildlog__list li + li::before { content: ""; width: 6px; height: 6px; background: var(--press-red); margin-left: -1.6rem; margin-right: 0; }
.buildlog__list li + li { padding-left: 0; }
.buildlog strong { color: var(--phosphor); }

/* Front page grid */
.front { padding: var(--sp-4) 0 var(--sp-5); display: grid; gap: var(--sp-4); }
.story { min-width: 0; }
.kicker {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; font-size: .85rem; color: var(--press-red); margin-bottom: .4rem;
}
.story__title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  line-height: .93; letter-spacing: .005em; margin-bottom: var(--sp-2);
  text-wrap: balance;
}
.story--lead .story__title { font-size: clamp(2.3rem, 6.2vw, 4.6rem); }
.story--side .story__title { font-size: clamp(1.7rem, 3.6vw, 2.35rem); }
.dek { font-style: italic; font-size: 1.15em; line-height: 1.45; color: var(--ink-soft); max-width: 40em; }
.story--side .dek { font-size: 1.02em; }
.byline {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: .4rem 0; margin-bottom: var(--sp-3);
}
.byline strong { color: var(--press-red); }

.illo { margin: 0 0 var(--sp-3); }
.illo svg { display: block; width: 100%; height: auto; border: 2px solid var(--ink); }
.illo figcaption { font-size: .9rem; font-style: italic; color: var(--ink-soft); padding-top: .4rem; }
.illo figcaption span {
  font-family: var(--display); font-style: normal; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ink); margin-right: .4rem;
}

.story__body { max-width: 68ch; }
.story__body > p:first-child::first-letter {
  float: left; font-family: var(--display); font-weight: 900; color: var(--press-red);
  font-size: 4.3em; line-height: .78; padding: .06em .1em 0 0;
}
.story--side .story__body > p:first-child::first-letter { font-size: 3.4em; }
.story__more h4 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  font-size: 1.35rem; margin: var(--sp-3) 0 .35rem;
}
.story__more pre {
  background: var(--ink); color: var(--phosphor); padding: var(--sp-2); overflow-x: auto;
  margin: 0 0 var(--sp-2); line-height: 1.5; break-inside: avoid; border-left: 6px solid var(--press-red);
}
.story__more code { background: var(--paper-deep); padding: .05em .3em; }
.story__more pre code { background: none; padding: 0; font-size: 1em; }

.timeline { list-style: none; margin: 0 0 var(--sp-2); padding: 0; border-left: 3px solid var(--ink); }
.timeline li { padding: .2rem 0 .5rem 1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7.5px; top: .7rem; width: 12px; height: 12px; background: var(--press-red); }
.timeline b { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; margin-right: .3rem; }

.cutlist { list-style: none; margin: 0 0 var(--sp-2); padding: 0; border-top: 2px solid var(--ink); }
.cutlist li {
  display: flex; justify-content: space-between; gap: var(--sp-2); padding: .45rem 0;
  border-bottom: 1px dashed var(--rule); text-decoration: line-through; text-decoration-color: var(--press-red);
}
.cutlist b { font-family: var(--display); letter-spacing: .06em; color: var(--press-red); text-decoration: none; white-space: nowrap; }

.story__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-top: var(--sp-2); }
.copy-status { font-style: italic; font-size: .92rem; color: var(--phosphor-deep); min-height: 1.4em; }

.front__side { display: grid; gap: var(--sp-4); border-top: 4px double var(--ink); padding-top: var(--sp-4); }
.story--side + .story--side { border-top: 1px solid var(--ink); padding-top: var(--sp-4); }

/* Reveal motion */
.can-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.can-reveal .reveal.is-in { opacity: 1; transform: none; }

/* Desk (calculator) */
.desk { background: var(--ink); color: var(--paper); padding: var(--sp-5) 0; position: relative; }
.desk::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(67, 217, 168, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(67, 217, 168, .06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.desk__grid { position: relative; display: grid; gap: var(--sp-4); }
.desk__title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .9;
  font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: var(--sp-2);
}
.desk__intro p { max-width: 46ch; }
.desk em { color: var(--phosphor); font-style: italic; }

.fps { border: 0; padding: 0; margin: var(--sp-3) 0; }
.fps legend {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .85rem;
  margin-bottom: .5rem; padding: 0;
}
.fps__opts { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--paper); }
.fps__opts label { position: relative; cursor: pointer; }
.fps__opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fps__opts span {
  display: block; text-align: center; padding: .55rem 0;
  font-family: var(--display); font-weight: 900; font-size: 1.4rem;
}
.fps__opts label + label span { border-left: 2px solid var(--paper); }
.fps__opts input:checked + span { background: var(--phosphor); color: var(--ink); }
.fps__opts input:focus-visible + span { outline: 3px solid #ff7a5c; outline-offset: -5px; }

.readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-1); margin: 0 0 var(--sp-2); }
.readout div { border-top: 2px solid var(--paper); padding-top: .4rem; }
.readout dt { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; }
.readout dd { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1; color: var(--phosphor); }
.readout dd::after { content: " ms"; font-size: .4em; letter-spacing: .1em; color: var(--paper); }
.readout dd.is-over { color: #ff7a5c; }
.verdict { font-style: italic; font-size: 1.1rem; min-height: 3.4em; }
.verdict.is-over { color: #ff9c85; }

.sys { display: grid; gap: var(--sp-2); }
.sys__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .25rem var(--sp-1); }
.sys__row label { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.sys__row output { font-family: var(--display); font-weight: 900; font-size: 1.15rem; color: var(--phosphor); font-variant-numeric: tabular-nums; }
.sys__row input { grid-column: 1 / -1; width: 100%; accent-color: var(--phosphor); margin: 0; height: 1.6rem; cursor: pointer; }

.sw { display: inline-block; width: 14px; height: 14px; flex: none; }
.sw--render { background: var(--phosphor); }
.sw--sim { background: var(--paper); }
.sw--ai { background: #e8a33d; }
.sw--game { background: #e0573c; }
.sw--audio { background: #8fb0ff; }
.sw--ui { background: #b9ae95; }

.bar { position: relative; display: flex; height: 3rem; margin-top: var(--sp-4); background: rgba(242, 237, 225, .08); border: 2px solid var(--paper); }
.bar__seg { display: block; height: 100%; width: 0; }
.bar__seg + .bar__seg { box-shadow: inset 2px 0 0 var(--ink); }
.bar__over {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, rgba(28, 26, 22, .65) 0 5px, transparent 5px 10px);
}
.bar__marker { position: absolute; top: -.9rem; bottom: -.6rem; width: 3px; margin-left: -1.5px; background: #ff7a5c; }
.bar__marker span {
  position: absolute; top: -1.4rem; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: #ff9c85;
}
.desk__note { margin-top: var(--sp-3); font-size: .95rem; color: #d6cfbf; font-style: italic; max-width: 52ch; }

/* The Wire */
.wire { padding: var(--sp-5) 0; }
.wire__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--sp-2); border-bottom: 4px double var(--ink); padding-bottom: var(--sp-2); }
.wire__filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.wire__filters button {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .9rem;
  background: transparent; color: var(--ink); border: 2px solid var(--ink); padding: .4rem .8rem; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.wire__filters button:hover { background: var(--paper-deep); }
.wire__filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.wire__count { font-style: italic; color: var(--ink-soft); margin: var(--sp-1) 0 var(--sp-3); font-size: .95rem; }
.wire__list { list-style: none; margin: 0; padding: 0; counter-reset: wire; columns: 1; column-gap: var(--sp-4); column-rule: 1px solid var(--rule); }
.wire__item { break-inside: avoid; padding: 0 0 var(--sp-3); margin-bottom: var(--sp-3); border-bottom: 1px solid var(--rule); counter-increment: wire; position: relative; }
.wire__item::before {
  content: counter(wire, decimal-leading-zero); position: absolute; right: 0; top: -.2rem;
  font-family: var(--display); font-weight: 900; font-size: 2.2rem; color: var(--paper-deep); line-height: 1;
  -webkit-text-stroke: 1px var(--rule);
}
.tag { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--phosphor-deep); }
.wire__item h3 { font-family: var(--text); font-weight: 600; font-size: 1.2rem; line-height: 1.25; margin: .25rem 3rem .4rem 0; }
.wire__item p { margin: 0; font-size: .98rem; color: var(--ink-soft); }

/* Subscribe */
.sub { background: var(--paper-deep); border-top: 2px solid var(--ink); padding: var(--sp-5) 0; }
.sub__grid { display: grid; gap: var(--sp-4); }
.staff { border: 2px solid var(--ink); padding: var(--sp-3); background: var(--paper); align-self: start; }
.staff dl { margin: 0 0 var(--sp-3); }
.staff dl div { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.staff dt { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: 1.2rem; }
.staff dd { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.staff__letters { margin-bottom: .3rem; font-style: italic; }
.staff__email { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-weight: 600; word-break: break-all; }

.signup__lede { max-width: 52ch; margin-top: var(--sp-2); }
.signup__form { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); max-width: 36rem; }
.field label { display: block; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; margin-bottom: .3rem; }
.field input, .field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 0; padding: .65rem .8rem;
}
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--press-red); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--press-red); background: #f8e7e1; }
.field__err { margin: .3rem 0 0; color: var(--press-red); font-size: .92rem; font-weight: 600; min-height: 0; }
.field__err:empty { display: none; }
.signup__form .btn { justify-self: start; }
.signup__ok {
  margin: 0; padding: var(--sp-2); border-left: 6px solid var(--phosphor-deep); background: var(--paper);
  font-weight: 600; color: var(--phosphor-deep);
}

/* Footer */
.footer { background: var(--ink); color: var(--paper); padding: var(--sp-4) 0; }
.footer__grid { display: grid; gap: var(--sp-3); }
.footer__brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 1.8rem; letter-spacing: .02em; }
.footer__brand svg { outline: 2px solid var(--paper); }
.footer__brand:hover { color: var(--phosphor); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.footer nav a { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; text-decoration: none; }
.footer nav a:hover { color: var(--phosphor); }
.footer :focus-visible { outline-color: var(--phosphor); }
.footer__colophon { margin: 0; font-size: .9rem; color: #cfc7b5; font-style: italic; max-width: 60ch; }

/* Breakpoints */
@media (min-width: 640px) {
  .wire__list { columns: 2; }
  .sub__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .sub__grid .staff { order: 0; }
}

@media (min-width: 860px) {
  .js .nav-toggle { display: none; }
  .js .site-nav, .site-nav { display: block; }
  .site-nav ul { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--ink); padding: 0; }
  .site-nav li + li { border-left: 1px solid var(--rule); }
  .site-nav a { border: 0; padding: .55rem 1.1rem; font-size: .95rem; }
  .site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

  .front { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 0; }
  .story--lead { padding-right: var(--sp-4); }
  .front__side { border-top: 0; padding-top: 0; border-left: 1px solid var(--ink); padding-left: var(--sp-4); align-content: start; }

  .desk__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--sp-5); align-items: start; }
  .footer__grid { grid-template-columns: auto 1fr; align-items: center; }
  .footer__grid nav { justify-self: end; }
  .footer__colophon { grid-column: 1 / -1; border-top: 1px solid var(--ink-soft); padding-top: var(--sp-2); }
}

@media (min-width: 1100px) {
  .story--lead .story__body { max-width: none; columns: 2; column-gap: var(--sp-4); column-rule: 1px solid var(--rule); }
  .story--lead .story__more h4 { break-after: avoid; }
  .wire__list { columns: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .can-reveal .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
