body {
  overflow-x: clip;
}

/* Shared chrome ---------------------------------------------------------- */

.jg-nav {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  height: 46px;
  padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  color: #ffffff;
  background: var(--ink);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.jg-brand,
.jg-nav nav,
.nav-actions {
  display: flex;
  align-items: center;
}

.jg-brand {
  gap: 9px;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-icon-mark {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 5px;
}

.jg-nav nav {
  justify-content: center;
  gap: 22px;
}

.jg-nav nav a,
.site-link,
.github-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--slate-on-dark);
  transition: color 160ms ease, background-color 160ms ease;
}

.jg-nav nav a[aria-current="page"] {
  color: #ffffff;
}

.jg-nav :focus-visible,
.panel :focus-visible,
.rule :focus-visible,
.coverage :focus-visible {
  outline-color: var(--signal);
}

.jg-nav .jg-brand:hover,
.jg-nav nav a:hover,
.site-link:hover,
.github-button:hover {
  color: #ffffff;
}

/* This site is a section of a personal site, not a standalone deployment, so
   every page keeps a way back out to it. */
.site-link {
  gap: 7px;
  padding: 7px 0;
  white-space: nowrap;
}

.nav-actions {
  justify-content: flex-end;
  gap: 10px;
}

.github-button {
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--rule-on-dark);
}

.github-button:hover {
  border-color: var(--slate-on-dark);
}

.sub-nav {
  position: sticky;
  z-index: 90;
  top: 46px;
  width: 100%;
  height: 54px;
  padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  background: rgba(231, 234, 236, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

.sub-nav-title {
  flex: none;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.sub-nav nav,
.sub-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sub-nav a:not(.sub-nav-title):not(.sub-nav-cta),
.sub-nav-links a {
  color: var(--slate);
  transition: color 160ms ease;
}

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

.sub-nav a:not(.sub-nav-title):not(.sub-nav-cta):hover,
.sub-nav-links a:hover {
  color: var(--accent);
}

/* Buttons: squared, signage-plate shaped. -------------------------------- */

.sub-nav-cta,
.big-button,
.ghost-button,
.doc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.big-button:hover,
.doc-button:hover,
.sub-nav-cta:hover {
  color: var(--ink);
  background: var(--signal);
  border-color: var(--signal);
}

.ghost-button {
  color: var(--ink);
  background: transparent;
  border-color: var(--rule);
}

.ghost-button:hover {
  border-color: var(--ink);
  background: transparent;
}

.sub-nav-cta {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 11px;
}

/* The provenance chip: one vocabulary, used everywhere. ------------------ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  color: var(--slate);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip[data-src="live"] {
  color: var(--accent);
  border-color: var(--signal);
}

.chip[data-src="live"]::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
}

.chip[data-src="none"] {
  border-style: dashed;
  color: var(--slate-soft);
}

/* Hero ------------------------------------------------------------------- */

.jg-hero,
.rule,
.changes,
.coverage,
.end {
  padding-block: clamp(4rem, 8vw, 7rem);
  padding-inline: var(--gutter);
}

.jg-hero {
  width: min(var(--content), 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  align-items: start;
  column-gap: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.availability,
.jg-hero h1 {
  grid-column: 1 / -1;
}

.availability {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--slate);
}

.availability i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--signal);
}

/* A full-bleed banner line, sized so it sets on one line above 1100px. */
.jg-hero h1 {
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
  font-size: clamp(2.6rem, 6.2vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* The one word that carries the claim gets a signage plate, not a tint —
   orange type on light grey never reaches readable contrast. */
.jg-hero h1 em {
  padding: 0 0.1em 0.06em;
  display: inline-block;
  font-style: normal;
  color: var(--ink);
  background: var(--signal);
}

.lead {
  max-width: 46ch;
  margin: 28px 0 0;
  color: var(--slate);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.55;
}

/* Lead and panel share a top edge. */
.hero-copy .lead {
  margin-top: 0;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.build-strip {
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}

.build-strip > div {
  padding: 14px 20px 0;
  border-left: 1px solid var(--rule);
}

.build-strip > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.build-strip dd {
  margin: 7px 0 0;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Signature: the honest station panel. ----------------------------------- */

.panel {
  margin: 0;
  align-self: start;
  color: #ffffff;
  background: var(--ink);
  font-size: 13px;
}

.panel-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--rule-on-dark);
  color: var(--signal);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-flag i {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--signal);
}

.panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
}

/* A circle is a line bullet. It is the only round thing on the page, and it
   only ever carries a real line number. */
.bullet {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: 17px;
  font-weight: 700;
}

.bullet[data-line="1"] {
  background: var(--line-1);
}

.panel-name strong {
  display: block;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.panel-name .hanzi {
  display: block;
  margin-top: 3px;
  color: var(--slate-on-dark);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.panel-net {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  color: var(--slate-on-dark);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-net i {
  font-style: normal;
  color: var(--signal);
}

.fields {
  margin: 0;
  border-top: 1px solid var(--rule-on-dark);
}

.field {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-on-dark);
  animation: field-in 480ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
  animation-delay: calc(var(--i) * 90ms + 180ms);
}

@keyframes field-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .field { animation: none; }
}

.field dt {
  color: var(--slate-on-dark);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field dd {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field .val {
  min-width: 0;
}

.field .chip {
  border-color: var(--rule-on-dark);
  color: var(--slate-on-dark);
}

.field .chip[data-src="live"] {
  color: var(--accent-on-dark);
  border-color: var(--signal);
}

/* An empty slot is drawn as an empty slot. */
.field.is-absent {
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 5px,
    rgba(255, 255, 255, 0.045) 5px 6px
  );
}

.field.is-absent .val {
  color: var(--slate-on-dark);
}

.field.is-absent .chip {
  border-color: var(--slate-on-dark);
  color: var(--slate-on-dark);
}

.panel figcaption {
  padding: 16px;
  color: var(--slate-on-dark);
  font-size: 12.5px;
  line-height: 1.5;
}

/* The rule ---------------------------------------------------------------- */

.rule {
  color: #ffffff;
  background: var(--ink);
}

.rule-inner {
  width: min(var(--content), 100%);
  margin-inline: auto;
}

.rule .label {
  color: var(--slate-on-dark);
}

.rule-top {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 4rem);
}

.rule blockquote {
  max-width: 17ch;
  margin: 26px 0 0;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: clamp(2.6rem, 6.2vw, 4.8rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.rule blockquote em {
  font-style: normal;
  color: var(--signal);
}

.rule-note {
  max-width: 44ch;
  margin: 0 0 6px;
  color: var(--slate-on-dark);
  font-size: 16px;
  line-height: 1.6;
}

.rule-body {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.layers {
  margin: 0;
  border-top: 1px solid var(--rule-on-dark);
}

.layers > div {
  padding: 18px 0;
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule-on-dark);
}

.layers dt .chip {
  border-color: var(--rule-on-dark);
  color: var(--slate-on-dark);
}

.layers dt .chip[data-src="live"] {
  color: var(--accent-on-dark);
  border-color: var(--signal);
}

.layers dd {
  margin: 0;
  color: var(--slate-on-dark);
  font-size: 15px;
  line-height: 1.55;
}

.layers dd strong {
  color: #ffffff;
  font-weight: 600;
}

/* Round 36 ---------------------------------------------------------------- */

.changes {
  width: min(var(--content), 100%);
  margin-inline: auto;
}

/* Section heads sit a full step below the hero and the rule, so the page has
   two loud moments rather than five. */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(1.75rem, 5vw, 4rem);
}

.sec-head h2 {
  margin-top: 18px;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

.sec-head .lead {
  margin-top: 0;
  margin-bottom: 4px;
  max-width: 42ch;
}

.change-list {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  border-top: 1px solid var(--rule);
}

.change-list > div {
  padding: 26px 0;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: baseline;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  transition: background-color 200ms ease;
}

.change-list > div:hover {
  background: rgba(255, 255, 255, 0.55);
}

.change-list dt .label {
  margin-bottom: 10px;
}

.change-list dt strong {
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.change-list dd {
  margin: 0;
  max-width: 56ch;
  color: var(--slate);
  font-size: 16px;
  line-height: 1.6;
}

/* Coverage: the shape of what is and is not known. ----------------------- */

.coverage {
  color: #ffffff;
  background: var(--ink);
}

.coverage > * {
  width: min(var(--content), 100%);
  margin-inline: auto;
}

.coverage .label {
  color: var(--slate-on-dark);
}

.coverage .lead {
  color: var(--slate-on-dark);
}

/* One unbroken strip of 58, so the two drop-off points are visible at once. */
.band {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(58, minmax(0, 1fr));
  gap: 4px;
}

.band span {
  aspect-ratio: 1;
}

.band span[data-tier="pack"] {
  background: var(--signal);
}

.band span[data-tier="routed"] {
  background: rgba(255, 255, 255, 0.5);
}

.band span[data-tier="catalog"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

/* The tick row is measured against the strip above it: each bracket spans
   exactly the cells it counts. */
.band-ticks {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(58, minmax(0, 1fr));
  gap: 4px;
}

.band-ticks span {
  padding-top: 10px;
  border-top: 2px solid;
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
  color: var(--slate-on-dark);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.band-ticks span[data-tier="pack"] { grid-column: span 14; border-color: var(--signal); }
.band-ticks span[data-tier="routed"] { grid-column: span 39; border-color: rgba(255, 255, 255, 0.5); }
.band-ticks span[data-tier="catalog"] { grid-column: span 5; border-color: rgba(255, 255, 255, 0.32); }

.band-ticks strong {
  flex: none;
  color: #ffffff;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

/* The ticks above carry the measurement; this row only explains the terms, so
   it sits on its own equal-column grid with a swatch to keep the mapping. */
.band-key {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.band-key dt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.band-key dt::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
}

.band-key dt[data-tier="pack"]::before { background: var(--signal); }
.band-key dt[data-tier="routed"]::before { background: rgba(255, 255, 255, 0.5); }
.band-key dt[data-tier="catalog"]::before { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32); }

.band-key dd {
  margin: 8px 0 0;
  color: var(--slate-on-dark);
  font-size: 14px;
  line-height: 1.5;
}

.counts {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-on-dark);
  border: 1px solid var(--rule-on-dark);
}

.counts > div {
  padding: 20px;
  background: var(--ink);
}

.counts .label {
  color: var(--slate-on-dark);
}

.counts dd {
  margin: 12px 0 0;
  font-family: var(--font-sign);
  font-stretch: condensed;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
}

.coverage-more {
  margin-top: 32px;
}

.coverage-more a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--signal);
  color: var(--accent-on-dark);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coverage-more a:hover {
  color: var(--signal);
}

/* Close ------------------------------------------------------------------- */

.end {
  width: min(var(--content), 100%);
  margin-inline: auto;
  border-top: 1px solid var(--rule);
}

.end .hero-actions {
  margin-top: 24px;
}

/* Footer ------------------------------------------------------------------ */

.jg-footer {
  padding: 48px max(var(--gutter), calc((100% - var(--content)) / 2));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--rule);
  color: var(--slate);
  background: var(--paper-deep);
}

.jg-footer .jg-brand {
  color: var(--ink);
}

.jg-footer .app-icon-mark {
  width: 26px;
  height: 26px;
}

.footer-links {
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer-links a {
  color: var(--slate);
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.jg-footer .label {
  margin: 0;
  text-align: right;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1060px) {
  .jg-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    max-width: 30rem;
  }

  .rule-top,
  .sec-head,
  .change-list > div {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .change-list > div {
    gap: 12px;
  }

  .sec-head .lead {
    margin-top: 18px;
  }

  .counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .jg-nav {
    padding-inline: 20px;
  }

  .jg-brand span {
    display: none;
  }

  .jg-nav nav {
    justify-content: flex-start;
  }

  .sub-nav {
    padding-inline: 20px;
  }

  .band {
    grid-template-columns: repeat(20, minmax(0, 1fr));
  }

  .band-key {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .band-key > div {
    padding: 14px 0;
    border-top-width: 1px;
  }

  .band-key > div:first-child {
    border-top-width: 2px;
  }

  .jg-footer {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 20px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .jg-footer .label {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .github-button {
    display: none;
  }

  .sub-nav nav > a:not(.sub-nav-cta) {
    display: none;
  }

  .layers > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .field dd {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .band {
    grid-template-columns: repeat(15, minmax(0, 1fr));
    gap: 5px;
  }

  .hero-actions .big-button,
  .hero-actions .ghost-button {
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  .build-strip > div {
    padding-inline: 12px;
  }

  .build-strip dd {
    font-size: 18px;
  }
}
