/* The Life Hack Matrix reader. Search-first index surface: light surfaces, one
   restrained Flamingo Pink accent, compact image-led cards, and provenance and review
   cues that stay legible at phone width. Shared by the full candidate (index.html) and
   the static preview (mvp.html). */
:is(h1, h2, h3) { text-wrap: balance; }
:is(p, li, figcaption) { text-wrap: pretty; }
.closing-invite { white-space: nowrap; }
.closing-invite strong { color: var(--pink-ink); }
.keep-phrase { white-space: nowrap; }

:root {
  --pink: #ff6b9d;
  --pink-ink: #8e1f49;
  --pink-wash: #fff1f6;
  --bg: #fff9f5;
  --card: #ffffff;
  --ink: #15161a;
  --muted: #5f6470;
  --line: #e4e6ec;
  --warn-bg: #fff6e5;
  --warn-ink: #7a4a00;
  --warn-line: #f0d9a8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 18, 27, .06), 0 8px 24px rgba(16, 18, 27, .06);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Flamingo Time brand system (FLAMINGO-TIME-BRAND.md): Playfair Display for display,
     Quicksand for UI, and the signature gradient on one word per heading. */
  --display: "Playfair Display", Georgia, serif;
  --ui: Quicksand, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ft-gradient: linear-gradient(135deg, #FF6B9D, #E84C82 60%, #D4A843);
  --wine: #C2185B;
  --wrap: 980px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101116;
    --card: #181a21;
    --ink: #f1f2f6;
    --muted: #a2a8b6;
    --line: #272a34;
    --pink-wash: #2a1520;
    --pink-ink: #ffc2d8;
    --warn-bg: #3a2a05;
    --warn-ink: #ffd88a;
    --warn-line: #5a4210;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101116;
  --card: #181a21;
  --ink: #f1f2f6;
  --muted: #a2a8b6;
  --line: #272a34;
  --pink-wash: #2a1520;
  --pink-ink: #ffc2d8;
  --warn-bg: #3a2a05;
  --warn-ink: #ffd88a;
  --warn-line: #5a4210;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* iOS: no text inflation on rotation, no grey flash on tap. Inputs stay at 16px (body size,
   inherited below) so Safari does not zoom the page when one is focused. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 90;
  padding: 10px 15px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
}
.skip:focus { top: 14px; }

/* Header: brand, tabs, account. Sticky so search and tabs stay in reach. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.01em;
}
.matrix-mark { flex: 0 0 auto; border-radius: 9px; }
.brand-copy { display: grid; line-height: 1.05; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
/* The wordmark: "Matrix" is the one gradient word (FLAMINGO-TIME-BRAND.md §5.2). */
.brand-copy b { margin-top: 1px; font: 900 22px/1 var(--display); letter-spacing: -.01em; text-transform: none; color: var(--pink-ink); background: var(--ft-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (forced-colors: active) { .brand-copy b { -webkit-text-fill-color: currentColor; background: none; } }
.tabs { display: flex; gap: 4px; margin-left: auto; order: 3; width: 100%; overflow-x: auto; }
.tabs a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { color: var(--pink-ink); }
.tabs a[aria-current="page"] { background: var(--pink-wash); color: var(--pink-ink); }
.tab-count { font-variant-numeric: tabular-nums; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.family-signature { flex: 0 0 auto; border-radius: 50%; box-shadow: 0 0 0 2px var(--pink); }
@media (min-width: 720px) {
  .tabs { order: 0; width: auto; margin-left: 18px; }
  .header-actions { margin-left: auto; }
}

.button, .text-button, .small-button, .save-toggle, .chip, .filter {
  font-size: 14px;
  font-weight: 600;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.button:hover { border-color: var(--pink); }
.button.primary { background: var(--pink); border-color: var(--pink); color: #2a0d19; }
.button.primary:hover { filter: brightness(1.05); }
.button.block { display: flex; width: 100%; }
.text-button {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
}
.text-button:hover { color: var(--pink-ink); }

/* Status strip: account and storage truth stays visible above the index. */
.service-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 16px 0;
  color: var(--muted);
  font-size: 13px;
}
.service-status p { margin: 0; }
.storage-message { color: var(--pink-ink); }
.service-status .text-button { margin-left: auto; font-size: 13px; }
/* While the account service is being checked, or where it is not configured, the account
   line and its link are not shown; the strip itself appears only for a storage warning. */
.service-status:is([data-accounts="checking"], [data-accounts="off"]) :is(#account-status, #open-account-hero) { display: none; }
.service-status:is([data-accounts="checking"], [data-accounts="off"]):has(#storage-status:empty) { display: none; }

.view { max-width: var(--wrap); margin: 0 auto; padding: 14px 16px 56px; }
.view > h1 { margin: 6px 0 4px; font-size: 24px; letter-spacing: -.02em; }
.view > .page-lede { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

/* Search-first controls. */
.searchbar { position: relative; display: flex; align-items: center; }
.searchbar input {
  width: 100%;
  min-height: 50px;
  padding: 13px 44px 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input:focus { outline: 2px solid var(--pink); outline-offset: 1px; border-color: transparent; }
.searchbar button {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
.searchbar button:hover { color: var(--pink-ink); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.filter {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
}
/* A chip is a label, not a control: it sits in a card's metadata row at the height of the
   text beside it. Sharing the filter button's 34px minimum made every card's metadata
   wrap onto extra rows. */
.chip {
  display: inline-block;
  line-height: 1.35;
  white-space: nowrap;
}
.filter:hover { border-color: var(--pink); }
.filter[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: #2a0d19; }
.tagline { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.tag {
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--pink-wash);
  color: var(--pink-ink);
  font-size: 12px;
  font-weight: 600;
}
.tag[aria-pressed="true"] { background: var(--pink); color: #2a0d19; }
.results-meta { margin: 18px 0 10px; color: var(--muted); font-size: 13px; }

/* Cards: image-led, two per row on a wide screen, one on a phone. */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid { grid-template-columns: 1fr 1fr; } }
.instruction {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.instruction:hover { border-color: var(--pink); }
.instruction:focus-within { border-color: var(--pink); }
.tile {
  width: 84px;
  height: 108px;
  border-radius: 10px;
  background: var(--pink-wash);
  color: var(--pink-ink);
  display: block;
}
.instruction h3 { margin: 0 0 4px; font: 700 17px/1.25 var(--display); letter-spacing: 0; }
.instruction h3 a { text-decoration: none; }
.instruction h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.instruction p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.pill { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 12px; }
/* The review tag sits on the thumbnail's bottom edge, full width of the frame, on its own
   solid ground so it reads over any poster frame. */
.tile-wrap { position: relative; width: 84px; align-self: start; }
/* Scoped to the card so it outranks the tag's colour rules (.chip.draft and friends),
   which set a larger size and padding for the tag in text. */
.instruction .tile-wrap .chip {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 2px 2px;
  font-size: 10px;
  letter-spacing: 0;
  line-height: 1.2;
  /* Sentence case is narrower than the capitals the tag uses elsewhere, so the whole
     label fits on one line across an 84px frame and stays readable. */
  text-transform: none;
  text-align: center;
  /* Never cut the review state short: if a label is ever wider than the frame, it wraps
     onto a second line instead of ending in an ellipsis. */
  white-space: normal;
  box-shadow: 0 1px 3px rgba(16, 18, 27, .18);
}
/* Inside a card the labels share one row on a phone; a few pixels of padding is the
   difference between one row and two at a 375px width. */
.meta .pill { padding: 2px 8px; }
.meta .stamp, .meta .chip { padding-left: 6px; padding-right: 6px; }
.stamp {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--pink-wash);
  color: var(--pink-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}
.chip.draft, .flag {
  padding: 2px 7px;
  border: 1px solid var(--warn-line);
  border-radius: 6px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.save-toggle {
  position: relative;
  z-index: 1;
  min-height: 30px;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
}
.save-toggle:hover { border-color: var(--pink); }
.save-toggle[aria-pressed="true"] { background: var(--pink-wash); border-color: var(--pink); color: var(--pink-ink); }
.empty { margin: 0; color: var(--muted); }

/* Detail page. */
.back-link { display: inline-block; margin: 0 0 12px; color: var(--muted); font-size: 14px; text-decoration: none; }
.back-link:hover { color: var(--pink-ink); }
.detail {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.detail-header { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail h1, .detail h2.title { margin: 10px 0 8px; font: 900 28px/1.1 var(--display); letter-spacing: -.01em; }
.lede { margin: 0 0 18px; font-size: 17px; }
.split { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .split { grid-template-columns: 190px 1fr; } }
.split .tile { width: 100%; height: 150px; }
.sec {
  margin: 20px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.sec:first-child { margin-top: 0; }
.kv { display: flex; gap: 8px; flex-wrap: wrap; }
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 40px; line-height: 1.5; }
.steps li::before {
  content: counter(s) / "";
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pink);
  color: #2a0d19;
  font-size: 13px;
  font-weight: 700;
}
.steps li:last-child { padding-bottom: 0; }
.state-grid { display: grid; gap: 8px; grid-template-columns: 1fr; margin: 0; }
@media (min-width: 560px) { .state-grid { grid-template-columns: repeat(3, 1fr); } }
.state {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 12.5px;
  line-height: 1.45;
}
.state b { display: block; color: var(--pink-ink); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--pink-wash); color: var(--pink-ink); font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.source-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.source-box strong { color: var(--ink); }

/* A-Z index, saved list, about. */
.az h2 {
  margin: 22px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--pink-ink);
  font-size: 15px;
}
.az ul { list-style: none; margin: 0; padding: 0; }
.az li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.az a { font-weight: 600; text-decoration: none; }
.az a:hover { color: var(--pink-ink); }
.library-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 10px;
}
.library-row small { color: var(--muted); }
.library-row button, .library-row a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.library-row button:hover, .library-row a:hover { border-color: var(--pink); }
.library-empty { color: var(--muted); }
.panel {
  margin: 0 0 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; }
.panel p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.panel p:last-child { margin-bottom: 0; }
.how-steps { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 14px; }
@media (min-width: 680px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
.how-steps article { padding-top: 12px; border-top: 2px solid var(--pink); }
.how-steps h3 { margin: 6px 0 4px; font-size: 15px; }
.how-steps p { margin: 0; color: var(--muted); font-size: 13.5px; }
.availability-list { display: grid; gap: 0; margin-top: 10px; }
.availability-list span { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.availability-list span:last-child { border-bottom: 0; }

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 16px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer .text-button { margin-left: auto; }
/* The family signature line, bottom of every Flamingo Time property. */
.ft-joint { flex-basis: 100%; order: 9; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ft-joint::before { content: "🦩 "; letter-spacing: 0; }

/* Dialogs keep the account, test-purchase, and shared-draft surfaces. */
dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(10, 12, 18, .45);
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(8, 9, 14, .45); }
.dialog-content { padding: 26px 22px 24px; }
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
.close:hover { border-color: var(--pink); color: var(--pink-ink); }
dialog .eyebrow {
  margin: 0 0 6px;
  color: var(--pink-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
dialog h2 { margin: 0 34px 10px 0; font-size: 21px; letter-spacing: -.01em; }
dialog h3 { margin: 0 0 8px; font-size: 15px; }
dialog p { color: var(--muted); font-size: 14px; }
dialog form { padding: 16px 0; border-top: 1px solid var(--line); }
dialog label { display: block; margin: 10px 0 12px; font-size: 13px; font-weight: 600; }
dialog label input, dialog textarea, .input {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
}
dialog textarea { min-height: 120px; resize: vertical; }
#draft-json { min-height: 150px; font: 13px/1.5 var(--mono); }
.form-error { color: var(--pink-ink); font-size: 13px; }
.preview-card { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--pink-wash); }
.preview-card h3 { margin: 8px 0; }
.preview-card ol { padding-left: 20px; }

/* Intake, editing and sharing. */
img.tile { object-fit: cover; }
.tile-blank { background: var(--pink-wash); }
.split img.tile { height: 150px; }
.chip.reviewed {
  padding: 2px 7px;
  border: 1px solid var(--pink);
  border-radius: 6px;
  background: var(--pink-wash);
  color: var(--pink-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.chip.ad {
  padding: 2px 7px;
  border: 1px solid #d3d9ff;
  border-radius: 6px;
  background: #eef1ff;
  color: #31409c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip.ad { background: #1c2140; color: #b9c4ff; border-color: #2f3768; }
}
:root[data-theme="dark"] .chip.ad { background: #1c2140; color: #b9c4ff; border-color: #2f3768; }
/* Synthetic demo records say so wherever they appear. */
.chip.demo {
  padding: 2px 7px;
  border: 1px dashed var(--pink-ink);
  border-radius: 6px;
  background: transparent;
  color: var(--pink-ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.intake-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 13px; }
.intake-demo .demo-video { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.source-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-filter[aria-pressed="true"] { background: var(--warn-ink); border-color: var(--warn-ink); color: #fff; }
.button.danger { color: var(--pink-ink); }
.button.danger:hover { border-color: var(--pink-ink); }
.transcript { margin-top: 16px; font-size: 13.5px; }
.transcript summary { color: var(--muted); cursor: pointer; }
.transcript p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row .grow { flex: 1; min-width: 0; }
dialog .checkbox { display: flex; gap: 8px; align-items: center; font-weight: 600; }
dialog .checkbox input { width: auto; min-height: 0; margin: 0; }
dialog select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.preview-list { display: grid; gap: 10px; margin-top: 12px; }
label.preview {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 13.5px;
  font-weight: 400;
}
label.preview input { width: auto; min-height: 0; margin: 3px 0 0; }
.share-actions { display: grid; gap: 8px; margin: 14px 0; }
/* Feedback inside an open sheet: a floating toast would draw under the dialog. */
.sheet-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--pink-wash);
  color: var(--pink-ink);
  font-size: 13.5px;
  font-weight: 600;
}
.sheet-status[data-tone="warn"] { background: var(--warn-bg); color: var(--warn-ink); }
.button.done { border-color: var(--pink); background: var(--pink-wash); color: var(--pink-ink); }
.button.primary.done { background: var(--pink); color: #2a0d19; }
.share-preview:focus { outline: 2px solid var(--pink); outline-offset: 2px; }
.toast[data-tone="warn"] { background: var(--warn-ink); color: #fff; }
.share-preview {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font: 12.5px/1.5 var(--mono);
  white-space: pre-wrap;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

/* Link import, matched to Ladle: one sheet, a spinner while reading, a preview, save. */
.intake-hint { margin: 8px 0 12px; font-size: 13px; }
.intake-hint a { color: var(--pink-ink); }
#intake-body .row { align-items: stretch; }
#intake-body .row .input { margin-top: 0; }
#intake-body > .button.block + .button.block { margin-top: 8px; }
.quiet-action { color: var(--muted); }
.sheet-actions { margin-top: 12px; }
.sheet-actions .button { flex: 1; }
.progress { display: flex; align-items: center; gap: 12px; padding: 22px 4px; color: var(--muted); font-weight: 600; }
.spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid var(--pink-wash);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stub-frame { display: block; height: 96px; margin: 12px 0 0; border-radius: 12px; object-fit: cover; }
.preview-head { align-items: flex-start; margin-top: 4px; }
.preview-head img { width: 96px; height: 72px; flex: 0 0 auto; border-radius: 12px; object-fit: cover; background: var(--pink-wash); }
.preview-head b { font-size: 16px; }
.preview-head .muted { font-size: 13px; }
#intake-body .notice.warn { margin-top: 12px; font-size: 13px; }
.preview-steps { margin: 12px 0 0; padding-left: 22px; font-size: 14px; }
.preview-steps li { margin: 4px 0; }
.preview-list { max-height: 44vh; overflow: auto; }

/* Mobile add button, where a thumb reaches; the header button covers wider screens. */
.fab {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: none;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  color: #2a0d19;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(142, 31, 73, .35);
}
@media (max-width: 719px) {
  .fab { display: grid; place-items: center; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .add-link { display: none; }
  .view { padding-bottom: 96px; }
  /* The footer's last line would sit under the + button at the end of the page. */
  footer { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}

/* Time is the index inside a video. */
a.stamp.jump { position: relative; z-index: 1; text-decoration: none; }
a.stamp.jump:hover { background: var(--pink); color: #2a0d19; }
.source-link {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-link:hover { color: var(--pink-ink); }
.source-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--pink);
  border-radius: 999px;
  background: var(--pink-wash);
  color: var(--pink-ink);
  font-size: 13px;
}
.source-filter button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--card); color: var(--pink-ink); font-size: 18px; line-height: 1; }
.siblings { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.sibling-list { list-style: none; margin: 0; padding: 0; }
.sibling-list li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sibling-list li:last-child { border-bottom: 0; }
.sibling-list li[aria-current="true"] { font-weight: 700; }
.sibling-list .stamp { flex: 0 0 auto; }
.sibling-title { text-decoration: none; }
a.sibling-title:hover { color: var(--pink-ink); text-decoration: underline; }

/* A short burst when something is saved; skipped under reduced motion. */
.confetti { position: fixed; left: 50%; top: 32%; z-index: 90; pointer-events: none; }
.confetti span { position: absolute; width: 9px; height: 13px; border-radius: 2px; animation: confetti 1.1s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .spinner { animation: none; border-top-color: var(--pink-ink); }
}

/* A storyboard frame: one cell of YouTube's frame sheet, centred and cropped to the tile.
   The sheet image is drawn one cell wide per column and shifted by whole cells, so a
   trimmed last sheet still crops to exactly one frame. */
.tile-frame { position: relative; overflow: hidden; background: #111; }
.tile-frame .frame-cell { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 16 / 9; transform: translateX(-50%); overflow: hidden; }
.tile-frame .frame-cell img { position: absolute; max-width: none; height: auto; display: block; }
/* On a guide page the frame is shown whole, at its own shape, as the clip's poster. */
.split .tile-frame.wide { height: auto; }
.tile-frame.wide .frame-cell { position: relative; left: 0; width: 100%; height: auto; transform: none; }
.poster { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.poster .tile { display: block; border-radius: var(--radius); }
.poster-play { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(17, 17, 17, .78); color: #fff; font: 700 12.5px/1.3 var(--body, inherit); font-variant-numeric: tabular-nums; }
.poster:hover .poster-play, .poster:focus-visible .poster-play { background: var(--pink); color: #2a0d19; }
.poster:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.poster:disabled { cursor: default; }
.poster:disabled .poster-play { display: none; }
.player { margin: 0 0 18px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; }
.player.vertical { aspect-ratio: 9 / 16; width: min(100%, calc(78vh * 9 / 16)); margin-left: auto; margin-right: auto; }
.player[hidden] { display: none; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.stamp, .poster-play { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* First-run splash and walkthrough (reader/tour.js). Night-sky splash per the Flamingo
   Time brand system; steps are real screenshots of the reader. */
#tour-dialog { width: min(440px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
#tour-dialog .dialog-content { padding: 22px 22px 20px; }
#tour-dialog.is-splash { background: linear-gradient(155deg, #0D1B2A, #1C3450 62%, #2A2238); color: #FFF9F5; border: 0; }
#tour-dialog.is-splash .close { color: #FFF9F5; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.tour-splash { text-align: center; padding: 18px 4px 4px; }
.tour-logo { display: block; margin: 0 auto 14px; border-radius: 32px; box-shadow: 0 10px 40px rgba(212,168,67,.25); }
.tour-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #D4A843; }
.tour-splash h2 { margin: 0 0 10px; font: 900 30px/1.08 var(--display); color: #FFF9F5; }
.tour-splash h2 em { font-style: italic; background: var(--ft-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tour-lede { margin: 0 auto 20px; max-width: 34ch; color: #E8E2F0; font-size: 16px; }
.tour-actions { display: grid; gap: 8px; justify-items: center; }
.tour-go { min-height: 48px; min-width: 220px; border-radius: 999px; background: #C2185B; border-color: #C2185B; color: #fff; font-weight: 700; }
.tour-go:hover { background: #a01348; border-color: #a01348; }
.tour-skip { color: #E8E2F0; }
.tour-joint { margin: 18px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #A9B4C4; }
.tour-shot { margin: 0 0 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--pink-wash); max-height: 46vh; }
.tour-shot img { display: block; width: 100%; height: auto; }
.tour-count { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tour-step h2 { margin: 0 0 6px; font: 900 24px/1.12 var(--display); }
.tour-text { margin: 0 0 14px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin: 0 0 14px; }
.tour-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dot.on { background: var(--pink); width: 22px; border-radius: 999px; }
.tour-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
@media (prefers-reduced-motion: no-preference) { .tour-step, .tour-splash { animation: tour-in .24s ease-out; } }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------------
   Warm and proud. The hero is a wall of everyday problems with the pink answer going up
   in the middle; the band below is the drawer of things most hacks are made of, one of
   them lit (Higgsfield renders, GPT Image 2.5, 2026-09-23). The page takes their lamp
   light: warm glows, lifted cards, gradient actions. Motion stops under reduced motion.
   --------------------------------------------------------------------------- */
:root { --lamp: #2a1d14; --gold: #d4a843; --glow-pink: rgba(255, 107, 157, .16); --glow-gold: rgba(232, 176, 90, .18); }
body {
  background:
    radial-gradient(900px 520px at 100% 0%, var(--glow-gold), transparent 70%),
    radial-gradient(760px 520px at 0% 40%, var(--glow-pink), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.site-header { background: color-mix(in srgb, var(--bg) 80%, transparent); box-shadow: 0 1px 0 rgba(212, 168, 67, .22); }

/* Let the hero fill the browse page's available width, excluding any scrollbar. */
.view:has(> .hero) { max-width: none; padding-inline: 0; }
.view:has(> .hero) > :not(.hero, .sr-only) {
  width: min(calc(100% - 32px), calc(var(--wrap) - 32px));
  margin-inline: auto;
}

/* Hero: full-bleed photo, the promise on the shaded wall to its left. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: -14px 0 0;
  min-height: clamp(380px, 42vw, 560px);
  display: flex;
  align-items: center;
  background: var(--lamp);
  color: #fff8ef;
}
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { z-index: -2; }
.hero-art img { object-fit: cover; object-position: 70% 50%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(34, 22, 14, .78) 0%, rgba(34, 22, 14, .5) 38%, transparent 62%), linear-gradient(0deg, var(--bg) 0%, transparent 14%);
}
.hero-copy { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 48px 16px 80px; }
.hero-copy > * { max-width: 500px; }
.hero-eyebrow { margin: 0 0 10px; color: #f3c98a; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.hero h2 { margin: 0 0 14px; font: 900 clamp(36px, 5.2vw, 58px)/1.03 var(--display); letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0, 0, 0, .3); }
.hero h2 em, .tools-band h2 em { font-style: italic; padding-right: .06em; background: linear-gradient(120deg, #ffa3c4, #ff6b9d 50%, #ffc56e); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; }
.hero-lede { margin: 0 0 22px; color: #f4e8dc; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button.hero-cta { min-height: 50px; padding: 12px 26px; border: 0; font-size: 16px; color: #fff; background: var(--ft-gradient); box-shadow: 0 8px 26px rgba(232, 76, 130, .45), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .15s ease, filter .15s ease; }
.button.hero-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hero-ghost { min-height: 50px; padding: 12px 22px; color: #fff8ef; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .38); backdrop-filter: blur(6px); }
.hero-ghost:hover { border-color: #f3c98a; color: #fff; }
.hero-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 22px 0 0; color: #eadccf; font-size: 13px; }
.hero-stats b { color: #fff; font-size: 15px; }
.hero-stats span { color: #f3c98a; }

/* Search floats up onto the hero. */
.hero + .searchbar { position: relative; z-index: 2; margin-top: -30px; }
.searchbar input { box-shadow: 0 10px 34px rgba(42, 29, 20, .16), 0 0 0 1px rgba(212, 168, 67, .25); }

/* Chips and filters pick up the gradient. */
.filter[aria-pressed="true"], .tag[aria-pressed="true"] { background: var(--ft-gradient); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(232, 76, 130, .3); }
.filter { background: color-mix(in srgb, var(--card) 85%, transparent); }

/* Cards lift like a note being pressed up, with a pink strip along the top. */
.instruction { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.instruction:hover, .instruction:focus-within { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(42, 29, 20, .14), 0 0 0 1px rgba(255, 107, 157, .45); }
.instruction::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--ft-gradient); opacity: 0; transition: opacity .18s ease; }
.instruction:hover::before, .instruction:focus-within::before { opacity: 1; }
.results-meta { font-weight: 600; }

/* The drawer band below the cards. */
.tools-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 320px;
  margin: 40px 0 0;
  border-radius: 24px;
  background: #efe6d8;
  box-shadow: var(--shadow);
}
.tools-art, .tools-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tools-art { z-index: -2; }
.tools-art img { object-fit: cover; object-position: 80% 50%; }
.tools-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(246, 239, 228, .96) 0%, rgba(246, 239, 228, .8) 40%, transparent 66%); }
.tools-copy { padding: 34px 30px; max-width: 460px; color: #2a1d14; }
.tools-band h2 { margin: 0 0 10px; font: 900 clamp(26px, 3.2vw, 36px)/1.08 var(--display); letter-spacing: -.01em; }
.tools-band h2 em { background: var(--ft-gradient); -webkit-background-clip: text; background-clip: text; }
.tools-copy p { margin: 0 0 18px; color: #5a4a3c; font-size: 15px; line-height: 1.5; }

.fab { background: var(--ft-gradient); color: #fff; box-shadow: 0 10px 28px rgba(232, 76, 130, .5); }

@media (max-width: 640px) {
  /* Phone: the picture first, then the words below it on the shaded desk. */
  .hero { display: block; min-height: 0; }
  .hero-art { position: relative; display: block; height: 420px; }
  .hero-art img { object-position: 50% 20%; }
  .hero::after { background: linear-gradient(180deg, transparent 250px, var(--lamp) 420px, var(--lamp) calc(100% - 70px), var(--bg) 100%); }
  .hero-copy { position: relative; margin-top: -96px; padding: 0 16px 76px; text-align: center; }
  .hero-copy > * { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .tools-band { display: block; min-height: 0; }
  .tools-art { position: relative; display: block; height: 220px; }
  .tools-art img { object-position: 78% 50%; }
  .tools-band::after { background: linear-gradient(180deg, transparent 120px, #f6efe4 220px); }
  .tools-copy { position: relative; margin-top: -30px; padding: 0 20px 26px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --glow-pink: rgba(255, 107, 157, .10); --glow-gold: rgba(232, 176, 90, .10); }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .hero-copy > * { animation: hero-rise .6s ease-out both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; } .hero-copy > :nth-child(4) { animation-delay: .24s; } .hero-copy > :nth-child(5) { animation-delay: .32s; }
}

/* Give short card phrases enough room on small phones. */
@media (max-width: 400px) {
  .instruction { grid-template-columns: 1fr; }
  .instruction .tile { width: 100%; height: 144px; }
}
