/* El Coco Media v2 — "edit suite" accents on the live site's palette.
   The site reads like an editing timeline: scroll is timecode, sections are
   slates, services are clips on tracks, the footer rolls credits.
   Colors match the live site: white ground, brand teal, #0d1117 for the dark
   moments, and the indigo from the live hero glow as a second track color. */

:root {
  --ink: #0d1117;        /* live dark section */
  --ink-2: #161b22;
  --ink-3: #30363d;
  --paper: #ffffff;
  --paper-2: #fafafa;    /* live --bg-alt */
  --card: #ffffff;
  --line: #e5e7eb;       /* live --border */
  --lane: #f3f4f6;
  --text: #111827;       /* live --fg */
  --muted: #4b5563;      /* 7.6:1 on white */
  --muted-d: #9ca3af;    /* 7.4:1 on ink */

  --teal: #29c4a9;       /* live --primary: fills, rules, accents on ink. 2.2:1 on white, never body text there */
  --teal-ink: #0d7361;   /* live --primary-ink: text, buttons, focus on white. 5.8:1 */
  --teal-ink-2: #0a5c4e; /* live --primary-ink-hover */
  --teal-tint: #e1f5ee;
  --mint: #b8efe4;
  --indigo: #6366f1;     /* from the live aerial-card glow */
  --indigo-soft: #c7d2fe;
  --indigo-ink: #3730a3;
  --rec: #ef4444;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1240px;
  --bar-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; }
.on-ink :focus-visible { outline-color: var(--teal); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--teal-ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ── Transport bar (nav) ─────────────────────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 20px; min-height: var(--bar-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.brand span { color: var(--teal-ink); }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 13px; border-radius: 999px; font-weight: 500; font-size: 15px; color: #374151; }
.nav a:hover { background: var(--lane); color: var(--text); }
.nav a[aria-current="page"] { background: var(--teal-tint); color: var(--teal-ink-2); }
.tc { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--teal-ink); min-width: 132px; font-variant-numeric: tabular-nums; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); flex: none; }
@media (prefers-reduced-motion: no-preference) { .rec { animation: blink 1.4s steps(2, jump-none) infinite; } }
@keyframes blink { 50% { opacity: .15; } }
.bar .btn { min-height: 42px; padding: 0 18px; font-size: 14px; }
.scrub { height: 3px; background: var(--lane); margin-bottom: -1px; }
.scrub i { display: block; height: 100%; width: 0; background: var(--teal); }
@media (max-width: 900px) {
  .tc, .bar .btn { display: none; }
  .bar .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  .nav { order: 3; width: 100%; margin-left: -13px; overflow-x: auto; }
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 26px; border-radius: 999px; font: 700 16px var(--display); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, transform .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal-ink); color: #fff; }
.btn-primary:hover { background: var(--teal-ink-2); }
.on-ink .btn-primary { background: var(--teal); color: var(--ink); }
.on-ink .btn-primary:hover { background: var(--mint); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-3); }
.btn-line { border-color: var(--line); color: inherit; background: transparent; }
.btn-line:hover { border-color: var(--text); }
.btn .key { font-family: var(--mono); font-size: 11px; font-weight: 500; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; opacity: .7; }

/* ── Slate (section label) ───────────────────────────────────────────── */
.slate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.slate .clap { width: 46px; height: 15px; border: 1.5px solid var(--text); border-radius: 2px; background: repeating-linear-gradient(-45deg, var(--text) 0 6px, transparent 6px 12px); }
.slate b { font-weight: 500; color: var(--teal-ink); }
.on-ink .slate { color: var(--muted-d); }
.on-ink .slate .clap { border-color: var(--teal); background: repeating-linear-gradient(-45deg, var(--teal) 0 6px, transparent 6px 12px); }
.on-ink .slate b { color: var(--teal); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.on-ink { background: var(--ink); color: #f1f5f9; }
.hero { padding: 72px 0 0; position: relative; background: var(--paper); }
.hero::before { content: ""; position: absolute; right: -10%; top: -20%; width: 60%; height: 90%; background: radial-gradient(closest-side at 60% 42%, rgba(41,196,169,.20), transparent), radial-gradient(closest-side at 32% 72%, rgba(99,102,241,.12), transparent); pointer-events: none; }
.hero > .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(48px, 7.2vw, 108px); line-height: .94; letter-spacing: -0.04em; margin: 22px 0 28px; }
.hero h1 .line { display: block; }
.w { display: inline-block; padding: 0 .06em; margin: 0 -.03em; border-radius: .1em; transition: background .12s, color .12s; }
.w.on { background: var(--teal); color: var(--ink); }
.hero h1 em, .big em, .page-head h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--teal-ink); }
.on-ink .big em { color: var(--teal); }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); max-width: 33rem; margin: 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.tags span { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); background: var(--paper-2); color: var(--muted); border-radius: 4px; padding: 5px 9px; }
.tags span b { color: var(--teal-ink); font-weight: 500; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding-top: 40px; } }

/* ── Monitor (viewfinder) ────────────────────────────────────────────── */
.monitor { position: relative; aspect-ratio: 4 / 5; max-height: 640px; width: 100%; border-radius: 12px; overflow: hidden; background: var(--ink); margin: 0; box-shadow: 0 24px 60px -24px rgba(17,24,39,.35); }
.monitor video, .monitor iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
/* Hero double-buffer: the incoming clip fades in on top while easing out of a slight zoom. */
.monitor video.mv { position: absolute; inset: 0; transition: opacity .9s ease, transform 1.6s cubic-bezier(.2,.7,.2,1); }
.monitor video.mv.off { opacity: 0; transform: scale(1.06); }
.monitor video.mv.top { z-index: 1; }
.monitor .safe, .monitor .cb, .monitor .hud, .monitor .lower { z-index: 2; }
.flash { position: absolute; inset: 0; z-index: 2; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .22; } 100% { opacity: 0; } }
.lower { transition: transform .45s ease, opacity .45s ease; }
.lower.swap { transform: translateX(-14px); opacity: 0; }
.hud [data-clip-tc].cut { color: var(--teal); }
@media (prefers-reduced-motion: reduce) { .monitor video.mv { transition: none; transform: none; } .flash.go { animation: none; } }
.monitor .safe { position: absolute; inset: 8%; border: 1px dashed rgba(255,255,255,.3); pointer-events: none; }
.cb { position: absolute; width: 26px; height: 26px; border: 2px solid var(--teal); pointer-events: none; }
.cb.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.cb.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.cb.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.cb.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.hud { position: absolute; top: 20px; left: 54px; right: 54px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; pointer-events: none; }
.hud .live { display: flex; align-items: center; gap: 7px; }
.lower { position: absolute; left: 8%; bottom: 10%; background: #fff; color: var(--text); padding: 10px 16px 10px 14px; border-left: 4px solid var(--teal); max-width: 80%; pointer-events: none; border-radius: 0 4px 4px 0; }
.lower strong { display: block; font-size: 19px; letter-spacing: -0.02em; line-height: 1.15; }
.lower span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-ink); }
.monitor.wide { aspect-ratio: 16 / 9; max-height: none; }

/* ── NLE timeline (services as clips) ────────────────────────────────── */
.nle { margin-top: 72px; border-top: 1px solid var(--line); padding: 14px 0 30px; font-family: var(--mono); font-size: 12px; }
.nle-body { position: relative; }
.nle-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; }
.nle-row + .nle-row { margin-top: 6px; }
.nle-label { color: var(--muted); }
.ruler { position: relative; height: 22px; color: var(--muted); }
.ruler span { position: absolute; top: 0; padding-left: 5px; border-left: 1px solid var(--line); height: 100%; font-size: 11px; }
.lane { position: relative; height: 34px; background: var(--lane); border-radius: 4px; }
.clip { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; padding: 0 10px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-decoration: none; font-weight: 500; font-size: 12px; transition: filter .15s; }
.clip:hover { filter: brightness(1.05); outline: 2px solid var(--text); outline-offset: 1px; }
.clip.v1 { background: var(--teal); color: var(--ink); }
.clip.v2 { background: var(--indigo-soft); color: var(--indigo-ink); }
.clip.v3 { background: var(--mint); color: #04342c; }
.clip.a1 { background: var(--teal-tint) repeating-linear-gradient(90deg, transparent 0 3px, rgba(13,115,97,.22) 3px 4px); color: #04342c; }
.ph-track { position: absolute; top: 0; bottom: 0; left: 56px; right: 0; pointer-events: none; }
.playhead { position: absolute; top: 0; bottom: -4px; left: 0; width: 2px; margin-left: -1px; background: var(--rec); pointer-events: none; }
.playhead::before { content: ""; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top: 9px solid var(--rec); }
@media (max-width: 640px) { .nle .clip { font-size: 11px; padding: 0 6px; } }

/* ── Sections ────────────────────────────────────────────────────────── */
.sec { padding: 112px 0; }
.sec.tight { padding: 80px 0; }
.sec.alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.big { font-size: clamp(38px, 5.4vw, 76px); line-height: .98; letter-spacing: -0.035em; margin: 20px 0 0; max-width: 17ch; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sec-head p { max-width: 26rem; color: var(--muted); margin: 0; font-size: 18px; }
.on-ink .sec-head p { color: var(--muted-d); }
.link-more { font-weight: 700; text-decoration: none; color: var(--teal-ink); border-bottom: 2px solid var(--teal); padding-bottom: 2px; white-space: nowrap; }
.link-more:hover { color: var(--teal-ink-2); }

/* services */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 14px; margin-top: 60px; }
.svc { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding-bottom: 22px; scroll-margin-top: calc(var(--bar-h) + 24px); transition: transform .15s, box-shadow .15s, border-color .15s; }
.svc:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 8px 24px -12px rgba(41,196,169,.35); }
.svc .strip { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.svc .strip.v1 { background: var(--teal); color: var(--ink); }
.svc .strip.v2 { background: var(--indigo-soft); color: var(--indigo-ink); }
.svc .strip.v3 { background: var(--mint); color: #04342c; }
.svc .strip.a1 { background: var(--teal-tint); color: #04342c; }
.svc h3 { font-size: 27px; margin: 22px 18px 8px; letter-spacing: -0.025em; }
.svc p { margin: 0 18px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.svc ul { list-style: none; margin: 18px 18px 0; padding: 0; font-size: 15px; }
.svc li { padding: 8px 0; border-top: 1px dashed var(--line); }
.svc li::before { content: "▸"; color: var(--teal-ink); margin-right: 8px; }
/* Rows line up across cards: strip, title, line, then one row per bullet (3 each). */
@supports (grid-template-rows: subgrid) {
  .svc-grid { grid-auto-rows: auto; }
  .svc { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
  .svc h3, .svc p { align-self: start; }
  .svc ul { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
}
.svc:target { outline: 3px solid var(--teal); }

/* work tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px 18px; margin-top: 48px; }
.tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.tile[hidden] { display: none; }
.thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--c); color: var(--ci); border: 1px solid var(--line); transition: box-shadow .2s, transform .2s; }
.tile:hover .thumb { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(17,24,39,.35); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover .thumb img { transform: scale(1.03); }
.thumb img.screen { position: absolute; top: 30px; left: 0; width: 100%; height: calc(100% - 30px); object-fit: cover; object-position: top; }
.tile:hover .thumb img.screen { transform: none; }
.chrome { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #f3f4f6; color: #4b5563; font-family: var(--mono); font-size: 11px; border-bottom: 1px solid var(--line); }
.chrome i { width: 9px; height: 9px; border-radius: 50%; background: #d1d5db; }
.chrome span { margin-left: 8px; background: #fff; border-radius: 4px; padding: 2px 10px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shot { position: absolute; inset: 30px 0 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.shot b { font-size: clamp(24px, 2.6vw, 34px); line-height: 1; letter-spacing: -0.03em; }
.shot .bars { display: grid; gap: 6px; margin-top: 14px; width: 60%; }
.shot .bars i { height: 6px; border-radius: 3px; background: currentColor; opacity: .25; }
.shot .bars i:nth-child(2) { width: 75%; } .shot .bars i:nth-child(3) { width: 45%; }
.vert { position: absolute; top: 10%; bottom: 10%; left: 50%; aspect-ratio: 9 / 16; transform: translateX(-50%); border: 2px solid currentColor; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.vert::after { content: ""; border: 11px solid transparent; border-left: 17px solid currentColor; margin-left: 10px; }
.cap-bar { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); background: var(--teal); color: var(--ink); font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.thumb .badge { position: absolute; top: 10px; right: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 3px 8px; border-radius: 4px; }
.thumb .badge .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-right: 6px; }
.tile-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.tile-meta span:first-child { color: var(--teal-ink); }
.tile h3 { font-size: 24px; letter-spacing: -0.025em; }
.tile p { margin: -4px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font: 500 15px var(--display); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chips button:hover { border-color: var(--teal-ink); }
.chips button[aria-pressed="true"] { background: var(--teal-ink); color: #fff; border-color: var(--teal-ink); }
.chips .n { font-family: var(--mono); font-size: 11px; opacity: .75; }

/* process (dark) */
.steps { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--ink-3); }
.steps li { position: relative; padding: 40px 22px 0 0; }
.steps li::before { content: ""; position: absolute; top: 3px; left: 0; width: 14px; height: 14px; background: var(--teal); transform: rotate(45deg); border: 2px solid var(--ink); }
.steps .mono { color: var(--teal); }
.steps h3 { font-size: 24px; margin: 8px 0 8px; letter-spacing: -0.02em; }
.steps p { margin: 0; color: var(--muted-d); font-size: 16px; line-height: 1.5; }
.fine { margin-top: 36px; color: var(--muted-d); font-size: 15px; }
.section-ghost { position: relative; overflow: hidden; }
.section-ghost::after { content: attr(data-ghost); position: absolute; right: -2%; bottom: -6%; font-weight: 800; font-size: clamp(120px, 22vw, 320px); line-height: 1; letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1.5px rgba(41,196,169,.16); pointer-events: none; white-space: nowrap; }
.section-ghost > .wrap { position: relative; z-index: 1; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 28px; padding-left: 30px; }
  .steps::before { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .steps li { padding: 0; }
  .steps li::before { left: -31px; top: 6px; }
}

/* CTA band */

/* ── Credits (footer) ────────────────────────────────────────────────── */
.credits { background: var(--ink); color: #f1f5f9; padding: 56px 0 32px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.credits .brand span { color: var(--teal); }
.credits .mail { font-size: clamp(22px, 3vw, 34px); font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.credits .mail:hover { color: var(--teal); }
.credits .legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ink-3); color: var(--muted-d); font-size: 14px; }
.credits .legal nav { display: flex; flex-wrap: wrap; gap: 18px; }
.credits .legal a { text-decoration: none; }
.credits .legal a:hover { color: var(--teal); }

/* ── Page head (inner pages) ─────────────────────────────────────────── */
.page-head { padding: 76px 0 64px; background: var(--paper-2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; right: -8%; top: -40%; width: 50%; height: 160%; background: radial-gradient(closest-side, rgba(41,196,169,.16), transparent); pointer-events: none; }
.page-head > .wrap { position: relative; }
.page-head h1 { font-size: clamp(48px, 8vw, 120px); line-height: .9; letter-spacing: -0.045em; margin-top: 22px; }
.page-head .lede { margin-top: 24px; }

/* journal cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 36px; }
.card { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px; text-decoration: none; min-height: 210px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card[hidden] { display: none; }
.card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgba(41,196,169,.35); }
.card .mono { color: var(--teal-ink); display: flex; justify-content: space-between; }
.card .mono span:last-child { color: var(--muted); }
.card h3 { font-size: 23px; line-height: 1.15; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; flex: 1; }
.card .go { font-weight: 700; font-size: 15px; color: var(--teal-ink); }

/* journal: media cards + lead */
.card.has-media { padding-top: 0; overflow: hidden; }
.card-media { position: relative; display: block; margin: 0 -24px 8px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.04); }
.play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255,255,255,.92); }
.play::after { content: ""; position: absolute; left: 21px; top: 16px; border: 11px solid transparent; border-left: 16px solid var(--ink); }
.card.lead { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; padding: 0; overflow: hidden; min-height: 0; }
.lead-media { position: relative; flex: 1.3 1 420px; min-height: 320px; background: var(--ink); }
.lead-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card.lead:hover .lead-media img { transform: scale(1.03); }
.lead-media .badge { position: absolute; top: 16px; left: 16px; background: var(--teal); color: var(--ink); padding: 4px 10px; border-radius: 4px; font-size: 11px; }
.lead-text { flex: 1 1 340px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 36px; }
.lead-text h3 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.02; letter-spacing: -0.03em; }
.lead-text p { flex: 0; font-size: 18px; }

/* ── Post pages ──────────────────────────────────────────────────────── */
.wrap.narrow { max-width: 820px; }
.prose.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.post-head { padding: 36px 0 26px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.post-head h1, .post-hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: .98; letter-spacing: -0.04em; margin: 20px 0 18px; }
.post-head .lede, .post-hero .lede { max-width: 38rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; color: var(--muted); }
.post-meta span + span::before { content: "·"; margin-right: 22px; color: var(--teal); }
.post-body { padding: 36px 0 32px; }

.post-hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; padding: 48px 0 36px; color: #fff; overflow: hidden; background: var(--ink); }
.post-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.post-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,17,23,.05) 30%, rgba(13,17,23,.88) 100%); }
.post-hero .wrap { position: relative; z-index: 1; }
.post-hero .slate, .post-hero .post-meta { color: rgba(255,255,255,.8); }
.post-hero .slate b { color: var(--teal); }
.post-hero .slate .clap { border-color: #fff; background: repeating-linear-gradient(-45deg, #fff 0 6px, transparent 6px 12px); }
.post-hero .lede { color: rgba(255,255,255,.88); }

.post-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
/* Sidebars (TOC, checklist progress) sit left of the content. */
.post-grid > aside { grid-column: 1; grid-row: 1; }
.post-grid > .prose { grid-column: 2; grid-row: 1; max-width: 860px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } .post-grid > aside, .post-grid > .prose { grid-column: auto; grid-row: auto; } }
.toc, .progress-card { position: sticky; top: calc(var(--bar-h) + 28px); }
.toc .mono, .progress-card .mono, .chapters .mono { color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: 15px; line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--teal-ink); border-left-color: var(--teal); font-weight: 500; }
@media (max-width: 900px) { .toc, .progress-card { position: static; } }

.prose { font-size: 19px; line-height: 1.7; color: #1f2937; }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose details p, .prose li p { margin: 0; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.025em; margin-top: 2em; color: var(--text); scroll-margin-top: calc(var(--bar-h) + 24px); }
.prose ul { padding-left: 1.2em; } .prose li { margin: .5em 0; } .prose li::marker { color: var(--teal-ink); }
.prose a { color: var(--teal-ink); font-weight: 600; }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--teal); font-family: var(--serif); font-style: italic; font-size: 1.45em; line-height: 1.3; color: var(--text); }
.callout { background: var(--teal-tint); border: 1px solid #b9e6d8; border-radius: 10px; padding: 20px 24px; }
.callout .mono { color: var(--teal-ink-2); display: block; margin-bottom: 6px; }
.callout p { font-size: 17px; }
.frame { margin: 1.6em 0; }
.frame img { display: block; width: 100%; height: auto; border-radius: 10px; }
.ph { display: flex; align-items: flex-end; aspect-ratio: 16 / 9; padding: 14px; border-radius: 10px; background: repeating-linear-gradient(135deg, var(--lane) 0 12px, #eceef1 12px 24px); border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.ph.tall { aspect-ratio: 4 / 5; }
.ph.alt { background: repeating-linear-gradient(135deg, var(--teal-tint) 0 12px, #d3f0e6 12px 24px); }
.frame figcaption, .bleed figcaption { margin-top: 10px; color: var(--muted); }
.faq { border-top: 1px solid var(--line); padding: 16px 0; }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--teal-ink); font-weight: 500; }
.faq[open] summary::after { content: "−"; }
.faq p { margin-top: 10px; font-size: 17px; color: var(--muted); }

/* feature */
.feature { font-size: 20px; }
.dropcap::first-letter { float: left; font-family: var(--serif); font-size: 5.2em; line-height: .8; padding: 6px 12px 0 0; color: var(--teal-ink); }
.pull { border-left: 0 !important; padding: 0 !important; text-align: center; font-size: clamp(30px, 3.6vw, 44px) !important; color: var(--teal-ink) !important; margin: 1.4em -6% !important; }
.pull::before, .pull::after { content: ""; display: block; width: 60px; height: 2px; background: var(--teal); margin: 0 auto 22px; }
.pull::after { margin: 22px auto 0; }
.bleed { margin: 40px 0; }
.bleed img { width: 100%; max-height: 78vh; object-fit: cover; }
.bleed figcaption { max-width: 820px; margin: 12px auto 0; padding: 0 28px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.6em 0; }

/* video note */
.video-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 720px) { .video-grid { grid-template-columns: 1fr; } }
.chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chapters button { width: 100%; display: flex; align-items: baseline; gap: 12px; text-align: left; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 500 16px var(--display); color: var(--text); cursor: pointer; }
.chapters button .mono { color: var(--teal-ink); margin: 0; }
.chapters button:hover { border-color: var(--teal); }
.chapters button.on { background: var(--teal-tint); border-color: var(--teal); }
.transcript { border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; }
.transcript summary { cursor: pointer; font-weight: 700; }
.transcript p { font-size: 16px; color: var(--muted); margin-top: 12px; }
.transcript .mono { color: var(--teal-ink); margin-right: 8px; }

/* checklist */
.progress-card { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--paper-2); }
.progress-card .count { font-size: 18px; margin: 0; color: var(--muted); }
.progress-card .count b { font-size: 46px; letter-spacing: -0.04em; color: var(--text); }
.pbar { height: 8px; border-radius: 4px; background: var(--lane); margin: 14px 0; overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s ease; }
.progress-card .hint { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.phase { display: block; color: var(--teal-ink); margin-bottom: 6px; }
.checklist { list-style: none; padding: 0 !important; margin-top: 18px; display: grid; gap: 10px; }
.checklist li { margin: 0 !important; }
.checklist input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checklist label { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: background .2s, border-color .2s; }
.checklist label:hover { border-color: var(--teal); }
.checklist .num { width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); margin: 0; }
.checklist .t { display: flex; flex-direction: column; gap: 2px; }
.checklist .t b { font-size: 18px; line-height: 1.3; }
.checklist .t span { font-size: 16px; color: var(--muted); line-height: 1.5; }
.checklist input:checked + label { background: var(--teal-tint); border-color: var(--teal); }
.checklist input:checked + label .num { background: var(--teal); border-color: var(--teal); color: var(--ink); font-size: 0; }
.checklist input:checked + label .num::after { content: "✓"; font-size: 18px; font-family: var(--display); font-weight: 800; }
.checklist input:checked + label .t b { text-decoration: line-through; text-decoration-color: var(--teal-ink); }
.checklist input:focus-visible + label { outline: 3px solid var(--teal-ink); outline-offset: 2px; }

/* ── Call sheet (contact) ────────────────────────────────────────────── */
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: 40px; align-items: start; }
@media (max-width: 960px) { .sheet-grid { grid-template-columns: 1fr; } }
.sheet { background: var(--card); border: 1.5px solid var(--text); border-radius: 6px; overflow: hidden; }
.sheet-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 14px 20px; background: var(--ink); color: #f1f5f9; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.sheet-top b { font-weight: 500; color: var(--teal); }
.row { display: grid; grid-template-columns: 170px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.row:last-of-type { border-bottom: 0; }
.row > .k { padding: 18px 20px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); background: var(--paper-2); }
.row > .v { padding: 10px 20px; display: flex; flex-direction: column; justify-content: center; min-height: 58px; }
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
  .row > .k { border-right: 0; padding-bottom: 6px; }
}
.sheet input[type=text], .sheet input[type=email], .sheet input[type=url], .sheet textarea {
  width: 100%; border: 0; border-bottom: 1.5px solid transparent; background: transparent; padding: 8px 0; font: 400 18px var(--display); color: var(--text);
}
.sheet input:focus, .sheet textarea:focus { outline: none; border-bottom-color: var(--teal-ink); }
.sheet textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0; border: 0; margin: 0; }
.opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opts label { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 15px; background: #fff; }
.opts label:hover { border-color: var(--teal-ink); }
.opts label::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; }
.opts input[type=radio] + label::before { border-radius: 50%; }
.opts input:checked + label { background: var(--teal-ink); color: #fff; border-color: var(--teal-ink); }
.opts input:checked + label::before { background: var(--teal); border-color: var(--teal); }
.opts input:focus-visible + label { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-top: 1.5px solid var(--text); }
.form-msg { margin: 0; font-size: 15px; }
.form-msg.error { color: #b42318; }
.form-msg.ok { color: var(--teal-ink); font-weight: 700; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.next { display: flex; flex-direction: column; gap: 22px; }
.next ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.next li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.next li .n { width: 44px; height: 44px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-ink-2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.next li b { display: block; font-size: 18px; }
.next li span { color: var(--muted); font-size: 15px; }
.note-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.note-card a { font-weight: 700; color: var(--teal-ink); }

/* ── Case study ──────────────────────────────────────────────────────── */
.case-head { background: var(--c); color: var(--ci); padding: 76px 0 64px; }
.case-head .slate, .case-head .slate b { color: inherit; }
.case-head .slate .clap { border-color: currentColor; background: repeating-linear-gradient(-45deg, currentColor 0 6px, transparent 6px 12px); }
.case-head h1 { font-size: clamp(48px, 8vw, 116px); line-height: .9; letter-spacing: -0.045em; margin-top: 22px; }
.case-head p { font-size: 20px; margin: 20px 0 0; max-width: 36rem; }
.case-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 2fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .case-grid { grid-template-columns: 1fr; } }
.facts { border-top: 2px solid var(--text); display: grid; gap: 0; margin: 0; }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stats div { background: var(--ink); color: #f1f5f9; border-radius: 10px; padding: 20px; }
.stats b { display: block; font-size: 46px; line-height: 1; letter-spacing: -0.04em; color: var(--teal); }
.stats span { color: var(--muted-d); font-size: 15px; }
.pbr { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-top: 40px; }
.pbr h3 { font-size: 22px; margin-bottom: 8px; color: var(--teal-ink); }
.pbr p { margin: 0; color: var(--muted); }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .rv.in { opacity: 1; transform: none; }
}

/* ── Post CTA (directly under post content) ──────────────────────────── */
.post-cta { padding: 0 0 48px; }
.post-cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: 14px; background: var(--teal-tint); border: 1px solid #b9e6d8; position: relative; overflow: hidden; }
.post-cta-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--teal); }
.post-cta-card .mono { color: var(--teal-ink-2); }
.post-cta-card h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -0.03em; margin: 6px 0 8px; }
.post-cta-card h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--teal-ink); }
.post-cta-card p { margin: 0; color: var(--muted); max-width: 30rem; }
.post-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.post-cta-actions .btn-line { background: #fff; }

/* ── Hero background lab ─────────────────────────────────────────────── */
.hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero.has-bg::before { display: none; }
.hero > .wrap { z-index: 1; }
.bg-switch { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 4px; background: var(--ink); color: #f1f5f9; border-radius: 999px; padding: 6px; font: 500 14px var(--display); box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.bg-switch span { padding: 0 12px; white-space: nowrap; }
.bg-switch b { font-family: var(--mono); color: var(--teal); font-weight: 500; margin-right: 6px; }
.bg-switch a { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 999px; text-decoration: none; background: var(--ink-3); }
.bg-switch a:hover { background: var(--teal); color: var(--ink); }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: 22px; margin-top: 24px; }
.lab-tile { display: flex; flex-direction: column; gap: 10px; }
.lab-frame { position: relative; aspect-ratio: 16 / 8; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.lab-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-frame .mock { position: absolute; left: 6%; top: 50%; transform: translateY(-50%); pointer-events: none; }
.lab-frame .mock b { display: block; font-size: clamp(22px, 2.4vw, 34px); line-height: .95; letter-spacing: -0.04em; font-weight: 800; color: var(--text); }
.lab-frame .mock em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--teal-ink); }
.lab-frame .mock i { display: block; margin-top: 12px; width: 110px; height: 30px; border-radius: 999px; background: var(--teal-ink); }
.lab-frame .num { position: absolute; top: 10px; left: 12px; font-family: var(--mono); font-size: 12px; background: var(--ink); color: var(--teal); padding: 2px 8px; border-radius: 4px; pointer-events: none; }
.lab-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.lab-meta h3 { font-size: 21px; letter-spacing: -0.02em; }
.lab-meta p { margin: 0; color: var(--muted); font-size: 15px; flex-basis: 100%; }

/* ── Post pages: tighter section rhythm + topographic hero ───────────── */
.post-main .sec.tight { padding: 40px 0; }
.post-head { position: relative; overflow: hidden; }
.post-head > .wrap { position: relative; z-index: 1; }
.post-head .post-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.post-cta .post-cta-card { max-width: none; }

/* Post hero gets 50% more top/bottom room on desktop. */
@media (min-width: 901px) {
  .post-head { padding: 54px 0 39px; }
  .post-hero { padding: 72px 0 54px; }
}

/* In-post images: 80% of the content column, centred, caption matches. */
.prose .frame, .prose .pair { width: 80%; margin-left: auto; margin-right: auto; }
.frame figcaption { text-align: center; }
@media (max-width: 640px) { .prose .frame, .prose .pair { width: 100%; } }

/* ── Journal diagrams (site/diagrams/*.html, placed by <!-- DIAGRAM: id --> in a draft) ── */
.dg { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 24px; overflow-x: auto; font-size: 16px; line-height: 1.5; color: var(--text); }
.dg .dg-title { font-size: 19px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.dg .dg-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.dg .dg-src { color: var(--muted); font-size: 12px; margin: 16px 0 0; font-family: var(--mono); letter-spacing: .02em; }
.dg ul, .dg li { margin: 0; }
/* range charts */
.dg-range { display: grid; gap: 14px; min-width: 520px; }
.dg-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 14px; }
.dg-row .dg-lab { font-size: 14px; font-weight: 600; line-height: 1.25; }
.dg-row .dg-lab small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.dg-track { position: relative; height: 30px; background: var(--lane); border-radius: 6px; }
.dg-bar { position: absolute; top: 5px; bottom: 5px; border-radius: 4px; background: var(--teal); display: flex; align-items: center; padding-inline: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dg-bar.dg-alt { background: var(--indigo-soft); }
.dg-bar.dg-once { background: var(--paper); border: 2px dashed var(--teal-ink); color: var(--teal-ink); }
.dg-bar.dg-open::after { content: ""; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-left: 7px solid var(--teal); }
.dg-bar.lbl-out { color: var(--text); background: transparent; padding: 0; }
.dg-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--teal-ink); }
.dg-dot + span { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.dg-axis { position: relative; height: 22px; margin-left: 164px; border-top: 1px solid var(--line); }
.dg-axis span { position: absolute; top: 4px; transform: translateX(-50%); font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dg-note { margin-left: 164px; font-size: 12.5px; color: var(--muted); margin-top: -6px; }

/* file chart */
.dg table.dg-files { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.dg-files th, .dg-files td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.dg-files th { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dg-files th:first-child, .dg-files td:first-child { text-align: left; }
.dg-files td:first-child b { display: block; }
.dg-files td:first-child small { color: var(--muted); font-size: 12.5px; }
.dg-y, .dg-n, .dg-m { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 14px; }
.dg-y { background: var(--teal-tint); color: var(--teal-ink); }
.dg-n { background: var(--lane); color: #9ca3af; }
.dg-m { background: #fef3c7; color: #92400e; font-size: 12px; }
.dg-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.dg-legend span { display: inline-flex; gap: 6px; align-items: center; }
.dg-legend .dg-y, .dg-legend .dg-n, .dg-legend .dg-m { width: 20px; height: 20px; font-size: 11px; }

/* care tiers */
.dg-tiers { display: grid; grid-template-columns: 1fr 120px; gap: 0 14px; }
.dg-stack { display: grid; gap: 6px; }
.dg-tier { border-radius: 8px; padding: 14px 16px; display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; }
.dg-tier .dg-p { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.dg-tier .dg-p small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.dg-tier ul { margin: 0; padding-left: 18px; font-size: 14px; }
.dg-t3 { background: var(--ink); color: #fff; }
.dg-t2 { background: var(--teal-tint); color: var(--teal-ink); outline: 2px solid var(--teal-ink); outline-offset: -2px; }
.dg-t1 { background: var(--lane); }
.dg-brk { display: grid; grid-template-rows: 1fr auto 1fr; }
.dg-brk div { grid-row: 2; border-left: 3px solid var(--teal-ink); padding: 10px 0 10px 10px; font-size: 13px; font-weight: 600; color: var(--teal-ink); line-height: 1.3; }

/* once vs monthly */
.dg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.dg-col { border-radius: 8px; padding: 16px; }
.dg-col.dg-once { background: var(--teal-tint); }
.dg-col.dg-month { background: var(--lane); }
.dg-col .dg-h { margin: 0 0 4px; font-size: 16px; }
.dg-col p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.dg-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.dg-col li { display: flex; gap: 10px; align-items: flex-start; }
.dg-col li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 2px; background: var(--teal-ink); }
.dg-col.dg-month li::before { border-radius: 50%; background: var(--indigo); }

/* phones */
.dg-phones { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; }
.dg-phone { width: 180px; display: grid; gap: 10px; justify-items: center; }
.dg-screen { position: relative; width: 180px; aspect-ratio: 9 / 16; border-radius: 22px; border: 6px solid var(--ink); background: #2b4a3f; overflow: hidden; }
.dg-screen .dg-sky { position: absolute; inset: 0 0 58% 0; background: #9fd3d6; }
.dg-screen .dg-sea { position: absolute; left: 0; right: 0; top: 42%; height: 16%; background: #2f8f9d; }
.dg-screen .dg-land { position: absolute; left: 0; right: 0; bottom: 0; top: 58%; background: #3e6b3a; }
.dg-screen .dg-house { position: absolute; left: 34%; top: 61%; width: 34%; height: 11%; background: #f3efe6; border-radius: 2px; }
.dg-screen .dg-pool { position: absolute; left: 44%; top: 75%; width: 18%; height: 5%; background: #6fd0e0; border-radius: 2px; }
.dg-mute { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(13,17,23,.6); display: grid; place-items: center; }
.dg-mute svg { width: 15px; height: 15px; }
.dg-cap { position: absolute; left: 10px; right: 10px; bottom: 34px; text-align: center; font-weight: 700; font-size: 15px; line-height: 1.2; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.dg-cap mark { background: var(--teal); color: var(--ink); text-shadow: none; padding: 0 3px; border-radius: 3px; }
.dg-inset { position: absolute; top: 12px; left: 10px; width: 54px; height: 54px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.85); background: rgba(13,17,23,.35); display: grid; place-items: center; font-family: var(--mono); font-size: 10px; color: #fff; text-align: center; line-height: 1.2; }
.dg-phone .mono { color: var(--text); }
.dg-stat { margin: 18px auto 0; max-width: 420px; text-align: center; font-size: 15px; }
.dg-stat b { font-size: 34px; font-weight: 700; color: var(--teal-ink); display: block; line-height: 1; font-variant-numeric: tabular-nums; }

/* brand kit */
.dg-kit { display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.dg-book { background: var(--ink); color: #fff; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; min-height: 240px; }
.dg-book .dg-mark { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--teal); position: relative; }
.dg-book .dg-mark::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--teal); }
.dg-book b { font-size: 18px; line-height: 1.15; }
.dg-book small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; }
.dg-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dg-part { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.dg-part .mono { font-size: 10.5px; }
.dg-marks { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dg-mk { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--teal-ink); position: relative; flex: none; }
.dg-mk::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--teal-ink); }
.dg-mk.dg-w { border-color: #fff; outline: 2px solid var(--ink); background: var(--ink); }
.dg-mk.dg-w::after { background: #fff; }
.dg-mk.dg-one { border-color: var(--text); }
.dg-mk.dg-one::after { background: var(--text); }
.dg-wide { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 13px; }
.dg-sw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dg-sw div { border-radius: 4px; height: 34px; }
.dg-sw small { font-family: var(--mono); font-size: 9.5px; color: var(--muted); display: block; line-height: 1.3; }
.dg-typ .dg-a { font-weight: 700; font-size: 22px; line-height: 1; }
.dg-typ .dg-b { font-family: var(--serif); font-size: 18px; font-style: italic; }
.dg-typ small { color: var(--muted); font-size: 11.5px; }
.dg-tpl { aspect-ratio: 1; border-radius: 4px; background: var(--teal-tint); display: grid; align-content: end; padding: 8px; gap: 4px; }
.dg-tpl i { display: block; height: 6px; border-radius: 3px; background: var(--teal-ink); width: 70%; }
.dg-tpl i + i { width: 45%; opacity: .5; }
.dg-web { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.dg-web .dg-bar1 { height: 10px; background: var(--ink); }
.dg-web .dg-hero { height: 34px; background: var(--teal-tint); }
.dg-web .dg-lines { padding: 6px; display: grid; gap: 4px; }
.dg-web .dg-lines i { display: block; height: 4px; background: var(--lane); border-radius: 2px; }

/* checklist */
.dg-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: c; }
.dg-check li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.dg-check li:last-child { border-bottom: 0; }
.dg-box { width: 22px; height: 22px; border: 2px solid var(--teal-ink); border-radius: 5px; margin-top: 1px; }
.dg-check b { display: block; font-size: 15px; }
.dg-check span { color: var(--muted); font-size: 13.5px; }

@media (max-width: 560px) {
  .dg { padding: 16px; }
  .dg-kit { grid-template-columns: 1fr; }
  .dg-book { min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
  .dg-tiers { grid-template-columns: 1fr; }
  .dg-brk { display: none; }
  .dg-tier { grid-template-columns: 1fr; gap: 6px; }
  /* Range charts: label above its track, full-width track, no sideways scroll. */
  .dg-range { min-width: 0; gap: 16px; }
  .dg-row { grid-template-columns: 1fr; gap: 6px; }
  .dg-axis, .dg-note { margin-left: 0; }
  .dg-axis { min-width: 0 !important; }
  .dg-bar { min-width: max-content; padding-inline: 6px; }
  /* File chart: fit five columns instead of scrolling sideways. */
  .dg table.dg-files { min-width: 0; font-size: 13px; }
  .dg-files th, .dg-files td { padding: 8px 2px; }
  .dg-files th { font-size: 9.5px; letter-spacing: 0; word-break: normal; hyphens: auto; }
  .dg-files td:first-child small { font-size: 11px; }
  .dg-y, .dg-n, .dg-m { width: 22px; height: 22px; font-size: 12px; }
}

/* ── Legal pages (terms, privacy, licensing) ── */
.page-head .updated { margin: 18px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.legal .prose h3 { font-size: 21px; line-height: 1.3; letter-spacing: -0.015em; margin-top: 1.6em; color: var(--text); }
.legal .prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.legal .prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.legal .prose th, .legal .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.legal .prose th { background: var(--paper-2); font-size: 13px; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.legal .prose tr:last-child td { border-bottom: 0; }
.legal .prose .note-card p { margin: 0; font-size: 17px; }
.legal .prose .note-card p + p { margin-top: .6em; }
.legal .prose .btn { text-decoration: none; }
.legal .prose > :first-child { margin-top: 0; }
