/*
 * Twine — the website. Same stationery as the app: cream paper, navy
 * ink, Rose thread, stitched patches and ticket stubs. Colors and type
 * mirror lib/theme.ts.
 */

:root {
  color-scheme: light;

  --paper: #F5EEDC;
  --raised: #FFFAEE;
  --sunk: #ECE2C9;
  --rule: #D9CBAB;
  --rule-soft: #E6DBC2;

  --ink: #1F2140;
  --ink-soft: #4E4F68;
  --ink-muted: #6C6A78;
  --ink-faint: #A39C88;

  --pending: #B9AE92;
  --pin-date: #8F8A98;
  --butter: #F5E9AA;
  --sky: #DCE5F6;
  --stamp: #FFFDF6;

  /* Rose, the default accent. */
  --accent: #E0707E;
  --accent-deep: #C4505F;
  --accent-text: #B23E4F;
  --accent-wash: #F9E0DF;
  --accent-line: rgba(178, 62, 79, 0.4);
  --on-accent: #3A1218;
  --pin-idea: #EFA0A9;

  --display: "Unbounded", system-ui, sans-serif;
  --mono: "Courier Prime", ui-monospace, "Courier New", monospace;
  --hand: "Caveat", "Bradley Hand", cursive;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 16px;
  --max: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px;
}
.skip:focus { left: 8px; z-index: 10; }

/* ---------- the logo, tinted like the app's ---------- */

.logo { display: block; width: auto; aspect-ratio: 1461 / 433; }

/* ---------- type ---------- */

.kicker {
  font: 600 11px/1.4 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 10px;
}

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }
h1 { font-weight: 700; font-size: clamp(30px, 5vw, 46px); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-weight: 600; font-size: clamp(24px, 3.6vw, 32px); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-weight: 500; font-size: 17px; line-height: 1.35; }

.hand { font-family: var(--hand); font-weight: 500; }
.mono { font-family: var(--mono); }

.lead { font-size: 18px; color: var(--ink-soft); max-width: 34em; }

/* A running stitch across the page — the app's divider. */
.thread {
  height: 0; border: 0;
  border-top: 2px dashed var(--accent-line);
  margin: 0;
}

/* ---------- site header ---------- */

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-header .logo { height: clamp(64px, 11vw, 110px); }
.site-header nav { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.site-header nav a {
  font: 600 11px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; padding: 6px 0;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--accent-text); }
/* Log In: the web app, as a small stitched pill at the end of the nav. */
.site-header nav a.nav-login {
  color: var(--accent-text); border: 1.5px solid var(--accent-text); border-radius: 999px; padding: 6px 12px;
}
.site-header nav a.nav-login:hover { background: var(--accent-wash); }

/* ---------- buttons and patches ---------- */

/* A round-cornered patch with a stitch inside its edge, like the + button. */
.patch {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--on-accent);
  border: 2px solid var(--accent-deep); border-radius: 14px;
  padding: 14px 22px;
  font: 600 13px/1.2 var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.patch::after {
  content: ""; position: absolute; inset: 4px;
  border: 1.5px dashed rgba(58, 18, 24, 0.45); border-radius: 10px;
  pointer-events: none;
}
/* The same patch, outlined in ink: a second way in beside the App Store. */
.patch-outline { background: var(--raised); color: var(--ink); border-color: var(--ink); }
.patch-outline::after { border-color: var(--accent-line); }
a.patch-outline:hover { background: var(--accent-wash); color: var(--ink); }
.patch svg { width: 20px; height: 20px; flex: none; }
.patch small {
  display: block; font: 700 10px/1 var(--mono); letter-spacing: 0.14em; opacity: 0.8; margin-bottom: 4px;
}

/* ---------- hero ---------- */

.hero { padding: 24px 0 64px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; grid-template-columns: 1.1fr 0.9fr; }
.hero h1 { margin-bottom: 16px; }
.hero .cta { display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; margin-top: 28px; }
/* The App Store patch and the web app's Log In, side by side at one width (stacked on small phones). */
.hero .cta { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; justify-content: start; }
@media (max-width: 520px) { .hero .cta { grid-auto-flow: row; } }
.hero-phone { display: flex; justify-content: center; }
.hero-phone .phone { transform: rotate(2.5deg); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-phone .phone { transform: none; }
}

/* ---------- sections ---------- */

section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--ink-soft); margin: 12px 0 0; }
.band { background: var(--raised); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ---------- how it works: ticket stubs ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

.ticket {
  position: relative;
  background: var(--stamp);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 18px 22px 22px;
}
/* A perforated tear line under the ticket number. */
.ticket .num {
  font: 700 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text);
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px dashed var(--rule);
}
.ticket h3 { margin-bottom: 8px; }
.ticket p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- screens: the wireframe gallery ---------- */

.gallery {
  display: flex; gap: 36px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 4px 28px;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.gallery figure { margin: 0; flex: none; scroll-snap-align: center; width: 250px; }
.gallery figcaption { margin-top: 18px; }
.gallery figcaption strong {
  display: block; font: 700 12px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.gallery figcaption span { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.gallery figure:first-child { margin-left: auto; }
.gallery figure:last-child { margin-right: auto; }
@media (min-width: 1180px) {
  .gallery { justify-content: center; flex-wrap: wrap; overflow: visible; gap: 28px; }
  /* Four screens on one row. */
  .gallery figure { width: 232px; }
  .gallery figure:first-child, .gallery figure:last-child { margin-left: 0; margin-right: 0; }
}

/* ---------- the phone wireframe ---------- */

.phone {
  width: 250px; flex: none;
  background: var(--ink);
  border-radius: 38px;
  padding: 9px;
  box-shadow: 5px 5px 0 rgba(31, 33, 64, 0.18);
}
.screen {
  position: relative;
  background: var(--paper);
  border-radius: 30px;
  overflow: hidden;
  padding-bottom: 16px;
}
.status { display: flex; justify-content: space-between; align-items: center; padding: 10px 22px 6px; font: 700 10px/1 var(--body); color: var(--ink); }
.status .island { width: 70px; height: 20px; border-radius: 12px; background: var(--ink); }
.status .bars { display: flex; gap: 2px; align-items: flex-end; }
.status .bars i { width: 3px; background: var(--ink); border-radius: 1px; }
/* A real screenshot of the app, 390 × 844 points. */
.shot { display: block; width: 100%; height: auto; }
.home-bar { position: absolute; bottom: 5px; left: 50%; width: 80px; height: 4px; margin-left: -40px; border-radius: 3px; background: var(--ink); }

/* ---------- privacy-first panel ---------- */

.promises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 720px) { .promises { grid-template-columns: 1fr; } }
.promises li {
  position: relative; background: var(--stamp); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 20px 20px 56px;
}
.promises li::before {
  content: ""; position: absolute; left: 20px; top: 22px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-wash); border: 1.5px dashed var(--accent);
}
.promises h3 { font-size: 15px; margin-bottom: 4px; }
.promises p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- thread colors ---------- */

.threads { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 720px) { .threads { grid-template-columns: repeat(4, 1fr); } }
.threads li { text-align: center; font: 700 11px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.threads .spool {
  width: 60px; height: 60px; margin: 0 auto 8px; border-radius: 50%;
  border: 2px dashed transparent; display: flex; align-items: center; justify-content: center;
}
/* The same thread spools as the app's color picker. */
.threads .spool svg { width: 46px; height: 46px; }
.threads li.on .spool { border-color: var(--accent-text); background: var(--accent-wash); }
.threads li.on { color: var(--ink); }

/* ---------- closing call ---------- */

.closing { text-align: center; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; }
.closing p { color: var(--ink-soft); max-width: 32em; margin: 12px 0 26px; }

/* ---------- footer ---------- */

.site-footer { border-top: 2px dashed var(--accent-line); padding: 36px 0 48px; margin-top: 24px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.site-footer .logo { height: 34px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { font: 700 12px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent-text); }
.site-footer .fine { flex-basis: 100%; font: 12px/1.6 var(--mono); color: var(--ink-muted); margin: 0; }

/* ---------- legal and support pages ---------- */

.doc { padding: 32px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc header { margin-bottom: 28px; }
.doc header h1 { margin-bottom: 10px; }
.doc .updated { font: 13px/1.5 var(--mono); color: var(--ink-muted); margin: 0; }
.doc h2 { font-size: 21px; margin: 44px 0 12px; scroll-margin-top: 16px; }
.doc h3 { margin: 24px 0 8px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }

.summary {
  position: relative; background: var(--stamp); border: 1.5px solid var(--ink); border-radius: 14px; padding: 22px 24px; margin: 8px 0 8px;
}
.summary::after { content: ""; position: absolute; inset: 5px; border: 1.5px dashed var(--accent-line); border-radius: 10px; pointer-events: none; }
.summary h2 { margin-top: 0; font-size: 17px; }
.summary ul { margin: 0; }

.toc { font: 14px/1.5 var(--mono); columns: 2; column-gap: 32px; padding-left: 22px; }
@media (max-width: 600px) { .toc { columns: 1; } }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--raised); }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); color: var(--ink-soft); }
th { font: 700 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--sunk); }
tr:last-child td { border-bottom: 0; }

.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between;
  background: var(--accent-wash); border: 1.5px solid var(--accent-line); border-radius: 14px; padding: 20px 24px; margin: 12px 0 8px;
}
.contact-card p { margin: 0; color: var(--ink); }
.contact-card a.email { font: 700 17px/1.3 var(--mono); word-break: break-all; }

details { border: 1px solid var(--rule); border-radius: 12px; background: var(--raised); padding: 0 18px; margin: 10px 0; }
details[open] { padding-bottom: 14px; }
summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative; font: 500 15px/1.4 var(--display); color: var(--ink); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 13px; font: 700 20px/1 var(--mono); color: var(--accent-text); }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 8px; }

ol.steps-plain { padding-left: 22px; }
ol.steps-plain li { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* ================= homepage: following redesign ================= */

/* hero: a pill row and two phones, the Feed laid over Us */
.pills { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px;
  border: 1.5px solid var(--rule); border-radius: 999px; background: var(--raised);
  font: 700 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.pills svg { width: 14px; height: 14px; flex: none; color: var(--accent-text); }
.pills .at { font: 700 14px/1 var(--display); color: var(--accent-text); }
.hero-pair { position: relative; height: 560px; }
.hero-pair .phone { position: absolute; width: 240px; }
.hero-pair .back { left: 6%; top: 0; transform: rotate(-4deg); }
.hero-pair .front { right: 4%; top: 46px; transform: rotate(3deg); box-shadow: 8px 8px 0 rgba(31, 33, 64, 0.2); }
@media (max-width: 860px) {
  .hero-pair { height: 520px; max-width: 460px; width: 100%; margin: 0 auto; }
}
@media (max-width: 480px) {
  .hero-pair { height: 420px; }
  .hero-pair .phone { width: 190px; border-radius: 30px; padding: 7px; }
  .hero-pair .screen { border-radius: 24px; }
}

/* two sides of Twine */
.sides { display: grid; grid-template-columns: 1fr 60px 1fr; align-items: stretch; }
.side {
  position: relative; background: var(--stamp); border: 1.5px solid var(--ink); border-radius: 16px; padding: 26px 26px 22px;
  box-shadow: 4px 4px 0 rgba(31, 33, 64, 0.12);
}
.side::after { content: ""; position: absolute; inset: 6px; border: 1.5px dashed var(--rule); border-radius: 11px; pointer-events: none; }
.side-shared::after { border-color: var(--accent-line); }
.side-icon { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent-wash); color: var(--accent-text); }
.side-icon svg { width: 18px; height: 18px; }
.side-icon-line { width: auto; padding: 0 12px; border-radius: 999px; }
.side-icon-line svg { width: 36px; height: 20px; }
.side-kicker { font: 700 11px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin: 16px 0 4px; }
.side h3 { font-size: 21px; margin-bottom: 10px; }
.side ul { margin: 0 0 14px; padding-left: 18px; }
.side li { color: var(--ink-soft); margin: 5px 0; }
.side-link { font: 700 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; position: relative; z-index: 1; }
.sides-thread { position: relative; }
.sides-thread::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 3px dashed var(--accent);
}
.sides-thread::after {
  content: "or share"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -150%);
  font: 500 18px/1 var(--hand); color: var(--accent-text); white-space: nowrap;
}
@media (max-width: 860px) {
  .sides { grid-template-columns: 1fr; }
  .sides-thread { height: 54px; }
  .sides-thread::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 3px dashed var(--accent); }
  .sides-thread::after { transform: translate(12px, -50%); }
}

/* the life of one date: alternating chapters */
.chapters { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.chapter { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; max-width: 920px; margin: 0 auto; width: 100%; }
.chapter.flip .chapter-text { order: 2; }
.chapter-text { max-width: 30em; }
.chapter-num { font: 700 12px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 10px; }
.chapter-num::after { content: ""; display: block; width: 56px; border-top: 2px dashed var(--accent-line); margin-top: 10px; }
.chapter h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; margin-bottom: 12px; }
.chapter p { color: var(--ink-soft); font-size: 16.5px; margin: 0 0 10px; }
.chapter .handle { font-size: 1.25em; color: var(--accent-text); }
.chapter-note { font-size: 21px !important; color: var(--ink) !important; margin-top: 14px !important; }
.chapter-phone { display: flex; justify-content: center; }
.chapter-phone .phone { width: 210px; transform: rotate(-2deg); }
.chapter.flip .chapter-phone .phone { transform: rotate(2deg); }
@media (max-width: 760px) {
  .chapters { gap: 48px; }
  .chapter { grid-template-columns: 1fr; gap: 24px; }
  .chapter.flip .chapter-text { order: 0; }
  .chapter-phone .phone { width: 220px; }
}

/* following */
.following .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.following .section-head { margin-bottom: 24px; }
.share-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.share-points li { position: relative; padding-left: 30px; }
.share-points li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-wash); border: 1.5px dashed var(--accent);
}
.share-points h3 { font-size: 15px; margin-bottom: 2px; }
.share-points p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.following-phones { display: flex; justify-content: center; gap: 22px; }
.following-phones figure { margin: 0; text-align: center; }
.following-phones figure:first-child .phone { transform: rotate(-2deg); }
.following-phones figure:last-child .phone { transform: rotate(2deg) translateY(28px); }
.following-phones figcaption { margin-top: 18px; font: 700 11px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.following-phones figure:last-child figcaption { margin-top: 46px; }
.following-phones .phone { width: 220px; }
@media (max-width: 960px) { .following .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .following-phones { gap: 12px; }
  .following-phones .phone { width: 160px; border-radius: 28px; padding: 7px; transform: none !important; }
  .following-phones .screen { border-radius: 22px; }
  .following-phones figure:last-child figcaption { margin-top: 18px; }
  .following-phones .status { padding: 7px 14px 4px; font-size: 8px; }
  .following-phones .status .island { width: 44px; height: 14px; }
}

/* who sees what */
.visibility { margin: 0 0 28px; background: var(--stamp); border-color: var(--ink); border-width: 1.5px; border-radius: 14px; }
.visibility table { min-width: 620px; font-size: 15px; }
.visibility thead th { background: var(--sunk); text-align: center; padding: 14px 12px; }
.visibility thead th:first-child { text-align: left; }
.visibility tbody th {
  font: 500 15px/1.35 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink); background: transparent; padding: 14px;
}
.visibility td { text-align: center; vertical-align: middle; padding: 12px; }
.visibility td small { display: block; font: 400 11px/1.2 var(--mono); color: var(--ink-muted); margin-top: 3px; }
.visibility .yes {
  display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font: 700 14px/1 var(--body);
}
.visibility .no { color: var(--ink-faint, #A39C88); font: 700 18px/1 var(--mono); }
.visibility tbody tr:nth-child(2) { background: var(--accent-wash); }

/* untwining */
.untwine .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.untwine .section-head { margin-bottom: 28px; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; border-left: 2.5px dashed var(--accent-line); }
.timeline li { position: relative; padding-left: 38px; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); }
.timeline .dot.open { background: var(--raised); border: 2.5px solid var(--accent-text); }
.timeline .dot.end { background: var(--ink); border-radius: 4px; }
.timeline strong { font: 700 12px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.timeline p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
.untwine-phone { display: flex; justify-content: center; }
.untwine-phone .phone { width: 240px; transform: rotate(2deg); }
@media (max-width: 860px) { .untwine .wrap { grid-template-columns: 1fr; gap: 36px; } }

/* quick answers */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; } }

/* closing */
.closing-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.howto { margin-top: 26px; background: var(--stamp); border: 1.5px solid var(--ink); border-radius: 14px; padding: 18px 20px; }
.howto h3 { font-size: 15px; margin-bottom: 8px; }
.howto ol { margin: 0 0 8px; padding-left: 20px; }
.howto li, .howto p { color: var(--ink-soft); font-size: 15px; margin: 4px 0; }

/* overview → deeper dive */
.more-link { margin: 18px 0 0; font: 700 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.more-link a { text-decoration: none; }
.teaser-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .teaser-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .teaser-cards { grid-template-columns: 1fr; } }
.teaser-cards a {
  display: block; height: 100%; text-decoration: none; background: var(--stamp); border: 1.5px solid var(--ink);
  border-radius: 14px; padding: 18px; box-shadow: 4px 4px 0 rgba(31, 33, 64, 0.12);
}
.teaser-cards a:hover { background: var(--accent-wash); }
.teaser-cards strong { display: block; font: 600 15px/1.3 var(--display); color: var(--ink); margin-bottom: 6px; }
.teaser-cards strong::after { content: " →"; color: var(--accent-text); }
.teaser-cards span { color: var(--ink-soft); font-size: 14px; }

/* deeper dive intro */
.page-intro { padding: 40px 0 24px; }
.page-intro h1 { margin-bottom: 14px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jump a {
  font: 700 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-soft); border: 1.5px solid var(--rule); background: var(--raised); border-radius: 999px; padding: 8px 12px;
}
.jump a:hover { color: var(--accent-text); border-color: var(--accent-line); }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 12px; }

/* ================= storyboards: phones with short captions (as in the PDF) ================= */
.storyboard { display: grid; gap: 28px 22px; justify-items: center; align-items: start; }
.storyboard.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.storyboard.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.storyboard.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 16px; }
.storyboard.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; max-width: 900px; margin: 0 auto; }
.storyboard .frame { margin: 0; width: 100%; max-width: 250px; }
.storyboard .phone { width: 100%; }
.storyboard .frame:nth-child(odd) .phone { transform: rotate(-1.5deg); }
.storyboard .frame:nth-child(even) .phone { transform: rotate(1.5deg); }
.storyboard figcaption { margin-top: 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; }
.storyboard .step {
  grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-text); color: #fff;
  font: 700 12px/24px var(--mono); text-align: center; align-self: start;
}
.storyboard strong { font: 700 12px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.storyboard .cap { font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 1000px) {
  .storyboard.cols-4, .storyboard.cols-5, .storyboard.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storyboard.cols-5 .frame:last-child { grid-column: 1 / -1; max-width: calc(50% - 8px); }
}
@media (max-width: 760px) {
  .storyboard.cols-3, .storyboard.cols-4, .storyboard.cols-5, .storyboard.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .storyboard .phone { border-radius: 26px; padding: 6px; }
  .storyboard .screen { border-radius: 21px; }
  .storyboard .status { padding: 7px 14px 4px; font-size: 8px; }
  .storyboard .status .island { width: 44px; height: 14px; }
  .storyboard .cap { font-size: 13.5px; }
  .storyboard.cols-3 .frame:last-child, .storyboard.cols-5 .frame:last-child { grid-column: 1 / -1; max-width: calc(50% - 7px); }
}
.more-link.center { text-align: center; margin-top: 30px; }

.facts { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }
.facts li {
  display: flex; gap: 10px; align-items: flex-start; background: var(--stamp); border: 1.5px solid var(--rule);
  border-radius: 12px; padding: 14px; font-size: 14.5px; color: var(--ink-soft);
}
.facts svg { flex: none; margin-top: 3px; color: var(--accent-text); }
.facts strong { color: var(--ink); }

.days { list-style: none; padding: 0; margin: 44px auto 0; max-width: 760px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.days::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 8px; border-top: 2.5px dashed var(--accent-line); }
.days li { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.days .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); }
.days .dot.open { background: var(--raised); border: 2.5px solid var(--accent-text); }
.days .dot.end { background: var(--ink); border-radius: 4px; }
.days strong { font: 700 12px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-top: 6px; }
.days small { font: 400 12.5px/1.3 var(--mono); color: var(--ink-muted); }
.threads-label { text-align: center; color: var(--ink-soft); margin: 36px 0 18px; }
/* The hero's "&": a length of rope, sized to the headline's letters. */
/* The headline: "Just us &" with the rope "&" rising tall at the end of the
   first line, then "the couples we love." The lead underneath says what Twine is. */
.hero h1 { font-size: clamp(40px, 5.6vw, 64px); line-height: 1.02; letter-spacing: -0.015em; margin-top: 0; }
.hero h1 .line { display: block; }
.hero .lead { margin: 0 0 4px; font-size: 19px; }
