/* BarnSuite website — one stylesheet for every page.
 *
 * Each tool owns one colour, taken from its GUI:
 *   Barnspec  mint    (gui/barnspec-gui/frontend/src/index.css)
 *   Barnark   orange  (gui/barnark-gui/frontend/src/styles/theme.css)
 *   Barncept  sky     (gui/barncept-gui/frontend/src/styles/theme.css)
 * A page picks its colour with <body data-brand="spec|ark|cept">; anything
 * inside an element carrying data-brand takes that tool's colour instead. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-raised: #ffffff;
  --border: #dcdfe4;
  --text: #1b1f23;
  --text-muted: #5f6873;
  --code-bg: #10151c;
  --code-fg: #e6edf3;
  --code-muted: #8b949e;
  --shadow: 0 1px 2px rgb(0 0 0 / 5%), 0 6px 20px rgb(0 0 0 / 6%);

  /* Fulfilment colours: Barnspec's yellow / red / green, never a brand. */
  --status-yellow: #b08800;
  --status-red: #cf222e;
  --status-green: #1a7f37;

  /* Barnspec — mint. The fill is too light for text, so text uses -strong. */
  --spec: #18d19e;
  --spec-ink: #072a22;
  --spec-text: #07795f;
  --spec-bright: #11b88a;
  --spec-tint: #e3fbf3;

  /* Barnark — burnt orange. */
  --ark: #f25c05;
  --ark-ink: #ffffff;
  --ark-text: #c84600;
  --ark-bright: #f25c05;
  --ark-tint: #fff0e3;

  /* Barncept — sky blue, at Barnark's lightness and Barnspec's saturation. */
  --cept: #0b95e0;
  --cept-ink: #ffffff;
  --cept-text: #0a76b5;
  --cept-bright: #0b95e0;
  --cept-tint: #e0f3ff;

  --brand: var(--text);
  --brand-ink: var(--bg);
  /* Terminal windows are dark in both themes, so they take the dark one. */
  --brand-on-code: var(--code-muted);
  --brand-text: var(--text);
  --brand-bright: var(--text);
  --mark-ink: #ffffff;
  --brand-tint: var(--bg-alt);

  --radius: 8px;
  --radius-lg: 14px;
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 32px);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-alt: #131920;
    --bg-raised: #161b22;
    --border: #2a313a;
    --text: #e6edf3;
    --text-muted: #9aa4af;
    --code-bg: #161b22;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);

    --status-yellow: #e3b341;
    --status-red: #ff7b72;
    --status-green: #56d364;

    --spec: #3ff0bf;
    --spec-ink: #071f19;
    --spec-text: #8af5d6;
    --spec-bright: #8af5d6;
    --spec-tint: #123a30;

    --ark: #ff9244;
    --ark-ink: #2a1400;
    --ark-text: #ff9244;
    --ark-bright: #ff9244;
    --ark-tint: #3a2212;

    --cept: #55c9ff;
    --cept-ink: #04263a;
    --cept-text: #55c9ff;
    --cept-bright: #55c9ff;
    --cept-tint: #12354d;
  }
}

[data-brand="spec"] {
  --brand-on-code: #3ff0bf;
  --brand: var(--spec);
  --brand-ink: var(--spec-ink);
  --brand-text: var(--spec-text);
  --brand-bright: var(--spec-bright);
  --brand-tint: var(--spec-tint);
}

[data-brand="ark"] {
  --brand-on-code: #ff9244;
  --brand: var(--ark);
  --brand-ink: var(--ark-ink);
  --brand-text: var(--ark-text);
  --brand-bright: var(--ark-bright);
  --brand-tint: var(--ark-tint);
}

[data-brand="cept"] {
  --brand-on-code: #55c9ff;
  --brand: var(--cept);
  --brand-ink: var(--cept-ink);
  --brand-text: var(--cept-text);
  --brand-bright: var(--cept-bright);
  --brand-tint: var(--cept-tint);
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  font-weight: 780;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.6rem);
  font-weight: 740;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--brand-text);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

img {
  max-width: 100%;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

strong {
  font-weight: 650;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap.wide {
  max-width: 1240px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--gutter);
  top: 8px;
  z-index: 10;
  background: var(--bg-raised);
  padding: 6px 12px;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.suite-mark {
  display: inline-grid;
  grid-template-columns: repeat(3, 7px);
  gap: 3px;
}

.suite-mark i {
  display: block;
  width: 7px;
  height: 18px;
  border-radius: 2px;
}

.suite-mark i:nth-child(1),
.tri-rule i:nth-child(1) {
  background: var(--spec);
}

.suite-mark i:nth-child(2),
.tri-rule i:nth-child(2) {
  background: var(--ark);
}

.suite-mark i:nth-child(3),
.tri-rule i:nth-child(3) {
  background: var(--cept);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 120ms, color 120ms;
}

.nav a:hover {
  background: var(--brand-tint);
  color: var(--brand-bright);
}

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

.nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

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

.mark {
  display: inline-block;
  flex: none;
}

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

.hero {
  position: relative;
  padding: clamp(56px, 10vw, 112px) 0 0;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 30% 0;
  background:
    radial-gradient(50% 70% at 50% 0%, var(--brand-tint), transparent 75%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero h1 {
  max-width: 15em;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 .accent {
  color: var(--brand-bright);
}

.hero .lede {
  margin-left: auto;
  margin-right: auto;
}

.hero .actions {
  justify-content: center;
}

.hero-shot {
  position: relative;
  margin-top: clamp(40px, 7vw, 72px);
  margin-bottom: -2px;
}

.hero-shot .shot {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--brand-bright);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow .mark {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--mark-ink);
}

.tri-rule {
  display: inline-flex;
  width: 120px;
  height: 5px;
  margin-bottom: 26px;
  border-radius: 3px;
  overflow: hidden;
}

.tri-rule i {
  flex: 1;
}

.lede {
  max-width: 36em;
  color: var(--text-muted);
  font-size: clamp(1.1rem, 2.1vw, 1.3rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 650;
  font-size: 0.98rem;
  text-decoration: none;
  transition: filter 120ms, transform 120ms;
}

.btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--brand-bright);
  border-color: var(--border);
}

.btn.ghost:hover {
  border-color: var(--brand);
  filter: none;
}

/* ---------- Screenshots ---------- */

.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #f6f7f9;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 6%),
    0 24px 60px -12px rgb(15 23 42 / 22%);
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #e3e6ea;
  background: #eef0f3;
  color: #5f6873;
  font-size: 0.75rem;
  font-weight: 550;
}

.shot-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d3d7dd;
}

.shot-bar span {
  flex: 1;
  margin-right: 46px;
  text-align: center;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .shot {
    box-shadow: 0 24px 60px -12px rgb(0 0 0 / 70%);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(64px, 10vw, 120px) 0;
}

.section.tight {
  padding: clamp(48px, 7vw, 80px) 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section.alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 42em;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.12rem;
}

.kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--brand-bright);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ---------- Pain points ---------- */

.pains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pains li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  color: var(--text-muted);
}

.pains li::before {
  content: "✕";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--status-red) 12%, transparent);
  color: var(--status-red);
  font-size: 0.75rem;
  font-weight: 800;
}

.pains strong {
  display: block;
  color: var(--text);
}

.punchline {
  margin: clamp(32px, 5vw, 48px) auto 0;
  max-width: 30em;
  font-size: clamp(1.3rem, 2.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}

/* ---------- Feature rows ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.feature + .feature {
  margin-top: clamp(72px, 11vw, 136px);
}

.feature.flip > :first-child {
  order: 2;
}

.feature figure {
  margin: 0;
}

/* A screenshot needs the full width to be legible: copy above, shot below. */
.feature.stacked {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 44px);
}

.feature.stacked > :first-child {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 8px clamp(28px, 5vw, 64px);
  align-items: start;
}

.feature.stacked .copy-head > :last-child {
  margin-bottom: 0;
}

.feature h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.feature p {
  color: var(--text-muted);
  font-size: 1.07rem;
}

.feature p strong {
  color: var(--text);
}

.feature .more {
  display: inline-block;
  margin-top: 6px;
  font-weight: 650;
  text-decoration: none;
}

.feature .more::after {
  content: " →";
}

/* ---------- Illustrations ---------- */

.panel {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.sentence {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.sentence .who,
.sentence .what,
.sentence .why {
  padding: 0 5px;
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sentence .who {
  background: color-mix(in srgb, #8250df 14%, transparent);
}

.sentence .what {
  background: var(--brand-tint);
}

.sentence .why {
  background: color-mix(in srgb, var(--status-yellow) 16%, transparent);
}

.sentence-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sentence-key span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: -1px;
}

.sentence-key .k-who::before {
  background: color-mix(in srgb, #8250df 40%, transparent);
}

.sentence-key .k-what::before {
  background: var(--brand);
}

.sentence-key .k-why::before {
  background: color-mix(in srgb, var(--status-yellow) 60%, transparent);
}

.trail {
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px dashed var(--border);
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.93rem;
}

.trail li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  color: var(--text-muted);
}

.trail b {
  color: var(--text);
  font-weight: 600;
}

.trail s {
  text-decoration-color: var(--status-red);
}

.examples {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.examples li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.93rem;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.lamp {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lamp.yellow {
  background: var(--status-yellow);
}

.lamp.red {
  background: var(--status-red);
}

.lamp.green {
  background: var(--status-green);
}

.examples .state {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.phases {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phases li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.phases .bar {
  width: 5px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--status-green);
}

.phases .now {
  border: 2px solid var(--status-yellow);
  box-shadow: var(--shadow);
}

.phases .now .bar {
  background: var(--status-yellow);
}

.phases .name {
  font-weight: 650;
}

.phases .meta {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.phases .void {
  justify-content: center;
  border-style: dashed;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.verdicts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
}

.verdict {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.verdict.on {
  border-color: var(--status-green);
  background: color-mix(in srgb, var(--status-green) 12%, transparent);
  color: var(--status-green);
}

.quote {
  margin: 0;
  padding: 16px 18px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-alt);
}

.quote p {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-style: italic;
}

.quote cite {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: normal;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.terms {
  display: grid;
  gap: 18px;
  margin: 0;
}

.terms > div {
  padding-left: 14px;
  border-left: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
}

.terms > div.who {
  border-left-color: color-mix(in srgb, #8250df 55%, transparent);
}

.terms dt {
  font-size: 1.05rem;
  font-weight: 600;
}

.terms .kind {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  vertical-align: 2px;
}

.terms dd {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.terms ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}

.terms ul b {
  color: var(--text);
  font-weight: 600;
}

.terms-note {
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---------- Principle ---------- */

.principle {
  text-align: center;
}

.principle .big {
  max-width: 18em;
  margin: 0 auto 22px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--text);
}

.principle p:not(.big) {
  max-width: 38em;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 1.12rem;
}

/* ---------- Cards ---------- */

.grid {
  display: grid;
  gap: 18px;
}

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

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

.card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.card .icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: var(--brand-tint);
  color: var(--brand-bright);
  font-size: 1.2rem;
}

.card .icon svg {
  width: 22px;
  height: 22px;
}

.product {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-top: 5px solid var(--brand);
  text-decoration: none;
  color: inherit;
  transition: transform 160ms, border-color 160ms;
}

.product:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
}

.product .role {
  color: var(--brand-bright);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.product h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 10px;
  font-size: 1.6rem;
}

.product h3 .mark {
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--mark-ink);
}

.product .more {
  margin-top: auto;
  padding-top: 20px;
  color: var(--brand-bright);
  font-weight: 650;
}

.product .more::after {
  content: " →";
}

/* ---------- Versus ---------- */

.versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.versus > div {
  padding: clamp(22px, 4vw, 36px);
}

.versus > div + div {
  border-left: 1px solid var(--border);
  background: var(--brand-tint);
}

.versus h3 {
  margin-bottom: 18px;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.versus > div + div h3 {
  color: var(--brand-bright);
}

.versus ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.versus li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
}

.versus li::before {
  font-weight: 800;
}

.versus .old li {
  color: var(--text-muted);
}

.versus .old li::before {
  content: "✕";
  color: var(--status-red);
}

.versus .new li::before {
  content: "✓";
  color: var(--status-green);
}

.versus .new li {
  font-weight: 550;
}

/* ---------- Go deeper ---------- */

.deeper {
  display: grid;
  gap: 12px;
}

.deeper details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.deeper summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 650;
  font-size: 1.05rem;
  list-style: none;
}

.deeper summary::-webkit-details-marker {
  display: none;
}

.deeper summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-bright);
  font-size: 1.1rem;
  transition: transform 160ms;
}

.deeper details[open] summary::after {
  transform: rotate(45deg);
}

.deeper summary small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 450;
}

.deeper .body {
  padding: 0 24px 24px;
  color: var(--text-muted);
}

.deeper .body > :last-child {
  margin-bottom: 0;
}

.deeper .body strong {
  color: var(--text);
}

.deeper .body ul {
  padding-left: 1.2em;
}

.deeper .body li {
  margin-bottom: 0.4em;
}

.deeper .body pre {
  margin: 14px 0;
}

/* ---------- Code ---------- */

pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
  tab-size: 4;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

pre .c {
  color: var(--code-muted);
}

pre .p {
  color: var(--brand-on-code);
  user-select: none;
}

/* ---------- Table ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td code {
  white-space: nowrap;
}

/* ---------- Call to action ---------- */

.cta {
  text-align: center;
}

.cta h2 {
  max-width: 16em;
  margin-left: auto;
  margin-right: auto;
}

.cta p {
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.cta .actions {
  justify-content: center;
}

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

.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

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

@media (max-width: 900px) {
  .feature,
  .feature.flip {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature.flip > :first-child {
    order: 0;
  }

  .feature.stacked > :first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .pains,
  .grid.three {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .grid.two,
  .versus {
    grid-template-columns: minmax(0, 1fr);
  }

  .versus > div + div {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .nav a {
    padding: 5px 10px;
    font-size: 0.88rem;
  }

  .shot-bar span {
    margin-right: 0;
  }

  .trail li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .examples li {
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }

  .examples .state {
    margin-left: 20px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}
