/* OJS Agents — public site.
 *
 * Direction: "koreksi cetak" (printer's proof). The subject's own artefact is a
 * marked-up manuscript, so the page borrows its vocabulary and, more
 * importantly, its semantics: crimson is always something being struck off the
 * editor's desk, ultramarine is always something the agents put back. Colour
 * carries meaning here; it is never decoration.
 *
 * Type: Newsreader for display (an editorial serif with optical sizing),
 * IBM Plex Sans for body, IBM Plex Mono for the margin rail, stage codes, and
 * anything that behaves like an annotation.
 *
 * Layout: a persistent left margin rail — the annotation column of a proof —
 * carries section labels and hairlines. It collapses to an inline label under
 * 900px rather than disappearing, so the structure survives on a phone.
 */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --paper: #e7e8ec;
  --paper-raise: #f4f5f8;
  --paper-deep: #dcdee5;
  --ink: #15171e;
  --ink-soft: #383d4c;
  --muted: #676c7d;
  --rule: #c9cbd3;
  --rule-soft: #d8dae1;
  --insert: #1f3ce0;
  --insert-wash: #e4e8fd;
  --strike: #c41e4e;
  --strike-wash: #fae3ea;
  --highlight: #f2e14b;

  --measure: 34rem;
  --shell: 74rem;
  --rail: 12rem;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.98rem, 0.95rem + 0.15vw, 1.06rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.55rem, 1.35rem + 0.9vw, 2.1rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.2vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.7rem + 4.2vw, 5.2rem);

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ── Reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--insert);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}
@media (max-width: 40rem) { .shell { width: min(100% - 1.75rem, var(--shell)); } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Shared type ────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  line-height: 1.06;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0;
  text-wrap: pretty;
}
.prose-note {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper-raise);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.btn:hover { background: var(--insert); border-color: var(--insert); }
.btn:active { transform: translateY(1px); }

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

.btn--light { background: var(--paper-raise); color: var(--ink); border-color: var(--paper-raise); }
.btn--light:hover { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }

.btn--small { padding: 0.42rem 0.8rem; font-size: 0.76rem; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand__tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav__item { position: relative; }
.site-nav__link {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 2px;
}
.site-nav__link:hover { color: var(--ink); background: var(--paper-deep); }
.site-nav__link[aria-current="page"] { color: var(--insert); }

.site-nav__sub {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 12rem;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  background: var(--paper-raise);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 12px 28px rgb(21 23 30 / 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease;
}
.site-nav__item:hover .site-nav__sub,
.site-nav__item:focus-within .site-nav__sub { opacity: 1; visibility: visible; }
.site-nav__sub .site-nav__link { display: block; padding: 0.4rem 0.6rem; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 62rem) {
  .nav-toggle { display: inline-flex; }
  .site-header__drawer {
    display: none;
    padding: 0.75rem 0 1.25rem;
    border-top: 1px solid var(--rule);
  }
  .site-header__drawer[data-open="true"] { display: block; }
  .site-header__drawer .site-nav { flex-direction: column; align-items: stretch; }
  .site-header__drawer .site-nav__link { padding: 0.6rem 0; font-size: 1rem; }
  .site-header__drawer .site-nav__sub {
    position: static; opacity: 1; visibility: visible;
    border: 0; box-shadow: none; background: transparent;
    padding: 0 0 0 1rem;
  }
  .site-header__bar .site-nav,
  .site-header__bar .header-widgets { display: none; }
}
@media (min-width: 62.0625rem) {
  .site-header__drawer { display: none; }
}

.header-widgets { display: flex; align-items: center; gap: 0.75rem; }
.header-widgets .widget { margin: 0; }
.header-widgets .widget__title,
.header-widgets .prose-note { display: none; }
.header-widgets .widget__cta { padding: 0; border: 0; background: none; }

@media (max-width: 40rem) {
  .brand__tagline { display: none; }
  .site-header__bar { gap: 0.75rem; }
}

/* ── Section scaffolding: the margin rail ───────────────────────────── */
.band { padding-block: clamp(3.5rem, 7vw, 6rem); }
.band--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.band--raise { background: var(--paper-raise); }
.band--deep { background: var(--paper-deep); }
.band--ink { background: var(--ink); color: var(--paper); }
.band--ink .display { color: var(--paper-raise); }
.band--ink .lede { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.band--ink .eyebrow { color: color-mix(in srgb, var(--paper) 55%, transparent); }

.rail-grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.25rem);
  align-items: start;
}
.rail {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.4rem;
}
.rail__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail__mark { height: 1px; background: var(--rule); }
.band--ink .rail__mark { background: color-mix(in srgb, var(--paper) 26%, transparent); }
.band--ink .rail__label { color: color-mix(in srgb, var(--paper) 58%, transparent); }

@media (max-width: 56rem) {
  .rail-grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .rail { position: static; flex-direction: row; align-items: center; gap: 0.75rem; }
  .rail__mark { flex: 1; }
}

.section-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }
.section-head__title { font-size: var(--step-2); }
.section-head__intro { max-width: var(--measure); color: var(--ink-soft); margin: 0; }

/* ── Signature: the redline hero ────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
/* Ruled manuscript paper behind the hero — the surface the correction is made
   on, faded at both ends so it never competes with the headline. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, transparent 0 2.05rem, var(--rule-soft) 2.05rem 2.1rem);
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 64%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 64%, transparent);
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__inner { display: flex; flex-direction: column; gap: 1.75rem; }
.hero__headline {
  font-size: clamp(2.4rem, 1.35rem + 3.5vw, 4.3rem);
  max-width: 14ch;
}
.hero__lead-in { display: block; color: var(--ink-soft); }
.hero__image {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 22px 45px -28px rgb(21 23 30 / 0.5);
}

@media (max-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .hero__headline { max-width: 18ch; }
}

/* ── Hero figure: a proof sheet being marked up ──────────────────────
   One orchestrated load sequence — the sheet arrives, a line is struck, the
   replacement goes in, the reviewers annotate, the stages fill, the decision
   stamps. Everything below is timed off that single narrative; the only
   ambient motion afterwards is the insertion caret blinking. */
.proof {
  position: relative;
  margin: 0;
  padding-right: clamp(0rem, 3vw, 2.5rem);
  animation: proof-rise 0.7s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.proof__back {
  position: absolute;
  inset: 1.4rem -0.6rem -1.1rem 1.6rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-raise);
  transform: rotate(2.4deg);
  opacity: 0.65;
}
.proof__sheet {
  position: relative;
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-raise);
  transform: rotate(-1.1deg);
  box-shadow: 0 1px 0 var(--paper-raise), 0 26px 50px -30px rgb(21 23 30 / 0.55);
}
.proof__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.proof__id { color: var(--ink); font-weight: 600; }
.proof__stage { color: var(--muted); }

.proof__body { display: grid; gap: 0.62rem; padding: 1.05rem 0 1.15rem; }
.proof__line {
  width: var(--w, 100%);
  height: 0.5rem;
  border-radius: 2px;
  background: var(--rule);
  transform-origin: left center;
  animation: line-in 0.4s ease both;
}
.proof__line:nth-child(1) { animation-delay: 0.42s; }
.proof__line:nth-child(2) { animation-delay: 0.49s; }
.proof__line:nth-child(3) { animation-delay: 0.56s; }
.proof__line:nth-child(5) { animation-delay: 0.63s; }
.proof__line:nth-child(6) { animation-delay: 0.7s; }
.proof__line:nth-child(7) { animation-delay: 0.77s; }

/* The struck line keeps its neutral bar; the crimson rule is drawn over it. */
.proof__line--struck { position: relative; }
.proof__line--struck::after {
  content: "";
  position: absolute;
  left: -0.3rem;
  right: -0.3rem;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: var(--strike);
  transform: scaleX(0);
  transform-origin: left center;
  animation: strike-sweep 0.5s cubic-bezier(0.65, 0, 0.35, 1) 1.05s both;
}

.proof__ins { display: flex; align-items: center; gap: 0.4rem; }
.proof__caret {
  width: 0.5rem;
  height: 0.34rem;
  flex-shrink: 0;
  background: var(--insert);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0;
  animation: fade-in 0.25s ease 1.4s forwards,
             caret-blink 1.15s steps(1, end) 2.8s infinite;
}
.proof__ins-bar {
  width: var(--w, 60%);
  height: 0.5rem;
  border-radius: 2px;
  background: var(--insert);
  transform: scaleX(0);
  transform-origin: left center;
  animation: line-in 0.42s cubic-bezier(0.2, 0.8, 0.25, 1) 1.5s both;
}

.proof__rail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--rule-soft);
}
.proof__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
}
.proof__dot.is-done {
  border-color: var(--insert);
  background: var(--insert);
  transform: scale(0);
  animation: pop-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.5) both;
}
.proof__dot.is-done:nth-child(1) { animation-delay: 1.95s; }
.proof__dot.is-done:nth-child(2) { animation-delay: 2.03s; }
.proof__dot.is-done:nth-child(3) { animation-delay: 2.11s; }
.proof__dot.is-done:nth-child(4) { animation-delay: 2.19s; }
.proof__rail-label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.proof__stamp {
  position: absolute;
  right: 1.1rem;
  bottom: 3.7rem;
  padding: 0.3rem 0.75rem;
  border: 2px solid var(--insert);
  border-radius: 3px;
  background: color-mix(in srgb, var(--paper-raise) 82%, transparent);
  color: var(--insert);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-9deg) scale(1.6);
  opacity: 0;
  animation: stamp-down 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.3) 2.45s forwards;
}

.proof__notes {
  position: relative;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.proof__note {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--insert);
  border-radius: 3px;
  background: var(--paper-raise);
  font-size: 0.8rem;
  color: var(--ink-soft);
  box-shadow: 0 10px 24px -20px rgb(21 23 30 / 0.6);
  animation: note-in 0.45s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.proof__note:nth-child(1) { animation-delay: 1.65s; }
.proof__note:nth-child(2) { animation-delay: 1.85s; }
.proof__note-role {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--insert);
}

@media (min-width: 62.0625rem) {
  /* Pulled out over the sheet's edge, the way a margin note sits half off the
     page — only where there is room for it. */
  .proof__notes { margin-top: -0.7rem; padding-left: 2.75rem; }
  .proof__note { margin-right: -2.2rem; }
}

@keyframes proof-rise {
  from { opacity: 0; transform: translateY(1.6rem) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes line-in { from { opacity: 0; transform: scaleX(0.2); } to { opacity: 1; transform: none; } }
@keyframes strike-sweep { to { transform: scaleX(1); } }
@keyframes note-in { from { opacity: 0; transform: translateX(1.2rem); } to { opacity: 1; transform: none; } }
@keyframes pop-in { to { transform: scale(1); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes caret-blink { 50% { opacity: 0; } }
@keyframes stamp-down {
  from { opacity: 0; transform: rotate(-9deg) scale(1.6); }
  to { opacity: 1; transform: rotate(-9deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .proof,
  .proof__line,
  .proof__line--struck::after,
  .proof__ins-bar,
  .proof__caret,
  .proof__dot.is-done,
  .proof__note,
  .proof__stamp { animation: none; }
  .proof__line--struck::after { transform: scaleX(1); }
  .proof__caret, .proof__stamp, .proof__note { opacity: 1; }
  .proof__dot.is-done { transform: none; }
  .proof__stamp { transform: rotate(-9deg); }
}

/* The deletion mark is painted as a background rather than an absolutely
   positioned rule so that a headline wrapping onto two lines gets a strike on
   each line, the way a proof sheet would. box-decoration-break: clone is what
   gives every line fragment its own background box. */
.strike {
  color: var(--strike);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background-image: linear-gradient(var(--strike), var(--strike));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 0% 0.05em;
  animation: strike-draw 0.55s cubic-bezier(0.65, 0, 0.35, 1) 0.45s forwards;
}

.insert {
  color: var(--insert);
  font-style: italic;
  opacity: 0;
  animation: insert-in 0.5s ease 1.05s forwards;
}
/* Keeps the caret glued to the first inserted word — a line break between the
   two leaves the mark stranded at the end of the previous line. */
.insert__lead { white-space: nowrap; }

/* The proofreader's caret marking where the new text goes in. */
.insert__caret {
  display: inline-block;
  width: 0.34em;
  height: 0.22em;
  margin-right: 0.1em;
  background: var(--insert);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: translateY(0.3em) scale(0.4);
  transform-origin: bottom center;
  animation: caret-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.95s forwards;
}

@keyframes strike-draw { to { background-size: 100% 0.05em; } }
@keyframes insert-in { to { opacity: 1; } }
@keyframes caret-in { to { transform: translateY(0.06em) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .strike { animation: none; background-size: 100% 0.05em; }
  .insert { animation: none; opacity: 1; }
  .insert__caret { animation: none; transform: translateY(0.06em); }
}

.hero__margin-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--strike);
}
.hero__margin-note::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.hero__footnote { font-size: var(--step--1); color: var(--muted); margin: 0; }

/* ── Stats ──────────────────────────────────────────────────────────── */
/* Dividers are drawn per cell rather than as a 1px grid gap over a coloured
   container: with auto-fit, any count that does not fill the last row leaves
   an empty cell, and the container colour shows through it as a solid block. */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-block: 1px solid var(--rule);
}
.stat {
  padding: 1.4rem 1.25rem;
  border-left: 1px solid var(--rule);
}
.stat:first-child { border-left: 0; }
.stat__value {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1;
  color: var(--insert);
}
.stat__label { display: block; margin-top: 0.45rem; font-weight: 600; font-size: 0.9rem; }
.stat__note { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* ── Masthead ───────────────────────────────────────────────────────── */
.masthead {
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--paper-raise);
}
.masthead__row {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 1rem 1.75rem;
  padding: 1.15rem 1.4rem;
  border-top: 1px solid var(--rule-soft);
}
.masthead__row:first-child { border-top: 0; }
.masthead__role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.35rem;
}
.masthead__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  display: block;
}
.masthead__duty { margin: 0.15rem 0 0; color: var(--ink-soft); font-size: 0.92rem; }
@media (max-width: 40rem) {
  .masthead__row { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; padding: 1rem 1.1rem; }
  .masthead__role { padding-top: 0; }
}

/* ── Pipeline (order is real information, so phases are numbered) ───── */
.phases { display: grid; gap: 0; counter-reset: phase; }
.phase {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  counter-increment: phase;
}
.phase:last-child { border-bottom: 1px solid var(--rule); }
.phase__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--insert);
  padding-top: 0.35rem;
}
.phase__num::before { content: "F" counter(phase, decimal-leading-zero); }
.phase__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; margin: 0; }
.phase__actor {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--insert-wash);
  color: var(--insert);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.phase__text { margin: 0.6rem 0 0; color: var(--ink-soft); max-width: var(--measure); }
@media (max-width: 40rem) {
  .phase { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
}

/* ── Feature cards ──────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.feature {
  padding: 1.6rem 1.4rem;
  box-shadow: inset 1px 1px 0 var(--rule);
}
.feature__icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 2px;
  background: var(--insert-wash);
  color: var(--insert);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.feature__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; margin: 0 0 0.4rem; }
.feature__text { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }

/* ── Toolkit list ───────────────────────────────────────────────────── */
.toolkits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  column-gap: 3rem;
  margin: 0;
}
.toolkit {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.toolkit__name { font-weight: 600; font-size: 0.98rem; }
.toolkit__text { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-align: right; }

/* ── Split ──────────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr); } }
.split__body { color: var(--ink-soft); max-width: var(--measure); }
.split__body p { margin: 0 0 1rem; }
.split__aside {
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper-raise);
  padding: 1.35rem 1.4rem;
}
.split__aside-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}
.deflist { margin: 0; display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: 0.55rem 1rem; }
.deflist dt { font-weight: 600; font-size: 0.88rem; }
.deflist dd { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* ── Logo / name row ────────────────────────────────────────────────── */
.namerow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.namerow__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.provider {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem 0.45rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-raise);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.provider:hover { border-color: var(--ink); transform: translateY(-1px); }
/* Brand marks render in ink rather than their own colours: on this page red
   and blue already mean "struck" and "inserted", and seven brand palettes
   would drain that of meaning. */
.provider__mark {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.86;
}
.provider__mark--mono {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-raise);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 1;
}
.provider__name { font-size: 0.86rem; font-weight: 500; color: var(--ink); }

/* ── Pricing ────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem; }
.plan {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper-raise);
}
.plan--popular { border-color: var(--insert); box-shadow: 0 0 0 1px var(--insert); }
.plan__flag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--insert);
}
.plan__name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; margin: 0; }
.plan__price { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1; }
.plan__period { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.plan__desc { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.plan__list li { display: flex; gap: 0.5rem; font-size: 0.88rem; color: var(--ink-soft); }
.plan__list li::before { content: "+"; color: var(--insert); font-family: var(--font-mono); }
.plan__cta { margin-top: auto; }

/* ── FAQ (native disclosure — no JS, keyboard works by default) ──────── */
.faq { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.15rem 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; font-family: var(--font-mono); color: var(--insert); font-size: 1.1rem; }
.faq__item[open] .faq__q::after { content: "\2013"; }
.faq__a { margin: 0 0 1.3rem; color: var(--ink-soft); max-width: var(--measure); }

/* ── Post cards ─────────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; }
.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
  text-decoration: none;
}
.post-card__meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-card__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}
.post-card:hover .post-card__title { color: var(--insert); }
.post-card__excerpt { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.post-card__cover { border-radius: 3px; border: 1px solid var(--rule); }

.more-link {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--insert);
  text-decoration: none;
  margin-top: 2rem;
}
.more-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Closing CTA ────────────────────────────────────────────────────── */
.cta-block { display: flex; flex-direction: column; gap: 1.35rem; align-items: flex-start; }
.cta-block__title { font-size: var(--step-3); max-width: 16ch; }
.cta-block__text { max-width: var(--measure); color: color-mix(in srgb, var(--paper) 74%, transparent); margin: 0; }
.cta-block__footnote { font-family: var(--font-mono); font-size: 0.72rem; color: color-mix(in srgb, var(--paper) 52%, transparent); margin: 0; }

/* ── Article pages ──────────────────────────────────────────────────── */
.page-head { padding-block: clamp(2.75rem, 6vw, 4.5rem) 0; }
.page-head__title { font-size: var(--step-3); max-width: 20ch; }
.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-head__meta a { color: var(--insert); text-decoration: none; }

.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 62rem) { .with-sidebar { grid-template-columns: minmax(0, 1fr); } }

.prose { max-width: 40rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; margin-top: 2.4rem; line-height: 1.15; }
.prose h3 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; margin-top: 1.8rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose a { color: var(--insert); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--paper-deep);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}
.prose pre {
  background: var(--ink);
  color: var(--paper-raise);
  padding: 1rem 1.15rem;
  border-radius: 3px;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  margin-left: 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--insert);
  color: var(--ink-soft);
  font-style: italic;
}
.prose img { border: 1px solid var(--rule); border-radius: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 0.5rem 0.7rem; text-align: left; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 2.5rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--muted);
  text-decoration: none;
}
.tag:hover { border-color: var(--insert); color: var(--insert); }

/* ── Widgets ────────────────────────────────────────────────────────── */
.widget + .widget { margin-top: 1.75rem; }
.widget__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.widget__body { font-size: 0.92rem; color: var(--ink-soft); }
.widget__body p { margin: 0 0 0.75rem; }
.widget__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.widget__list a { text-decoration: none; color: var(--ink-soft); }
.widget__list a:hover { color: var(--insert); }
.widget__count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.widget__cta {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--paper-raise);
}
.widget__cta .prose-note { margin-top: 0.6rem; }
.sidebar { position: sticky; top: 6rem; }
@media (max-width: 62rem) { .sidebar { position: static; } }

.social-row { display: flex; gap: 0.5rem; }
.social-row a {
  display: grid;
  place-items: center;
  width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
}
.social-row a:hover { border-color: var(--insert); color: var(--insert); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--paper) 14%, transparent); background: var(--ink); color: color-mix(in srgb, var(--paper) 76%, transparent); padding-block: 3.5rem 2rem; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2.5rem; }
.site-footer .widget__title { color: color-mix(in srgb, var(--paper) 52%, transparent); border-color: color-mix(in srgb, var(--paper) 20%, transparent); }
.site-footer .widget__body,
.site-footer .widget__list a { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.site-footer .widget__list a:hover { color: var(--paper-raise); }
.site-footer .widget__cta { background: transparent; border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.site-footer .social-row a { border-color: color-mix(in srgb, var(--paper) 24%, transparent); color: inherit; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
}
.site-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer__bottom a { text-decoration: none; }
.site-footer__bottom a:hover { color: var(--paper-raise); }

/* ── Pagination & empty states ──────────────────────────────────────── */
.pager { display: flex; gap: 0.6rem; align-items: center; margin-top: 3rem; }
.pager__label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.empty {
  padding: 3rem 1.5rem;
  border: 1px dashed var(--rule);
  border-radius: 3px;
  text-align: center;
  color: var(--muted);
}
