/* Inkgrid launch page: the app's cover. Paper, ink and one red-orange accent. */

:root {
  --paper: #f6f1e7;
  --surface: #fffcf5;
  --ink: #1f1d1a;
  --ink-muted: #6b655b;
  --grid: #d8cfbf;
  --grid-heavy: #8f8574;
  --cross: #a0968a;
  --clue-done: #b9b0a2;
  --border: #e3dbcc;
  --accent: #c2452d;
  --accent-ink: #fffcf5;
  --accent-soft: #f4dcd2;
  --focus: #2f6fd6;
  --shadow-tint: 60 45 20;

  --shadow-float: 0 1px 2px rgb(var(--shadow-tint) / 0.06), 0 18px 40px -12px rgb(var(--shadow-tint) / 0.28);
  --shadow-small: 0 1px 2px rgb(var(--shadow-tint) / 0.05), 0 6px 16px -8px rgb(var(--shadow-tint) / 0.18);
  --shadow-lift: 0 2px 4px rgb(var(--shadow-tint) / 0.07), 0 16px 32px -12px rgb(var(--shadow-tint) / 0.3);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --gap-section: clamp(5rem, 12vw, 9rem);
  --side: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16150f;
    --surface: #201e18;
    --ink: #ece5d6;
    --ink-muted: #a39b8c;
    --grid: #3a362d;
    --grid-heavy: #7a7262;
    --cross: #6f685b;
    --clue-done: #5a5448;
    --border: #332f27;
    --accent: #ef7a5c;
    --accent-ink: #1a120e;
    --accent-soft: #3a2219;
    --focus: #7aa7ff;
    --shadow-tint: 0 0 0;

    --shadow-float: 0 1px 2px rgb(var(--shadow-tint) / 0.3), 0 22px 48px -12px rgb(var(--shadow-tint) / 0.65);
    --shadow-small: 0 1px 2px rgb(var(--shadow-tint) / 0.3), 0 8px 20px -8px rgb(var(--shadow-tint) / 0.55);
    --shadow-lift: 0 2px 4px rgb(var(--shadow-tint) / 0.35), 0 20px 40px -12px rgb(var(--shadow-tint) / 0.7);
  }
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--side);
}

:focus-visible {
  outline: 2px solid transparent;
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--focus);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title,
.section-title,
.closing-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Small serif titles use the text optical size so their words stay apart */
.step-title,
.card-title,
.wordmark {
  font-family: var(--serif);
  font-variation-settings: normal;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-title {
  font-size: clamp(1.875rem, 3vw + 1rem, 3rem);
  line-height: 1.1;
  font-weight: 600;
}

.lede,
.body-copy {
  color: var(--ink-muted);
  max-width: 36rem;
  text-wrap: pretty;
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 44rem;
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

.section-head.centered .lede {
  margin: 1.25rem auto 0;
}

/* Logo mark */
.mark {
  display: block;
  flex: none;
}
.mark .ink {
  fill: var(--ink);
}
.mark .accent {
  fill: var(--accent);
}

/* Graph-paper dots behind each section, fixed to the page and fading toward its bottom */
main > section {
  position: relative;
  isolation: isolate;
  padding-top: var(--gap-section);
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  pointer-events: none;
}

/* ---------- Buttons and links ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-small);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms var(--ease-out);
}

.pill:hover {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.pill:active {
  transform: scale(0.98);
}

.pill:focus-visible {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--focus);
}

.pill-small {
  min-height: 44px;
  padding: 0 1.125rem;
  font-size: 0.9375rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
  border-radius: 4px;
  transition: text-decoration-color 160ms ease;
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

.text-link:active {
  opacity: 0.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 2rem;
}

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

/* ---------- 1. Header ---------- */

.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  text-decoration: none;
  border-radius: 8px;
}

.brand .mark {
  width: 28px;
  height: 28px;
}

.brand:active {
  opacity: 0.8;
}

.wordmark {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.nav-link:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--border) 60%, transparent);
}

.nav-link:active {
  background: var(--border);
}

.header-nav .pill-small {
  margin-left: 0.5rem;
}

@media (max-width: 39.999rem) {
  .nav-link {
    display: none;
  }
}

/* ---------- The Cat board ---------- */

.board {
  --cell: 28px;
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  font: 500 max(11px, calc(var(--cell) * 0.55)) / 1 var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  user-select: none;
}

.board .cols {
  display: grid;
  grid-template-columns: repeat(10, var(--cell));
  padding-inline: 2px;
}

.board .rows {
  display: grid;
  grid-template-rows: repeat(10, var(--cell));
  padding-block: 2px;
}

.clue {
  transition: color 240ms ease;
}

.clue.col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.2em;
  padding-bottom: 0.45em;
}

.clue.row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45em;
  padding-inline: 0.4em 0.55em;
  border-radius: 4px 0 0 4px;
}

.field {
  display: grid;
  grid-template-columns: repeat(10, var(--cell));
  grid-template-rows: repeat(10, var(--cell));
  border: 2px solid var(--grid-heavy);
  background: var(--surface);
}

.cell {
  position: relative;
  display: block;
  border-right: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
  transition:
    border-color 320ms ease,
    background-color 240ms ease;
}

.cell.c4 {
  border-right: 2px solid var(--grid-heavy);
}
.cell.r4 {
  border-bottom: 2px solid var(--grid-heavy);
}
.cell.ce {
  border-right: 0;
}
.cell.re {
  border-bottom: 0;
}

/* The ink, inset by 1px, popping in */
.cell::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--ink);
  border-radius: 1px;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 90ms var(--ease-out),
    transform 90ms var(--ease-out);
}

/* A cross: two 1.5px strokes over the middle half of the cell */
.cell::after {
  content: "";
  position: absolute;
  inset: 25%;
  background:
    linear-gradient(
      45deg,
      transparent calc(50% - 0.75px),
      var(--cross) calc(50% - 0.75px),
      var(--cross) calc(50% + 0.75px),
      transparent calc(50% + 0.75px)
    ),
    linear-gradient(
      -45deg,
      transparent calc(50% - 0.75px),
      var(--cross) calc(50% - 0.75px),
      var(--cross) calc(50% + 0.75px),
      transparent calc(50% + 0.75px)
    );
  opacity: 0;
  transition: opacity 200ms ease;
}

.cell.on::before,
.board[data-state="working"] .cell.w::before,
.board[data-state="solved"] .cell.f::before {
  opacity: 1;
  transform: none;
}

.cell.xon::after,
.board[data-state="working"] .cell.x::after {
  opacity: 1;
}

.board[data-state="solved"] .cell::after {
  opacity: 0;
}

.clue.done,
.board[data-state="working"] .clue.w,
.board[data-state="solved"] .clue {
  color: var(--clue-done);
}

/* Solved: thin lines fall away, heavy lines and the border stay */
.board[data-state="solved"] .cell {
  border-color: transparent;
}
.board[data-state="solved"] .cell.c4 {
  border-right-color: var(--grid-heavy);
}
.board[data-state="solved"] .cell.r4 {
  border-bottom-color: var(--grid-heavy);
}

/* Step 1 points at row 8, "3 3" */
.board[data-highlight][data-state="blank"] .hl {
  background-color: var(--accent-soft);
}

/* The quicker, scroll-driven state change */
.board.quick .cell::before {
  transition-delay: calc(var(--i) * 6ms);
}

/* ---------- 2. Hero ---------- */

.hero {
  display: grid;
  gap: 3.5rem;
  align-items: center;
  padding-top: clamp(3rem, 8vw, 6rem);
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: 5fr 6fr;
    gap: 3rem;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw + 1rem, 5.25rem);
  line-height: 1.02;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.small-note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.hero-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.sheet-wrap {
  position: relative;
  max-width: 100%;
}

.sheet {
  background: var(--surface);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-float);
  transform: rotate(-1.5deg);
  transition: transform 700ms var(--spring);
}

.is-solved .sheet {
  transform: none;
}

.hero-board {
  --cell: clamp(18px, 3.4vw, 34px);
}

.streak-chip {
  position: absolute;
  top: -18px;
  right: -14px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.8rem 0.4rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-small);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.flame {
  width: 16px;
  height: 16px;
  fill: var(--accent);
  flex: none;
}

.streak-num {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9375rem;
}

.streak-num.tick {
  animation: tick 420ms var(--spring);
}

@keyframes tick {
  from {
    transform: translateY(-6px);
    opacity: 0;
  }
}

.streak-label {
  color: var(--ink-muted);
}

.hero-caption {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 400ms ease 200ms,
    transform 400ms var(--ease-out) 200ms;
}

.is-solved .hero-caption {
  opacity: 1;
  transform: none;
}

@media (max-width: 39.999rem) {
  .hero-board {
    --cell: 22px;
  }
  .sheet {
    padding: 20px;
  }
  .streak-chip {
    right: -6px;
  }
}

/* ---------- 3. How it works ---------- */

.how-grid {
  display: grid;
  gap: 3rem;
}

.how-sticky {
  display: none;
}

.step {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  padding-bottom: 3rem;
}

.step-num {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144;
  font-weight: 600;
  font-size: 4rem;
  line-height: 1;
  color: var(--grid-heavy);
  font-variant-numeric: tabular-nums;
  transition: color 240ms ease;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.step-body {
  color: var(--ink-muted);
  max-width: 34ch;
}

.step-board {
  --cell: 16px;
  margin-top: 1.25rem;
  padding: 16px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-small);
}

@media (max-width: 39.999rem) {
  .step-board {
    --cell: 20px;
  }
}

@media (min-width: 60rem) {
  .how-grid {
    grid-template-columns: 6fr 5fr;
    gap: 4rem;
  }

  .how-sticky {
    display: block;
    position: sticky;
    top: 18vh;
    align-self: start;
  }

  .how-board {
    --cell: clamp(20px, 2.6vw, 32px);
    padding: 28px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow-float);
  }

  .step {
    min-height: 70vh;
    align-content: center;
    padding-bottom: 0;
    transition: opacity 280ms ease;
  }

  .step-board {
    display: none;
  }

  .js .step:not(.active) {
    opacity: 0.45;
  }

  .js .step.active .step-num {
    color: var(--accent);
  }
}

/* ---------- 4. Features ---------- */

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 40rem) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-wide {
    grid-column: span 2;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-small);
  transition:
    transform 240ms var(--ease-out),
    box-shadow 240ms ease,
    opacity 420ms ease,
    translate 420ms var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.card-body {
  color: var(--ink-muted);
  text-wrap: pretty;
}

.motion .bento .card {
  opacity: 0;
  translate: 0 12px;
}

.motion .bento.in .card {
  opacity: 1;
  translate: 0 0;
  transition-delay: 0s, 0s, calc(var(--n) * 60ms), calc(var(--n) * 60ms);
}

/* Illustrations */
.ill {
  height: 96px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.strip {
  --s: 22px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--grid-heavy);
  border-radius: 2px;
  background: var(--paper);
  position: relative;
}

.strip i {
  position: relative;
  width: var(--s);
  height: var(--s);
  border-right: 1px solid var(--grid);
}

.strip i:last-of-type {
  border-right: 0;
}

.strip i.on::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--ink);
  border-radius: 1px;
}

.strip i.x::before {
  content: "";
  position: absolute;
  inset: 25%;
  background:
    linear-gradient(45deg, transparent 45%, var(--cross) 45%, var(--cross) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--cross) 45%, var(--cross) 55%, transparent 55%);
}

.ill-clue {
  font: 500 0.875rem/1 var(--sans);
  color: var(--ink-muted);
  min-width: 2.25rem;
  text-align: right;
}

.runs {
  display: grid;
  gap: 10px;
}

.strip.wrong {
  transition:
    transform 240ms var(--ease-out),
    opacity 240ms ease;
}

.strip.wrong::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: 50%;
  height: 2px;
  background: var(--accent);
  transform: rotate(-8deg);
}

.card:hover .strip.wrong {
  transform: translateX(-4px);
  opacity: 0.35;
}

.check {
  position: absolute;
  right: -26px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill-keys {
  flex-wrap: wrap;
  align-content: center;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  border: 1px solid var(--grid-heavy);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: var(--paper);
  font: 500 0.875rem/1 var(--sans);
}

.strip.small {
  --s: 20px;
  margin-left: 0.25rem;
}

.ill-undo {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
}

.undo-arrow {
  width: 120px;
  height: 44px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card:hover .strip.blink i.on::before {
  animation: blink 700ms ease 1;
}

@keyframes blink {
  45%,
  60% {
    opacity: 0;
  }
}

.ill-week {
  gap: 1.25rem;
  justify-content: flex-start;
}

.week {
  display: flex;
  gap: 6px;
  padding-top: 22px;
}

.day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--grid-heavy);
  border-radius: 4px;
  font: 500 0.6875rem/1 var(--sans);
  color: var(--ink-muted);
}

.week .day.done {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.week .day.today {
  border-color: var(--accent);
  border-width: 2px;
  color: var(--ink);
}

.day.today .flame {
  position: absolute;
  top: -22px;
  left: 50%;
  translate: -50% 0;
}

.week-count {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.ill-archive {
  gap: 8px;
  overflow: hidden;
}

.mini {
  position: relative;
  flex: 0 1 48px;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 20% 20%;
  background-position: -1px -1px;
}

.mini-solved {
  display: grid;
  place-items: center;
  background-image: none;
  background-color: var(--surface);
}

.mini-solved svg {
  width: 70%;
  height: 70%;
  fill: var(--ink);
}

.progress-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
}

.ill-quiet {
  justify-content: center;
}

.browser {
  width: min(100%, 200px);
  height: 90px;
  border: 1.5px solid var(--grid-heavy);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.browser-bar {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.browser-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}

.browser-body {
  flex: 1;
  display: grid;
  place-items: center;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 10px 10px;
}

.browser-body span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-muted);
  background: var(--surface);
  padding: 0 0.4rem;
}

/* ---------- 5. The real thing ---------- */

.book-frame {
  max-width: 64rem;
  margin-inline: auto;
  padding: 10px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  transition:
    opacity 600ms ease,
    translate 600ms var(--ease-out);
}

.motion .book-frame {
  opacity: 0;
  translate: 0 16px;
}

.motion .book-frame.in {
  opacity: 1;
  translate: 0 0;
}

.frame-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 8px 10px;
}

.frame-dots {
  display: flex;
  gap: 6px;
}

.frame-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.frame-label {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  font: 500 0.8125rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.frame-body {
  position: relative;
}

.frame-body iframe {
  display: block;
  width: 100%;
  height: min(820px, 85vh);
  border: 0;
  border-radius: 12px;
  background: var(--paper);
}

.frame-overlay {
  display: none;
}

@media (max-width: 39.999rem) {
  .closing-paper {
    background-size: 32px 32px;
  }

  .frame-body iframe {
    height: 640px;
  }

  .js .frame-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--paper) 70%, transparent);
  }
}

.frame-link {
  margin-top: 1.25rem;
  text-align: center;
}

/* ---------- 6. For publishers ---------- */

.publishers {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.publishers .section-title {
  margin-bottom: 1.25rem;
}

@media (min-width: 60rem) {
  .publishers {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.body-copy code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.3em;
}

.code-col {
  min-width: 0;
}

.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-small);
  overflow: hidden;
}

.code-card pre {
  margin: 0;
  padding: 1.5rem 1.75rem;
  overflow-x: auto;
  font: 400 0.875rem/1.6 var(--mono);
  color: var(--ink-muted);
  border-radius: 14px;
}

.code-card code {
  font: inherit;
}

.code-card .ink {
  color: var(--accent);
  font-weight: 700;
}

.code-note {
  margin-top: 1rem;
  font: 400 0.875rem/1.5 var(--mono);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 7. Closing call to action ---------- */

.closing {
  padding-bottom: var(--gap-section);
}

.closing-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: 28px;
  padding: clamp(2.5rem, 7vw, 6rem);
  box-shadow: var(--shadow-float);
  text-align: center;
}

.closing-paper {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, #000 80%);
  mask-image: radial-gradient(ellipse at center, transparent 30%, #000 80%);
}

.closing-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mark-big {
  width: 44px;
  height: 44px;
  margin-bottom: 1.75rem;
  overflow: visible;
}

.mark-big rect {
  transform-box: fill-box;
  transition:
    opacity 320ms ease,
    transform 320ms var(--ease-out);
}

.motion .closing-inner .mark-big rect {
  opacity: 0;
  transform: translateY(-8px);
}

.motion .closing-inner.in .mark-big rect {
  opacity: 1;
  transform: none;
}

.mark-big .drop-2 {
  transition-delay: 60ms;
}
.mark-big .drop-3 {
  transition-delay: 120ms;
}
.mark-big .drop-4 {
  transition-delay: 180ms;
}

.closing-title {
  font-size: clamp(2.25rem, 6vw + 1rem, 5.25rem);
  line-height: 1.02;
  font-weight: 700;
  max-width: 14ch;
}

.closing-line {
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 8. Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: grid;
  gap: 0.5rem;
  padding-block: 1.75rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
}

.mark-tiny {
  width: 18px;
  height: 18px;
}

@media (min-width: 40rem) {
  .footer-inner {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2rem;
  }
  .footer-inner p:last-child {
    text-align: right;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  .sheet {
    transform: none;
  }
}
