/* LanguageMyna base: fonts, colours, type, the header and the footer.
   Paper and ink, a slab serif for anything big, and the myna's orange bill
   and yellow wattle for emphasis. Each country's own colours live with its
   sign in 30-signs.css. */

@font-face {
  font-family: "Roboto Slab";
  src: url("/fonts/roboto-slab.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("/fonts/roboto-slab-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Doto";
  src: url("/fonts/doto.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --paper-2: #e9e3d5;
  --card: #fbf9f4;
  --ink: #141312;
  --ink-2: #565149;
  --ink-3: #8b857a;
  --rule: rgba(20, 19, 18, 0.14);
  --rule-2: rgba(20, 19, 18, 0.3);
  --bill: #ff4f00;
  --wattle: #ffd400;
  --hl: var(--wattle);

  --slab: "Roboto Slab", Rockwell, Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --dot: "Doto", "JetBrains Mono", monospace;
  --jp-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  --jp-serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --ko-sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --ko-serif: "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif;
  --zh-serif: "Songti SC", "STSong", "Noto Serif SC", serif;

  --gutter: clamp(16px, 3vw, 40px);
  --max: 1440px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Paper grain over everything, like a print. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0 0.06 0 0 0 .28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--bill); outline-offset: 3px; }

:lang(ja) { font-family: var(--slab), var(--jp-serif); }
:lang(ko) { font-family: var(--slab), var(--ko-serif); }
:lang(zh) { font-family: var(--slab), var(--zh-serif); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 3px; }
.skip:focus { top: 12px; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 4; }

/* ------------------------------------------------------------ parts */

.box { border: 1px solid var(--rule-2); background: var(--card); border-radius: 4px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
  width: max-content;
  padding: 8px 12px 7px;
  border: 1px solid var(--rule-2);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag span { color: var(--bill); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font: 600 15px/1 var(--sans);
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--bill); }
.btn-lg { padding: 18px 26px; font-size: 18px; }

/* Headings: light slab, with one heavy phrase on a marker stroke. */
h2 {
  font: 300 clamp(44px, 7.2vw, 116px)/0.95 var(--slab);
  letter-spacing: -0.04em;
  max-width: 17ch;
  text-wrap: balance;
}
h2 em, .hero-title em {
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.045em;
}
h2 em {
  background: linear-gradient(transparent 56%, var(--hl) 56% 90%, transparent 90%);
  padding: 0 0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.section { padding: clamp(80px, 11vw, 160px) 0; }
.sec-head { display: grid; gap: clamp(24px, 3vw, 36px); margin-bottom: clamp(40px, 6vw, 84px); }
.sec-head .tag { justify-self: start; }

.dark { background: var(--ink); color: var(--paper); --hl: var(--bill); }
.dark .tag { background: transparent; color: var(--paper); border-color: rgba(243, 239, 230, 0.35); }

/* Reveal on scroll, only where the script runs. */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
html.js [data-reveal].in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ dithered photos */

.dither {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--d-paper, var(--paper));
  isolation: isolate;
}
span.dither { display: inline-block; }
.dither img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--d-pos, 50% 50%);
  /* Without the script: a duotone, the dark of the photo on the paper colour. */
  filter: grayscale(1) contrast(1.35);
  mix-blend-mode: multiply;
}
.dither canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
html.js .dither:not(.is-failed) img { opacity: 0; }

/* ------------------------------------------------------------ header */

.top {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 12px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.top.is-stuck {
  background: rgba(243, 239, 230, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--rule);
}
.top-inner { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; padding: 2px 14px 2px 6px; font-size: 19px; line-height: 1; }
.brand .mark { color: var(--ink); flex: none; }
.wordmark { display: block; flex: none; color: var(--ink); }
.top-nav { display: flex; margin-left: auto; padding: 0 4px; }
.top-nav a { padding: 13px 12px 12px; font: 500 15px/1 var(--sans); border-radius: 3px; }
.top-nav a:hover { background: var(--paper-2); }
@media (max-width: 600px) {
  .top-nav { display: none; }
}
@media (max-width: 420px) {
  .brand { font-size: 17px; padding-right: 10px; }
}

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

.foot { border-top: 1px solid var(--ink); padding-top: clamp(40px, 5vw, 72px); }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 40px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.foot-cols h2 { font: 500 12px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); max-width: none; margin-bottom: 14px; }
.foot-cols li { font-size: 15px; line-height: 1.5; padding: 3px 0; }
.foot-cols li span { color: var(--ink-3); }
.foot-cols a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-word { display: block; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--max) - 2 * var(--gutter)); height: auto; margin: 0 auto; color: var(--ink); overflow: visible; }
.fw-line { fill: none; stroke: var(--ink); stroke-width: 0.7px; }
.fw-line.fw-myna { stroke: var(--bill); }
.fw-fill { fill: url(#fw-dots); opacity: 0; transition: opacity 0.6s; }
.fw-fill.fw-myna { fill: url(#fw-dots-m); }
.foot-word:hover .fw-fill { opacity: 1; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 22px; padding-bottom: 30px; font-size: 14px; color: var(--ink-2); }
.foot-base p:first-child { display: flex; align-items: center; gap: 10px; }
.foot-base .mark { color: var(--ink); }
.foot-sites { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-sites a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.foot-sites b { padding: 4px 5px 3px; background: var(--pl-bg); color: var(--pl-fg); box-shadow: inset 0 0 0 1.2px var(--pl-fg); border-radius: 2px; font: 800 10px/1 var(--sans); font-stretch: 70%; letter-spacing: 0.06em; }
.foot-sites a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .foot-cols { grid-template-columns: 1fr; gap: 28px; }
}

/* ------------------------------------------------------------ 404 */

.lost { position: relative; padding-top: 24px; padding-bottom: 96px; }
.lost-photo { aspect-ratio: 16 / 8.5; max-height: calc(100svh - 170px); width: 100%; border: 1px solid var(--ink); border-radius: 4px; }
.lost-copy {
  position: absolute;
  left: calc(var(--gutter) + 28px);
  top: 64px;
  display: grid;
  gap: 20px;
  justify-items: start;
  max-width: 560px;
  padding: 28px 32px 32px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--ink);
}
.lost-copy .tag { justify-self: start; }
.lost h1 { font: 300 clamp(44px, 6.4vw, 96px)/1.04 var(--slab); letter-spacing: -0.045em; }
/* The block sits behind the line above, so its descenders stay whole. */
.lost-copy { isolation: isolate; }
.lost h1 em { position: relative; z-index: -1; font-style: normal; font-weight: 800; background: var(--bill); padding: 0 0.06em; }
@media (max-width: 760px) {
  .lost-copy { position: static; margin-top: 20px; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* The home page, section by section: a birder's field guide to five
   languages, an art and information page. The country colours of the
   plates, and the feature demos, are in 30-signs.css. */

/* ------------------------------------------------------------ hero
   The flock print across the whole hero, its full width uncropped on a
   wide screen, and the words standing in its empty sky on the left. The
   copy keeps 18.5% of the print's width free under it, so it ends above
   the ridges (they start at 64% of the print's height, which is 42% of
   its width). A big square lens under the mouse shows the illustration in
   colour (client/dither.js), over the words too. On a narrow screen the
   print goes under the words, cropped to the birds. */

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--ink); overflow: hidden; }
.hero-print, .hero-copy { grid-area: 1 / 1; }
.hero-print { align-self: end; justify-self: center; width: 100%; max-width: 1840px; }
.hero-print .dither { width: 100%; aspect-ratio: 1584 / 672; }
.hero-copy {
  position: relative;
  z-index: 1;
  align-self: start;
  display: grid;
  gap: clamp(18px, 2vw, 28px);
  justify-items: start;
  padding-top: clamp(44px, 5vw, 84px);
  padding-bottom: calc(min(100vw, 1840px) * 0.185);
}
.hero-kicker { display: flex; align-items: center; gap: 12px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.hero-kicker::before { content: ""; width: 28px; height: 2px; flex: none; background: var(--bill); }
/* The orange block sits behind the line above, so its descenders stay whole. */
.hero-title { font: 300 clamp(52px, 6.4vw, 104px)/0.94 var(--slab); letter-spacing: -0.05em; isolation: isolate; }
.hero-title > span { display: block; }
.hero-title em { position: relative; z-index: -1; font-style: normal; font-weight: 800; letter-spacing: -0.045em; background: var(--bill); padding: 0 0.07em 0 0.05em; }
.lede { max-width: 30ch; font: 400 clamp(19px, 1.5vw, 23px)/1.45 var(--slab); letter-spacing: -0.01em; color: var(--ink-2); }
.hero-more { font: 600 16px/1 var(--sans); text-decoration: underline; text-decoration-color: var(--bill); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.hero-more:hover { color: var(--bill); }

@media (max-width: 1000px) {
  .hero-print { grid-area: 2 / 1; }
  .hero-print .dither { aspect-ratio: 16 / 10; }
  .hero-copy { padding-bottom: 0; }
}
@media (max-width: 640px) {
  .hero-title { font-size: 15vw; }
  .hero-print .dither { aspect-ratio: 5 / 4; }
}

/* A section with a rule above it. */
.section--rule { border-top: 1px solid var(--ink); }

/* ------------------------------------------------------------ features
   The four things every site has, in one ruled row: a number, the name and
   the language of its demo, the demo in one frame for all four, then what
   it is. On a narrower screen they stack, one to a row. */

.sec-lede { max-width: 46ch; font: 400 clamp(17px, 1.4vw, 20px)/1.5 var(--sans); color: var(--ink-2); }
.dark .sec-lede { color: rgba(243, 239, 230, 0.72); }

.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.feat {
  display: grid;
  grid-template-rows: auto 340px auto 1fr;
  gap: 18px;
  padding: 20px 20px 28px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--card);
}
.feat-tag { display: flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.feat-tag span { color: var(--bill); }
.feat-tag b { margin-left: auto; padding: 5px 7px 4px; background: var(--pl-bg); color: var(--pl-fg); box-shadow: inset 0 0 0 1.5px var(--pl-fg); border-radius: 3px; font: 800 12px/1 var(--sans); font-stretch: 70%; letter-spacing: 0.06em; }
.feat-demo { display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: var(--paper); border: 1px solid var(--rule); padding: 16px 14px; }
.feat h3 { font: 400 clamp(26px, 2.2vw, 32px)/1.08 var(--slab); letter-spacing: -0.03em; }
.feat > p:last-child { color: var(--ink-2); font-size: 16px; line-height: 1.5; }
@media (max-width: 1180px) {
  .feats { grid-template-columns: minmax(0, 1fr); }
  .feat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: clamp(24px, 4vw, 56px); }
  .feat-tag { grid-column: 1 / -1; }
  .feat-demo { grid-column: 1; grid-row: 2 / 4; height: 340px; }
  .feat h3 { grid-column: 2; align-self: end; font-size: clamp(30px, 4vw, 44px); }
  .feat > p:last-child { grid-column: 2; font-size: 18px; max-width: 30em; }
}
@media (max-width: 700px) {
  .feat { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 320px auto auto; }
  .feat-demo, .feat h3, .feat > p:last-child { grid-column: 1; grid-row: auto; height: auto; }
  .feat h3 { font-size: 28px; }
  .feat > p:last-child { font-size: 16px; }
}

/* ------------------------------------------------------------ exams: one trail
   Every exam the same climb (src/trail.js): a dotted range behind, a
   denser ridge in front carrying the trail, a tent at each level and a
   flag with the myna on the summit, over contour lines like a hiking map.
   Positions are percentages of the trail's box, so it fits any width. */

.trails { position: relative; overflow: hidden; }
.trails::before { content: ""; position: absolute; inset: 0; background: url("/topo.svg") center / cover no-repeat; opacity: 0.08; pointer-events: none; }
.trails .wrap { position: relative; }

.routes { border-top: 1px solid rgba(243, 239, 230, 0.22); }
.route {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(160px, 200px);
  gap: clamp(20px, 3vw, 48px);
  align-items: end;
  padding: 22px 0 26px;
  border-bottom: 1px solid rgba(243, 239, 230, 0.22);
}
/* The plates sit in one column, so the exam names line up. */
.route-id { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 16px; align-self: center; }
.route-id .sign { justify-self: start; }
.route-id .pl-sub { display: none; }
.route-id h3 { font: 400 clamp(22px, 1.9vw, 27px)/1.1 var(--slab); letter-spacing: -0.025em; }
.route-id p { margin-top: 6px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: rgba(243, 239, 230, 0.65); }
.route-id a { color: var(--paper); text-decoration: underline; text-decoration-color: rgba(243, 239, 230, 0.4); text-underline-offset: 3px; }
.route-id a:hover { text-decoration-color: var(--paper); }
.route-link { align-self: center; font: 500 15px/1.35 var(--sans); color: var(--paper); justify-self: end; text-align: right; }
.route-link:hover { color: #ffcc00; }

.trail { position: relative; height: 170px; }
.trail-land { position: absolute; inset: 0; transform: scaleY(0); transform-origin: bottom; transition: transform 0.9s cubic-bezier(0.3, 0.8, 0.2, 1) 0.1s; }
.route.in .trail-land, html:not(.js) .trail-land { transform: none; }
.trail-back, .trail-ridge { position: absolute; inset: 0; display: block; }
/* Two dither tones: a sparse grid of dots behind, a checkerboard in front. */
.trail-back { background: radial-gradient(circle at 1px 1px, rgba(243, 239, 230, 0.34) 1px, transparent 1.2px) 0 0 / 6px 6px; }
.trail-ridge { background: repeating-conic-gradient(rgba(243, 239, 230, 0.42) 0 25%, transparent 0 50%) 0 0 / 4px 4px; }
.trail-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(0 100% 0 0); transition: clip-path 1.6s cubic-bezier(0.5, 0, 0.3, 1) 0.6s; }
.route.in .trail-path, html:not(.js) .trail-path { clip-path: inset(0 0 0 0); }
.trail-path polyline { fill: none; stroke: var(--bill); stroke-width: 2.5; stroke-dasharray: 2 7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* A bird: the four frames of src/flap.js in one mask, stepped like a GIF. */
.bird {
  position: absolute;
  width: calc(var(--flap-cols) * 2px);
  height: calc(var(--flap-rows) * 2px);
  background: var(--paper);
  opacity: 0.85;
  -webkit-mask: var(--flap) 0 0 / 400% 100% no-repeat;
  mask: var(--flap) 0 0 / 400% 100% no-repeat;
  animation: flap 0.44s steps(4) var(--d, 0s) infinite, bob 2.6s ease-in-out var(--d, 0s) infinite alternate;
}
@keyframes flap { to { -webkit-mask-position: 133.333% 0; mask-position: 133.333% 0; } }
@keyframes bob { to { translate: 6px -5px; } }

.camps { position: absolute; inset: 0; }
.camp {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  justify-items: center;
  gap: 5px;
  transform: translate(-50%, -100%);
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.3s, translate 0.4s cubic-bezier(0.2, 1.5, 0.4, 1);
  transition-delay: calc(var(--i) * 0.16s + 0.7s);
}
.route.in .camp, html:not(.js) .camp { opacity: 1; translate: 0 0; }
.stop {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 30px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3.5px var(--ink), 0 2px 0 rgba(0, 0, 0, 0.55);
  font: 800 15px/1 var(--sans);
  font-stretch: 66%;
  letter-spacing: 0.05em;
}
.summit .stop { background: #ffcc00; box-shadow: inset 0 0 0 2px #ffcc00, inset 0 0 0 3.5px var(--ink), 0 2px 0 rgba(0, 0, 0, 0.55); }
.tent { position: relative; display: block; width: 18px; height: 12px; background: var(--paper); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tent::after { content: ""; position: absolute; left: 7px; bottom: 0; width: 4px; height: 7px; background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.peak { display: flex; align-items: flex-end; gap: 3px; }
.peak-myna { color: var(--paper); }
.flag { position: relative; display: block; width: 2px; height: 26px; background: var(--paper); }
/* The flag flutters in three frames. */
.flag::after { content: ""; position: absolute; left: 2px; top: 0; width: 15px; height: 11px; background: var(--bill); clip-path: polygon(0 0, 100% 50%, 0 100%); transform-origin: left center; animation: flutter 0.66s steps(1) infinite; }
@keyframes flutter { 0% { transform: none; } 33% { transform: scaleX(0.82) skewY(7deg); } 66% { transform: scaleX(0.92) skewY(-5deg); } }

@media (max-width: 980px) {
  .route { grid-template-columns: 1fr; gap: 16px; }
  .route-link { justify-self: start; text-align: left; }
  .trail { height: 150px; }
}
@media (max-width: 420px) {
  .stop { min-width: 36px; height: 26px; padding: 0 5px; font-size: 13px; }
  .tent { width: 14px; height: 9px; }
  .tent::after { left: 5px; width: 4px; height: 5px; }
}

/* ------------------------------------------------------------ guides */

.index { border-top: 1px solid var(--ink); }
.index a {
  display: grid;
  grid-template-columns: 44px 52px 1fr auto 28px;
  gap: 18px;
  align-items: baseline;
  padding: 22px 10px;
  border-bottom: 1px solid var(--ink);
  transition: background 0.15s, color 0.15s, padding 0.25s;
}
.ix-n { font: 500 13px/1 var(--mono); color: var(--ink-3); }
.ix-code { justify-self: start; padding: 6px 8px 5px; background: var(--pl-bg); color: var(--pl-fg); box-shadow: inset 0 0 0 1.5px var(--pl-fg); border-radius: 3px; font: 800 12px/1 var(--sans); font-stretch: 70%; letter-spacing: 0.06em; transform: translateY(-4px); }
.ix-title { font: 300 clamp(22px, 2.5vw, 38px)/1.15 var(--slab); letter-spacing: -0.03em; }
.ix-site { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.ix-go { font-size: 20px; justify-self: end; transition: transform 0.2s; }
.index a:hover { background: var(--ink); color: var(--paper); padding-left: 22px; }
.index a:hover .ix-site, .index a:hover .ix-n { color: rgba(243, 239, 230, 0.7); }
.index a:hover .ix-go { transform: translate(3px, -3px); color: var(--bill); }
.index-all { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.index-all a { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--ink); border-radius: 3px; font: 500 15px/1 var(--sans); background: var(--card); transition: background 0.15s; }
.index-all a b { font: 900 20px/1 var(--dot); }
.index-all a:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 760px) {
  .index a { grid-template-columns: 34px 1fr 20px; gap: 8px 12px; padding: 18px 4px; }
  .ix-code { grid-column: 2; grid-row: 1; }
  .ix-title { grid-column: 1 / -1; }
  .ix-site { grid-column: 2; }
  .ix-go { grid-column: 3; grid-row: 1; }
}

/* ------------------------------------------------------------ faq */

.faq-wrap { max-width: 1160px; }
.faq details { border-top: 1px solid var(--ink); }
.faq details:last-child { border-bottom: 1px solid var(--ink); }
.faq summary { display: grid; grid-template-columns: 56px 1fr 36px; align-items: baseline; gap: 10px; padding: 26px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.fq-n { font: 500 13px/1 var(--mono); color: var(--bill); }
.fq-q { font: 400 clamp(22px, 2.4vw, 34px)/1.2 var(--slab); letter-spacing: -0.025em; }
.faq summary i { position: relative; width: 22px; height: 22px; align-self: center; justify-self: end; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 0; top: 10px; width: 22px; height: 2px; background: var(--ink); transition: transform 0.25s; }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i::after { transform: rotate(0deg); }
.faq summary:hover .fq-q { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.faq details p { padding: 0 46px 30px 66px; max-width: 54em; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 640px) {
  .faq summary { grid-template-columns: 34px 1fr 26px; }
  .faq details p { padding: 0 0 26px 44px; }
}

/* The plate, and the feature demos.

   One plate for every language (src/signs.js): the same rounded shape, the
   same rule set in from the edge, the same band with the language's code,
   the same condensed capitals. Each language sets only --pl-bg and --pl-fg,
   its country's plate and street-sign colours. Sizes are in em, so
   .sign--sm, --md and --lg scale the whole plate. */

.sign { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.45em; line-height: 1; vertical-align: middle; text-align: left; }
.sign--sm { font-size: 10.5px; }
.sign--md { font-size: 14px; }
.sign--lg { font-size: clamp(15px, 1.3vw, 18px); }

.pl {
  display: inline-flex;
  align-items: stretch;
  height: 3.3em;
  padding: 0.34em;
  border-radius: 0.5em;
  background: var(--pl-bg);
  color: var(--pl-fg);
  box-shadow: inset 0 0 0 0.16em var(--pl-bg), inset 0 0 0 0.28em var(--pl-fg), 0 0.2em 0 rgba(20, 19, 18, 0.35);
}
.pl-band {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 1.9em;
  padding-bottom: 0.42em;
  background: var(--pl-fg);
  color: var(--pl-bg);
  border-radius: 0.24em 0 0 0.24em;
}
.pl-band b { font: 800 0.62em/1 var(--sans); letter-spacing: 0.06em; }
.pl-main {
  display: flex;
  align-items: center;
  padding: 0 0.7em 0 0.62em;
  font: 800 1.7em/1 var(--sans);
  font-stretch: 66%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pl-main:lang(ja) { font: 700 1.45em/1 var(--jp-sans); letter-spacing: 0.08em; }
.pl-main:lang(ko) { font: 700 1.45em/1 var(--ko-sans); letter-spacing: 0.02em; }
.pl-main:lang(zh) { font: 700 1.45em/1 "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif; letter-spacing: 0.1em; }
.pl-sub { font: 500 0.76em/1.2 var(--mono); letter-spacing: 0.03em; white-space: nowrap; color: var(--ink-2); }

/* On the dark exams section, the gloss goes light. */
.dark .pl-sub { color: rgba(243, 239, 230, 0.7); }

/* ------------------------------------------------------------ feature demos
   One frame for all four: a card in ink with a header row. Each takes its
   language's plate colours as --ac (the darker of the two) and --ac-on, for
   whatever is yours or picked: your line on a call, the step you are on,
   the grade you give, the answer you choose. Nothing else changes. */

.dm { width: 100%; max-width: 290px; display: grid; gap: 10px; padding: 12px 13px 13px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); font: 400 13px/1.3 var(--sans); }
.dm-top { display: flex; align-items: center; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--rule-2); }
.dm-top p { display: grid; gap: 4px; }
.dm-top p b { font: 700 14px/1 var(--sans); }
.dm-top p span { font: 500 10px/1 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); }
.dm-time { margin-left: auto; font: 900 19px/1 var(--dot); font-variant-numeric: tabular-nums; }
.dm-face { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ac); color: var(--ac-on); font: 800 14px/1 var(--sans); font-style: normal; }

/* Lines spoken, theirs on paper and yours in the plate's colour. */
.bub { justify-self: start; max-width: 88%; display: grid; gap: 3px; padding: 7px 10px 8px; border: 1px solid var(--ink); border-radius: 12px 12px 12px 3px; background: var(--paper); font: 400 14px/1.3 var(--slab); }
.bub small { font: 400 10.5px/1.25 var(--mono); color: var(--ink-2); }
.bub.me { justify-self: end; border-radius: 12px 12px 3px 12px; background: var(--ac); color: var(--ac-on); border-color: var(--ac); }
.bub.me small { color: inherit; opacity: 0.78; }

.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 22px; }
.wave i { width: 3px; height: 100%; background: var(--ink); border-radius: 2px; transform: scaleY(0.25); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: -0.3s; }
.wave i:nth-child(3n + 1) { animation-delay: -0.7s; }
.wave i:nth-child(4n) { animation-duration: 0.8s; }
@keyframes wave { 50% { transform: scaleY(1); } }

/* Conversation: the call's secret missions, ticked off. */
.missions { display: grid; gap: 5px; padding-top: 9px; border-top: 1px dashed var(--rule-2); }
.missions li { display: flex; align-items: center; gap: 8px; font: 500 12px/1.2 var(--sans); color: var(--ink-2); }
.missions li::before { content: ""; flex: none; width: 13px; height: 13px; border: 1.5px solid var(--ink); border-radius: 3px; }
.missions .ok { color: var(--ink); }
.missions .ok::before { background: var(--ac) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3L9.5 3.6' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center / 11px no-repeat; border-color: var(--ac); }

/* Lesson: words, a reading, then speaking. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.steps li { padding: 6px 4px 5px; border: 1px solid var(--ink); border-radius: 3px; text-align: center; font: 600 10px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.steps .ok { color: var(--ink-2); border-color: var(--rule-2); text-decoration: line-through; }
.steps .on { background: var(--ac); color: var(--ac-on); border-color: var(--ac); }
.mic { display: flex; align-items: center; justify-content: center; gap: 9px; padding-top: 2px; font: 600 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.mic i { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--ac); }
.mic i::before { content: ""; position: absolute; left: 10px; top: 6px; width: 6px; height: 10px; border-radius: 3px; background: var(--ac-on); }
.mic i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ac); animation: ping 1.6s ease-out infinite; }
@keyframes ping { to { transform: scale(1.9); opacity: 0; } }

/* Flashcards: a card that turns over, on a deck, and the four grades. */
.fc { position: relative; justify-self: center; width: 200px; height: 128px; margin: 6px 0 8px; perspective: 900px; }
.fc::before, .fc::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--card); }
.fc::before { transform: translate(8px, 8px); }
.fc::after { transform: translate(4px, 4px); }
.fc-card { position: relative; z-index: 1; width: 100%; height: 100%; transform-style: preserve-3d; animation: flip 7s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
.fc-face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--card); }
.fc-front span { font: 700 44px/1 var(--ko-sans); }
.fc-front small { font: 500 11px/1 var(--mono); color: var(--ink-2); }
.fc-back { transform: rotateY(180deg); background: var(--ac); color: var(--ac-on); border-color: var(--ac); }
.fc-back b { font: 400 30px/1 var(--slab); letter-spacing: -0.02em; }
.fc-back small { font: 400 13px/1 var(--ko-sans); opacity: 0.85; }
@keyframes flip { 0%, 38% { transform: none; } 50%, 88% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.grades span { padding: 7px 2px 6px; border: 1px solid var(--ink); border-radius: 3px; text-align: center; font: 600 11px/1 var(--mono); background: var(--card); }
.grades .on { background: var(--ac); color: var(--ac-on); border-color: var(--ac); }

/* Practice tests: a question against the clock. */
.q { display: flex; gap: 9px; align-items: baseline; font: 400 15px/1.35 var(--slab); }
.q span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--card); font: 700 11px/1 var(--mono); transform: translateY(-1px); }
.q i { font-style: normal; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opts li { padding: 8px 10px 7px; border: 1px solid var(--ink); border-radius: 4px; font: 400 14px/1 var(--slab); background: var(--card); }
.opts .pick { animation: pick 6s infinite; }
@keyframes pick { 0%, 30% { background: var(--card); color: var(--ink); border-color: var(--ink); } 36%, 94% { background: var(--ac); color: var(--ac-on); border-color: var(--ac); } 100% { background: var(--card); } }
.qbar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; padding-top: 4px; }
.qbar li { height: 8px; border: 1px solid var(--ink); border-radius: 1px; }
.qbar .ok { background: var(--ink); }
.qbar .on { background: var(--ac); border-color: var(--ac); }

/* Guides hub (/guides/) and guide articles (/guides/<slug>/).
   Same warm cream paper, near-black ink, Roboto Slab display headings,
   Archivo body prose and JetBrains Mono labels as the home page. */

/* ------------------------------------------------------------ breadcrumbs */

.crumbs { margin-bottom: 24px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--ink-3); }
.crumbs a:hover { color: var(--bill); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { color: var(--ink); }

.top-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------ hub header */

.g-hub-head, .art-head {
  padding: clamp(36px, 5vw, 68px) 0 clamp(44px, 6vw, 72px);
  border-bottom: 1px solid var(--ink);
}
.g-hub-head .tag { margin-bottom: 24px; }
.g-hub-title, .art-title {
  font: 300 clamp(38px, 5.4vw, 82px)/0.98 var(--slab);
  letter-spacing: -0.045em;
  max-width: 17ch;
  text-wrap: balance;
}
.g-hub-title em, .art-title em {
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.045em;
  background: linear-gradient(transparent 56%, var(--hl) 56% 90%, transparent 90%);
  padding: 0 0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.art-lede {
  margin-top: clamp(20px, 2.4vw, 30px);
  max-width: 58ch;
  font: 400 clamp(18px, 1.5vw, 22px)/1.5 var(--slab);
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

/* ------------------------------------------------------------ hub cards */

.g-hub-sec { padding-top: clamp(56px, 7vw, 100px); }
.g-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.g-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 18px;
  padding: clamp(24px, 3vw, 38px);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--card);
  transition: background 0.16s, color 0.16s;
}
.g-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.g-card-meta span { color: var(--bill); }
.g-card-meta b {
  padding: 5px 8px 4px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-weight: 600;
  background: var(--paper);
}
.g-card-meta small { margin-left: auto; font: inherit; color: var(--ink-3); }
.g-card h3 {
  font: 400 clamp(26px, 2.6vw, 38px)/1.12 var(--slab);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.g-card-blurb { font-size: 17px; line-height: 1.58; color: var(--ink-2); max-width: 48ch; }
.g-card-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.g-card-tags li {
  padding: 5px 9px 4px;
  border: 1px solid var(--rule-2);
  border-radius: 3px;
  background: var(--paper);
  font: 500 11.5px/1.2 var(--mono);
  color: var(--ink-2);
}
.g-card-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font: 600 15px/1 var(--sans);
}
.g-card-go span { color: var(--bill); transition: transform 0.18s; }
.g-card:hover { background: var(--ink); color: var(--paper); }
.g-card:hover .g-card-meta b { background: var(--bill); border-color: var(--bill); color: var(--ink); }
.g-card:hover .g-card-meta small, .g-card:hover .g-card-blurb { color: rgba(243, 239, 230, 0.76); }
.g-card:hover .g-card-tags li { background: rgba(243, 239, 230, 0.08); border-color: rgba(243, 239, 230, 0.25); color: rgba(243, 239, 230, 0.85); }
.g-card:hover .g-card-go { border-top-color: rgba(243, 239, 230, 0.22); }
.g-card:hover .g-card-go span { transform: translateX(4px); }

@media (max-width: 860px) {
  .g-cards { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ article header & grid */

.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 22px;
}
.art-stamp {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.art-grid {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 84px);
  align-items: start;
  padding-top: clamp(44px, 5vw, 72px);
  padding-bottom: clamp(64px, 8vw, 112px);
}

/* ------------------------------------------------------------ sticky rail */

.art-rail {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 20px;
}
.rail-box {
  padding: 20px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
}
.rail-h {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font: 600 11.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rail-toc { display: grid; gap: 4px; }
.rail-toc a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 6px 4px;
  border-radius: 3px;
  font: 500 14px/1.35 var(--sans);
  color: var(--ink-2);
  transition: background 0.14s, color 0.14s;
}
.rail-toc a span { font: 500 11.5px/1 var(--mono); color: var(--bill); }
.rail-toc a:hover { background: var(--paper-2); color: var(--ink); }

.rail-sites ul { display: grid; gap: 6px; }
.rail-sites a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 6px;
  border-radius: 3px;
  transition: background 0.14s;
}
.rail-sites a:hover { background: var(--paper-2); }
.rail-sites b {
  padding: 5px 6px 4px;
  background: var(--pl-bg);
  color: var(--pl-fg);
  box-shadow: inset 0 0 0 1.4px var(--pl-fg);
  border-radius: 3px;
  font: 800 11px/1 var(--sans);
  font-stretch: 70%;
  letter-spacing: 0.06em;
}
.rail-sites span { display: grid; gap: 2px; font: 600 14px/1.15 var(--sans); color: var(--ink); }
.rail-sites small { font: 500 11px/1.2 var(--mono); color: var(--ink-3); }
.rail-sites i { font-style: normal; font-size: 14px; color: var(--ink-3); }
.rail-sites a:hover i { color: var(--bill); }

@media (max-width: 1020px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .art-rail { display: contents; }
  .rail-toc-box { order: 1; }
  .prose { order: 2; }
  .rail-sites { order: 3; }
}

/* ------------------------------------------------------------ prose typography */

.prose { min-width: 0; max-width: 72ch; font: 400 17.5px/1.72 var(--sans); color: var(--ink); }
.prose-sec + .prose-sec { margin-top: clamp(44px, 5vw, 68px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--rule-2); }

/* Override the giant display h2 in 10-base.css inside article prose. */
.prose h2.prose-h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  max-width: none;
  margin: 0 0 20px;
  font: 400 clamp(26px, 2.7vw, 36px)/1.16 var(--slab);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.prose-n {
  flex: none;
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--bill);
  transform: translateY(-2px);
}
.prose h3 {
  margin: 30px 0 10px;
  font: 600 clamp(19px, 1.8vw, 23px)/1.28 var(--slab);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.prose p { margin: 0 0 18px; color: var(--ink); }
.prose p:last-child { margin-bottom: 0; }
.prose b, .prose strong { font-weight: 700; color: var(--ink); }
.prose em { font-style: italic; }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--bill);
  text-decoration-thickness: 1.8px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--bill); }

.prose ul { display: grid; gap: 12px; margin: 18px 0 22px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--bill);
  border-radius: 1px;
}

.prose ol.step-list { counter-reset: step; display: grid; gap: 16px; margin: 20px 0 24px; }
.prose ol.step-list li {
  counter-increment: step;
  position: relative;
  padding: 16px 18px 16px 54px;
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  background: var(--card);
}
.prose ol.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 18px;
  font: 600 13px/1.2 var(--mono);
  color: var(--bill);
}

/* Field-note callout box */
.prose .note {
  margin: 26px 0;
  padding: 20px 24px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  box-shadow: 5px 5px 0 var(--ink);
}
.prose .note-k {
  margin: 0 0 8px;
  font: 600 11.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bill);
}
.prose .note p:last-child { margin: 0; font-size: 16px; line-height: 1.62; color: var(--ink-2); }

/* ------------------------------------------------------------ tables */

.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
}
.g-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font: 400 14.5px/1.45 var(--sans);
  text-align: left;
}
.g-table th, .g-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.g-table thead th {
  background: var(--paper-2);
  border-bottom: 1px solid var(--ink);
  font: 600 11.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.g-table tbody tr:last-child td { border-bottom: 0; }
.g-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-table small { display: block; margin-top: 2px; font: 500 11.5px/1.3 var(--mono); color: var(--ink-3); }

.g-compare { min-width: 720px; }
.g-compare tr.is-us td { background: rgba(255, 212, 0, 0.22); }
.g-compare tr.is-us td:first-child { border-left: 3px solid var(--bill); }

.g-plate {
  display: inline-grid;
  place-items: center;
  flex: none;
  padding: 5px 6px 4px;
  background: var(--pl-bg);
  color: var(--pl-fg);
  box-shadow: inset 0 0 0 1.4px var(--pl-fg);
  border-radius: 3px;
  font: 800 11px/1 var(--sans);
  font-stretch: 70%;
  letter-spacing: 0.06em;
}
.prose .g-site-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.prose .g-site-cell b { text-decoration: underline; text-decoration-color: var(--bill); text-underline-offset: 3px; }
.prose .g-site-cell:hover b { color: var(--bill); }

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

.art-foot {
  border-top: 1px solid var(--ink);
  padding: clamp(40px, 5vw, 68px) 0 clamp(56px, 7vw, 88px);
  background: var(--paper-2);
}
.art-foot-inner { display: grid; gap: 24px; justify-items: start; }
.g-next { width: 100%; display: grid; gap: 18px; }
.g-next-card {
  display: grid;
  gap: 10px;
  max-width: 680px;
  padding: 24px 28px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  transition: transform 0.15s, box-shadow 0.15s;
}
.g-next-card:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--bill); }
.g-next-k { font: 600 11.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bill); }
.g-next-card strong { font: 400 clamp(22px, 2.4vw, 30px)/1.15 var(--slab); letter-spacing: -0.025em; }
.g-next-card p { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.g-next-go { font: 600 15px/1 var(--sans); padding-top: 4px; }

.g-all-link {
  font: 600 15px/1 var(--sans);
  text-decoration: underline;
  text-decoration-color: var(--bill);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.g-all-link:hover { color: var(--bill); }

@media (max-width: 640px) {
  .prose { font-size: 16.5px; }
  .prose h2.prose-h2 { flex-direction: column; gap: 6px; }
  .prose ol.step-list li { padding: 14px 14px 14px 46px; }
  .prose ol.step-list li::before { left: 14px; top: 16px; }
}
