/* Rusty Tools - rust-app.com
   Tokens come from the Craft Bind Maker's own theme, so the site and the tool
   read as one product.

   Design system: all-sharp. Zero border radius anywhere; the signature detail
   is a chamfered (cut) top-right corner on primary surfaces and a 2px oxide
   bar on the leading edge. Dark-locked: the tool is dark-only, and a light
   landing page handing off to a dark app reads as two different products. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #12100e;
  --bg-panel: #1b1815;
  --bg-panel-hi: #232019;
  --bg-input: #0e0c0b;

  --line: #2e2a25;
  --line-strong: #3d3730;

  --text: #efe9e2;
  --text-dim: #9c9188;
  --text-faint: #6b625a;

  --accent: #d45a28;
  --accent-hover: #e86b34;
  --accent-press: #b84a1e;

  --shell: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* The one corner treatment on this site: a 14px cut, never a curve. */
  --chamfer: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
code {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.85em;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line);
  padding: 1px 6px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- nav ---------- */

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 16, 14, 0.88);
  backdrop-filter: blur(10px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  font-size: 16px;
  /* Same hover the Bind Maker's own header has, so the wordmark reads as a
     link on every page of the product rather than only on the tool. */
  color: var(--text);
  transition: color 0.15s var(--ease);
}
.wordmark:hover { color: var(--accent-hover); }
.wordmark:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

/* The scorched hammer stands on its own: no plate, no rounding. */
.wordmark .mark {
  width: 52px;
  height: 52px;
  display: block;
}

.nav-spacer { flex: 1; }

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  margin-right: 18px;
  transition: color 0.15s var(--ease);
}
.nav-link:hover { color: var(--text); }

/* ---------- buttons: sharp, pressed = pushed in ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
    transform 0.1s var(--ease), color 0.15s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff6f1;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); background: var(--bg-panel-hi); }
.btn-ghost:active { transform: translateY(1px); }

.btn-sm { padding: 8px 16px; font-size: 14px; }

.arrow {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-top: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s var(--ease);
  flex: none;
}
.btn:hover .arrow { transform: rotate(45deg) translate(2px, -2px); }

:where(a, button, summary, input):focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

/* ---------- hero ---------- */

.hero {
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 600;
}

h1 .muted { color: var(--text-dim); }

.tool-panel {
  margin-top: 32px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  clip-path: var(--chamfer);
  padding: 22px;
  display: grid;
  gap: 16px;
  position: relative;
  transition: border-color 0.2s var(--ease);
}
.tool-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
}
.tool-panel:hover { border-color: var(--line-strong); }

.tool-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.tool-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tool-host {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--text-faint);
}
.tool-desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
  max-width: 48ch;
}
.tool-panel .btn { justify-self: start; }

/* ---------- hero demo loop ---------- */

.demo {
  margin: 0;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.demo-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
/* A short accent rule instead of another all-caps eyebrow. */
.demo-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.demo-frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  clip-path: var(--chamfer);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  /* The frame is sized by the video, so the chamfer never crops picture. */
  line-height: 0;
}
/* Same 2px oxide edge the tool panel opposite it carries. */
.demo-frame::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
  z-index: 1;
}

.demo-video {
  display: block;
  width: 100%;
  height: auto;
  /* Declared as well as implied by width/height so the box is reserved at the
     right shape before metadata arrives — no reflow, and never cropped. */
  aspect-ratio: 880 / 804;
}

/* ---------- sections ---------- */

section { padding: 84px 0; }

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.output {
  margin-top: 34px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  clip-path: var(--chamfer);
  padding: 22px 24px;
  overflow-x: auto;
}
.output code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.t-cmd { color: var(--accent); }
.t-key { color: var(--accent-hover); }
.t-verb { color: var(--text); }
.t-arg { color: var(--text-dim); }
.t-sep { color: var(--text-faint); }

.output-note {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--text-faint);
}

/* ---------- split: content left, ad right on desktop ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: 48px;
  align-items: start;
}

.split-ad {
  aspect-ratio: 6 / 3;
  width: 100%;
  min-height: 200px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.split-ad .adsbygoogle { display: block; width: 100%; height: 100%; }

.split.no-ad { grid-template-columns: 1fr; }
.split.no-ad .split-ad { display: none; }

/* ---------- faq: native accordions, answers always in the DOM ---------- */

.faq { padding-top: 0; }
.faq-list { margin-top: 30px; max-width: 800px; border-top: 1px solid var(--line); }

.faq-item {
  border-bottom: 1px solid var(--line);
  transition: background 0.15s var(--ease);
}
.faq-item[open] { background: var(--bg-panel); }
.faq-item[open] summary { color: var(--accent-hover); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 16px;
  font-weight: 600;
  font-size: 15.5px;
  transition: color 0.15s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--text); background: var(--bg-panel); }

/* Plus made of two bars: rotates to a cross when open. */
.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--text-faint), var(--text-faint)) center / 12px 1.6px no-repeat,
    linear-gradient(var(--text-faint), var(--text-faint)) center / 1.6px 12px no-repeat;
  transition: transform 0.2s var(--ease);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
  background:
    linear-gradient(var(--accent-hover), var(--accent-hover)) center / 12px 1.6px no-repeat,
    linear-gradient(var(--accent-hover), var(--accent-hover)) center / 1.6px 12px no-repeat;
}

.faq-a {
  padding: 0 16px 18px;
  color: var(--text-dim);
  font-size: 14.5px;
  max-width: 68ch;
}
.faq-a b { color: var(--text); }

/* ---------- breadcrumbs (item pages) ---------- */

.crumbs {
  padding: 26px 0 0;
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs b { color: var(--text); font-weight: 500; }

/* ---------- item page ---------- */

.item-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 44px 0 64px;
}

.item-art {
  margin: 0;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  clip-path: var(--chamfer);
  padding: 10px;
}
.item-art img { display: block; width: 100%; height: auto; }

.item-facts h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }

.facts {
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.facts dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.facts dd { margin: 0; font-size: 15px; }
.facts code { font-size: 14px; }

.item-desc {
  margin: 20px 0 0;
  color: var(--text-dim);
  max-width: 60ch;
}

/* Question, steps, command and CTA on the left; a tall unit on the right. */
.item-bind {
  padding-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
  gap: 48px;
  align-items: start;
}
.item-bind h2 { max-width: 30ch; }
.item-bind .btn { margin-top: 26px; }

.bind-steps {
  margin: 18px 0 0;
  padding: 0 0 0 18px;
  color: var(--text-dim);
  max-width: 62ch;
}
.bind-steps li { margin: 0 0 6px; }
.bind-steps li::marker { color: var(--accent); }
.bind-steps b { color: var(--text); }

.item-ad-tall {
  /* Portrait unit: taller than wide, sitting beside the instructions. */
  aspect-ratio: 3 / 4;
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.item-ad-tall .adsbygoogle { display: block; width: 100%; height: 100%; }

.item-bind.no-ad { grid-template-columns: 1fr; }
.item-bind.no-ad .item-ad-tall { display: none; }

.related { padding-top: 0; }
.related-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.related-list li { background: var(--bg); }
.related-list a {
  display: block;
  padding: 13px 16px;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.related-list a:hover { background: var(--bg-panel); color: var(--text); }

/* ---------- items index ---------- */

.index-head { padding: 56px 0 28px; }
.index-sub { margin: 14px 0 0; color: var(--text-dim); max-width: 60ch; }
.index-body { padding: 0 0 84px; }

#filter {
  margin-top: 26px;
  width: 100%;
  max-width: 480px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 12px 16px;
}
#filter:focus { border-color: var(--line-strong); outline: none; }
#filter::placeholder { color: var(--text-faint); }

.index-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.index-list li { background: var(--bg); }
.index-list a {
  /* The display name is what people scan, so it gets priority; the short name
     truncates before the name does. */
  display: grid;
  grid-template-columns: 28px minmax(0, 1.7fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s var(--ease);
}
.index-list a:hover { background: var(--bg-panel); }
.index-list img { display: block; }
.ix-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.index-list code {
  color: var(--text-faint);
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ix-id {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  color: var(--text-faint);
  font-size: 13.5px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
footer p { margin: 0 0 6px; max-width: 56ch; }
footer a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { color: var(--text); }

/* ---------- motion ----------
   No entrance animations, on purpose: fading the hero from opacity 0 delays
   LCP, and any run where the animation fails leaves the page blank. Motion is
   hover and press feedback only, which cannot hide content. */

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-top: 44px; padding-bottom: 44px; }
  section { padding: 60px 0; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-ad { aspect-ratio: 4 / 3; min-height: 240px; }
  .item-hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 48px; }
  .item-bind { grid-template-columns: 1fr; gap: 32px; }
  .item-ad-tall { aspect-ratio: 4 / 3; min-height: 280px; }
  .item-art { max-width: 340px; }
  .related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .shell { padding-inline: 18px; }
  .nav { height: 64px; }
  .wordmark .mark { width: 40px; height: 40px; }
  .nav-link { display: none; }
  .output { padding: 18px 16px; }
  .output code { font-size: 12.5px; }
  .related-list { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Long-form pages: guides, about, privacy, terms, contact.
   The landing page is all panels and grids; these are just text, so they get
   a single narrow measure and generous vertical rhythm instead.
   --------------------------------------------------------------------------- */

.page-head {
  padding: 56px 0 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-head .lede {
  margin: 14px 0 0;
  max-width: 68ch;
  color: var(--text-dim);
  font-size: 18px;
}
.page-head .meta {
  margin: 18px 0 0;
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prose {
  max-width: 74ch;
  padding: 40px 0 72px;
  font-size: 17px;
}
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  margin: 48px 0 0;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}
.prose h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 12px;
  background: var(--accent);
}
.prose h3 {
  margin: 34px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.prose p { margin: 16px 0 0; color: var(--text-dim); }
.prose li { margin: 8px 0; color: var(--text-dim); }
.prose ul, .prose ol { margin: 16px 0 0; padding-left: 22px; }
.prose b, .prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.prose a:hover { color: var(--accent-hover); border-bottom-color: currentColor; }
.prose code { white-space: nowrap; }

.prose .note {
  margin: 26px 0 0;
  padding: 16px 18px;
  background: var(--bg-panel);
  border-left: 2px solid var(--accent);
  color: var(--text-dim);
  font-size: 15px;
}
.prose .note b { color: var(--text); }

/* Wide reference tables (key lists, yield lists) scroll rather than squash. */
.tablewrap {
  margin: 22px 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
table.ref {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.ref th,
table.ref td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.ref th {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-panel-hi);
  position: sticky;
  top: 0;
}
table.ref td { color: var(--text-dim); }
table.ref tr:last-child td { border-bottom: 0; }
table.ref td code { background: none; border: 0; padding: 0; color: var(--text); }

/* Guides index */
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  padding: 40px 0 72px;
}
.guide-card {
  display: block;
  padding: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  clip-path: var(--chamfer);
  text-decoration: none;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.guide-card:hover { background: var(--bg-panel-hi); border-color: var(--line-strong); }
.guide-card h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}
.guide-card p { margin: 10px 0 0; color: var(--text-dim); font-size: 15px; }
.guide-card .go { display: block; margin-top: 16px; color: var(--accent); font-size: 14px; }
footer b { display: block; margin-bottom: 8px; color: var(--text-dim); font-weight: 600; }
footer .footer-grid > div { min-width: 130px; }
footer .footer-grid > div:first-child { flex: 1 1 320px; min-width: 260px; }

/* ---------------------------------------------------------------------------
   Article furniture: bylines, inline item art, diagrams.
   --------------------------------------------------------------------------- */
.byline { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; color: var(--text-faint); font-size: 13.5px; }
.byline img { width: 26px; height: 26px; }
.byline a { color: var(--text-dim); }
.prose figure { margin: 26px 0 0; }
.prose figure.diagram { background: var(--bg-panel); border: 1px solid var(--line); padding: 18px; }
.prose figure svg { width: 100%; height: auto; display: block; }
.prose figcaption { margin-top: 10px; color: var(--text-faint); font-size: 13px; }
table.ref td img { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
table.ref td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.ref tr.hi td { color: var(--text); background: var(--bg-panel-hi); }
.iconlist { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.iconlist a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; background: var(--bg-panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; }
.iconlist a:hover { border-color: var(--line-strong); background: var(--bg-panel-hi); }
.iconlist img { width: 26px; height: 26px; }
.prose .lead-art { float: right; margin: 0 0 12px 22px; width: 128px; height: 128px; }
@media (max-width: 640px) { .prose .lead-art { float: none; margin: 0 0 12px; width: 96px; height: 96px; } }
/* Tables and figures never sit beside the floated lead art: a table squeezed
   next to a 128px float reads as broken. */
.prose .tablewrap, .prose figure, .prose .iconlist, .prose .output { clear: both; }
/* Reference tables must never be silently cut off. Text cells wrap; only the
   header row and numeric cells stay on one line. */
table.ref td:not(.num) { white-space: normal; min-width: 9ch; }
table.ref th { white-space: nowrap; }
/* A bind line is meant to be read, not scrolled: wrap it. Copying wrapped
   text still yields a single line, because the DOM has no line breaks. */
.output code { white-space: pre-wrap; overflow-wrap: anywhere; display: block; }
/* A 400px minimum column overflows a phone; cap it at the container width. */
.index-list { grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr)); }
/* Item-name column stays on one line; the table scrolls on phones anyway. */
table.ref td:first-child { white-space: nowrap; }
/* On a phone a diagram shrunk to 340px is unreadable. Keep it legible and let
   the figure scroll sideways instead. */
@media (max-width: 640px) {
  .prose figure.diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose figure.diagram svg { min-width: 680px; }
}
/* Ad slots are invisible until AdSense reports the unit as filled. An
   unfilled unit renders as a white iframe on a dark page, and an unapproved
   account never fills, so the default layout is the ad-free one. */
.split { grid-template-columns: 1fr; }
.split-ad { display: none; }
.split.has-ad { grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr); }
.split.has-ad .split-ad { display: block; }
.item-bind { grid-template-columns: 1fr; }
.item-ad-tall { display: none; }
.item-bind.has-ad { grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr); }
.item-bind.has-ad .item-ad-tall { display: block; }
/* Text keeps a reading measure; tables, figures and icon rows may use the
   whole shell. The lead art sits in the right-hand gutter that leaves free. */
.prose { max-width: none; position: relative; }
.prose > :not(.tablewrap):not(figure):not(.iconlist):not(.lead-art) { max-width: 74ch; }
.prose .lead-art { float: none; position: absolute; right: 0; top: 40px; margin: 0; }
table.ref th { white-space: normal; }
@media (max-width: 1100px) {
  .prose .lead-art { position: static; display: block; width: 96px; height: 96px; margin: 0 0 14px; }
}
/* Two-column fact tables read better at text width than stretched across the shell. */
.prose > .tablewrap.narrow { max-width: 74ch; }
/* A diagram that scrolls sideways on a phone says so. */
@media (max-width: 640px) {
  .prose figure.diagram { position: relative; }
  .prose figure.diagram::before { content: "scroll sideways \2194"; position: absolute; top: 6px; right: 10px; font-size: 11px; color: var(--text-faint); letter-spacing: .04em; pointer-events: none; }
}
