/*
 * bringajacket.app — the website's only stylesheet.
 *
 * The app's design, for the web: the Ink & Cherry colours from
 * theme/tokens.ts, the app's two fonts (served from this site, never from
 * Google), the cream "paper" for postcards and clues. Light or dark follows
 * the phone or computer, as the app does. When a colour changes in
 * theme/tokens.ts, change it here too.
 *
 * Mocked and agreed first: https://claude.ai/artifact/UJb3XQZEzhLGvzMEynF4QV
 */

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-400-italic.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jakarta-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jakarta-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/jakarta-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jakarta-700.ttf') format('truetype');
}

:root {
  /* colors.light */
  --bg: #f7f6f3;
  --surface: #eceae5;
  --sheet: #fdfcfa;
  --text: #1c1d20;
  --muted: #6a6c70;
  --border: #dedbd4;
  --accent: #d93448;
  --accent-wash: #f4e3e2;
  --partner: #e86fa0;
  --butter: #f2cf63;
  --fill-text: #1c1d20;
  --shadow: rgba(28, 29, 32, 0.2);
  /* paper: the same in light and dark */
  --cream: #fbeee3;
  --paper-ink: #4a2e23;
  --ink-faded: #9a7b6c;
  --stitch: rgba(240, 185, 194, 0.9);
  --flap: #ead5c3;
  --wax: #b8566a;
  --wax-light: #d9707f;
  --wax-dark: #8e3d4d;
  --mint: #9ed9c0;
  /* the stores' badges: black in both */
  --badge-bg: #000000;
  --badge-fg: #ffffff;
  --badge-line: #a6a6a6;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* colors.dark */
    --bg: #16171a;
    --surface: #202226;
    --sheet: #1c1d21;
    --text: #f4f4f2;
    --muted: #a1a3a8;
    --border: #34373d;
    --accent: #ff6b7a;
    --accent-wash: #392428;
    --partner: #ff9ec4;
    --butter: #f2d98b;
    --fill-text: #16171a;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
svg {
  max-width: 100%;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
.i {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
}
@media (min-width: 760px) {
  .wrap {
    padding-inline: 40px;
  }
}

/* ---------- Header ---------- */
.top {
  position: relative;
  z-index: 5;
}
.mark {
  width: 34px;
  height: 34px;
  display: block;
  flex: none;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: max(14px, env(safe-area-inset-top)) 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 18px;
  white-space: nowrap;
}
.nav {
  display: none;
  gap: 28px;
}
.nav a {
  font: 600 14.5px/1 var(--sans);
  color: var(--muted);
  text-decoration: none;
  padding-block: 8px;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  color: var(--text);
}
.nav a[aria-current='page'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* The phone menu: a <details>, so it opens without JavaScript. */
.menu-wrap > summary {
  list-style: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
}
.menu-wrap > summary::-webkit-details-marker {
  display: none;
}
.menu-wrap > summary .i {
  width: 20px;
  height: 20px;
}
.menu-wrap .i-close,
.menu-wrap[open] .i-open {
  display: none;
}
.menu-wrap[open] .i-close {
  display: block;
}
.menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 30px var(--shadow);
  padding-bottom: 8px;
  display: grid;
}
.menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 21px;
  text-decoration: none;
}
.menu a .i {
  color: var(--muted);
}
.menu a[aria-current='page'] {
  color: var(--accent);
}

@media (min-width: 760px) {
  .bar {
    padding-block: 22px;
  }
  .brand {
    font-size: 21px;
    gap: 10px;
  }
  .mark {
    width: 40px;
    height: 40px;
  }
  .nav {
    display: flex;
  }
  .menu-wrap {
    display: none;
  }
}

/* ---------- Home: hero ---------- */
.hero {
  display: grid;
  gap: 34px;
  padding-block: 18px 44px;
}
.hero-copy {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 33.5px;
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.lede {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 34em;
}

.card-space {
  display: flex;
  justify-content: center;
  padding: 22px 26px 26px;
}
.postcard {
  position: relative;
  width: min(100%, 300px);
  padding: 10px;
  border-radius: 16px;
  background: var(--cream);
  transform: rotate(-3deg);
  box-shadow: 0 18px 40px var(--shadow);
}
.painting {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 62%;
  border-radius: 6px;
}
.postcard::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1.5px dashed var(--stitch);
  border-radius: 3px;
  pointer-events: none;
}
/* The stamp sits on the card's top-right corner, as on the app's welcome screen. */
.stamp {
  position: absolute;
  right: 14px;
  top: -12px;
  width: 54px;
  height: 62px;
  transform: rotate(8deg);
  filter: drop-shadow(0 3px 5px var(--shadow));
}
.stamp svg {
  display: block;
  width: 100%;
  height: 100%;
}

.thread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 4px;
}
.thread::before {
  content: '';
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 26px;
  border-top: 1.5px dashed var(--border);
}
.flag {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  font: 600 13px/1 var(--sans);
}
.flag span:first-child {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
}
.flag:last-child span:first-child {
  background: var(--accent-wash);
  color: var(--accent);
}

.soon {
  display: grid;
  gap: 10px;
}
.soon > p {
  margin: 0;
  font: 600 12px/1.3 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.badges {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  padding: 0 16px 0 12px;
  border-radius: 10px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  border: 1px solid var(--badge-line);
  text-decoration: none;
}
.badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.badge span {
  display: grid;
  line-height: 1;
  white-space: nowrap;
}
.badge small {
  font: 500 10.5px/1.1 var(--sans);
}
.badge b {
  font: 600 19px/1.1 var(--sans);
  letter-spacing: -0.01em;
}
.badge.play small {
  text-transform: uppercase;
  font-size: 9.5px;
  letter-spacing: 0.04em;
}
/* Side by side at every width: on a phone they shrink to fit. */
@media (max-width: 460px) {
  .badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .badge {
    height: 46px;
    padding: 0 8px;
    gap: 6px;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
  }
  .badge svg {
    width: clamp(17px, 5vw, 21px);
    height: clamp(17px, 5vw, 21px);
  }
  .badge small {
    font-size: clamp(7.5px, 2.2vw, 9px);
  }
  .badge.play small {
    font-size: clamp(7px, 2vw, 8px);
  }
  .badge b {
    font-size: clamp(12.5px, 3.8vw, 15.5px);
  }
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    padding-block: 48px 84px;
  }
  .hero h1 {
    font-size: 52px;
  }
  .lede {
    font-size: 18px;
  }
  .card-space {
    order: 2;
    padding: 20px;
  }
  .postcard {
    width: min(100%, 360px);
  }
  .thread {
    max-width: 420px;
  }
}

/* ---------- Home: sections ---------- */
.band {
  border-top: 1px solid var(--border);
  padding-block: 40px;
}
.band h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 10px;
  text-wrap: balance;
}
.band-lede {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 34em;
}

/* How a date works: four steps, each with a small scene from the app. */
.journey {
  display: grid;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.journey li {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
}
.scene {
  height: 176px;
  border-radius: 18px;
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}
.step-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}
.num {
  flex: none;
  margin-top: -1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  font: 600 13px/1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.journey li:last-child .num {
  border-color: var(--accent);
  color: var(--accent);
}
.journey h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
}
.journey p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.ask {
  width: min(100%, 214px);
  padding: 14px;
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: 0 6px 18px var(--shadow);
  display: grid;
  gap: 10px;
}
.ask-title {
  font: 600 13px/1.2 var(--sans);
}
.days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.day {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 0;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.day small {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.day b {
  font: 400 20px/1 var(--serif);
}
.day.on {
  background: var(--accent-wash);
  border-color: var(--accent);
}
.day.on small {
  color: var(--accent);
}

.wishes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  max-width: 250px;
}
.wish {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font: 600 12.5px/1 var(--sans);
  white-space: nowrap;
}
.wish i {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
}
.wish.surprise {
  background: var(--butter);
  border-color: var(--butter);
  color: var(--fill-text);
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.wish .i {
  width: 13px;
  height: 13px;
}

.secret {
  position: relative;
  width: min(100%, 214px);
  padding: 14px 14px 16px;
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: 0 6px 18px var(--shadow);
  display: grid;
  gap: 9px;
}
.secret-title {
  font: 600 13px/1.2 var(--sans);
}
.secret-line {
  height: 9px;
  border-radius: 5px;
  background: var(--muted);
  opacity: 0.35;
  filter: blur(2.5px);
}
.secret-line.mid {
  width: 72%;
}
.secret-line.long {
  width: 86%;
}
.lock {
  position: absolute;
  right: -10px;
  top: -12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--partner);
  color: var(--partner);
}
.lock .i {
  width: 17px;
  height: 17px;
}

.clue {
  position: relative;
  width: min(100%, 218px);
  padding: 16px 16px 14px;
  border-radius: 6px;
  background: var(--cream);
  color: var(--paper-ink);
  transform: rotate(-2deg);
  box-shadow: 0 8px 20px var(--shadow);
  display: grid;
  gap: 8px;
}
.clue::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1.5px dashed var(--stitch);
  border-radius: 3px;
  pointer-events: none;
}
.clue small {
  font: 700 10px/1 var(--sans);
  letter-spacing: 0.14em;
  color: var(--ink-faded);
}
.clue q {
  font: italic 400 17px/1.35 var(--serif);
  quotes: none;
}
.clue span {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 600 11.5px/1 var(--sans);
  color: var(--ink-faded);
}
.clue .i {
  width: 13px;
  height: 13px;
}

/* And between dates: tiles, each with its own little object. */
.tiles {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  min-width: 0;
  padding: 18px 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  display: grid;
  gap: 4px;
  align-content: start;
}
.art {
  height: 140px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.tile h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  margin: 0;
}
.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.env {
  position: relative;
  width: 150px;
  height: 96px;
  border-radius: 6px;
  background: var(--cream);
  transform: rotate(-4deg);
  box-shadow: 0 8px 18px var(--shadow);
}
.env::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--flap);
  clip-path: polygon(0 0, 100% 0, 50% 60%);
  border-radius: 6px 6px 0 0;
}
.seal {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--wax-light), var(--wax) 55%, var(--wax-dark));
  display: grid;
  place-items: center;
  color: var(--cream);
}
.seal svg {
  width: 16px;
  height: 16px;
}

/* Photos cropped from the welcome painting. */
.crop {
  display: block;
  background: url('/img/backdrop.webp') no-repeat;
}
.pols {
  position: relative;
  width: 170px;
  height: 124px;
}
.pol {
  position: absolute;
  width: 92px;
  padding: 6px 6px 20px;
  background: var(--cream);
  box-shadow: 0 8px 18px var(--shadow);
  border-radius: 2px;
}
.pol .crop {
  aspect-ratio: 1;
  background-size: 300%;
}
.pol:first-child {
  left: 8px;
  top: 8px;
  transform: rotate(-8deg);
}
.pol:first-child .crop {
  background-position: 30% 70%;
}
.pol:last-child {
  right: 8px;
  top: 2px;
  transform: rotate(7deg);
}
.pol:last-child .crop {
  background-position: 80% 20%;
}

.quiz {
  width: min(100%, 210px);
  padding: 14px;
  border-radius: 16px;
  background: var(--partner);
  color: var(--fill-text);
  display: grid;
  gap: 8px;
  transform: rotate(2deg);
}
.quiz small {
  font: 700 10px/1 var(--sans);
  letter-spacing: 0.12em;
  opacity: 0.7;
}
.quiz b {
  font: 400 16.5px/1.3 var(--serif);
}
.quiz span {
  display: flex;
  gap: 6px;
}
.quiz i {
  font: 600 12px/1 var(--sans);
  font-style: normal;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--fill-text);
}
.quiz i:first-child {
  background: var(--fill-text);
  color: var(--partner);
}

.rings {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  padding: 3px;
  border: 2.5px solid var(--text);
}
.ring.seen {
  border-color: var(--border);
}
.ring.big {
  width: 78px;
  height: 78px;
}
.ring .crop {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: 400%;
}
.ring:nth-child(1) .crop {
  background-position: 20% 80%;
}
.ring:nth-child(2) .crop {
  background-position: 45% 75%;
}
.ring:nth-child(3) .crop {
  background-position: 85% 15%;
}

.stickers {
  position: relative;
  width: 190px;
  height: 120px;
}
.sticker {
  position: absolute;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  color: var(--fill-text);
  box-shadow: 0 6px 14px var(--shadow);
  border: 3px solid var(--cream);
}
.sticker .i {
  width: 26px;
  height: 26px;
}
.sticker:nth-child(1) {
  left: 4px;
  top: 30px;
  background: var(--butter);
  border-radius: 50%;
  transform: rotate(-10deg);
}
.sticker:nth-child(2) {
  left: 62px;
  top: 4px;
  background: var(--partner);
  border-radius: 18px;
  transform: rotate(6deg);
}
.sticker:nth-child(3) {
  right: 4px;
  top: 40px;
  background: var(--mint);
  border-radius: 50% 50% 18px 50%;
  transform: rotate(14deg);
}

.miles {
  position: relative;
  width: 210px;
  height: 110px;
}
.miles svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.miles .path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
}
.miles .me {
  fill: var(--text);
}
.miles .you {
  fill: var(--partner);
}
.miles b {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font: 600 13px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (min-width: 600px) {
  .journey {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 28px;
  }
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 760px) {
  .band {
    padding-block: 64px;
  }
  .band h2 {
    font-size: 34px;
  }
  .band-lede {
    margin-bottom: 36px;
    font-size: 17px;
  }
}
@media (min-width: 980px) {
  .journey {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
  .tiles {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* ---------- Legal pages, help, legal notice ---------- */
.doc {
  display: grid;
  padding-block: 10px 48px;
}
.doc-main {
  min-width: 0;
  max-width: 680px;
}
.doc h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
.updated {
  margin: 8px 0 0;
  font: 500 13px/1.4 var(--sans);
  color: var(--muted);
}
.pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 16px -20px 0;
  padding: 0 20px 4px;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar {
  display: none;
}
.pills a {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: 600 12.5px/1 var(--sans);
  text-decoration: none;
}
.short {
  position: relative;
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--paper-ink);
}
.short::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px dashed var(--stitch);
  border-radius: 5px;
  pointer-events: none;
}
.short h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 6px;
}
.short p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
.sec h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  margin: 34px 0 8px;
  scroll-margin-top: 16px;
}
.sec p {
  margin: 0 0 12px;
  font-size: 15.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.sec ul {
  margin: 0 0 12px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}
.sec li {
  font-size: 15.5px;
  line-height: 1.6;
  padding-left: 2px;
}
.sec li::marker {
  color: var(--muted);
}
.sec a,
.topic a,
.facts a {
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.side {
  display: none;
}

.help {
  display: grid;
  margin-top: 24px;
}
.topic {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px 14px;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 16px;
}
.topic > .i {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.topic h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  margin: 0;
}
.topic div {
  grid-column: 2;
  display: grid;
  gap: 10px;
}
.topic p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
}
.topic ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 15.5px;
  line-height: 1.55;
}
.email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.email a {
  font-weight: 600;
  font-size: 16px;
  text-underline-offset: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 13px/1 var(--sans);
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text);
  cursor: pointer;
}
.btn[hidden] {
  display: none;
}
.btn .i {
  width: 15px;
  height: 15px;
}
.facts {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
}
.facts div {
  display: grid;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.facts dt {
  font: 600 12px/1.3 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.lost {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding-block: 40px 80px;
}
.lost h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  margin: 0;
}
.lost p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

@media (min-width: 760px) {
  .doc {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 64px;
    padding-block: 28px 80px;
  }
  .doc h1 {
    font-size: 42px;
  }
  .pills {
    display: none;
  }
  .side {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
  }
  .side p {
    margin: 6px 0 12px;
    font: 600 12px/1.3 var(--sans);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .side ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
    border-left: 1px solid var(--border);
  }
  .side a {
    display: block;
    padding: 6px 0 6px 14px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: 13.5px;
    color: var(--muted);
    text-decoration: none;
  }
  .side a:hover {
    color: var(--text);
    border-left-color: var(--accent);
  }
  .sec p,
  .sec li {
    font-size: 16px;
  }
  .facts div {
    grid-template-columns: 220px 1fr;
    gap: 24px;
  }
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--border);
  padding-block: 28px max(34px, env(safe-area-inset-bottom));
  display: grid;
  gap: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.foot .brand {
  color: var(--text);
  font-size: 17px;
}
.foot .mark {
  width: 28px;
  height: 28px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.foot-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
}
.foot-links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .postcard {
    animation: settle 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  @keyframes settle {
    from {
      transform: rotate(-7deg) translateY(10px);
    }
    to {
      transform: rotate(-3deg);
    }
  }
}
