/* Design philosophy: "the sketchbook". Graph paper, ink, red pen and pencil notes,
   a deliberate contrast with the dark control-room look of the other two paths. */
:root {
  --paper: #F4F0E6;
  --paper-2: #EAE4D5;
  --ink: #1D1D24;
  --ink-2: #4A4A55;
  --ink-3: #6F6F7A;
  --grid: rgba(70, 110, 160, .11);
  --pen: #D23E2C;
  --pencil: #2F5FA8;
  --go: #2F9E58;        /* tally green: up next */
  --live: #D93A30;      /* tally red: on air */
  --device: #1E1E25;
  --key: #3A3A45;

  --f-display: 'Spectral', Georgia, serif;
  --f-body: 'Crimson Pro', Georgia, serif;
  --f-ui: Inter, system-ui, sans-serif;
  --f-hand: 'Caveat', 'Segoe Print', cursive;
  --wrap: 1120px;
  --gutter: 48px;
}
@media (max-width: 720px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; overflow-x: clip; }
body {
  margin: 0; color: var(--ink); font-family: var(--f-body); font-size: 21px; line-height: 31px;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
/* the red margin rule of a notebook page */
body::before { content: ""; position: fixed; top: 0; bottom: 0; left: max(24px, calc(50% - var(--wrap) / 2 - 36px)); width: 1.5px; background: rgba(210, 62, 44, .35); pointer-events: none; }
@media (max-width: 1220px) { body::before { display: none; } }
a { color: var(--pencil); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; font-family: var(--f-ui); font-size: 14px; }
.skip:focus { left: 16px; }
@media (max-width: 720px) { body { font-size: 19px; line-height: 28px; } }

.eyebrow { margin: 0 0 14px; font-family: var(--f-ui); font-size: 12px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.h2 { margin: 0 0 18px; font-family: var(--f-display); font-weight: 400; font-size: 46px; line-height: 52px; }
@media (max-width: 720px) { .h2 { font-size: 34px; line-height: 40px; } }
.note { font-family: var(--f-hand); font-weight: 500; font-size: 25px; line-height: 1.1; color: var(--pencil); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 8px; font-family: var(--f-ui); font-size: 14px; text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.btn--ink { background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); }
.btn--ink:hover { background: #33333F; color: var(--paper); }
.btn--line { border: 1.5px solid var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

.avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--f-display); font-size: 14px; box-shadow: 0 0 0 1.5px var(--ink); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter); background: rgba(244, 240, 230, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--ink);
}
.top__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 19px; }
.paths-nav { flex: 1; display: flex; justify-content: center; gap: 6px; }
.paths-nav a { position: relative; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-family: var(--f-ui); font-size: 14px; text-decoration: none; white-space: nowrap; }
.paths-nav a span { color: var(--ink-3); font-size: 11px; margin-right: 4px; }
.paths-nav a:hover { color: var(--ink); background: var(--paper-2); }
.paths-nav a[aria-current] { color: var(--ink); }
.paths-nav a[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--pen); transform: rotate(-1deg); }
@media (max-width: 760px) {
  .top { gap: 12px; padding-block: 10px; }
  .top__brand [data-name] { display: none; }
  .paths-nav { justify-content: flex-start; gap: 0; }
  .paths-nav a { padding: 8px 8px; font-size: 13px; }
  .paths-nav a span { display: none; }
  .top__contact { min-height: 38px; padding: 0 12px; font-size: 13px; }
}
@media (max-width: 400px) { .top__contact { display: none; } }

/* ---------- Sections ---------- */
.sheet { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.hero { position: relative; padding: 96px 0 48px; }
.hero__title { margin: 0; max-width: 15ch; font-family: var(--f-display); font-weight: 400; font-size: clamp(46px, 7vw, 92px); line-height: 1.02; letter-spacing: -.015em; }
.scribble { position: relative; display: inline-block; color: var(--pen); font-style: italic; white-space: nowrap; }
.scribble svg { position: absolute; left: -2%; bottom: -12px; width: 104%; height: 22px; fill: none; stroke: var(--pen); stroke-width: 3; stroke-linecap: round; overflow: visible; }
.scribble path { stroke-dasharray: 700; animation: draw 1.1s .3s ease-out both; }
@keyframes draw { from { stroke-dashoffset: 700; } }
.hero__lede { margin: 36px 0 0; max-width: 58ch; color: var(--ink-2); font-size: 23px; line-height: 34px; }
.hero__note { position: absolute; right: 0; top: 124px; transform: rotate(-5deg); color: var(--pen); }
@media (max-width: 1000px) { .hero__note { display: none; } }
.toc { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1.5px solid var(--ink); }
.toc a { display: flex; flex-direction: column; gap: 4px; padding: 20px 20px 22px 0; color: var(--ink); text-decoration: none; }
.toc li + li a { padding-left: 20px; border-left: 1px dashed rgba(29, 29, 36, .3); }
.toc__n { font-family: var(--f-hand); font-size: 26px; color: var(--pen); line-height: 1; }
.toc__t { font-family: var(--f-display); font-size: 28px; line-height: 34px; }
.toc__d { color: var(--ink-3); font-size: 18px; line-height: 25px; }
.toc a:hover .toc__t { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 720px) {
  .hero { padding: 56px 0 32px; }
  .hero__lede { font-size: 20px; line-height: 29px; margin-top: 28px; }
  .toc { grid-template-columns: 1fr; margin-top: 36px; }
  .toc a, .toc li + li a { padding: 14px 0; border-left: 0; flex-direction: row; align-items: baseline; gap: 12px; }
  .toc li + li a { border-top: 1px dashed rgba(29, 29, 36, .3); }
  .toc__d { display: none; }
}

/* Principle: text beside a live demo */
.principle { display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; padding: 88px 0; border-top: 1.5px solid var(--ink); }
.principle--flip .principle__text { order: 2; }
.principle__text p { margin: 0 0 16px; color: var(--ink-2); }
.principle__text em { font-style: italic; color: var(--ink); }
.principle__n { font-family: var(--f-hand); font-size: 44px !important; line-height: 1 !important; color: var(--pen) !important; margin: 0 0 4px !important; }
@media (max-width: 900px) {
  .principle { grid-template-columns: 1fr; gap: 36px; padding: 64px 0; }
  .principle--flip .principle__text { order: 0; }
}

.demo { position: relative; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.demo figcaption { text-align: center; transform: rotate(-1.5deg); }
/* a strip of tape holding the panel to the page */
.demo::before { content: ""; position: absolute; z-index: 3; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px; background: rgba(250, 240, 200, .7); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); transform: rotate(-3deg); pointer-events: none; }

/* Observe findings */
.finds { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.finds li { display: flex; gap: 14px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; font-size: 19px; line-height: 26px; color: var(--ink-2); transition: background .2s, border-color .2s; }
.finds li strong { color: var(--ink); font-weight: 400; font-family: var(--f-display); }
.finds b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-ui); font-size: 12px; background: var(--pen); color: #fff; margin-top: 1px; }
.finds li.is-on { background: rgba(210, 62, 44, .07); border-color: rgba(210, 62, 44, .55); }

/* Reduce: step counts */
.steps { margin: 24px 0 0; display: grid; gap: 14px; }
.steps div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px dashed rgba(29, 29, 36, .3); }
.steps dt { font-family: var(--f-ui); font-size: 13px; letter-spacing: .04em; color: var(--ink-3); }
.steps dd { margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); }
.steps__before { font-size: 26px; color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--pen); text-decoration-thickness: 2px; }
.steps__arrow { font-family: var(--f-hand); color: var(--pen); font-size: 26px; }
.steps__after { font-size: 40px; line-height: 1; color: var(--ink); }

/* Improve: version tabs + feedback */
.versions { display: inline-flex; margin-top: 10px; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; }
.versions button { min-height: 42px; padding: 0 18px; border: 0; background: transparent; font-family: var(--f-ui); font-size: 14px; color: var(--ink); cursor: pointer; }
.versions button + button { border-left: 1.5px solid var(--ink); }
.versions button:hover { background: var(--paper-2); }
.versions button.is-on { background: var(--ink); color: var(--paper); }
.feedback { margin-top: 20px; min-height: 140px; }
.feedback p { margin: 0 0 10px !important; }
.feedback__heard { font-family: var(--f-display); font-style: italic; font-size: 22px; line-height: 30px; color: var(--ink) !important; }
.feedback__heard::before, .feedback__changed::before { display: block; font-family: var(--f-hand); font-style: normal; font-size: 22px; line-height: 1.2; color: var(--pen); }
.feedback__heard::before { content: "heard"; }
.feedback__changed::before { content: "changed"; color: var(--pencil); }

/* ---------- The example panels ---------- */
.device {
  position: relative; aspect-ratio: 4 / 3; padding: 32px 16px 16px; border-radius: 16px;
  background: var(--device); color: #E2E2E6; font-family: var(--f-ui);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 0 #0D0D11, 0 22px 40px rgba(29, 29, 36, .28);
  display: flex; flex-direction: column; gap: 10px;
}
.demo > .device { transform: rotate(-.6deg); }
.device__label { position: absolute; top: 11px; left: 18px; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #85858E; }
.device__label::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3DBE6B; margin-right: 6px; vertical-align: 1px; }

/* before: 35 identical small keys */
.pb { flex: 1; display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: 1fr; gap: 5px; }
.pb__key {
  position: relative; display: grid; place-items: center; border-radius: 4px; background: var(--key);
  font-size: clamp(7px, .72vw, 9.5px); letter-spacing: .02em; color: #ACACB5; white-space: nowrap;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); transition: box-shadow .2s, transform .2s;
}
.pb__dst { background: #30303A; }
.pb__fn { background: #2A2A33; color: #85858E; }
.pb__take { background: #55555F; color: #F1F2F3; }
.pin {
  position: absolute; z-index: 2; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pen); color: #fff; font-size: 10px; font-weight: 500;
  box-shadow: 0 0 0 2px var(--device); cursor: pointer;
}
.pb__key.is-flagged { z-index: 1; transform: scale(1.12); box-shadow: 0 0 0 2px var(--device), 0 0 0 4px var(--pen); }
[data-observe] .pb__key[data-flag] { cursor: pointer; }
.compare .pin { display: none; }

/* after: three destinations, eight named sources, one TAKE */
.pa__dests { display: flex; gap: 6px; }
.pa__dest { flex: 1; min-height: 28px; padding: 4px 6px; border: 0; border-radius: 6px; background: #2E2E38; color: #ACACB5; font: 500 11px/1.2 var(--f-ui); display: grid; place-items: center; transition: background .2s, color .2s; }
.pa__dest.is-on { background: #F1F2F3; color: var(--ink); }
.pa__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto; gap: 8px; transition: grid-template-columns .35s ease; }
.pa__srcs { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 6px; }
.pa__src {
  position: relative; border: 2px solid transparent; border-radius: 7px; background: var(--key); color: #F1F2F3;
  font: 500 11px/1.15 var(--f-ui); letter-spacing: .03em; display: grid; place-items: center; padding: 2px; text-align: center;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); transition: background .2s, border-color .2s, font-size .3s;
}
button.pa__src, button.pa__take, button.pa__dest { cursor: pointer; }
button.pa__src:hover { background: #474753; }
.pa__take {
  justify-self: end; width: 26%; min-height: 30px; padding: 6px; border: 0; border-radius: 6px;
  background: #55555F; color: #F1F2F3; font: 500 11px/1 var(--f-ui); letter-spacing: .12em;
  display: grid; place-items: center; transition: all .35s ease;
}
button.pa__take:hover { filter: brightness(1.12); }
/* v1.0: state shown only as a faint outline and a tiny dot */
.pa__src.is-pvw { border-color: #85858E; }
.pa__src.is-pgm::after { content: ""; position: absolute; top: 5px; left: 5px; width: 5px; height: 5px; border-radius: 50%; background: #ACACB5; }
/* v1.1: tally colours */
[data-version="2"] .pa__src.is-pvw, [data-version="3"] .pa__src.is-pvw { background: var(--go); border-color: #63D08B; }
[data-version="2"] .pa__src.is-pgm, [data-version="3"] .pa__src.is-pgm { background: var(--live); border-color: #FF7B70; }
[data-version="2"] .pa__src.is-pgm::after, [data-version="3"] .pa__src.is-pgm::after { display: none; }
/* v2.0: TAKE moves beside the sources and becomes the biggest key */
[data-version="3"] .pa__body { grid-template-columns: 1fr 24%; grid-template-rows: 1fr; }
[data-version="3"] .pa__take { justify-self: stretch; width: auto; height: 100%; border-radius: 9px; background: #F1F2F3; color: var(--ink); font-size: 15px; font-weight: 500; }
[data-version="3"] .pa__src { font-size: 13px; }
.compare .pa__src:nth-child(1) { background: var(--live); border-color: #FF7B70; }
.compare .pa__src:nth-child(3) { background: var(--go); border-color: #63D08B; }
[data-live].is-cut .pa__srcs { animation: cut .35s ease; }
@keyframes cut { 30% { filter: brightness(1.5); } }
@media (max-width: 480px) {
  .device { padding: 28px 10px 10px; border-radius: 12px; gap: 7px; }
  .pb { gap: 3px; }
  .pa__src { font-size: 9.5px; border-radius: 5px; }
  [data-version="3"] .pa__src { font-size: 10.5px; }
  .pa__dest { font-size: 10px; min-height: 24px; }
  .pa__take { font-size: 10px; }
  [data-version="3"] .pa__take { font-size: 12px; }
}

/* Reduce: before / after slider */
.compare { position: relative; aspect-ratio: 4 / 3; transform: rotate(.5deg); }
.compare__layer { position: absolute; inset: 0; }
.compare__after { clip-path: inset(0 0 0 var(--split)); }
.compare__line { position: absolute; z-index: 2; top: -10px; bottom: -10px; left: var(--split); width: 2px; margin-left: -1px; background: var(--pen); pointer-events: none; }
.compare__line span { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: var(--pen); color: #fff; display: grid; place-items: center; font-family: var(--f-ui); font-size: 16px; box-shadow: 0 4px 12px rgba(29, 29, 36, .3); }
.compare__tag { position: absolute; top: -34px; font-family: var(--f-hand); font-size: 24px; color: var(--pen); }
.compare__tag--l { left: 4px; }
.compare__tag--r { right: 4px; }
.compare__range { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare__range:focus-visible + * { outline: none; }
.compare:has(.compare__range:focus-visible) .compare__line span { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--pencil); }
#reduce .demo { padding-top: 22px; }

/* ---------- Techniques ---------- */
.techniques { padding: 88px 0; border-top: 1.5px solid var(--ink); }
.tech { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tech__card { padding: 24px; border: 1.5px solid var(--ink); border-radius: 14px; background: rgba(255, 255, 255, .42); display: flex; flex-direction: column; gap: 10px; transition: transform .2s; }
.tech__card:nth-child(odd) { transform: rotate(-.4deg); }
.tech__card:nth-child(even) { transform: rotate(.4deg); }
.tech__card:hover { transform: none; }
.tech__card svg { width: 120px; height: 60px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tech__card .tech__pen { stroke: var(--pen); stroke-width: 2.4; }
.tech__card .tech__red { fill: var(--live); stroke: var(--live); }
.tech__card .tech__green { fill: var(--go); stroke: var(--go); }
.tech__card .tech__fill { fill: var(--ink); }
.tech__card h3 { margin: 4px 0 0; font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 30px; }
.tech__card p { margin: 0; color: var(--ink-2); font-size: 18px; line-height: 26px; }
@media (max-width: 960px) { .tech { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .tech { grid-template-columns: 1fr; } .techniques { padding: 64px 0; } }

/* ---------- Next paths ---------- */
.next { padding: 88px 0 32px; border-top: 1.5px solid var(--ink); }
.next__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.next__card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px 72px 28px 28px; border-radius: 16px; background: var(--ink); color: #F1F2F3; text-decoration: none; border: 2px solid var(--ink); transition: transform .2s, border-color .2s; }
.next__card:hover { color: #F1F2F3; transform: translateY(-3px); }
.next__card--gallery:hover { border-color: #E95047; }
.next__card--journey:hover { border-color: #5B97E6; }
.next__n { font-family: var(--f-ui); font-size: 12px; letter-spacing: .1em; color: #ACACB5; }
.next__t { font-family: var(--f-display); font-size: 28px; line-height: 34px; }
.next__d { color: #ACACB5; font-size: 18px; line-height: 25px; }
.next__go { position: absolute; right: 24px; top: 50%; margin-top: -18px; width: 36px; height: 36px; border-radius: 50%; background: #333340; display: grid; place-items: center; font-family: var(--f-ui); }
@media (max-width: 720px) { .next__grid { grid-template-columns: 1fr; } .next { padding-top: 64px; } }

.contact { margin-top: 56px; margin-bottom: 72px; padding: 48px; border: 1.5px dashed var(--ink); border-radius: 18px; background: rgba(255, 255, 255, .35); }
.contact p { margin: 0; color: var(--ink-2); max-width: 56ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 720px) { .contact { padding: 28px 22px; } .contact__actions .btn { flex: 1 1 100%; } }

.footer { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 48px; border-top: 1.5px solid var(--ink); font-family: var(--f-ui); font-size: 13px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .scribble path, [data-live].is-cut .pa__srcs { animation: none; }
  .pa__body, .pa__take, .pa__src { transition: none; }
}
