/* colindouglas.com — the reel's world (frame.md): butcher-paper cream, heavy black grotesque, one tomato-red voltage.
   Mobile-first; every size below 768px is the phone layout. */

:root {
  --paper: #f2ede3;
  --paper-deep: #e7dfd0;
  --card: #fbf8f2;
  --ink: #17140f;
  --ink-soft: #5e564b;
  --accent: #dd3b17;
  --fresh: #1e8a4c;
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas,
    monospace;
  --label: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: 16px;
  --hud-h: 48px;
  --shadow: 6px 8px 0 var(--ink);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  /* the reel's dotted paper grid */
  background-image: radial-gradient(
    circle,
    rgba(23, 20, 15, 0.13) 1.2px,
    transparent 1.6px
  );
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 20;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 8px;
}

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

/* ── HUD header / footer (the reel's console frame) ── */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
header.hud {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--hud-h);
  background: rgba(242, 237, 227, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-top: 4px solid var(--accent);
}
.hud b {
  color: var(--accent);
}
.hud-name {
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud nav {
  display: flex;
  gap: 14px;
}
@media (max-width: 520px) {
  .hud-name span {
    display: none;
  }
}
.hud nav a {
  text-decoration: none;
}
.hud nav a:hover {
  color: var(--ink);
}
.hud-foot {
  min-height: 64px;
  margin-top: 72px;
  border-top: 3px solid var(--ink);
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ── the reel ── */
.reel-wrap {
  padding: 12px var(--gutter) 0;
}
.reel {
  position: relative;
  container: reel / inline-size;
  margin: 0 auto;
  border: 3px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  /* 16:9 — as large as fits under the header, with the controls just below */
  aspect-ratio: 16 / 9;
  width: min(100%, calc((100vh - 190px) * 16 / 9));
  width: min(100%, calc((100svh - 190px) * 16 / 9));
}
.reel[data-edition="port"] {
  /* 9:16 phone edition: fill the first screen; the sound button floats on the video */
  aspect-ratio: 9 / 16;
  width: min(100%, calc((100vh - var(--hud-h) - 36px) * 9 / 16));
  width: min(100%, calc((100svh - var(--hud-h) - 36px) * 9 / 16));
}
/* before (or without) any script, the screen shape alone sizes the player */
@media (max-aspect-ratio: 4/5) {
  .reel:not([data-edition]) {
    aspect-ratio: 9 / 16;
    width: min(100%, calc((100vh - var(--hud-h) - 36px) * 9 / 16));
    width: min(100%, calc((100svh - var(--hud-h) - 36px) * 9 / 16));
  }
}
/* the sound pill grows with the player itself, not the screen (a landscape phone has a small player) */
@container reel (min-width: 760px) {
  .btn.overlay-btn:not(.overlay-play) {
    right: 18px;
    bottom: 16px;
    min-height: 42px;
    padding: 8px 20px;
    font-size: 14px;
  }
}
.reel video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
  cursor: pointer;
}

/* sound prompt: a corner pill over the reel's decorative timecode, so it never covers the content */
.btn.overlay-btn {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 3;
  min-height: 34px;
  padding: 6px 14px;
  border-width: 2px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 3px 4px 0 var(--ink);
}
.btn.overlay-btn[hidden] {
  display: none;
}
.btn.overlay-play {
  right: auto;
  bottom: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-height: 56px;
  padding: 14px 30px;
  border-width: 3px;
  font-size: 18px;
  box-shadow: 5px 6px 0 var(--ink);
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* controls row */
.reel-bar[hidden] {
  display: none;
}
/* the controls are exactly as wide as the player above them (same sizing as .reel, per edition) */
.reel-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px auto 0;
  width: min(100%, calc((100vh - 190px) * 16 / 9));
  width: min(100%, calc((100svh - 190px) * 16 / 9));
}
.reel[data-edition="port"] + .reel-bar {
  width: min(100%, calc((100vh - var(--hud-h) - 36px) * 9 / 16));
  width: min(100%, calc((100svh - var(--hud-h) - 36px) * 9 / 16));
}
@media (max-aspect-ratio: 4/5) {
  .reel:not([data-edition]) + .reel-bar {
    width: min(100%, calc((100vh - var(--hud-h) - 36px) * 9 / 16));
    width: min(100%, calc((100svh - var(--hud-h) - 36px) * 9 / 16));
  }
}
.progress {
  position: relative;
  flex: 1 0 100%;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  overflow: hidden;
}
.progress i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.progress span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ink);
  opacity: 0.35;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 20px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 700 14px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-accent {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 4px 5px 0 var(--ink);
}
.btn-icon {
  width: 44px;
  padding: 0;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
}
.btn:hover {
  filter: brightness(1.08);
}
.chapters {
  position: relative;
  display: flex;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 6px;
}
/* when the chapters don't fit they scroll, and the row fades out at its edge to say so */
.chapters.is-scrolling {
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.chapters::-webkit-scrollbar {
  display: none;
}
.chapters button {
  /* when they fit, the chapters share the row so it ends flush with the player's right edge */
  flex: 1 0 auto;
  min-height: 40px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.chapters button b {
  margin-right: 4px;
  color: var(--accent);
}
.chapters button[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ── end card: the reel's last frame rebuilt at canvas size, scaled to the player ── */
.endcard {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  background-color: var(--paper);
  background-image: radial-gradient(
    circle,
    rgba(23, 20, 15, 0.17) 2.4px,
    transparent 2.9px
  );
  animation: ec-in 0.45s ease-out both;
}
.endcard[hidden] {
  display: none;
}
@keyframes ec-in {
  from {
    opacity: 0;
  }
}
.ec-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
  transform: scale(var(--ec-s, 0.5));
  font-family: var(--mono);
}
.reel[data-edition="port"] .ec-stage {
  width: 1080px;
  height: 1920px;
}
.ec-stage > * {
  position: absolute;
}
.ec-glow {
  left: -170px;
  top: -60px;
  width: 1200px;
  height: 1200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 65, 28, 0.22) 0%,
    rgba(232, 65, 28, 0) 62%
  );
}
.ec-stage::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 6px;
  background: var(--accent);
}
.ec-hud {
  color: var(--ink-soft);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ec-hud b {
  color: var(--accent);
}
.ec-tl {
  left: 40px;
  top: 30px;
}
.ec-tr {
  right: 40px;
  top: 30px;
}
.ec-bl {
  left: 40px;
  bottom: 26px;
  text-transform: none;
  letter-spacing: 0.02em;
}
.ec-card {
  left: 120px;
  top: 112px;
  width: 620px;
  height: 846px;
}
.ec-card-sh {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 620px;
  height: 846px;
  border-radius: 30px;
  background: var(--ink);
}
.ec-card-in {
  position: absolute;
  inset: 0;
  border: 5px solid var(--ink);
  border-radius: 30px;
  background: var(--card);
  overflow: hidden;
}
.ec-card-in > * {
  position: absolute;
}
.ec-img {
  left: 20px;
  top: 20px;
  width: 570px;
  height: 570px;
  border-radius: 20px;
  background: #efefef;
  overflow: hidden;
}
.ec-img img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.ec-badge {
  left: 38px;
  top: 38px;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ec-cname,
.ec-n,
.ec-t {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
.ec-cname {
  left: 26px;
  top: 614px;
  font-size: 60px;
}
.ec-crole {
  left: 28px;
  top: 684px;
  color: var(--ink-soft);
  font-size: 28px;
  white-space: nowrap;
}
.ec-cbtn {
  left: 20px;
  right: 20px;
  top: 742px;
  height: 74px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 74px;
  text-align: center;
  text-decoration: none;
}
.ec-n {
  left: 812px;
  font-size: 196px;
}
.ec-n1 {
  top: 140px;
}
.ec-n2 {
  top: 322px;
}
.ec-role {
  left: 822px;
  top: 540px;
  color: var(--accent);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.ec-t {
  left: 818px;
  font-size: 68px;
}
.ec-t1 {
  top: 630px;
}
.ec-t2 {
  top: 708px;
  color: var(--accent);
}
.ec-url {
  left: 818px;
  top: 826px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 36px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 48px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.ec-urlc {
  display: inline-block;
  width: 6px;
  height: 52px;
  background: var(--accent);
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.ec-li {
  left: 826px;
  top: 930px;
  color: var(--ink-soft);
  font-size: 30px;
  font-weight: 700;
  white-space: nowrap;
}
.ec-cbtn:hover,
.ec-url:hover,
.ec-li:hover {
  filter: brightness(1.12);
  text-decoration: underline;
}
/* phone edition's last frame */
.reel[data-edition="port"] .ec-glow {
  left: -60px;
  top: 83px;
}
.reel[data-edition="port"] .ec-stage::before {
  height: 8px;
}
.reel[data-edition="port"] .ec-hud {
  font-size: 28px;
  letter-spacing: 0.04em;
}
.reel[data-edition="port"] .ec-tl {
  left: 52px;
  top: 44px;
}
.reel[data-edition="port"] .ec-tr {
  right: 52px;
  top: 44px;
}
.reel[data-edition="port"] .ec-bl {
  left: 52px;
  bottom: 40px;
}
.reel[data-edition="port"] .ec-card {
  left: 230px;
  top: 260px;
}
.reel[data-edition="port"] .ec-n {
  display: none;
}
.reel[data-edition="port"] .ec-role {
  left: 60px;
  top: 1210px;
  font-size: 36px;
}
.reel[data-edition="port"] .ec-t {
  left: 56px;
  font-size: 70px;
}
.reel[data-edition="port"] .ec-t1 {
  top: 1266px;
}
.reel[data-edition="port"] .ec-t2 {
  top: 1346px;
}
.reel[data-edition="port"] .ec-url {
  left: 60px;
  top: 1470px;
  font-size: 54px;
}
.reel[data-edition="port"] .ec-urlc {
  height: 58px;
}
.reel[data-edition="port"] .ec-li {
  left: 64px;
  top: 1610px;
  font-size: 32px;
}
.ec-replay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  min-height: 40px;
  padding: 6px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ── sections ── */
section:not(.reel-wrap) {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.kicker,
.section-h {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.kicker span {
  display: block;
  color: var(--ink-soft);
}

.intro {
  padding-top: 72px !important;
}
.name {
  margin: 0;
  /* "DOUGLAS" is ~5.12em wide: size it to the column so it never overflows a phone */
  font-size: clamp(44px, calc((100vw - 2 * var(--gutter)) / 5.25), 200px);
  letter-spacing: -0.045em;
  line-height: 0.88;
}
.roleline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 8px solid var(--accent);
  font-size: clamp(15px, 3.6vw, 24px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.roleline i {
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: rotate(45deg);
}
.thesis {
  margin: 48px 0 0;
  font-size: clamp(32px, 8.4vw, 76px);
  line-height: 0.98;
}
.thesis em,
.hook em,
.promise em {
  color: var(--accent);
  font-style: normal;
}
.mono-k {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.lede {
  max-width: 62ch;
  margin: 28px 0 0;
  font-size: 17px;
}

/* the work */
.work {
  padding-top: 88px !important;
}
.chap {
  position: relative;
  margin: 0 0 28px;
  padding: 22px 20px 24px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.chap-tag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chap-tag b {
  margin-right: 12px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
}
.pill {
  display: inline-block;
  padding: 2px 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}
.hook {
  margin: 22px 0 12px;
  font-size: clamp(34px, 8.6vw, 64px);
}
.chap > p {
  max-width: 62ch;
  margin: 0;
}
.stats {
  display: grid;
  gap: 18px;
  margin: 22px 0 0;
}
.stat {
  padding-top: 14px;
  border-top: 3px solid var(--ink);
}
.stat dt {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stat dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.num {
  display: block;
  font-family: var(--display);
  font-size: clamp(40px, 11vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.num sup {
  font-size: 0.45em;
  vertical-align: 0.9em;
}
.money {
  color: var(--accent);
}
.fresh {
  color: var(--fresh);
}
.stat .fine {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 400;
}
.watch {
  margin-top: 22px;
  min-height: 44px;
  padding: 8px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.watch:hover {
  background: var(--accent);
  color: var(--ink);
}

/* SuperCharge: the map + the ladder */
.flow {
  display: grid;
  gap: 26px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.flow li {
  position: relative;
  padding: 12px 16px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--accent);
  font-family: var(--display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.flow li:nth-child(2) {
  background: var(--paper);
  border-radius: 999px;
}
.flow li small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.flow li + li::before {
  content: "↓";
  position: absolute;
  left: 50%;
  top: -27px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}
.flow::after {
  content: "● Human-in-the-loop at every step";
  color: var(--fresh);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ladder {
  position: relative;
  margin: 26px 0 0;
  padding: 0 0 0 30px;
  list-style: none;
}
.ladder::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 18px;
  width: 4px;
  background: var(--ink);
}
.ladder li {
  position: relative;
  padding: 0 0 14px;
  font-weight: 700;
}
.ladder li::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 4px;
  width: 20px;
  height: 20px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--fresh);
}
.ladder li:last-child::before {
  background: var(--accent);
}
.ladder small {
  display: block;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ladder li:last-child {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}
.ladder li:last-child small {
  font-family: var(--mono);
  font-weight: 700;
  margin-bottom: 4px;
}

/* Engineer Facts — the nutrition label */
.facts {
  padding-top: 64px !important;
}
.nf {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 14px 18px 18px;
  border: 5px solid var(--ink);
  background: var(--card);
  box-shadow: 10px 12px 0 var(--ink);
  font-family: var(--label);
  font-size: 15px;
}
.nf p {
  margin: 0;
}
.nf-h {
  margin: 0;
  font-size: clamp(38px, 10vw, 56px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.nf-r1 {
  margin-top: 6px !important;
  padding-top: 4px;
  border-top: 2px solid var(--ink);
  font-size: 16px;
}
.nf-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}
.nf-row > :last-child {
  text-align: right;
}
.nf-ss {
  padding-bottom: 4px;
  font-size: 20px;
  font-weight: 900;
}
.nf-thick {
  height: 12px;
  background: var(--ink);
}
.nf-thick2 {
  height: 9px;
}
.nf-mid {
  height: 6px;
  background: var(--ink);
}
.nf-aps {
  padding-top: 4px;
  font-size: 13px;
  font-weight: 700;
}
.nf-big {
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 900;
  line-height: 1.15;
}
.nf-it {
  padding: 5px 0;
  border-top: 1px solid var(--ink);
  line-height: 1.3;
}
.nf-it b {
  font-weight: 900;
}
.nf-sub {
  padding-left: 20px;
  font-size: 14px;
}
.nf-sub b {
  font-weight: 700;
}
.nf-contains {
  margin-top: 8px !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.nf-fn {
  margin-top: 8px !important;
  font-size: 13px;
}

/* contact — the reel's last search, answered */
.contact {
  padding-top: 88px !important;
  text-align: center;
}
.search {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 22px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 5px 6px 0 var(--ink);
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 700;
  text-align: left;
}
.search svg {
  flex: none;
  width: 28px;
  height: 28px;
}
.search i {
  width: 3px;
  height: 1.2em;
  margin-left: -10px;
  background: var(--accent);
  animation: blink 0.9s steps(1) infinite;
}
.result {
  margin: 34px 0 22px;
  font-size: clamp(44px, 12vw, 80px);
}
.card {
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 12px 12px 14px;
  border: 4px solid var(--ink);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 10px 12px 0 var(--ink);
  text-align: left;
}
.card-img {
  border-radius: 14px;
  background: #efefef;
  overflow: hidden;
}
.card-badge {
  position: absolute;
  left: 24px;
  top: 24px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-name {
  margin: 14px 4px 0;
  font-size: 34px;
}
.card-role {
  margin: 4px 6px 0;
  color: var(--ink-soft);
}
.card-btn {
  display: block;
  margin-top: 14px;
  padding: 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}
.card-btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.promise {
  margin: 56px 0 0;
  font-size: clamp(30px, 8vw, 64px);
}
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}
.links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.links a span {
  color: var(--accent);
  font-size: 16px;
}
.links a:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ── tablet / desktop ── */
@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --hud-h: 54px;
    --shadow: 8px 10px 0 var(--ink);
  }
  .hud {
    font-size: 13px;
  }
  .hud nav {
    gap: 24px;
  }
  .reel {
    border-width: 4px;
    border-radius: 22px;
  }

  .chap {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas:
      "tag tag"
      "hook stats"
      "body stats"
      "extra stats"
      "watch stats";
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: 40px;
    padding: 30px 34px 32px;
    border-radius: 28px;
  }
  .chap-tag {
    grid-area: tag;
  }
  .hook {
    grid-area: hook;
  }
  .chap > p {
    grid-area: body;
  }
  .stats {
    grid-area: stats;
    align-self: start;
    margin-top: 22px;
  }
  .watch {
    grid-area: watch;
    justify-self: start;
    align-self: start;
  }
  #supercharge .flow {
    grid-area: stats;
    align-self: start;
  }
  #supercharge .ladder {
    grid-area: extra;
  }
  .pill {
    margin-left: auto;
    font-size: 12px;
  }
  .nf {
    font-size: 17px;
  }
}

@media (min-width: 1000px) {
  .finale {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--gutter);
  }
  .finale > section {
    max-width: none;
    margin: 0;
    padding: 88px 0 0 !important;
  }
  .finale .nf {
    margin: 0;
  }
  .finale .promise {
    font-size: 44px;
  }
}

/* landscape phones: the reel takes the whole screen height */
@media (orientation: landscape) and (max-height: 500px) {
  .reel,
  .reel-bar {
    width: min(100%, calc((100svh - 70px) * 16 / 9));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ec-urlc,
  .search i {
    animation: none;
  }
  .endcard {
    animation: none;
  }
}
