/* ==========================================================================
   bridalbook — app.css
   One file, no framework, no build step. Copy to static/css/app.css.
   Fonts: vendor the two woff2 files into static/fonts/ (see design-system.md).
   Layout responds to the .app container (container queries), not the viewport,
   so a component behaves the same in the app, in a wireframe frame or in print.
   CSP-safe: no inline styles are required anywhere; images carry width/height
   attributes, progress uses <progress>, variants use classes.
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted, SIL OFL 1.1) ---------- */
/* Direction B (Kwabena, 2026-12-02): Funnel Sans for text, Funnel Display for titles and
   numbers; Instrument Serif stays for the wordmark. Funnel from @fontsource-variable 5.3.0. */
@font-face {
  font-family: "Funnel Sans";
  src: url("../fonts/funnel-sans-latin.c7de8cbc5544.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("../fonts/funnel-sans-latin-ext.d61d55076942.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Funnel Display";
  src: url("../fonts/funnel-display-latin.fdffe09288ef.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Funnel Display";
  src: url("../fonts/funnel-display-latin-ext.608a55a566e2.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.ef7d5752a00d.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face { /* only downloaded on pages that render italic serif (the "&", the login tagline) */
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.a7d9331bf36b.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- 1. Tokens: light (default) ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  /* Neutrals: warm linen (direction B, 2026-12-02). Photos bring the colour; the ground stays calm. */
  --color-bg: #F7F2EE;            /* canvas: linen */
  --color-paper: #F6E3EB;         /* a board's sheet: 12% accent over the card surface (Kwabena, 2026-11-28: B) */
  --paper-texture: url("../img/paper/grain-light.fc946201554f.svg");  /* fine grain, a 160px tile */
  --color-bg-glass: rgb(247 242 238 / 0.86);
  --color-surface: #FFFFFF;       /* cards, sheets, inputs */
  --color-surface-alt: #F1EBE6;   /* alternating sections, table header, media wells */
  --color-surface-sunken: #EDE4DF;
  --color-text: #26191F;          /* 15.2:1 on bg */
  --color-text-muted: #5E5157;    /* 6.8:1 on bg  — secondary text */
  --color-text-subtle: #6B5E64;   /* 5.5:1 on bg, 4.9+ on every tinted surface — meta only */
  --color-border: #E9DED8;        /* decorative hairlines only */
  --color-border-strong: #85767C; /* outlines: 4.3:1 on surface, 3.4+ on tints (WCAG 1.4.11) */

  /* The one accent: Hibiscus */
  --color-accent: #B0175A;        /* 6.7:1 on white */
  --color-accent-hover: #96124C;
  --color-accent-active: #7A0D3C;
  --color-on-accent: #FFFFFF;
  --color-accent-soft: #F8E1EB;
  --color-accent-ink: #8C0F47;    /* 7.9:1 on accent-soft */

  /* Semantic (status only — never decoration) */
  --color-success: #1A7F47;
  --color-on-success: #FFFFFF;   /* 5.0:1 */
  --color-success-soft: #E2F6EA;
  --color-success-ink: #136B3A;
  --color-warning: #B86E00;       /* icons only (3:1+ on white) */
  --color-warning-soft: #FFF1D6;
  --color-warning-ink: #8A4B00;
  --color-danger: #C42121;
  --color-on-danger: #FFFFFF;   /* 5.86:1 */
  --color-danger-hover: #A71C1C;
  --color-danger-soft: #FDE8E8;
  --color-danger-ink: #A61B1B;
  --color-info-soft: #E6EEFC;
  --color-info-ink: #1F4FA8;
  /* The dark slab under toasts, the banner and an accent stat, and what sits on it (audit C7, D5) */
  --color-inverse-bg: #26191F;
  --color-track: #E0D3CC;          /* the empty part of a bar: visible against a card (audit C11) */
  --color-raised: #FFFFFF;          /* the chosen option in a switch: above its track (audit B12) */
  --color-on-inverse: #F7F2EE;
  --color-success-on-inverse: #4CC27F;

  --color-focus: var(--color-accent);
  --color-overlay: rgb(38 25 31 / 0.48);   /* behind sheets */
  --color-scrim: linear-gradient(180deg, rgb(0 0 0 / 0) 35%, rgb(0 0 0 / 0.68) 100%);

  /* Link-only pin tints (server picks .pin--tint-N from a hash of the domain) */
  --tint-1-bg: #FBE4EC; --tint-1-ink: #6B1235;
  --tint-2-bg: #FCE9D9; --tint-2-ink: #6E3510;
  --tint-3-bg: #E3F0E4; --tint-3-ink: #1F4D2B;
  --tint-4-bg: #E1ECF8; --tint-4-ink: #173E6B;
  --tint-5-bg: #ECE6F8; --tint-5-ink: #3D2470;
  --tint-6-bg: #F1ECE2; --tint-6-ink: #4A3F2A;

  /* Depth */
  --shadow-1: 0 1px 2px rgb(38 25 31 / 0.05), 0 6px 18px -10px rgb(38 25 31 / 0.12);
  --shadow-2: 0 1px 2px rgb(38 25 31 / 0.04), 0 10px 26px -12px rgb(38 25 31 / 0.16);
  --shadow-3: 0 4px 10px rgb(38 25 31 / 0.08), 0 24px 48px -12px rgb(38 25 31 / 0.24);
  --shadow-inset: inset 0 0 0 1px rgb(38 25 31 / 0.06);
}

/* ---------- 2. Tokens: dark ---------- */
/* Written twice on purpose: once for the OS preference, once for an explicit
   data-theme="dark" (server-rendered from a user setting, no JS needed).
   light-dark() would avoid the copy but excludes iOS < 17.5 guests. */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #141013;
    --color-paper: #362734;         /* a board's sheet: 12% accent over the card surface, so it stands off the page (2026-11-28) */
    --paper-texture: url("../img/paper/grain-dark.5351bde1bcf2.svg");  /* fine grain, a 160px tile */
    --color-bg-glass: rgb(20 16 19 / 0.84);
    --color-surface: #1F191D;       /* cards stand off the page (audit D1) */
    --color-surface-alt: #2A2226;
    --color-surface-sunken: #0F0C0E;
    --color-text: #F4ECEF;
    --color-text-muted: #B4A5AB;
    --color-text-subtle: #A3949A;
    --color-border: #2E262A;
    --color-border-strong: #85767C;
    --color-accent: #F27BAE;
    --color-accent-hover: #F79BC2;
    --color-accent-active: #FBB9D5;
    --color-on-accent: #1C0611;
    --color-accent-soft: #3A1828;
    --color-accent-ink: #F9A8CB;
    --color-success: #4CC27F;
    --color-on-success: #06200F;   /* 7.6:1 */
    --color-success-soft: #0F2E1D;
    --color-success-ink: #7FDCA5;
    --color-warning: #F5B54A;
    --color-warning-soft: #33240A;
    --color-warning-ink: #F5C26B;
    --color-danger: #F26B6B;
    --color-on-danger: #1F0505;   /* 6.55:1 */
    --color-danger-hover: #F58A8A;
    --color-danger-soft: #3A1214;
    --color-danger-ink: #FF9B9B;
    --color-info-soft: #14223D;
    --color-info-ink: #9DBBF5;
    --color-inverse-bg: #2E262A;
    --color-track: #3A2F34;
    --color-raised: #3A3035;
    --color-on-inverse: #F4ECEF;
    --color-success-on-inverse: #4CC27F;
    --color-overlay: rgb(0 0 0 / 0.64);
    --tint-1-bg: #3A1A27; --tint-1-ink: #F7C1D5;
    --tint-2-bg: #3A2616; --tint-2-ink: #F6CFA9;
    --tint-3-bg: #1C3022; --tint-3-ink: #BFE3C6;
    --tint-4-bg: #182A40; --tint-4-ink: #B9D3F2;
    --tint-5-bg: #2A2140; --tint-5-ink: #D3C6F2;
    --tint-6-bg: #2E2A22; --tint-6-ink: #E2D8C3;
    --shadow-1: 0 0 0 1px rgb(255 255 255 / 0.06), 0 1px 2px rgb(0 0 0 / 0.5);  /* an edge: a shadow does nothing on near-black */
    --shadow-2: 0 2px 6px rgb(0 0 0 / 0.5), 0 12px 28px -8px rgb(0 0 0 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.04);
    --shadow-3: 0 6px 14px rgb(0 0 0 / 0.55), 0 28px 56px -12px rgb(0 0 0 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.05);
    --shadow-inset: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  }
}
@media screen {
[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #141013;
  --color-paper: #362734;         /* a board's sheet: 12% accent over the card surface, so it stands off the page (2026-11-28) */
  --paper-texture: url("../img/paper/grain-dark.5351bde1bcf2.svg");  /* fine grain, a 160px tile */
  --color-bg-glass: rgb(20 16 19 / 0.84);
  --color-surface: #1F191D;       /* cards stand off the page (audit D1) */
  --color-surface-alt: #2A2226;
  --color-surface-sunken: #0F0C0E;
  --color-text: #F4ECEF;
  --color-text-muted: #B4A5AB;
  --color-text-subtle: #A3949A;
  --color-border: #2E262A;
  --color-border-strong: #85767C;
  --color-accent: #F27BAE;
  --color-accent-hover: #F79BC2;
  --color-accent-active: #FBB9D5;
  --color-on-accent: #1C0611;
  --color-accent-soft: #3A1828;
  --color-accent-ink: #F9A8CB;
  --color-success: #4CC27F;
  --color-on-success: #06200F;   /* 7.6:1 */
  --color-success-soft: #0F2E1D;
  --color-success-ink: #7FDCA5;
  --color-warning: #F5B54A;
  --color-warning-soft: #33240A;
  --color-warning-ink: #F5C26B;
  --color-danger: #F26B6B;
  --color-on-danger: #1F0505;   /* 6.55:1 */
  --color-danger-hover: #F58A8A;
  --color-danger-soft: #3A1214;
  --color-danger-ink: #FF9B9B;
  --color-info-soft: #14223D;
  --color-info-ink: #9DBBF5;
  --color-inverse-bg: #2E262A;
  --color-track: #3A2F34;
  --color-raised: #3A3035;
  --color-on-inverse: #F4ECEF;
  --color-success-on-inverse: #4CC27F;
  --color-overlay: rgb(0 0 0 / 0.64);
  --tint-1-bg: #3A1A27; --tint-1-ink: #F7C1D5;
  --tint-2-bg: #3A2616; --tint-2-ink: #F6CFA9;
  --tint-3-bg: #1C3022; --tint-3-ink: #BFE3C6;
  --tint-4-bg: #182A40; --tint-4-ink: #B9D3F2;
  --tint-5-bg: #2A2140; --tint-5-ink: #D3C6F2;
  --tint-6-bg: #2E2A22; --tint-6-ink: #E2D8C3;
  --shadow-1: 0 0 0 1px rgb(255 255 255 / 0.06), 0 1px 2px rgb(0 0 0 / 0.5);  /* an edge: a shadow does nothing on near-black */
  --shadow-2: 0 2px 6px rgb(0 0 0 / 0.5), 0 12px 28px -8px rgb(0 0 0 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.04);
  --shadow-3: 0 6px 14px rgb(0 0 0 / 0.55), 0 28px 56px -12px rgb(0 0 0 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.05);
  --shadow-inset: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
}

/* ---------- 3. Tokens: theme-independent ---------- */
:root {
  --font-sans: "Funnel Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: "Funnel Display", "Funnel Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Instrument Serif", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;  /* the wordmark only */

  /* Type scale: Major Third (1.25), base 16px. --fs-sm is the one half-step (×1/√1.25)
     for dense UI: buttons, table cells, meta. Headings are fluid on the .app container. */
  --fs-xs: 0.8rem;       /* 12.8 captions, chips, tab labels */
  --fs-sm: 0.894rem;     /* 14.3 dense UI */
  --fs-base: 1rem;       /* 16   body — never smaller for inputs (iOS zoom) */
  --fs-md: 1.125rem;     /* 18   section titles */
  --fs-lg: 1.25rem;      /* 20   H3, card titles */
  --fs-xl: 1.5625rem;    /* 25   H2 */
  --fs-2xl: clamp(1.953rem, 1.6rem + 1.4cqi, 2.441rem);  /* 31→39 H1 (serif) */
  --fs-3xl: clamp(2.441rem, 1.8rem + 3cqi, 3.815rem);    /* 39→61 display (serif) */
  --fs-money-lg: clamp(1.5625rem, 1.3rem + 1cqi, 1.953rem);

  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.55;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --tracking-tight: -0.015em;
  --tracking-caps: 0.06em;

  /* Spacing: 4 8 12 16 24 32 48 64 96 128 */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* Radii */
  --r-xs: 6px;    /* checkboxes, tiny tags */
  --r-sm: 14px;   /* inputs, buttons (direction B) */
  --r-md: 16px;   /* list rows, small cards */
  --r-lg: 22px;   /* pins, cards */
  --r-xl: 28px;   /* sheets, hero */
  --r-pill: 999px;

  /* Motion: short, eased out, nothing bounces */
  --dur-1: 120ms;  /* press, colour */
  --dur-2: 200ms;  /* hover lift, chip toggle */
  --dur-3: 320ms;  /* toast, sheet, page fade */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);  /* strong ease-out: quick start, soft landing */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* strong ease-in-out: moving on screen */

  /* Layout */
  --topbar-h: 56px;
  --tabbar-h: 64px;
  /* The phone tab bar floats as an island this far above the bottom edge; on phones with a
     home bar it sits just above it instead (Kwabena, 2026-12-04). */
  --tabbar-lift: max(10px, var(--safe-bottom));
  --sidebar-w: 264px;
  --content-max: 76rem;
  --read-max: 40rem;
  --tap: 44px;
  /* Icons: six sizes, each with a stroke that keeps lines about 1.5px (audit I62). */
  --icon-xs: 14px; --icon-sm: 16px; --icon-md: 18px; --icon-lg: 20px; --icon-xl: 22px; --icon-2xl: 24px;
  /* List rows: two heights, one line or two (audit I40). */
  --row: 56px; --row-dense: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* ---------- 4. Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "calt";
}
img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p, li, dd { overflow-wrap: break-word; }
/* Headings carry no default size: the class sets it (.page__title, .h2, .section__title…),
   so the outline can stay correct without the look changing. */
h1, h2, h3, h4 { font-size: inherit; line-height: var(--lh-snug); text-wrap: balance; font-weight: var(--fw-semibold); }
p { text-wrap: pretty; }
ul[class], ol[class] { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--color-border); margin-block: var(--sp-5); }
::selection { background: var(--color-accent-soft); color: var(--color-accent-ink); }

a { color: var(--color-accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-accent-hover); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-3); top: var(--sp-3); z-index: 100;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm);
  background: var(--color-text); color: var(--color-bg); text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- 5. Type helpers ---------- */
.display { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-3xl);
  line-height: var(--lh-tight); letter-spacing: -0.035em; }
.h1, .page__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-2xl);
  line-height: var(--lh-tight); letter-spacing: -0.03em; }
.h2 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); }
.h3 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); }
.eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--color-text-muted); }
.lead { font-size: var(--fs-lg); color: var(--color-text-muted); line-height: var(--lh-snug); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.muted { color: var(--color-text-muted); }
.subtle { color: var(--color-text-subtle); }
.serif { font-family: var(--font-display); font-weight: 400; }
.num, .money { font-variant-numeric: tabular-nums lining-nums; }
.money { font-weight: var(--fw-semibold); white-space: nowrap; }
.money__cur { font-weight: var(--fw-medium); color: var(--color-text-muted); margin-inline-end: 0.15em; }
.money--lg { font-size: var(--fs-money-lg); letter-spacing: var(--tracking-tight); }
.money--neg, .text-danger { color: var(--color-danger-ink); }
.text-success { color: var(--color-success-ink); }
.text-warning { color: var(--color-warning-ink); }
/* Every sprite icon. A context sets --icon (and the stroke that goes with it, since the sprite's
   lines are drawn on a 24 grid); without one an icon follows its text at 1.25em. */
.icon { display: inline-block; vertical-align: -0.2em; width: var(--icon, 1.25em); height: var(--icon, 1.25em);
  stroke-width: var(--icon-stroke, 2); flex: none; }
.stack > .chip, .stack > .badge, .stack > .role { align-self: flex-start; }
.text-center { text-align: center; }
.fieldset-reset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* float the legend so it lays out like a normal label, not inside the fieldset border */
.fieldset-reset > legend { float: left; width: 100%; padding: 0; margin-bottom: var(--sp-2); }
.fieldset-reset > legend + * { clear: both; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 6. Layout primitives ---------- */
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-1 { gap: var(--sp-1); } .stack-2 { gap: var(--sp-2); } .stack-3 { gap: var(--sp-3); } .stack-4 { gap: var(--sp-4); }
.stack-5 { gap: var(--sp-5); } .stack-6 { gap: var(--sp-6); } .stack-7 { gap: var(--sp-7); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.cluster--tight { flex-wrap: nowrap; gap: var(--sp-1); flex: none; }
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }
.cluster--nowrap { flex-wrap: nowrap; min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-auto { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.split { display: grid; gap: var(--sp-5); }
.section { display: flex; flex-direction: column; gap: var(--sp-4); }
.section + .section { margin-top: var(--sp-7); }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.section__title { font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.02em; }
.confirm-list { margin: var(--sp-2) 0 0; padding-left: 1.25rem; display: grid; gap: var(--sp-1); }
.section__link { font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none;
  min-height: var(--tap); display: inline-flex; align-items: center; gap: var(--sp-1); --icon: var(--icon-sm); --icon-stroke: 2.25; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); }

/* ---------- 7. App shell ---------- */
/* <body><div class="app"><div class="shell">
     <aside class="sidebar">…</aside>
     <div class="shell__main"><header class="topbar">…</header><main class="page" id="main">…</main></div>
     <nav class="tabbar">…</nav>
   </div></div></body>
   The tab bar is position: sticky at the end of a full-height column, not fixed:
   this survives container containment and safe areas and never covers content. */
.app {
  container: app / inline-size;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
}
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.shell__main { flex: 1 0 auto; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) var(--sp-2) 0 var(--sp-2);
  background: var(--color-bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease-standard);
}
.topbar__title { flex: 1 1 auto; min-width: 0; font-size: var(--fs-base); font-weight: var(--fw-semibold);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: var(--sp-2); }
.topbar__title small { display: block; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--color-text-muted); }
.topbar__actions { display: flex; align-items: center; gap: var(--sp-1); }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--color-text);
  font-family: var(--font-brand); font-size: 1.5625rem; line-height: 1; letter-spacing: -0.01em; min-height: var(--tap); }
/* The Planner b logo: the accent colour shown through the mark's shape, so the letter and the binder
   holes are real cut-outs on any background. The "b" in the markup stays for browsers without CSS. */
.brand__mark { flex: none; width: 28px; height: 28px; background: var(--color-accent); font-size: 0; color: transparent;
  -webkit-mask: url("../icons/logo-mark.6275ad1ab94f.svg") center / contain no-repeat; mask: url("../icons/logo-mark.6275ad1ab94f.svg") center / contain no-repeat; }

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--sp-4) var(--sp-4) var(--sp-7);
}
.page--narrow { max-width: calc(var(--read-max) + 2 * var(--sp-4)); }
.page--flush { padding-inline: 0; }
.page__header { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.page__header--row { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.page__eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--color-text-muted); }
.page__lead { color: var(--color-text-muted); max-width: var(--read-max); }
.page__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }

/* Bottom tab bar (mobile) */
.tabbar {
  position: sticky; bottom: var(--tabbar-lift); z-index: 30;
  display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr);
  align-items: center;
  height: var(--tabbar-h);
  margin: 0 12px var(--tabbar-lift);
  padding: 0 4px;
  /* 80% see-through (Kwabena, 2026-12-04): the page shows through the bar, and the blur
     behind it keeps the labels readable over photos. */
  background: color-mix(in srgb, var(--color-bg) 20%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgb(40 25 31 / 0.16), 0 2px 6px rgb(40 25 31 / 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tabbar { box-shadow: 0 10px 28px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.4); }
}
:root[data-theme="dark"] .tabbar { box-shadow: 0 10px 28px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.4); }
.tabbar--3 { --tabs: 3; } .tabbar--4 { --tabs: 4; }
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--tap); height: 100%;
  color: var(--color-text-muted); text-decoration: none;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: 0.01em;
  border-radius: var(--r-md);
  transition: color var(--dur-1) var(--ease-standard);
}
.tabbar__icon { width: 56px; height: 30px; display: grid; place-items: center; }
.tabbar__icon svg { --icon: var(--icon-xl); --icon-stroke: 1.75; }
.tabbar__item[aria-current="page"] { color: var(--color-accent-ink); }
/* Icons drawn with a soft pen: a thin grey edge hugs each line and settles a little below
   it, without filling the shape. The tab you are on has a close plum glow instead, with
   no shape behind it (Kwabena, 2026-12-03; made lighter 2026-12-04). Ink is the text
   colour eased toward the bar, so dark mode gets a pale edge that reads as a soft light. */
.tabbar { --tab-ink: color-mix(in srgb, var(--color-text) 85%, var(--color-bg)); }
.tabbar__icon svg {
  filter:
    drop-shadow(0 0.5px 0.6px color-mix(in srgb, var(--tab-ink) 40%, transparent))
    drop-shadow(0 1px 1.2px color-mix(in srgb, var(--tab-ink) 18%, transparent));
}
.tabbar__item[aria-current="page"] .tabbar__icon svg {
  filter:
    drop-shadow(0 0 1px color-mix(in srgb, var(--color-accent) 60%, transparent))
    drop-shadow(0 0 3px color-mix(in srgb, var(--color-accent) 32%, transparent));
}
.tabbar__item:focus-visible { outline-offset: -2px; }
.tabbar__add { display: grid; place-items: center; text-decoration: none; min-height: var(--tap); }
.tabbar__add span.tabbar__plus {
  width: 52px; height: 52px; border-radius: 18px;
  display: grid; place-items: center;
  /* Plum: Kwabena tried an ink circle and preferred this (2026-12-02). */
  background: var(--color-accent); color: var(--color-on-accent);
  box-shadow: var(--shadow-2);
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-standard);
}
.tabbar__add svg { --icon: var(--icon-2xl); --icon-stroke: 1.6; }
@media (hover: hover) { .tabbar__item:hover { color: var(--color-text); } .tabbar__add:hover .tabbar__plus { background: var(--color-accent-hover); } }
.tabbar__add:active .tabbar__plus { transform: scale(0.94); }

/* Task mode (capture, decide): no tab bar, a close button instead of back */
.shell--task .tabbar { display: none; }

/* Sidebar (desktop) */
.sidebar { display: none; }
.sidebar__inner { display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-5) var(--sp-4); height: 100%; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--tracking-caps);
  color: var(--color-text-subtle); padding: var(--sp-3) var(--sp-3) var(--sp-1); }
.nav__item {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap); padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--color-text-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  transition: background-color var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard);
}
.nav__item svg { --icon: var(--icon-lg); --icon-stroke: 1.85; }
/* Sidebar items in sentence case, not spaced capitals (typography review 2026-11-18). */
.nav__item .nav__label { padding: 0; color: inherit; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.nav__item[aria-current="page"] .nav__label { font-weight: var(--fw-semibold); }
.nav__item--sub { padding-left: calc(var(--sp-3) + var(--icon-lg) + var(--sp-3)); font-weight: var(--fw-medium); }
.nav__item[aria-current="page"] { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-1); }
.nav__item[aria-current="page"] svg { color: var(--color-accent); }
.nav__count { margin-left: auto; white-space: nowrap; padding-left: var(--sp-2); font-size: var(--fs-xs); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .nav__item:hover { background: var(--color-surface-alt); color: var(--color-text); } }

.wedding-switch {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md); background: var(--color-surface); box-shadow: var(--shadow-1);
  text-decoration: none; color: var(--color-text); min-height: 56px;
}
.wedding-switch__name { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.1; }
.wedding-switch__meta { font-size: var(--fs-xs); color: var(--color-text-muted); }

@container app (min-width: 62rem) {
  .shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  /* No wedding, no sidebar: the content must not sit in the sidebar's column. */
  .shell--bare { grid-template-columns: minmax(0, 1fr); }
  .shell--bare .page { max-width: 52rem; }  /* a single column reads best at this width */
  .sidebar {
    display: block; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    border-right: 1px solid var(--color-border);
    background: var(--color-bg);
  }
  .tabbar { display: none; }
  .topbar { padding-inline: var(--sp-6); min-height: 64px; }
  .topbar .brand, .topbar .only-mobile { display: none; }
  .page { padding: var(--sp-6) var(--sp-6) var(--sp-8); }
}
@container app (min-width: 40rem) {
  .page { padding-inline: var(--sp-5); }
}
.only-desktop { display: none !important; }
@container app (min-width: 62rem) { .only-desktop { display: revert !important; } .only-mobile { display: none !important; } }

/* Back / breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--color-text-muted); }
.crumbs a { color: inherit; text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--color-text); text-decoration: underline; }

/* Disclosure menu (works without JS: <details class="menu">) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + var(--sp-2)); z-index: 40;
  min-width: 15rem; width: max-content; max-width: min(22rem, calc(100vw - 2 * var(--sp-4))); padding: var(--sp-2);  /* rows fit on one line where they can (audit B10) */
  background: var(--color-surface); border-radius: var(--r-md); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
}
.menu__panel a, .menu__panel button {
  display: flex; align-items: center; gap: var(--sp-3); min-height: var(--tap); padding: 0 var(--sp-3);
  border: 0; background: none; border-radius: var(--r-xs); text-align: left; width: 100%;
  color: var(--color-text); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
}
.menu__panel a:hover, .menu__panel button:hover { background: var(--color-surface-alt); }
.menu__panel hr { margin: var(--sp-1) 0; }
.menu__panel { --icon: var(--icon-md); --icon-stroke: 2; }
.menu__panel .icon { color: var(--color-text-muted); }
/* A menu that has icons keeps every label in one column, icon or not (audit I5). */
.menu__panel:has(.icon) > :is(a, button):not(:has(.icon)), .menu__panel:has(.icon) > form:not(.menu__theme) > button:not(:has(.icon)) {
  padding-left: calc(var(--sp-3) + var(--icon-md) + var(--sp-3)); }
.menu__panel > p { padding: var(--sp-1) var(--sp-3); }
.menu__label { padding: var(--sp-2) var(--sp-3) var(--sp-1); font-size: var(--fs-xs); color: var(--color-text-muted); font-weight: var(--fw-semibold); }
.menu__theme, .menu__panel .menu__theme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.menu__theme button { justify-content: center; padding: 0; }
.nav__group { padding: var(--sp-4) var(--sp-3) var(--sp-1); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted); }
.menu[open] > summary { color: var(--color-text); }

/* ---------- 8. Buttons ---------- */
.btn {
  --btn-bg: var(--color-surface);
  --btn-fg: var(--color-text);
  --btn-bd: var(--color-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: 0 var(--sp-4);
  border: 1px solid var(--btn-bd); border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none; position: relative;
  transition: background-color var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard),
              color var(--dur-1) var(--ease-standard), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.btn { --icon: var(--icon-md); --icon-stroke: 2; }
/* A button whose label carries a name the couple typed ("Delete <board>…") wraps rather
   than run off a phone screen. */
.btn--name { max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: var(--sp-2); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--r-sm); }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
@media (hover: hover) { .btn:hover { --btn-bg: var(--color-surface-alt); color: var(--btn-fg); } }

.btn--primary { --btn-bg: var(--color-accent); --btn-fg: var(--color-on-accent); --btn-bd: var(--color-accent); box-shadow: var(--shadow-1);
  min-height: 48px; font-weight: var(--fw-semibold); }  /* the page's one strong button (direction B) */
.btn--primary.btn--sm { min-height: 40px; }
@media (hover: hover) { .btn--primary:hover { --btn-bg: var(--color-accent-hover); --btn-bd: var(--color-accent-hover); } }
.btn--primary:active { --btn-bg: var(--color-accent-active); --btn-bd: var(--color-accent-active); }

.btn--secondary { --btn-bg: var(--color-accent-soft); --btn-fg: var(--color-accent-ink); --btn-bd: transparent; }  /* a soft fill, not an outline: one filled primary leads (visual pass, 2026-12-01) */
@media (hover: hover) { .btn--secondary:hover { --btn-bg: color-mix(in srgb, var(--color-accent-soft) 85%, var(--color-accent)); } }

.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--color-text); }
@media (hover: hover) { .btn--ghost:hover { --btn-bg: var(--color-surface-alt); } }

.btn--danger { --btn-bg: var(--color-surface); --btn-fg: var(--color-danger-ink); --btn-bd: var(--color-danger); }
@media (hover: hover) { .btn--danger:hover { --btn-bg: var(--color-danger-soft); } }

.btn--success { --btn-bg: var(--color-success); --btn-fg: var(--color-on-success); --btn-bd: var(--color-success); }

.btn--sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-xs); gap: var(--sp-1); --icon: var(--icon-sm); --icon-stroke: 2.25; }
.btn--sm::after { content: ""; position: absolute; inset: -4px 0; } /* keeps a 44px hit area */
.btn--lg { min-height: 52px; padding: 0 var(--sp-5); font-size: var(--fs-base); border-radius: var(--r-md); gap: var(--sp-3); --icon: var(--icon-lg); --icon-stroke: 1.85; }
.btn--block { width: 100%; }
.btn--icon { width: var(--tap); padding: 0; border-color: transparent; --btn-bg: transparent; border-radius: var(--r-pill); }
.btn--icon { --icon: var(--icon-xl); --icon-stroke: 1.75; }
/* The small icon button (row menus, "⋯" beside a small button): an 18px icon, as wide as tall,
   with a full 44px hit area (audit I6, I45). */
.btn--icon.btn--sm { width: 36px; --icon: var(--icon-md); --icon-stroke: 2; }
.btn--icon.btn--sm::after { inset: -4px; }
@media (hover: hover) { .btn--icon:hover { --btn-bg: var(--color-surface-alt); } }
.btn--icon.btn--on-media { --btn-bg: rgb(255 255 255 / 0.92); --btn-fg: #17171C; box-shadow: var(--shadow-1); width: 32px; min-height: 32px; --icon: var(--icon-sm); --icon-stroke: 2.25; }
.btn--icon.btn--on-media::after { content: ""; position: absolute; inset: -6px; }
.btn--link { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--color-accent); padding: 0 var(--sp-1);
  text-decoration: none; font-weight: var(--fw-semibold); }
@media (hover: hover) { .btn--link:hover { --btn-bg: transparent; text-decoration: underline; text-underline-offset: 0.2em; } }

/* ---------- 9. Chips, badges, avatars ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  min-height: 26px; padding: 0 var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--color-surface-alt); color: var(--color-text-muted);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1; white-space: nowrap;
}
.chip { --icon: var(--icon-xs); --icon-stroke: 2.5; }
.chip--saved { background: var(--color-surface-alt); color: var(--color-text-muted); }
/* Amber means waiting on someone; a shortlist is a happy half-choice, so its chip is the accent.
   The star on it stays gold (audit D3). */
.chip--shortlisted { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.chip--shortlisted svg { color: var(--color-warning); }
.chip--final { background: var(--color-success-soft); color: var(--color-success-ink); }
.chip--accent { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.chip--danger { background: var(--color-danger-soft); color: var(--color-danger-ink); }
.chip--info { background: var(--color-info-soft); color: var(--color-info-ink); }
.chip--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border-strong); color: var(--color-text-muted); }
/* Status chip sitting on a photo: always opaque, so contrast never depends on the image */
.chip--on-media { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-1); min-height: 32px; padding-inline: var(--sp-3); }
.chip--on-media.chip--final { background: var(--color-success); color: var(--color-on-success); }
.chip--on-media.chip--shortlisted svg { color: var(--color-warning); }

/* Filter chips row: <nav class="filters"><a class="filter" aria-current="true">All <span>24</span></a>… */
.filters { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-block: var(--sp-1);
  margin-inline: calc(-1 * var(--sp-4)); padding-inline: var(--sp-4); scroll-padding-inline: var(--sp-4); }
.filters::-webkit-scrollbar { display: none; }
.filter {
  display: inline-flex; align-items: center; gap: var(--sp-2); flex: none;
  min-height: 36px; padding: 0 var(--sp-4); border-radius: var(--r-pill);
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-inset);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none; position: relative;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.filter::after { content: ""; position: absolute; inset: -4px 0; }
.filter span { color: var(--color-text-subtle); font-variant-numeric: tabular-nums; font-weight: var(--fw-medium); }
.filter[aria-current="true"], .filter[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); box-shadow: none; }
.filter[aria-current="true"] span, .filter[aria-pressed="true"] span { color: inherit; opacity: 0.75; }
@media (hover: hover) { .filter:not([aria-current="true"]):hover { background: var(--color-surface-alt); color: var(--color-text); } }

.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--color-accent); color: var(--color-on-accent); font-size: 0.6875rem; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }

.avatar {
  --av: 32px;
  width: var(--av); height: var(--av); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--color-accent-soft); color: var(--color-accent-ink);
  font-size: calc(var(--av) * 0.42); font-weight: var(--fw-bold); line-height: 1;
  box-shadow: 0 0 0 2px var(--color-surface);
}
.avatar--sm { --av: 24px; }
.avatar--lg { --av: 44px; }
.avatar--alt { background: var(--color-info-soft); color: var(--color-info-ink); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

.role { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--sp-2); border-radius: var(--r-xs);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--color-surface-alt); color: var(--color-text-muted); }

/* ---------- 10. Cards ---------- */
.card {
  background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  padding: var(--sp-4);
}
.card--pad-lg { padding: var(--sp-5); }
.card--flat { box-shadow: var(--shadow-inset); }
.card--alt { background: var(--color-surface-alt); box-shadow: none; }
.card--accent { background: var(--color-accent-soft); color: var(--color-accent-ink); box-shadow: none; }
.card__title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); line-height: var(--lh-snug); }
.card__meta { font-size: var(--fs-sm); color: var(--color-text-muted); }
.card--link { position: relative; display: block; color: inherit; text-decoration: none;
  transition: box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.card__stretch { color: inherit; text-decoration: none; }
.card__stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.card__stretch:focus-visible { outline: none; }
.card__stretch:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 2px; }
@media (hover: hover) { .card--link:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); } }
.card--link:active { transform: scale(0.99); }

/* List rows inside a card */
.list { display: flex; flex-direction: column; }
.list__row { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--row); padding: var(--sp-2) 0;
  border-top: 1px solid var(--color-border); color: inherit; text-decoration: none; }
.list__row:first-child { border-top: 0; }
.list__main { flex: 1 1 auto; min-width: 0; }
.list__row > .select { flex: 0 0 auto; width: min(10rem, 45%); }
.list__title { font-weight: var(--fw-semibold); }
.list__meta { font-size: var(--fs-sm); color: var(--color-text-muted); }
a.list__row:hover .list__title { color: var(--color-accent); }

/* Key/value details (event details, honeymoon facts) */
.kv { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; gap: var(--sp-2) var(--sp-4); }
.kv dt { color: var(--color-text-muted); font-size: var(--fs-sm); }
.kv dd { font-weight: var(--fw-medium); }

/* ---------- 11. Media placeholders and the image well ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--color-surface-alt); isolation: isolate; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--square { aspect-ratio: 1; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--wide { aspect-ratio: 16 / 9; }

/* ---------- 12. Feature card (home only), ledger and band ---------- */
/* Feature card: frosted plum glass over soft, slowly drifting light (hibiscus and a warm
   peach), a faint sheen across the top and a coloured shadow beneath.
   The home page's alone; section pages use plain cards (Kwabena, 2026-11-18). */
.feature {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-xl); padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-6);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-4);
  color: #fff;
  background: linear-gradient(160deg, #4A1A31 0%, #2A0F1D 100%);
  box-shadow: 0 24px 48px -26px rgb(122 13 60 / 0.6), 0 2px 6px rgb(42 15 29 / 0.18);
}
/* The light: three blurred pools of colour, larger than the card so the drift never shows an edge. */
.feature::before { content: ""; position: absolute; inset: -25%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 55% at 78% 22%, rgb(236 72 153 / 0.8), rgb(236 72 153 / 0) 70%),
    radial-gradient(34% 48% at 90% 88%, rgb(255 170 120 / 0.6), rgb(255 170 120 / 0) 70%),
    radial-gradient(34% 48% at 14% 100%, rgb(176 23 90 / 0.5), rgb(176 23 90 / 0) 70%);
  filter: blur(28px); }
/* The glass: a translucent plum veil and a sheen falling from the top-left corner. */
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(125deg, rgb(255 255 255 / 0.13) 0%, rgb(255 255 255 / 0.03) 32%, rgb(255 255 255 / 0) 55%),
    linear-gradient(160deg, rgb(74 26 49 / 0.1) 0%, rgb(42 15 29 / 0.38) 100%); }
/* The light drifts once, on the first visit of a day (app.js adds .calm--fresh), and then
   rests: Home is read, and nothing loops while someone reads (audit M14). */
@media (prefers-reduced-motion: no-preference) {
  .calm--fresh .feature::before { animation: feature-drift 8s ease-in-out 1 both; }
}
@keyframes feature-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-7%, 5%, 0) scale(1.06); }
}

.countdown { display: flex; align-items: center; gap: var(--sp-4); }
.countdown__num { font-family: var(--font-display); font-size: clamp(4rem, 3rem + 4cqi, 6.5rem); line-height: 0.82;
  letter-spacing: -0.03em; font-variant-numeric: lining-nums; }
.countdown__label { display: flex; flex-direction: column; gap: 2px; padding-left: var(--sp-4);
  border-left: 1px solid rgb(255 255 255 / 0.28); font-size: var(--fs-sm); color: rgb(255 255 255 / 0.82); }
.countdown__event { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xl); line-height: 1.1; color: #fff; }

/* Ledger: counts set in the display serif, labels beside them. Numbers sit side by side on
   their own; inside a band on a wide screen they become one line each. */
.ledger { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-5);
  border-radius: var(--r-xl); background: var(--color-surface); box-shadow: var(--shadow-1); }

.ledger__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(3.75rem, 100%), 1fr)); gap: var(--sp-3) var(--sp-2); margin: 0; }
.ledger__row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ledger__row dt { order: 2; font-size: var(--fs-sm); color: var(--color-text-muted); }
.ledger__row dd { order: 1; margin: 0; font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.ledger__row--yes dd { color: var(--color-success-ink); }
.ledger__row--wait dd { color: var(--color-warning-ink); }
.ledger__meter { display: grid; gap: var(--sp-2); margin-top: auto; }
.ledger__meter p { font-size: var(--fs-sm); color: var(--color-text-muted); }
.ledger__meter progress { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: var(--r-pill);
  background: var(--color-track); overflow: hidden; color: var(--color-accent); }
.ledger__meter progress::-webkit-progress-bar { background: var(--color-track); border-radius: var(--r-pill); }
.ledger__meter progress::-webkit-progress-value { background: var(--color-accent); border-radius: var(--r-pill); }
.ledger__meter progress::-moz-progress-bar { background: var(--color-accent); border-radius: var(--r-pill); }
.wedding-card { position: relative; border-radius: var(--r-lg); background: var(--color-surface); box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.wedding-card__cover { aspect-ratio: 16 / 9; background: var(--color-surface-alt); overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; }
/* The couple's ⋯ menu sits over the cover, above the card-wide link. The card no longer clips
   (the cover does), so the open panel can hang past the card's edge; an open card is lifted
   over its neighbours, which a hover transform would otherwise paint on top. */
.wedding-card__menu { position: absolute; top: var(--sp-2); right: var(--sp-2); z-index: 2; }
.wedding-card__menu > summary { --btn-bg: var(--color-surface); box-shadow: var(--shadow-1); }
.wedding-card:has(.menu[open]) { z-index: 3; }
.wedding-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.wedding-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); }
.wedding-card__name { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.1; font-weight: 400; }
@media (hover: hover) { .wedding-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); } }

/* Horizontal strip (recent pins, decisions waiting) — scrolls inside itself, never the page */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 40%; gap: var(--sp-3);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(-1 * var(--sp-4)); padding-inline: var(--sp-4); scroll-padding-inline: var(--sp-4); padding-bottom: var(--sp-1); }
.strip::-webkit-scrollbar { display: none; }
.strip > * { scroll-snap-align: start; }
@container app (min-width: 40rem) { .strip { grid-auto-columns: 22%; } }
@container app (min-width: 62rem) { .strip { grid-auto-columns: 15%; margin-inline: 0; padding-inline: 0; } }

.glance { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); font-size: var(--fs-sm); color: var(--color-text-muted); }
.glance strong { color: var(--color-text); font-weight: var(--fw-semibold); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
@container app (min-width: 48rem) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.stat__label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.stat__value { font-size: var(--fs-lg); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-tight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat__hint { font-size: var(--fs-xs); color: var(--color-text-muted); }
.stat--accent { background: var(--color-inverse-bg); color: var(--color-on-inverse); box-shadow: none; }
.stat--accent .stat__label, .stat--accent .stat__hint { color: inherit; opacity: 0.75; }

/* Callout: one important line (due next, waiting for a date, mismatch) */
.callout { display: flex; gap: var(--sp-2); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--color-info-soft); color: var(--color-info-ink); font-size: var(--fs-sm); }
.callout { --icon: var(--icon-md); --icon-stroke: 2; }
.callout > svg { margin-block: calc((1lh - var(--icon)) / 2); }
.callout--accent { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.callout--warning { background: var(--color-warning-soft); color: var(--color-warning-ink); }
.callout--danger { background: var(--color-danger-soft); color: var(--color-danger-ink); }
.callout--success { background: var(--color-success-soft); color: var(--color-success-ink); }
.callout strong { font-weight: var(--fw-bold); }
.callout__close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: calc((1lh - 32px) / 2) -6px calc((1lh - 32px) / 2) auto; position: relative;
  padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: inherit; opacity: .85; cursor: pointer; }
.callout__close::after { content: ""; position: absolute; inset: -6px; }  /* a 44px tap target (audit I45) */
.callout__close:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.callout__close:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; opacity: 1; }
.callout .callout__close svg { margin: 0; }
.callout a { color: inherit; font-weight: var(--fw-semibold); }

/* Test-mode / demo banner */
.banner { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4);
  background: var(--color-inverse-bg); color: var(--color-on-inverse); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: center; }
.banner a { color: inherit; }
.banner .link-button { color: inherit; font-weight: inherit; }
/* Signup honeypot (ADR-0013): off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.auth__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2); }
.busy-note { display: none; }
form[aria-busy="true"] .busy-note { display: block; }
form[aria-busy="true"] button[type=submit] { opacity: .75; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--color-accent); text-decoration: underline; cursor: pointer; }

/* ---------- 13. Events and board covers ---------- */
.event-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.event-card__thumb { width: 72px; height: 72px; border-radius: var(--r-md); overflow: hidden; background: var(--color-surface-alt); }
.event-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-card__name { font-weight: var(--fw-semibold); font-size: var(--fs-base); }
.event-card__date { font-size: var(--fs-sm); color: var(--color-text-muted); }
.event-card__when { text-align: right; font-size: var(--fs-xs); color: var(--color-text-muted); font-weight: var(--fw-semibold); }
.event-card__when strong { display: block; font-family: var(--font-sans); font-weight: var(--fw-bold); font-size: var(--fs-lg); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--color-text); line-height: 1; }
@media (hover: hover) { .event-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); } }

.event-head { display: flex; flex-direction: column; gap: var(--sp-2); }
.event-head__when { color: var(--color-text); }
.event-head__when b { font-family: var(--font-sans); font-weight: var(--fw-bold); font-size: var(--fs-lg); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--color-accent); }
.event-head__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.event-head__date { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); color: var(--color-text-muted); font-size: var(--fs-sm); }
.event-head__date span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.event-head__date { --icon: var(--icon-sm); --icon-stroke: 2.25; }

.board-list { display: grid; gap: var(--sp-4) var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container app (min-width: 40rem) { .board-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container app (min-width: 62rem) { .board-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.board-card { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); }
.board-card__mosaic {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px;
  aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--color-surface-alt);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.board-card__mosaic > :first-child { grid-row: 1 / 3; }
.board-card__mosaic > * { min-width: 0; min-height: 0; width: 100%; height: 100%; object-fit: cover; background: var(--color-surface-sunken); }
.board-card__mosaic--empty { display: grid; place-items: center; grid-template-columns: 1fr; grid-template-rows: 1fr;
  background: repeating-linear-gradient(135deg, var(--color-surface-alt) 0 10px, var(--color-surface) 10px 20px);
  color: var(--color-text-subtle); box-shadow: var(--shadow-inset); }
.board-card__mosaic--empty > :first-child { grid-row: auto; background: none; width: auto; height: auto; }
.board-card__name { font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.board-card__name a { color: inherit; text-decoration: none; }
.board-card__name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.board-card__name a:focus-visible { outline: none; }
.board-card__name a:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.board-card__counts { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); font-size: var(--fs-xs); color: var(--color-text-muted); }
.board-card__counts .is-final { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--color-success-ink); font-weight: var(--fw-semibold); --icon: var(--icon-xs); --icon-stroke: 2.5; }
@media (hover: hover) { .board-card:hover .board-card__mosaic { transform: translateY(-2px); box-shadow: var(--shadow-2); } }

/* ---------- 14. Board grid (masonry) and pins ---------- */
/* Masonry with CSS columns: reading and tab order run down each column.
   The server renders newest first; with 2 columns on a phone the newest pins
   fill the top of column 1 then column 2 — acceptable for a mood board. */
.board-head { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.board-head__hint { color: var(--color-text-muted); font-size: var(--fs-sm); }
.board-head__bar { display: flex; align-items: center; gap: var(--sp-2); }
.board-head__bar .segmented__btn { min-height: 38px; }  /* 44 in all, as the buttons beside it (audit I32) */

.board-grid { columns: 2; column-gap: var(--sp-3); }
@container app (min-width: 40rem) { .board-grid { columns: 3; column-gap: var(--sp-4); } }
@container app (min-width: 62rem) { .board-grid { columns: 4; } }
@container app (min-width: 92rem) { .board-grid { columns: 5; } }
.board-grid > * { break-inside: avoid; margin-bottom: var(--sp-5); }

.pin { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); }
.pin__media {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--color-surface-alt);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.pin__img { width: 100%; height: auto; max-height: 34rem; object-fit: cover; }
/* very tall screenshots: server adds .pin__media--tall when h/w > 2 */
.pin__media--tall .pin__img { aspect-ratio: 9 / 16; height: auto; object-position: top; }
.pin__status { position: absolute; top: var(--sp-2); left: var(--sp-2); z-index: 2; pointer-events: none; }
.pin__quick { position: absolute; top: var(--sp-2); right: var(--sp-2); z-index: 2; opacity: 1; transition: opacity var(--dur-2) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .pin__quick { opacity: 0; }
  .pin:hover .pin__quick, .pin:focus-within .pin__quick { opacity: 1; }
  .pin:hover .pin__media { transform: translateY(-2px); box-shadow: var(--shadow-2); }
}
.pin__body { display: flex; flex-direction: column; gap: 2px; padding-inline: 2px; }
.pin__title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: var(--lh-snug); color: var(--color-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pin__link { color: inherit; text-decoration: none; }
.pin__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }
.pin__link:focus-visible { outline: none; }
.pin__link:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.pin__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--color-text-subtle); min-width: 0; }
.pin__meta .avatar { --av: 20px; font-size: 10px; box-shadow: none; }
.pin__quick .btn[aria-pressed="true"] { --btn-fg: #B86E00; }
.pin--final .pin__media { box-shadow: 0 0 0 3px var(--color-success); }

/* Link-only pin: no image (preview failed or never existed). Typographic tile. */
.pin--link .pin__media { aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--sp-4); background: var(--tint-bg, var(--tint-6-bg)); color: var(--tint-ink, var(--tint-6-ink)); }
.pin--tint-1 { --tint-bg: var(--tint-1-bg); --tint-ink: var(--tint-1-ink); }
.pin--tint-2 { --tint-bg: var(--tint-2-bg); --tint-ink: var(--tint-2-ink); }
.pin--tint-3 { --tint-bg: var(--tint-3-bg); --tint-ink: var(--tint-3-ink); }
.pin--tint-4 { --tint-bg: var(--tint-4-bg); --tint-ink: var(--tint-4-ink); }
.pin--tint-5 { --tint-bg: var(--tint-5-bg); --tint-ink: var(--tint-5-ink); }
.pin--tint-6 { --tint-bg: var(--tint-6-bg); --tint-ink: var(--tint-6-ink); }
.pin__site { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.pin__site-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--tint-ink, currentColor); color: var(--tint-bg, #fff); font-size: 0.75rem; letter-spacing: 0; }
.pin__face { font-family: var(--font-display); font-size: 1.5625rem; line-height: 1.12; letter-spacing: -0.005em;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pin__domain { font-size: var(--fs-xs); font-weight: var(--fw-medium); opacity: 0.85; display: flex; align-items: center; gap: var(--sp-1);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pin__domain svg { --icon: var(--icon-xs); --icon-stroke: 2.5; }
/* link-only tiles show their status chip in .pin__meta, not on the tile */
@container app (max-width: 25rem) { .pin__face { font-family: var(--font-sans); font-weight: var(--fw-semibold); font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.25; } }

/* Board empty state sits outside the column flow */
.board-grid:empty { display: none; }

/* ---------- 15. Pin detail ---------- */
.pin-detail { display: grid; gap: var(--sp-5); }
.pin-detail__media { margin-inline: calc(-1 * var(--sp-4)); background: var(--color-surface-sunken); display: grid; place-items: center;
  max-height: 72dvh; overflow: hidden; position: relative; }
.pin-detail__media img { width: 100%; height: 100%; max-height: 72dvh; object-fit: contain; }
.pin-detail__media .pin__media { border-radius: 0; width: 100%; }
.pin-detail__panel { display: flex; flex-direction: column; gap: var(--sp-5); }
.pin-detail__title { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 400; line-height: 1.1; }
.pin-detail__source { --icon: var(--icon-sm); --icon-stroke: 2.25; display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--color-text-muted); }
.pin-detail__source a { font-weight: var(--fw-semibold); display: inline-flex; align-items: center; gap: var(--sp-1); }
@container app (min-width: 56rem) {
  .pin-detail { grid-template-columns: minmax(0, 3fr) minmax(20rem, 2fr); align-items: start; gap: var(--sp-6); }
  .pin-detail__media { margin-inline: 0; border-radius: var(--r-xl); position: sticky; top: calc(64px + var(--sp-4)); max-height: calc(100dvh - 120px); }
  .pin-detail__media img { max-height: calc(100dvh - 120px); }
}

/* Segmented control: one <form>, three submit buttons with name="status" */
/* Sized to its content at every width (Kwabena, 2026-11-16), never the full page. */
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(6.5rem, auto); max-width: 100%; gap: 3px; padding: 3px;
  border-radius: var(--r-md); background: var(--color-surface-alt); }
.segmented__btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1);
  min-height: 40px; padding: 0 var(--sp-2); border: 0; border-radius: 11px; background: transparent;
  color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none; position: relative;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.segmented__btn::after { content: ""; position: absolute; inset: -3px 0; }
.segmented { --icon: var(--icon-sm); --icon-stroke: 2.25; }
.segmented__btn[aria-pressed="true"], .segmented__btn[aria-current="true"] { background: var(--color-raised); color: var(--color-text); box-shadow: var(--shadow-1); }
.segmented__btn[aria-pressed="true"].is-shortlisted svg { color: var(--color-warning); }
.segmented__btn[aria-pressed="true"].is-final { background: var(--color-success); color: var(--color-on-success); }
@media (hover: hover) { .segmented__btn:not([aria-pressed="true"]):hover { color: var(--color-text); } }

/* Votes */
.votes { display: flex; flex-direction: column; gap: var(--sp-2); }
.vote-row { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--row-dense); }
.vote-row__who { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.vote-row__who small { display: block; font-weight: var(--fw-medium); color: var(--color-text-muted); font-size: var(--fs-xs); }
.vote-btns { display: inline-flex; gap: var(--sp-2); }
.vote-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); min-width: var(--tap); min-height: var(--tap);
  padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--color-border-strong); background: var(--color-surface);
  color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  transition: background-color var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard), transform var(--dur-1) var(--ease-out); }
.vote-btn { --icon: var(--icon-md); --icon-stroke: 2; }
.vote-btn:active { transform: scale(0.94); }
.vote-btn--love[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.vote-btn--nope[aria-pressed="true"] { background: var(--color-text); border-color: var(--color-text); color: var(--color-bg); }
.vote-state { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.vote-state { --icon: var(--icon-xs); --icon-stroke: 2.5; }
.vote-state--love { color: var(--color-accent-ink); }
.vote-state--nope { color: var(--color-text-muted); }
.vote-state--none { color: var(--color-text-subtle); font-weight: var(--fw-medium); }

/* ---------- 16. Compare ---------- */
.compare__summary { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.compare__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: var(--sp-3);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  margin-inline: calc(-1 * var(--sp-4)); padding: var(--sp-2) var(--sp-4) var(--sp-4); scroll-padding-inline: var(--sp-4);
  scrollbar-width: thin;
}
.compare__track > * { scroll-snap-align: start; }
@container app (min-width: 48rem) {
  .compare__track { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; }
}
.compare-card { display: flex; flex-direction: column; background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; position: relative;
  transition: box-shadow var(--dur-2) var(--ease-out); }
.compare-card__media { aspect-ratio: 4 / 5; background: var(--color-surface-alt); position: relative; }
.compare-card__media img { width: 100%; height: 100%; object-fit: cover; }
.compare-card__body { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); flex: 1 1 auto; }
.compare-card__title { font-size: var(--fs-base); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.compare-card__foot { display: flex; flex-direction: column; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-4); }
.compare-card--agree { box-shadow: 0 0 0 2px var(--color-success), var(--shadow-2); }
.compare-card--split .agree { background: var(--color-warning-soft); color: var(--color-warning-ink); }
.agree { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); background: var(--color-success-soft); color: var(--color-success-ink); }
.agree { --icon: var(--icon-md); --icon-stroke: 2; }
.agree--waiting { background: var(--color-surface-alt); color: var(--color-text-muted); }
.tally { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.tally__cell { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--r-sm); background: var(--color-surface-alt); min-width: 0; }
.tally__cell .vote-state { min-width: 0; }

/* ---------- 17. Forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--sp-5); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-text); }
.field__label .optional { font-weight: var(--fw-medium); color: var(--color-text-subtle); }
.field__hint { font-size: var(--fs-xs); color: var(--color-text-muted); }
.field__error { display: flex; gap: var(--sp-1); align-items: flex-start; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-danger-ink); }
.field-row { display: grid; gap: var(--sp-4); }
@container app (min-width: 30rem) { .field-row--estimate { grid-template-columns: minmax(0, 1fr) minmax(0, 11rem); gap: var(--sp-3); } }
.estimate + .estimate { margin-top: var(--sp-4); }
@container app (min-width: 40rem) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-base); /* 16px stops iOS zoom-on-focus */
  color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--r-sm);
  transition: border-color var(--dur-1) var(--ease-standard), box-shadow var(--dur-1) var(--ease-standard);
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 96px; resize: vertical; line-height: var(--lh-body); }
.input::placeholder, .textarea::placeholder { color: var(--color-text-subtle); }
@media (hover: hover) { .input:hover, .select:hover, .textarea:hover { border-color: var(--color-text-muted); } }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible,
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent);
}
.field--invalid .input, .field--invalid .select, .field--invalid .textarea, .input[aria-invalid="true"] {
  border-color: var(--color-danger); box-shadow: 0 0 0 1px var(--color-danger);
}
.select {
  padding-right: var(--sp-7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236E6E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input-affix { display: flex; align-items: stretch; border: 1px solid var(--color-border-strong); border-radius: var(--r-sm); background: var(--color-surface);
  transition: border-color var(--dur-1) var(--ease-standard), box-shadow var(--dur-1) var(--ease-standard); }
.input-affix:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent); }
.input-affix .input { border: 0; box-shadow: none !important; background: transparent; min-width: 0; }
.input-affix__fix { display: grid; place-items: center; padding: 0 var(--sp-3) 0 var(--sp-4); color: var(--color-text-muted); font-weight: var(--fw-semibold);
  font-size: var(--fs-sm); white-space: nowrap; }
.input-affix--money .input { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); font-size: var(--fs-lg); padding-left: 0; }

/* Native checkbox and radio, restyled; still the real input */
.check { display: flex; align-items: flex-start; gap: var(--sp-3); min-height: var(--tap); padding-block: 10px; cursor: pointer; }
.check input[type="checkbox"], .check input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0;
  width: 24px; height: 24px; border: 2px solid var(--color-border-strong); background: var(--color-surface);
  border-radius: 7px; display: grid; place-items: center; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard);
}
.check input[type="radio"] { border-radius: 50%; }
.check input::after { content: ""; width: 12px; height: 7px; border: 2.5px solid var(--color-on-accent); border-top: 0; border-right: 0;
  opacity: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0.6);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) var(--ease-out); }
.check input[type="radio"]::after { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--color-on-accent); transform: scale(0.6); }
.check input:checked { background: var(--color-accent); border-color: var(--color-accent); }
.check input:checked::after { opacity: 1; transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input[type="radio"]:checked::after { opacity: 1; transform: scale(1); }
.check input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.check__text { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.check__text small { font-size: var(--fs-xs); color: var(--color-text-muted); }
/* A short pick-one list: rows of .check, no cards (cards stay for RSVP). */
.check-list { display: grid; }

/* Choice cards: big radio/checkbox tiles (decide flow, presets, RSVP) */
.choices { display: grid; gap: var(--sp-2); }
.choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__card {
  display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md); background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-border-strong);
  transition: box-shadow var(--dur-1) var(--ease-standard), background-color var(--dur-1) var(--ease-standard);
}
.choice__title { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.choice__desc { font-size: var(--fs-xs); color: var(--color-text-muted); }
.choice__tick { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--color-border-strong); flex: none;
  display: grid; place-items: center; }
.choice input:checked + .choice__card { box-shadow: inset 0 0 0 2px var(--color-accent); background: var(--color-accent-soft); }
.choice input:checked + .choice__card .choice__tick { background: var(--color-accent); box-shadow: none; }
.choice input:checked + .choice__card .choice__tick::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-on-accent); }
.choice input:focus-visible + .choice__card { outline: 2px solid var(--color-focus); outline-offset: 2px; }
@media (hover: hover) { .choice:hover .choice__card { box-shadow: inset 0 0 0 1px var(--color-text-muted); } .choice input:checked + .choice__card { box-shadow: inset 0 0 0 2px var(--color-accent); } }
.choice--yes input:checked + .choice__card { box-shadow: inset 0 0 0 2px var(--color-success); background: var(--color-success-soft); }
.choice--yes input:checked + .choice__card .choice__tick { background: var(--color-success); }
.choice--no input:checked + .choice__card { box-shadow: inset 0 0 0 2px var(--color-text-muted); background: var(--color-surface-alt); }
.choice--no input:checked + .choice__card .choice__tick { background: var(--color-text-muted); }

/* File / screenshot drop: a real <input type="file"> stretched over a friendly target */
.file-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 120px; padding: var(--sp-4); border-radius: var(--r-md); border: 1.5px dashed var(--color-border-strong);
  background: var(--color-surface); color: var(--color-text-muted); text-align: center; font-size: var(--fs-sm); }
.file-drop svg { --icon: 28px; --icon-stroke: 1.5; color: var(--color-accent); }
.file-drop strong { color: var(--color-text); }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop:focus-within { border-color: var(--color-accent); outline: 2px solid var(--color-focus); outline-offset: 2px; }

.form-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

/* Sticky bottom action bar for long forms (capture, decide, RSVP) */
.action-bar {
  position: sticky; bottom: 0; z-index: 25;
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  margin-inline: calc(-1 * var(--sp-4)); margin-top: var(--sp-5);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-bottom));
  background: var(--color-bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--color-border);
}
.action-bar > .btn--primary { flex: 1 1 12rem; }
.action-bar__note { flex: 1 1 100%; font-size: var(--fs-xs); color: var(--color-text-muted); }
@container app (min-width: 62rem) { .action-bar { margin-inline: 0; border-radius: var(--r-lg); border: 0; box-shadow: var(--shadow-3); bottom: var(--sp-4); }
  .action-bar > .btn--primary { flex: 0 0 auto; } }

/* ---------- 18. Capture ---------- */
.capture-preview { display: grid; grid-template-columns: 88px 1fr; gap: var(--sp-3); align-items: center;
  padding: var(--sp-3); background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.capture-preview__thumb { width: 88px; height: 110px; border-radius: var(--r-md); overflow: hidden; background: var(--color-surface-alt); }
.capture-preview__thumb img { width: 100%; height: 100%; object-fit: cover; }
.capture-preview__thumb.pin--link { display: grid; place-items: center; background: var(--tint-bg); color: var(--tint-ink); }
.capture-preview__title { font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.capture-preview__url { font-size: var(--fs-xs); color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 19. A pick's head (Add the cost) ---------- */
.decide-head { display: grid; grid-template-columns: 64px 1fr; gap: var(--sp-3); align-items: center; }
.decide-head__thumb { width: 64px; height: 80px; border-radius: var(--r-md); overflow: hidden; background: var(--color-surface-alt); }
.decide-head__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Payment schedule preview / custom rows */
.schedule { display: flex; flex-direction: column; border-top: 1px solid var(--color-border); }  /* flat rows, no box in a box */

/* ---------- 20. Tables (budget, guests, vendors) ---------- */
.table-wrap { background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow-x: auto; }
.table-scroll { overflow-x: auto; } /* wide guest table between 48 and 62rem; sticky header is lost inside it */
.table { font-size: var(--fs-sm); }
.table caption { text-align: left; padding: var(--sp-4); font-weight: var(--fw-semibold); }
.table th, .table td { padding: var(--sp-3) var(--sp-4); text-align: left; vertical-align: middle; }
.table thead th { position: sticky; top: var(--topbar-h); z-index: 1; background: var(--color-surface-alt); color: var(--color-text-muted);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.table tbody tr { border-top: 1px solid var(--color-border); transition: background-color var(--dur-1) var(--ease-standard); }
.table tbody th { font-weight: var(--fw-semibold); }
.table tbody th a { color: inherit; text-decoration: none; }
.table tbody th a:hover { color: var(--color-accent); text-decoration: underline; }
@media (hover: hover) { .table tbody tr:hover { background: color-mix(in srgb, var(--color-surface-alt) 55%, transparent); } }
.table .num, .table td.money, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td, .table tfoot th { border-top: 2px solid var(--color-text); font-weight: var(--fw-bold); background: var(--color-surface); }
.table .row--muted th, .table .row--muted td { color: var(--color-text-muted); font-style: italic; }
.table .row--over .is-over { color: var(--color-danger-ink); font-weight: var(--fw-bold); }
.table .sub { display: block; font-size: var(--fs-xs); color: var(--color-text-muted); font-weight: var(--fw-medium); }
.table .sub--danger { color: var(--color-danger-ink); font-weight: var(--fw-semibold); }

/* Stacked table on narrow containers: rows become cards, cells label themselves.
   Each <td> carries data-label="Paid"; <th scope="row"> is the card title. */
@container app (max-width: 47.99rem) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap:has(.table--stack) { background: none; box-shadow: none; overflow: visible; border-radius: 0; }
  .table--stack, .table--stack tbody, .table--stack tfoot { display: flex; flex-direction: column; gap: var(--sp-3); }
  .table--stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2) var(--sp-4); padding: var(--sp-4);
    background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); border: 0 !important; }
  .table--stack th[scope="row"] { grid-column: 1 / -1; padding: 0; font-size: var(--fs-base); }
  .table--stack td { display: flex; flex-direction: column; gap: 2px; padding: 0; text-align: left !important; }
  .table--stack td::before { content: attr(data-label); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted);
    text-transform: uppercase; letter-spacing: var(--tracking-caps); }
  .table--stack td.span-2 { grid-column: 1 / -1; }
  .table--stack td:empty { display: none; }
  .table--stack tfoot tr { background: var(--color-text); color: var(--color-bg); }
  .table--stack tfoot td::before { color: inherit; opacity: 0.75; }
  .table--stack tfoot td, .table--stack tfoot th { border: 0; background: none; }
  .table--stack tfoot .money__cur, .table--stack tfoot .sub { color: inherit; opacity: 0.8; }
}

/* Progress: native <progress class="progress"> (no inline width needed) */
.progress { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: var(--r-pill);
  background: var(--color-track); color: var(--color-accent); overflow: hidden; display: block; }
.progress::-webkit-progress-bar { background: var(--color-track); border-radius: var(--r-pill); }
.progress::-webkit-progress-value { background: var(--color-accent); border-radius: var(--r-pill); }
.progress::-moz-progress-bar { background: var(--color-accent); border-radius: var(--r-pill); }
.progress--success::-webkit-progress-value { background: var(--color-success); }
.progress--success::-moz-progress-bar { background: var(--color-success); }

/* ---------- 21. Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: var(--sp-6); }
.timeline__group { display: flex; flex-direction: column; gap: var(--sp-2); }
.timeline__heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2);
  position: sticky; top: calc(var(--topbar-h) + var(--safe-top)); z-index: 5; padding-block: var(--sp-2); background: var(--color-bg); }
.timeline__heading h2 { font-size: var(--fs-base); font-weight: var(--fw-bold); }
.timeline__heading span { font-size: var(--fs-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.timeline__group--overdue .timeline__heading h2 { color: var(--color-danger-ink); }
@container app (min-width: 62rem) { .timeline__heading { top: 64px; } .table thead th { top: 64px; } }

.task { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); min-height: 64px; background: var(--color-surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.task + .task { margin-top: 0; }
/* The 44px tap box takes 24px of the row and sits centred on the title's first line (audit I23, I34). */
.task__check { display: grid; place-items: center; width: var(--tap); height: var(--tap); margin: calc((1lh - var(--tap)) / 2) -10px; }
.task__check button { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--color-border-strong); background: var(--color-surface); padding: 0; position: relative; }
.task__check button::after { content: ""; position: absolute; inset: -10px; }
.task__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task__title { font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.task__title a { color: inherit; text-decoration: none; }
.task__meta { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); align-items: center; font-size: var(--fs-xs); color: var(--color-text-muted); }
.task__due { text-align: right; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted); white-space: nowrap; }
.task__due strong { display: block; font-size: var(--fs-sm); color: var(--color-text); }
.task--overdue { box-shadow: inset 3px 0 0 var(--color-danger), var(--shadow-1); }
.task--overdue .task__due, .task--overdue .task__due strong { color: var(--color-danger-ink); }
.task--done .task__title { text-decoration: line-through; color: var(--color-text-muted); }
.task--done .task__check button { background: var(--color-success); border-color: var(--color-success); }
.task--done .task__check button::before { content: ""; position: absolute; left: 6px; top: 3px; width: 6px; height: 11px; border: solid var(--color-on-success); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
@media (hover: hover) { .task__check button:hover { border-color: var(--color-accent); } }
.task--waiting { background: transparent; box-shadow: inset 0 0 0 1.5px var(--color-border); }

/* ---------- 22. Guests and RSVP ---------- */
.guest-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.guest-summary__cell { padding: var(--sp-3); border-radius: var(--r-md); background: var(--color-surface); box-shadow: var(--shadow-1); text-align: center; }
.guest-summary__num { display: block; font-size: var(--fs-xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.guest-summary__label { font-size: var(--fs-xs); color: var(--color-text-muted); font-weight: var(--fw-semibold); }
.guest-summary__cell--yes .guest-summary__num { color: var(--color-success-ink); }
.guest-summary__cell--no .guest-summary__num { color: var(--color-text-muted); }
.guest-summary__cell--pending .guest-summary__num { color: var(--color-warning-ink); }

.household { background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.household__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
.household__name { font-weight: var(--fw-bold); flex: 1 1 auto; min-width: 0; }
.household__name small { display: block; font-weight: var(--fw-medium); font-size: var(--fs-xs); color: var(--color-text-muted); }
.guest-row { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-1) var(--sp-3); align-items: center;
  padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--color-border); }
.guest-row__name { font-weight: var(--fw-medium); }
.guest-row__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--sp-1); }

.rsvp { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 24px; padding: 0 var(--sp-2); border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.rsvp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rsvp--yes { background: var(--color-success-soft); color: var(--color-success-ink); }
.rsvp--no { background: var(--color-surface-alt); color: var(--color-text-muted); }
.rsvp--pending { background: var(--color-warning-soft); color: var(--color-warning-ink); }
.side { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted); }

/* ---------- 23. Public token pages (RSVP, vendor brief) ---------- */
.public { min-height: 100dvh; background: var(--color-bg); color: var(--color-text); container: app / inline-size; }
.public__wrap { max-width: 36rem; margin-inline: auto; padding: var(--sp-6) var(--sp-4) var(--sp-8); display: flex; flex-direction: column; gap: var(--sp-6); }
.public__wrap--wide { max-width: 64rem; }
.public__head { text-align: center; display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; }
.public__names { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-3xl); line-height: 1; }
.public__names .amp { font-family: var(--font-brand); font-style: italic; color: var(--color-accent); }
.public__foot { text-align: center; font-size: var(--fs-xs); color: var(--color-text-subtle); }
.public__foot a { color: inherit; }
.rsvp-event { background: var(--color-surface); border-radius: var(--r-xl); box-shadow: var(--shadow-2); overflow: hidden; }
.rsvp-event__head { padding: var(--sp-5) var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); border-bottom: 1px solid var(--color-border); }
.rsvp-event__name { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; line-height: 1.1; }
.rsvp-event__facts { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); color: var(--color-text-muted); }
.rsvp-event__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-5); }
.rsvp-guest { display: flex; flex-direction: column; gap: var(--sp-3); }
.rsvp-guest + .rsvp-guest { padding-top: var(--sp-5); border-top: 1px solid var(--color-border); }
.rsvp-guest__name { font-weight: var(--fw-bold); font-size: var(--fs-base); }

.brief-final { display: grid; gap: var(--sp-5); }
@container app (min-width: 48rem) { .brief-final { grid-template-columns: 3fr 2fr; align-items: start; } }
.brief-final__img { border-radius: var(--r-xl); overflow: hidden; background: var(--color-surface-alt); }

/* ---------- 24. Login ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: var(--sp-5) var(--sp-4); container: app / inline-size;
  background:
    radial-gradient(60rem 30rem at 110% -10%, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 60%),
    radial-gradient(40rem 30rem at -20% 110%, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 60%),
    var(--color-bg); }
.auth__card { width: 100%; max-width: 26rem; display: flex; flex-direction: column; gap: var(--sp-5);
  padding: var(--sp-6) var(--sp-5); background: var(--color-surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); }
.auth__tag { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; }
.auth__tag em { font-style: normal; color: var(--color-accent); }

/* ---------- 25. Empty states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-5); border-radius: var(--r-xl); background: var(--color-surface); box-shadow: var(--shadow-inset); }
.empty__art { width: 96px; height: 96px; color: var(--color-accent); }
.empty__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xl); line-height: 1.15; }
.empty__text { color: var(--color-text-muted); max-width: 26rem; font-size: var(--fs-sm); }
.empty .form-actions { justify-content: center; margin-top: var(--sp-2); }
.empty--quiet { background: transparent; box-shadow: inset 0 0 0 1.5px var(--color-border); padding: var(--sp-6) var(--sp-4); }

/* ---------- 26. Toasts (Django messages) ---------- */
/* Render <div class="toasts" role="status" aria-live="polite"> as a DIRECT CHILD OF <body>,
   outside .app: .app is a size container, and containment makes it the containing block
   for position: fixed, which would pin toasts to the bottom of the document instead of the
   screen. That is also why this block uses @media, not @container.
   Without JS toasts stay until the next page; app.js adds auto-dismiss after 6 s
   (paused on hover/focus) and wires the close button. */
.toasts { position: fixed; z-index: 60; left: var(--sp-3); right: var(--sp-3);
  bottom: calc(var(--tabbar-h) + var(--tabbar-lift) + var(--sp-3));
  display: flex; flex-direction: column; gap: var(--sp-2); pointer-events: none; }
body:has(.shell--task) .toasts, body:has(.public) .toasts, body:has(.auth) .toasts { bottom: calc(var(--sp-3) + var(--safe-bottom)); }
@media (min-width: 64rem) { .toasts { left: auto; right: var(--sp-5); bottom: var(--sp-5); width: 24rem; } }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  border-radius: var(--r-md); background: var(--color-inverse-bg); color: var(--color-on-inverse); box-shadow: var(--shadow-3);
  font-size: var(--fs-sm); animation: toast-in var(--dur-3) var(--ease-out) both; }
.toast { --icon: var(--icon-md); --icon-stroke: 2; }
.toast > svg { margin-block: calc((1lh - var(--icon)) / 2); }
.toast__body { flex: 1 1 auto; min-width: 0; }
.toast__body a { color: inherit; font-weight: var(--fw-bold); }
.toast--success > svg { color: var(--color-success-on-inverse); }
.toast--error { background: var(--color-danger-soft); color: var(--color-danger-ink); box-shadow: inset 0 0 0 1px var(--color-danger), var(--shadow-3); }
.toast__close { flex: none; width: 32px; height: 32px; margin: calc((1lh - 32px) / 2) -6px calc((1lh - 32px) / 2) 0; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; position: relative; }
.toast__close svg { margin: 0; }
.toast__close::after { content: ""; position: absolute; inset: -6px; }
.toast.is-leaving { animation: toast-out var(--dur-2) var(--ease-out) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 27. Motion: page transitions and reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-fade-out 160ms var(--ease-standard) both; }
  ::view-transition-new(root) { animation: vt-fade-in 220ms var(--ease-out) both; }
  /* The bars stay put from page to page: named, so they are not part of the page's fade,
     and held still (audit M3: they blinked and slid 6px on every change). */
  .topbar { view-transition-name: topbar; }
  .tabbar { view-transition-name: tabbar; }
  ::view-transition-group(topbar), ::view-transition-group(tabbar),
  ::view-transition-old(topbar), ::view-transition-new(topbar),
  ::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; }
  /* A swap in place (a filter chip) changes one block: the page holds still and only the
     block cross-fades (app.js names it for the moment). */
  html.vt-swap::view-transition-old(root), html.vt-swap::view-transition-new(root) { animation: none; }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    animation-delay: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  /* The highlights that were motion stay as a still tint while app.js keeps the class (audit M15). */
  #tg-waiting.is-flash .agenda__row, .canvas__world > .pin.pin--arrived { background: var(--color-accent-soft); }
  .card--link:hover, .event-card:hover, .wedding-card:hover,
  .pin:hover .pin__media, .board-card:hover .board-card__mosaic { transform: none !important; }
  .btn:active, .vote-btn:active, .tabbar__add:active .tabbar__plus { transform: none !important; }
}

/* ---------- 28. Forced colours (Windows high contrast) ---------- */
@media (forced-colors: active) {
  .btn, .input, .select, .textarea, .choice__card, .filter, .segmented__btn, .chip, .vote-btn { border: 1px solid CanvasText; }
  .segmented__btn[aria-pressed="true"], .filter[aria-current="true"], .choice input:checked + .choice__card { outline: 2px solid Highlight; }
  .pin__link:focus-visible::after, .card__stretch:focus-visible::after { outline: 2px solid Highlight; }
}

/* ---------- 29. Print (run sheet, vendor brief, export) ---------- */
@media print {
  :root { --color-bg: #fff; --color-surface: #fff; --color-text: #000; --color-text-muted: #333; }
  .tabbar, .sidebar, .topbar, .action-bar, .toasts, .banner, .pin__quick, .no-print { display: none !important; }
  .shell { display: block; }
  .page { max-width: none; padding: 0; }
  .card, .stat, .household, .table-wrap, .rsvp-event, .compare-card { box-shadow: none; border: 1px solid #bbb; }
  .board-grid { columns: 3; }
  .pin, .task, .household, tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .table thead th { position: static; }
}

/* --- milestone 4 additions: print the run sheet, ticked checklist lines --- */
.check__text.is-done { text-decoration: line-through; color: var(--color-text-muted); }
@media print {
  .topbar, .tabbar, .sidebar, .toasts, .no-print, .skip-link { display: none !important; }
  .app, .shell, .shell__main, .page { display: block; max-width: none; padding: 0; margin: 0; box-shadow: none; }
  body { background: #fff; color: #000; }
  .table { border-collapse: collapse; width: 100%; }
  .table th, .table td { border-bottom: 1px solid #999; padding: 6px 8px; text-align: left; }
}

/* --- timeline list as an agenda: one column, a section per month, a date gutter, no cards --- */
.agenda { display: flex; flex-direction: column; gap: var(--sp-6); max-width: 48rem; }
.agenda__section { display: flex; flex-direction: column; min-width: 0; }
.agenda__head { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); }
.agenda__head h2 { font-size: var(--fs-base); font-weight: var(--fw-bold); }
.agenda__day { display: grid; grid-template-columns: 3rem minmax(0, 1fr); border-top: 1px solid var(--color-border); }
.agenda__date { display: flex; flex-direction: column; padding-block: var(--sp-2); font-size: var(--fs-xs); line-height: 1.2; color: var(--color-text-muted); }
.agenda__date strong { line-height: var(--lh-snug); font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--color-text); font-variant-numeric: tabular-nums; }
.agenda__section--overdue :is(.agenda__head > span, .agenda__date, .agenda__date strong) { color: var(--color-danger-ink); }
.agenda__row { position: relative; display: flex; align-items: center; gap: var(--sp-3); min-height: var(--tap); padding-block: var(--sp-1); }
.agenda__title { flex: 1; min-width: 0; line-height: var(--lh-snug); }
.agenda__title a { color: inherit; text-decoration: none; }
.agenda__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.agenda__title a:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--r-sm); }
.agenda__row .task__check { z-index: 2; }
.agenda__amount { line-height: var(--lh-snug); flex: none; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: hover) { .agenda__row:has(a):hover .agenda__title a { text-decoration: underline; text-underline-offset: 2px; } }

/* --- timeline as a month calendar --- */
.cal__nav { display: flex; align-items: center; gap: var(--sp-2); }
.cal__title { flex: 1; text-align: center; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; margin: 0; }
.cal { touch-action: pan-y; border: 1px solid var(--color-border); border-radius: var(--r-lg); background: var(--color-surface); overflow: hidden; }
.cal__head, .cal__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__dow { padding: var(--sp-1) 0; text-align: center; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-subtle); border-bottom: 1px solid var(--color-border); }
.cal__week + .cal__week { border-top: 1px solid var(--color-border); }
.cal__day { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 4px 2px 6px; color: inherit; text-decoration: none; border-left: 1px solid var(--color-border); overflow: hidden; }
.cal__day:first-child { border-left: 0; }
.cal__day:hover { background: var(--color-surface-alt); }
.cal__day:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; z-index: 1; }
.cal__day--out { color: var(--color-text-subtle); background: var(--color-surface-alt); }
.cal__day--selected { background: var(--color-accent-soft); }
.cal__num { align-self: flex-start; width: 22px; height: 22px; line-height: 22px; text-align: center; font-size: var(--fs-sm); font-weight: 600; border-radius: 50%; }
.cal__day--today .cal__num { background: var(--color-accent); color: var(--color-on-accent); }
.cal__ev { display: block; font-size: var(--fs-xs); line-height: 1.3; padding: 1px 4px; margin: 0 -2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--color-info-soft); color: var(--color-info-ink); border-radius: 0; }
.cal__ev--first { margin-left: 2px; border-radius: 4px 0 0 4px; }
.cal__ev--last { margin-right: 2px; border-radius: 0 4px 4px 0; }
.cal__ev--first.cal__ev--last { border-radius: 4px; }
.cal__marks { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: auto; padding-left: 2px; }
.cal__dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--color-text-muted); }
.cal__dot--payment { background: var(--color-info-ink); border-radius: 2px; }  /* square (audit C10) */
.cal__dot--late { background: none; box-shadow: inset 0 0 0 2px var(--color-danger); }  /* ring */
.cal__more { font-size: var(--fs-xs); color: var(--color-text-subtle); }
.cal__legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-2); }
.cal__key { display: inline-flex; align-items: center; gap: var(--sp-1); white-space: nowrap; }
.cal__panel { max-width: 48rem; }
.cal__event { color: inherit; text-decoration: none; align-items: center; }
.cal__event .kanban__title, .cal__event .kanban__meta { display: block; }
.cal__event .agenda__lead { display: grid; place-items: center; height: 1lh; color: var(--color-accent); --icon: var(--icon-md); --icon-stroke: 2; }
@media (hover: hover) { .cal__event:hover .kanban__title { color: var(--color-accent); } }
@media (max-width: 640px) {
  .cal__day { min-height: 56px; }
  .cal__ev { font-size: 0; height: 6px; padding: 0; }  /* a bar, no text: the panel below names it */
}

/* --- vendor brief (token page) and board grants --- */
.public__wrap--wide { max-width: 960px; }
.brief-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-3); }
.brief-pin { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); overflow: hidden; }
.brief-pin__img { width: 100%; height: auto; display: block; }
.brief-pin__body { padding: var(--sp-3); }
.brief-pin__title { font-size: var(--fs-sm); font-weight: 600; margin: 0 0 var(--sp-1); }
.list__row--sub { padding-top: 0; }
.grants summary { cursor: pointer; }
.grants__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-2); }

/* --- chosen-file preview under a file picker --- */
.file-drop--chosen { border-color: var(--color-success); }
.file-drop__preview { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--color-border); border-radius: var(--r-lg); background: var(--color-surface); font-size: var(--fs-sm); }
.file-drop__preview strong { color: var(--color-success-ink); }
.file-drop__thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); flex: none; background: var(--color-surface-alt); }
.file-drop__meta { color: var(--color-text-muted); word-break: break-all; }
.file-drop__preview { position: relative; }
.file-drop__text { min-width: 0; flex: 1; }
/* Small round x on the thumbnail's corner; the hit area is a full 44 px tap target. */
.file-drop__remove { position: absolute; top: calc(var(--sp-2) - 8px); left: calc(var(--sp-3) + 72px - 18px);
  display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r-pill);
  background: var(--color-text); color: var(--color-bg); box-shadow: 0 0 0 2px var(--color-surface); cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out); }
.file-drop__remove::after { content: ""; position: absolute; inset: -9px; }
.file-drop__remove { --icon: var(--icon-xs); --icon-stroke: 2.5; }
.file-drop__remove:active { transform: scale(0.92); }
@media (hover: hover) { .file-drop__remove:hover { background: var(--color-danger); color: var(--color-on-danger); } }
/* No thumbnail (a format the browser cannot draw): the x sits at the end of the row. */
.file-drop__preview:not(:has(.file-drop__thumb)) .file-drop__remove { position: relative; top: auto; left: auto; flex: none; }

.notes { color: var(--color-text); white-space: pre-line; }

/* --- a share link with a Copy button; the URL wraps instead of overflowing --- */
.copylink { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); max-width: 100%; }
.copylink__text { width: 100%; margin-top: var(--sp-1); font-size: var(--fs-xs); }
.copylink__btn { flex: none; }

/* --- task cards: the whole card opens the task; the tick stays its own target --- */
.task { position: relative; }
.task__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); z-index: 1; }
.task__title a:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.task__check { position: relative; z-index: 2; }
.task__meta a { position: relative; z-index: 2; }
/* The meta line and the due date sit above the stretched link, so their text can be
   selected and copied; the title and the card's empty space still open the task. */
.task__meta, .task__due { position: relative; z-index: 2; }

/* --- export: a printable document --- */
.export { max-width: 52rem; margin-inline: auto; }
.export__head { margin-bottom: var(--sp-6); }
.export__section { margin-top: var(--sp-7); break-inside: avoid-page; }
.export__section h2 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; margin: 0 0 var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--color-border); }
.export__section h3 { font-size: var(--fs-md); margin: var(--sp-4) 0 var(--sp-1); }
.export__section h4 { font-size: var(--fs-sm); margin: var(--sp-3) 0 var(--sp-1); color: var(--color-text-muted); }
.export__pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-3); }
.export__pin { margin: 0; break-inside: avoid; }
.export__pin img { width: 100%; height: auto; border-radius: var(--r-md); display: block; margin-bottom: var(--sp-1); }
.export__pin figcaption { font-size: var(--fs-sm); }
.export__foot { margin-top: var(--sp-8); font-size: var(--fs-xs); }
@media print {
  .export { max-width: none; }
  .export__pins { grid-template-columns: repeat(3, 1fr); }
  .topbar, .sidebar, .tabbar, .toasts, .no-print { display: none !important; }
  .page { padding: 0; }
}

/* Start a wedding plan, one question per screen */
.wizard { max-width: 32rem; }
.wizard__count { margin-bottom: var(--sp-2); }
.wizard__bar { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-5); }
.wizard__bar span { flex: 1; height: 4px; border-radius: var(--r-pill); background: var(--color-track); }  /* reads as a track (audit C12) */
.wizard__bar span.on { background: var(--color-accent); }
.wizard .page__title label { font: inherit; }
.input--lg { min-height: 56px; font-size: var(--fs-lg); }
.wizard__actions { flex-wrap: wrap; }

/* Budget on a phone: one line per category, figures on tap */
.fold__summary { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); cursor: pointer; font-weight: var(--fw-semibold); }

/* Timeline: one control row */
.ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
/* Every control in the Timeline's row is 36px tall, the switch included (audit I31). */
.ctl-row .segmented { padding: 2px; gap: 2px; }
.ctl-row .segmented__btn { min-height: 32px; }
.ctl-row .segmented__btn::after { inset: -6px 0; }
.ctl-filter { flex: 0 1 auto; min-width: 0; }
.ctl-filter > summary { max-width: 14rem; }
.menu__panel--left, .menu__panel--flip { left: 0; right: auto; }
.menu__panel--up { top: auto; bottom: calc(100% + var(--sp-2)); }
.menu__panel a[aria-current="true"] { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.segmented--icons { grid-auto-columns: var(--tap); margin-left: auto; }
.segmented--icons .segmented__btn { padding: 0; }
.ctl-add { margin-left: auto; }  /* the page's add button keeps to the right, as on every page (direction B) */
.ctl-add > summary { list-style: none; }
.ctl-add > summary::-webkit-details-marker { display: none; }
.ctl-add[open] { flex-basis: 100%; order: 3; min-width: 0; }
.task__meta { display: flex; flex-wrap: wrap; gap: 0 var(--sp-1); }
.task__meta > span + span::before { content: "·"; margin-right: var(--sp-1); color: var(--color-text-muted); }
.timeline__fold > summary { cursor: pointer; list-style: none; }
.timeline__fold > summary::-webkit-details-marker { display: none; }
.timeline__fold > summary::after { content: "Show"; margin-left: var(--sp-2); font-size: var(--fs-xs); color: var(--color-accent); }
.timeline__fold[open] > summary::after { content: "Hide"; }
.timeline__more > summary { list-style: none; margin-top: var(--sp-1); }
.timeline__more > summary::-webkit-details-marker { display: none; }
.timeline__more[open] > summary { display: none; }
/* A row of the calendar's chosen day (timeline/_board_row.html; the name is from the
   Columns view it was first made for, removed 2026-11-24): split by hairlines, the due
   text under the title. */
.kanban__row { position: relative; display: flex; align-items: flex-start; gap: var(--sp-3); padding-block: var(--sp-2); line-height: var(--lh-snug); }
.kanban__row + .kanban__row { border-top: 1px solid var(--color-border); }
.kanban__row .task__check { z-index: 2; }
.kanban__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kanban__title { line-height: var(--lh-snug); overflow-wrap: anywhere; }
.kanban__title a { color: inherit; text-decoration: none; }
.kanban__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.kanban__title a:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--r-sm); }
.kanban__meta { display: flex; flex-wrap: wrap; gap: 0 var(--sp-1); font-size: var(--fs-xs); color: var(--color-text-muted); }
.kanban__meta > span + span::before { content: "·"; margin-right: var(--sp-1); }
.kanban__late { color: var(--color-danger-ink); font-weight: var(--fw-semibold); }
.kanban__amount { flex: none; font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: hover) { .kanban__row:has(a):hover .kanban__title a { text-decoration: underline; text-underline-offset: 2px; } }

/* Guests: one line of totals, one row per household */
.guest-line { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); font-size: var(--fs-sm); color: var(--color-text-muted); }
.guest-line b { color: var(--color-text); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.guest-line--yes b { color: var(--color-success-ink); }
.guest-line--pending b { color: var(--color-warning-ink); }
.ctl-more { margin-left: auto; }
.hh-list { background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 0 var(--sp-2) 0 var(--sp-4); }
.hh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); min-height: var(--row); padding: var(--sp-2) 0; }
.hh + .hh { border-top: 1px solid var(--color-border); }
.hh__main { flex: 1 1 10rem; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.hh__name { font-weight: var(--fw-semibold); }
.hh__meta { font-size: var(--fs-xs); color: var(--color-text-muted); }

/* Calm rules (declutter step 4-5): menus, labels, rows */
.menu__panel .menu__danger { color: var(--color-danger-ink, var(--color-danger)); }
.menu__panel form { display: contents; }
.btn--icon.btn--sm { width: 36px; min-height: 36px; }
.table--stack td::before, .stat__label { text-transform: none; letter-spacing: 0; }
.list__row { padding-block: var(--sp-3); }
.section__title a { color: inherit; text-decoration: none; }
@media (hover: hover) { .section__title a:hover { color: var(--color-accent); } }

/* Payment plan: only the fields that apply */

.pin-detail__foot { align-items: center; }

/* Boards as cover strips; event day-of row; hero opens its event */
.board-strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(42%, 11rem); gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: var(--sp-1); }
.board-strip::-webkit-scrollbar { display: none; }
.board-strip > .board-card { scroll-snap-align: start; }
@container app (min-width: 48rem) { .board-strip { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } }
.board-card__mosaic--empty { background: var(--color-surface-alt); box-shadow: none; }
/* The day-of tiles share the row: two across on a phone, so none hides off the edge. */
.dayof { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: var(--sp-2); }
.dayof::-webkit-scrollbar { display: none; }
.dayof__tile { flex: 0 0 auto; min-width: 6.5rem; display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3); border-radius: var(--r-md); background: var(--color-surface); box-shadow: var(--shadow-1); color: inherit; text-decoration: none; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.dayof__tile small { font-weight: var(--fw-regular, 400); color: var(--color-text-muted); font-size: var(--fs-xs); }
.dayof__tile { --icon: var(--icon-lg); --icon-stroke: 1.85; }
.dayof__tile .icon { color: var(--color-accent); }

/* Household page: answers per event on one wrapping line */
.hh__answers { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-1); font-size: var(--fs-sm); }
.card + .section, .card + section.section { margin-top: var(--sp-6); }

/* A text link-button that still gets a 44 px tap target without changing the line (review L8). */
.link-button--tap { display: inline-block; padding-block: 11px; margin-block: -11px; }

/* Household edit: one card per guest, one field per line on a phone. */
#edit { scroll-margin-top: calc(var(--tap) + var(--sp-4)); }
.guest-cards { display: flex; flex-direction: column; gap: var(--sp-3); }
.guest-card { display: grid; gap: var(--sp-2); padding: var(--sp-4); margin: 0; border: 0;
  background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.guest-card__invites { border: 0; margin: 0; padding: 0; display: grid; }
.guest-card__invites .check { min-height: 0; padding-block: 6px; }
/* The X that removes one guest: top right of their card, on its own row. */
/* One rule (audit I43): a plain small icon button at the card's top right, in the danger ink. */
.guest-card__remove { justify-self: end; grid-column: 1 / -1; --btn-fg: var(--color-danger-ink); }
.add-guest > summary { list-style: none; width: fit-content; }
.add-guest > summary::-webkit-details-marker { display: none; }
.add-guest[open] > summary { display: none; }
@container app (min-width: 48rem) {
  .guest-card { grid-template-columns: 1fr 1fr; column-gap: var(--sp-4); }
  .guest-card > .check, .guest-card__invites { grid-column: 1 / -1; }
  .guest-card__invites { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
}

/* Section pages in the home look: lists become columns of cards on a wide screen. */
@container app (min-width: 56rem) {
  .list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: var(--sp-3);
    padding: 0; background: none; box-shadow: none; }
  .list--grid > .list__row { padding: var(--sp-3) var(--sp-4); border: 0; border-radius: var(--r-md); background: var(--color-surface); box-shadow: var(--shadow-1); }
  .hh-list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: var(--sp-3);
    padding: 0; background: none; box-shadow: none; }
  .hh-list--grid > .hh { padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-radius: var(--r-md); background: var(--color-surface); box-shadow: var(--shadow-1); }
  .hh-list--grid > .hh + .hh { border-top: 0; }
  .timeline__group:not(details) { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: var(--sp-3); }
  .timeline__group:not(details) > .timeline__heading, .timeline__group > .timeline__more { grid-column: 1 / -1; }
  .timeline__group > .timeline__more[open] { display: grid; grid-template-columns: inherit; gap: var(--sp-3); }
  .timeline__group > .timeline__more[open] > summary { grid-column: 1 / -1; }
}
/* A table in a scrolling wrapper sticks inside the wrapper, not the page: the top-bar
   offset there pushed the header down over the first row (budget's first category). */
.table-wrap .table thead th { top: 0; }

/* ---------- Board canvas (ADR-0012) ----------
   app.js turns a board's grid into a sheet that pans and zooms. Pins and the sheet move with
   transforms only; nothing here animates position, so a drag follows the pointer exactly. */
.board-head__bar .view-switch { grid-auto-columns: minmax(5.5rem, auto); }
.canvas {
  position: relative; overflow: hidden; isolation: isolate;
  height: max(26rem, calc(100dvh - 17rem));
  border-radius: var(--r-lg); background: var(--color-paper) var(--paper-texture) 0 0 / 160px 160px; box-shadow: var(--shadow-inset);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: contain; cursor: grab;
}
@container app (min-width: 62rem) { .canvas { height: max(30rem, calc(100dvh - 15rem)); } }
.canvas.is-panning { cursor: grabbing; }
.canvas__world { position: absolute; left: 0; top: 0; width: 4000px; height: 3000px; transform-origin: 0 0; }
/* A board is a blush sheet with a fine grain (Kwabena, 2026-11-25); the dotted grid is gone.
   app.js shifts the grain with the pan; it keeps its size at every zoom. */
.canvas .pin {
  position: absolute; left: 0; top: 0; width: 220px; margin: 0;
  padding: var(--sp-2); border-radius: var(--r-lg); background: var(--color-surface); box-shadow: var(--shadow-1);
  cursor: grab; touch-action: none;
  transition: box-shadow var(--dur-2) var(--ease-out);
}
.canvas .pin[data-move] { cursor: grab; }
.canvas .pin:not([data-move]) { cursor: default; }
.canvas .pin.is-lifted { cursor: grabbing; box-shadow: var(--shadow-3), 0 0 0 2px var(--color-accent); }
.canvas.is-dragging .pin:not(.is-lifted) { pointer-events: none; }
.canvas .pin img { -webkit-user-drag: none; }
.canvas .pin:focus-within { box-shadow: var(--shadow-2), 0 0 0 2px var(--color-focus); }
/* Resizing (ADR-0012 amendment): app.js sets each pin's width; a corner handle drags it. The
   handle shows on hover or focus with a mouse, and on the lifted or selected pin on touch. Its
   hit area is larger than the dot it draws, so a finger can find it. */
.canvas__resize { position: absolute; right: -10px; bottom: -10px; z-index: 3; width: 36px; height: 36px;
  display: grid; place-items: center; cursor: nwse-resize; visibility: hidden; touch-action: none; }
.canvas__resize::before { content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-surface); box-shadow: var(--shadow-2), 0 0 0 2px var(--color-accent); }
@media (pointer: coarse) { .canvas__resize { width: 48px; height: 48px; right: -16px; bottom: -16px; } }
.canvas .pin.is-lifted > .canvas__resize, .canvas .pin.is-selected > .canvas__resize,
.canvas .pin:focus-within > .canvas__resize { visibility: visible; }
@media (hover: hover) and (pointer: fine) { .canvas .pin[data-move]:hover > .canvas__resize { visibility: visible; } }
.canvas .pin.is-selected:not(.is-lifted) { box-shadow: var(--shadow-2), 0 0 0 2px var(--color-accent); }
.canvas__tools { position: absolute; right: var(--sp-3); bottom: var(--sp-3); z-index: 2; display: flex; gap: var(--sp-1);
  padding: 4px; border-radius: var(--r-md); background: var(--color-surface); box-shadow: var(--shadow-2); }
.canvas__btn { min-width: 40px; min-height: 40px; font-size: var(--fs-base); }
.canvas__status { position: absolute; left: var(--sp-3); bottom: var(--sp-3); z-index: 2; max-width: calc(100% - 12rem);
  font-size: var(--fs-sm); color: var(--color-danger-ink); }
.canvas__status:empty { display: none; }
.canvas__status:not(:empty) { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--color-danger-soft); }
@media (prefers-reduced-motion: reduce) { .canvas .pin { transition: none; } }
/* The layout switch wraps under the board actions on a narrow screen instead of overflowing. */
.board-head__bar { flex-wrap: wrap; row-gap: var(--sp-2); }

/* Votes on a pin card: your love / not-for-us pair, then everyone else's as initials. */
.pin__votes { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin-top: var(--sp-1); font-variant-numeric: tabular-nums; --icon: var(--icon-xs); --icon-stroke: 2.5; }
.vote-btns--sm { gap: var(--sp-1); }
.vote-btns--sm .vote-btn { position: relative; min-width: 32px; min-height: 32px; padding: 0; }
.vote-btns--sm .vote-btn::after { content: ""; position: absolute; inset: -6px; }  /* a 44px tap target */
.pin__vote { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); }
.pin__vote .avatar { --av: 20px; font-size: 10px; box-shadow: none; }
.pin__vote--love .icon { color: var(--color-accent); }
.pin__vote--nope .icon { color: var(--color-text-muted); }
/* Above the card's stretched link (.pin__link::after), as the star is, so a vote is not a click
   through to the pin's page. */
.pin__votes { position: relative; z-index: 2; }
/* Card icons are tinted elsewhere; a vote button's icon takes the button's colour (white when
   pressed), or the pressed heart vanishes into its own fill. */
.pin__votes .vote-btn svg { color: inherit; }
/* Vote totals: in the couple's buttons, and as plain counts for everyone else. */
.vote-btns--sm .vote-btn { gap: var(--sp-1); padding: 0 var(--sp-2); --icon: var(--icon-xs); --icon-stroke: 2.5; }
.vote-btn__count { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.pin__tally { display: inline-flex; gap: var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.pin__tally > span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.pin__tally-love .icon { color: var(--color-accent); }

/* Board covers: the board's canvas, shrunk (ADR-0012). The SVG draws each pin where it sits on
   the canvas, on the same paper. */
.board-card__sheet { display: block; background: var(--color-paper) var(--paper-texture) 0 0 / 160px 160px; }
.board-card__sheet > svg { width: 100%; height: 100%; display: block; }
.mini-pin { fill: var(--color-surface); stroke: color-mix(in srgb, var(--color-text) 8%, transparent); stroke-width: 2px; }
.mini-pin__line { fill: color-mix(in srgb, var(--color-text) 14%, transparent); }
.mini-pin__face--1 { fill: var(--tint-1-bg); } .mini-pin__face--2 { fill: var(--tint-2-bg); } .mini-pin__face--3 { fill: var(--tint-3-bg); }
.mini-pin__face--4 { fill: var(--tint-4-bg); } .mini-pin__face--5 { fill: var(--tint-5-bg); } .mini-pin__face--6 { fill: var(--tint-6-bg); }
.board-card__sheet > svg { background: none; grid-row: auto; }

/* Account pages (Export, People, Settings, Share links): the same treatment as the plan pages.
   Cards sit in columns on a wide screen instead of running edge to edge; forms keep a
   readable width. */
.card-cols { display: grid; gap: var(--sp-3); }
@container app (min-width: 48rem) { .card-cols { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); align-items: stretch; } }
.card-cols > .card { display: flex; flex-direction: column; }
.card-cols > .card > .form-actions { margin-top: auto; padding-top: var(--sp-2); }
.form--narrow { max-width: 28rem; }
.form--wide-cap { max-width: 48rem; }
.member { padding: var(--sp-2) var(--sp-4); }
.member .list__row { border-top: 0; }
.member .list__row--sub { border-top: 1px solid var(--color-border); }
.settings-grid { display: grid; gap: var(--sp-4); }
@container app (min-width: 56rem) { .settings-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
.settings-grid__full { grid-column: 1 / -1; }
.card--danger { box-shadow: var(--shadow-1), inset 0 0 0 1px var(--color-danger-soft); }

/* ---------- Foundations (UI audit 2026-11-19, PR 1) ----------
   The audit's root causes, fixed once here instead of page by page. */

/* 1. Short fields get a size of their own. A number, date, time or amount box is as wide as
   what goes in it, not as wide as the row. */
.input[type="number"] { width: 7rem; max-width: 100%; font-variant-numeric: tabular-nums; }
.input[type="date"] { width: 12rem; max-width: 100%; }
.input[type="time"] { width: 8.5rem; max-width: 100%; }
.input--lg[type="date"] { width: 14rem; }
.input-affix--money { width: 14rem; max-width: 100%; }
.input--short { width: 7rem; max-width: 100%; }
/* A row of fields packs from the left: text fields share the room, short fields keep their
   size, and everything wraps to one per line on a phone when it has to. */
.field-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-4); }
.field-row > * { flex: 1 1 14rem; min-width: 0; }
.field-row > :has(> .input[type="number"], > .input[type="date"], > .input[type="time"],
  > .input-affix--money, > .input--short) { flex: 0 1 auto; }
.field-row--estimate { gap: var(--sp-3); }
/* A form that is one job reads at a readable width, not across a 1400px screen. */
.form:not(.form--wide-cap):not(:has(.guest-cards, table, .canvas, .card-cols)) { max-width: 44rem; }

/* 2. One section header: the title, its count right beside it, the action at the end. */
.section__head, .timeline__heading { justify-content: flex-start; flex-wrap: wrap; column-gap: var(--sp-2); }
.section__head > :is(a, button, form, details, .btn):last-child:not(:first-child) { margin-left: auto; }
.section__count, .section__head > span:not(.section__link), .timeline__heading > span, .agenda__head > span, .seat-group > span {
  display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.5rem; padding: 0 var(--sp-2);
  border-radius: var(--r-pill); background: var(--color-surface-alt); color: var(--color-text-muted);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; align-self: center; }

/* 3. Anything that opens shows that it opens: a chevron that turns, and a 44px target. */
.fold__summary, .timeline__fold > summary, .grants > summary {
  list-style: none; cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); }
.fold__summary::-webkit-details-marker, .timeline__fold > summary::-webkit-details-marker, .grants > summary::-webkit-details-marker { display: none; }
.fold__summary::after, .timeline__fold > summary::after, .grants > summary::after {
  content: ""; flex: none; width: var(--icon-sm); height: var(--icon-sm); margin-left: 0;
  /* Drawn as a mask in the text-subtle colour, so it follows the theme (audit I12, C14). */
  background: var(--color-text-subtle); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236E6E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236E6E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--dur-2) var(--ease-out); }  /* every caret turns alike (audit M21) */
[open] > .fold__summary::after, .timeline__fold[open] > summary::after,
.grants[open] > summary::after { transform: rotate(180deg); }
.timeline__fold > summary::after, .timeline__fold[open] > summary::after { content: ""; font-size: 0; }
.grants > summary { width: fit-content; }
@media (hover: hover) { .fold__summary:hover, .timeline__fold > summary:hover h2, .grants > summary:hover { color: var(--color-accent); } }
@media (prefers-reduced-motion: reduce) { .fold__summary::after { transition: none; } }

/* 4. Buttons look like buttons. A secondary or ghost button standing alone has an edge; an
   icon button has a resting background, so "…" and the like read as controls. */
.btn--ghost { --btn-bd: var(--color-border-strong); }
.menu__panel .btn--ghost, .action-bar .btn--ghost { --btn-bd: transparent; }
.btn--icon { --btn-bg: var(--color-surface-alt); }
.topbar .btn--icon, .tabbar .btn--icon { --btn-bg: transparent; }
@media (hover: hover) { .btn--icon:hover { --btn-bg: color-mix(in srgb, var(--color-surface-alt) 60%, var(--color-border-strong)); } }
/* The star on a photo stays white when hovered; the grey hover made its icon 1.7:1 in dark (audit C2). */
@media (hover: hover) { .btn--icon.btn--on-media:hover { --btn-bg: #FFFFFF; } }
/* One "⋯": the small icon button is drawn like the small outlined buttons it sits beside
   (Edit, Add guest), not as a grey disc with a bigger icon (audit I6, B1, B2, B3). */
.btn--icon.btn--sm { --btn-bg: transparent; --btn-bd: var(--color-border-strong); border-color: var(--btn-bd); border-radius: var(--r-sm); }
@media (hover: hover) { .btn--icon.btn--sm:hover { --btn-bg: var(--color-surface-alt); } }
/* A cost line's bin stays bare and small, so every line keeps one height (audit I14). */

/* White on the dark-mode red was 2.96:1 (audit C1): each theme names its own ink and hover. */
.btn--danger.btn--solid { --btn-bg: var(--color-danger); --btn-fg: var(--color-on-danger); --btn-bd: var(--color-danger); }
@media (hover: hover) { .btn--danger.btn--solid:hover { --btn-bg: var(--color-danger-hover); --btn-bd: var(--color-danger-hover); } }

/* 5. Classes the templates used that were never defined. */
.chip--success { background: var(--color-success-soft); color: var(--color-success-ink); }
.mt-3 { margin-top: var(--sp-3); } .mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }
.tabbar--2 { --tabs: 2; }
.input--sm { min-height: 40px; padding: var(--sp-2) var(--sp-3); }
.pin__tally-nope .icon { color: var(--color-text-muted); }
.cal__dot--task { background: var(--color-text-muted); }
.ph { background: var(--color-surface-alt); }
.ph-1, .ph-7 { background: var(--tint-1-bg); } .ph-2, .ph-8 { background: var(--tint-2-bg); }
.ph-3, .ph-9 { background: var(--tint-3-bg); } .ph-4, .ph-10 { background: var(--tint-4-bg); }
.ph-5, .ph-11 { background: var(--tint-5-bg); } .ph-6, .ph-12 { background: var(--tint-6-bg); }

/* Contrast: the sign-in tagline is the display serif, which only ships at 400 (no faux bold). */
.auth__tag { font-weight: 400; }

/* ---------- UI audit area A (PR 2): home, events, timeline, export ---------- */
/* The top-bar back link names where it goes, one tap target ("‹ Vision Board"). */
.topbar__back { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--tap); min-width: 0;
  padding: 0 var(--sp-2) 0 0; color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  text-decoration: none; flex: 1 1 auto; }
.topbar__back > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__back { --icon: var(--icon-xl); --icon-stroke: 1.75; }
@media (hover: hover) { .topbar__back:hover { color: var(--color-accent); } }

/* Task date: one choice, each with its own short fields. */
.when { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
.when__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.when__row > .check { min-width: 7.5rem; }
/* "○ [14] days before [event ▾]" on one line, even on a phone: the radio, a narrow number
   field, the words, and the event picker taking what is left (a long event name is cut
   short). The fields stay at 16px, or iOS zooms the page when one is tapped. */
.when__row--before { flex-wrap: nowrap; gap: 6px; }
.when__row--before > .check { min-width: 0; flex: none; margin-right: 6px; }
.when__row .when__days { flex: none; width: 3.25rem; padding-inline: var(--sp-1); text-align: center; appearance: textfield; -moz-appearance: textfield; }
.when__days::-webkit-inner-spin-button, .when__days::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.when__unit { flex: none; font-size: var(--fs-xs); color: var(--color-text-muted); white-space: nowrap; }
.when__row .when__event { flex: 1 1 auto; width: auto; min-width: 0; padding-left: var(--sp-2); padding-right: 28px; background-position: right 6px center; text-overflow: ellipsis; }
.when__row:has(input[type="radio"]:not(:checked)) > :not(.check) { opacity: 0.55; }
.when__row:has(input[type="radio"]:not(:checked)):focus-within > :not(.check) { opacity: 1; }

/* Timeline controls: the filter says what is shown and that it opens; a filter clears in one tap. */
.ctl-filter > summary { max-width: none; }
.ctl-filter__label strong { font-weight: var(--fw-bold); }
.ctl-filter__chev { transition: transform var(--dur-2) var(--ease-out); }
.ctl-filter[open] .ctl-filter__chev { transform: rotate(180deg); }
.filter-clear { text-decoration: none; min-height: 36px; position: relative; }
.filter-clear::after { content: ""; position: absolute; inset: -4px 0; }
.filter-clear { --icon: var(--icon-sm); --icon-stroke: 2.25; }
.segmented__label { display: none; }
@container app (min-width: 62rem) {
  .segmented--icons { grid-auto-columns: auto; }
  .segmented--icons .segmented__btn { padding: 0 var(--sp-3); }
  .segmented__label { display: inline; }
}
/* A payment row's wallet sits in a round well, so it does not read as a tick box. */
.task__check--icon { width: 32px; height: 32px; margin: 0; border-radius: 50%; background: var(--color-info-soft); color: var(--color-info-ink); }

/* Calendar: controls beside the month they change; titles in the day on a laptop. */
.cal__nav { justify-content: center; }
.cal__title { flex: none; min-width: 12rem; }
.filters { align-items: center; }
.cal__item, .cal__item-more { display: none; }
@container app (min-width: 62rem) {
  .cal__day { min-height: 96px; }
  .cal__marks { display: none; }
  .cal__item { display: block; font-size: var(--fs-xs); line-height: 1.3; padding: 1px 4px; margin: 0 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--color-text-muted);
    background: var(--color-surface-alt); border-radius: 0 3px 3px 0; }
  .cal__item--payment { border-left-color: var(--color-info-ink); }
  .cal__item--late { border-left-color: var(--color-danger); color: var(--color-danger-ink); }
  .cal__item-more { display: block; font-size: var(--fs-xs); color: var(--color-text-muted); padding-left: 4px; }
}

/* Calendar, lighter: no box or cell borders, hairlines between weeks only, items as a dot
   and a title instead of grey chips, and the picked day's items as plain rows. */
.cal { border: 0; border-radius: 0; background: none; overflow: visible; }
.cal__dow { text-align: left; padding: 0 0 var(--sp-1) 6px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--color-text-muted); }
.cal__day { border-left: 0; padding: 6px 4px 8px; border-radius: var(--r-md); }
.cal__day--out { background: none; }
.cal__day--out .cal__num { color: var(--color-text-subtle); font-weight: 400; }
.cal__day--selected { background: var(--color-surface-alt); }
.cal__day--selected:not(.cal__day--today) .cal__num { box-shadow: inset 0 0 0 1.5px var(--color-accent); }
.cal__rows { max-width: 48rem; }
@container app (min-width: 62rem) {
  .cal__item { border-left: 0; background: none; border-radius: 0; padding: 0 2px; margin: 0; color: var(--color-text); }
  .cal__item::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; vertical-align: 1px; border-radius: 50%; background: var(--color-text-muted); }
  .cal__item--payment::before { background: var(--color-info-ink); }
  .cal__item--late { color: var(--color-danger-ink); }
  .cal__item--late::before { background: var(--color-danger); }
}

/* Budget table without its card: hairlines, no grey header band, like the timeline. */
.table-wrap--plain { background: none; box-shadow: none; border-radius: 0; }
.table-wrap--plain .table thead th { background: none; border-bottom: 1px solid var(--color-border); font-weight: 400; }
.table-wrap--plain .table tfoot td, .table-wrap--plain .table tfoot th { background: none; border-top-width: 1px; }
/* Categories with nothing booked: a name and its estimate, not a row of dashes. */
.todo-cats { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.todo-cats li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding-block: var(--sp-2); border-top: 1px solid var(--color-border); }
.todo-cats li:first-child { border-top: 0; }
.todo-cats__est { font-variant-numeric: tabular-nums; white-space: nowrap; }
.todo-cats__label, .todo-cats__none { font-size: var(--fs-xs); color: var(--color-text-muted); }

/* Vendors list: plain rows like the timeline. Name and its line under it on the left, the
   amount on the right; no letter tile and no "Booked" badge under a "Booked" heading. */

/* Vendor page: a reading width on desktop, so a cost's name, amount and buttons stay
   close together; and an amount in a card heading never shortens to "12,500.…". */

.kanban__go { flex: none; align-self: center; width: 18px; height: 18px; color: var(--color-text-muted); }

/* Guests: households as one column of rows at a reading width, no box round the list or
   round each household; a household's guests are named under it, not just counted. */
.hh-list--plain { max-width: 48rem; padding: 0; background: none; box-shadow: none; border-radius: 0; }

/* Vision Board: progress up top, each event's heading on one line with its decided count,
   picture tiles only for boards with ideas, and the empty boards as one row of name chips. */
.vb-progress { display: grid; gap: var(--sp-1); max-width: 24rem; margin-top: var(--sp-2); }
.vb-progress p { font-size: var(--fs-sm); color: var(--color-text-muted); }
.vb-progress progress { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border: 0; border-radius: var(--r-pill); background: var(--color-track); overflow: hidden; }
.vb-progress progress::-webkit-progress-bar { background: var(--color-track); }
.vb-progress progress::-webkit-progress-value { background: var(--color-success); }
.vb-progress progress::-moz-progress-bar { background: var(--color-success); }
.vb-sec { padding-block: var(--sp-4) var(--sp-5); border-top: 1px solid var(--color-border); }
/* The event's name takes the room and wraps; "N of M decided" keeps its place on the right of
   the first line instead of dropping onto a line of its own on a phone (audit B6, I25). */
/* A long event name wraps as text, with the date and chevron kept together after its last
   word, and the count lines up with the name's first line (not a chevron left on a line of
   its own). */
.vb-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.vb-head__link { display: block; min-width: 0; color: inherit; text-decoration: none; }
.vb-head__link .section__title { display: inline; }
.vb-head__meta { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; vertical-align: baseline; }
.vb-head__link { --icon: var(--icon-sm); --icon-stroke: 2.25; }
.vb-head__link .icon { color: var(--color-text-muted); }
.vb-head__date { font-size: var(--fs-sm); color: var(--color-text-muted); white-space: nowrap; }
.vb-head__count { font-size: var(--fs-sm); color: var(--color-text-muted); white-space: nowrap; }
@media (hover: hover) { .vb-head__link:hover .section__title { color: var(--color-accent); } }
.vb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.vb-chips__label { font-size: var(--fs-xs); color: var(--color-text-muted); margin-right: var(--sp-1); }
.vb-chips__none { font-size: var(--fs-sm); color: var(--color-text-muted); margin-right: var(--sp-1); }
.vb-chip { position: relative; display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-pill); background: var(--color-surface-alt); color: var(--color-text); font-size: var(--fs-sm); text-decoration: none; }
.vb-chip--add { background: none; color: var(--color-accent-ink); font-weight: var(--fw-semibold); padding-inline: var(--sp-2); }
.vb-chip::after { content: ""; position: absolute; inset: -4px 0; }
.vb-chip--add { --icon: var(--icon-sm); --icon-stroke: 2.25; }
@media (hover: hover) { .vb-chip:hover { box-shadow: inset 0 0 0 1px var(--color-accent); } }
.vb-chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* Board: the vendor brief link sits under the pins, not between the filters and them; on a
   phone the canvas zoom tools are a bar above the canvas instead of floating over pins. */
.brief { max-width: 40rem; margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--color-border); }
.canvas__tools.canvas__tools--bar { position: static; justify-content: flex-end; margin-bottom: var(--sp-2); padding: 0; background: none; box-shadow: none; }

/* Pin page: the edit fold reads as a quiet link, not a heading. */
.fold__summary.fold__summary--action { font-size: var(--fs-sm); }

/* Seating: one reading width for tables and seats, like the timeline. */
.seating { max-width: 48rem; }

/* People: members and open invites as plain rows at a reading width, not a grid of cards;
   a family member who can see no boards says so instead of a quiet "0 of 32". */
.member-list, .plain-rows { max-width: 48rem; }
.member-list > .member, .member-list > .list__row, .plain-rows > .list__row { padding-inline: 0; border-top: 1px solid var(--color-border); }
.member-list > :first-child, .plain-rows > :first-child { border-top: 0; }
.member-list > .member { padding-block: 0; }
/* Share links: a badge only when a link needs attention (expired, used, off); the rest is
   one wrapping line of facts, so "Not used yet" is never cut off on a phone. */
.link-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.link-meta > span + span::before { content: "·"; margin: 0 var(--sp-2); }
.grants > summary { flex-wrap: wrap; row-gap: var(--sp-1); }
.grants__none { white-space: nowrap; padding: 2px var(--sp-2); border-radius: var(--r-pill); background: var(--color-warning-soft); color: var(--color-warning-ink); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }

/* Export files: the descriptions say what each file leaves out ("Pictures are listed, not
   included"), so they wrap instead of being cut to one line. */
.export-files .list__meta { white-space: normal; overflow: visible; }

/* RSVP: "Joyfully yes" and "Sadly no" share one height even when "yes" wraps, and the
   plus-one waits until that person says yes. Without :has the fields simply stay shown. */
.choices--2 > .choice { display: flex; }
.choices--2 > .choice > .choice__card { flex: 1; }
.rsvp-guest:not(:has(input[value="yes"]:checked)) .rsvp-guest__extra { display: none; }

/* RSVP thank-you: what was saved, per event, so a guest need not reopen the form to check. */
.rsvp-summary { display: grid; gap: var(--sp-4); width: 100%; max-width: 32rem; margin: var(--sp-5) auto 0; text-align: left; }
.rsvp-summary__name { font-size: var(--fs-base); font-weight: var(--fw-semibold); margin-bottom: var(--sp-1); }
.rsvp-summary__guests { list-style: none; margin: 0; padding: 0; }
.rsvp-summary__guests li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--sp-2); padding-block: var(--sp-2); border-top: 1px solid var(--color-border); }
.rsvp-summary__guests li > span:first-child { flex: 1; }
.rsvp-summary__guests small { flex-basis: 100%; font-size: var(--fs-xs); }

/* Seating: who still needs a seat, then who has one, each with a count; a guest's
   plus-one wraps rather than being cut off on a phone. */
.seat-group { display: flex; align-items: baseline; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.seat-rows .list__meta { white-space: normal; overflow: visible; }
.seat-rows .select { flex: none; width: 10.5rem; max-width: 56%; }

/* Checklist lines are buttons (one POST each, no JavaScript), so they draw their own tick
   box: without this they showed as grey browser buttons with no box at all. */
button.check { position: relative; width: 100%; margin: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.check::before { content: ""; flex: none; width: 24px; height: 24px; box-sizing: border-box; border: 2px solid var(--color-border-strong); border-radius: 7px; background: var(--color-surface); }
button.check[aria-pressed="true"]::before { background: var(--color-accent); border-color: var(--color-accent); }
button.check[aria-pressed="true"]::after { content: ""; position: absolute; left: 6px; top: 18px; width: 11px; height: 6px; border: 2.5px solid var(--color-on-accent); border-top: 0; border-right: 0; transform: rotate(-45deg); }
button.check:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--r-sm); }

/* Run sheet on a phone: each line stacks (time beside it, then who, vendor and note) instead
   of five squeezed columns with the note off the edge. Printing keeps the table. */
@container app (max-width: 40rem) {
  .table-wrap:has(> .runsheet) { overflow: visible; }
  .runsheet, .runsheet tbody { display: block; }
  .runsheet thead { display: none; }
  .runsheet tr { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; column-gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
  .runsheet td { display: block; padding: 0; border: 0; grid-column: 2; }
  .runsheet td:empty { display: none; }
  .runsheet td[data-label="Time"] { grid-column: 1; grid-row: 1 / span 4; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
  .runsheet td[data-label="What"] { font-weight: var(--fw-semibold); }
  .runsheet td:is([data-label="Who"], [data-label="Vendor"], [data-label="Note"]) { font-size: var(--fs-xs); color: var(--color-text-muted); }
  .runsheet td.no-print { grid-column: 3; grid-row: 1 / span 4; align-self: start; }
}

/* Forms are 44rem wide, but a dropdown or a name of a few words does not need all of it:
   short fields stop at 28rem on a wide screen, long ones (notes, links) keep the full width.
   A phone is narrower than the cap, so nothing changes there. */
.form .field > .select,
.form .field > .input:is([maxlength="60"], [maxlength="80"], [maxlength="100"], [maxlength="120"]):not(.input--lg) { max-width: 28rem; }

/* Canvas resizing on one axis. Touch: three visible handles on the lifted pin, a bar on the
   right edge (width), a bar on the bottom edge (picture height) and the corner dot (both). */
.canvas__resize--e { top: 50%; bottom: auto; right: -12px; width: 24px; height: 56px; margin-top: -28px; cursor: ew-resize; }
.canvas__resize--s { left: 50%; right: auto; bottom: -12px; width: 56px; height: 24px; margin-left: -28px; cursor: ns-resize; }
.canvas__resize--e::before { width: 6px; height: 28px; border-radius: 3px; }
.canvas__resize--s::before { width: 28px; height: 6px; border-radius: 3px; }
.canvas__resize--w, .canvas__resize--n, .canvas__resize--nw, .canvas__resize--ne, .canvas__resize--sw { display: none; }
@media (pointer: coarse) {
  .canvas__resize--e { right: -16px; width: 32px; height: 64px; margin-top: -32px; }
  .canvas__resize--s { bottom: -16px; width: 64px; height: 32px; margin-left: -32px; }
}
/* Mouse: the whole border resizes. Nothing is drawn; the cursor shows it over an edge or a
   corner, as in a desktop window. Strips straddle the border, corners sit on top of them. */
@media (hover: hover) and (pointer: fine) {
  .canvas .pin[data-move] > .canvas__resize { display: block; visibility: visible; margin: 0; }
  .canvas .pin[data-move] > .canvas__resize::before { content: none; }
  .canvas .pin > .canvas__resize--e, .canvas .pin > .canvas__resize--w { top: 10px; bottom: 10px; width: 12px; height: auto; }
  .canvas .pin > .canvas__resize--e { left: auto; right: -6px; cursor: ew-resize; }
  .canvas .pin > .canvas__resize--w { right: auto; left: -6px; cursor: ew-resize; }
  .canvas .pin > .canvas__resize--n, .canvas .pin > .canvas__resize--s { left: 10px; right: 10px; width: auto; height: 12px; }
  .canvas .pin > .canvas__resize--n { bottom: auto; top: -6px; cursor: ns-resize; }
  .canvas .pin > .canvas__resize--s { top: auto; bottom: -6px; cursor: ns-resize; }
  .canvas .pin > .canvas__resize--nw, .canvas .pin > .canvas__resize--ne,
  .canvas .pin > .canvas__resize--sw, .canvas .pin > .canvas__resize--se { width: 16px; height: 16px; z-index: 4; }
  .canvas .pin > .canvas__resize--nw { top: -6px; left: -6px; right: auto; bottom: auto; cursor: nwse-resize; }
  .canvas .pin > .canvas__resize--se { bottom: -6px; right: -6px; top: auto; left: auto; cursor: nwse-resize; }
  .canvas .pin > .canvas__resize--ne { top: -6px; right: -6px; left: auto; bottom: auto; cursor: nesw-resize; }
  .canvas .pin > .canvas__resize--sw { bottom: -6px; left: -6px; top: auto; right: auto; cursor: nesw-resize; }
}
/* A pin with a picture height: the picture fills that height and is cropped, never stretched. */
.canvas .pin.has-h .pin__media { height: var(--media-h); aspect-ratio: auto; }
.canvas .pin.has-h .pin__img { display: block; height: 100%; max-height: none; aspect-ratio: auto; }
/* The zoom tools are small: they help, they should not cover the pins. */
.canvas__tools { padding: 2px; gap: 2px; }
.canvas__tools { --icon: var(--icon-sm); --icon-stroke: 2.25; }
.canvas__tools .canvas__btn { min-width: 32px; min-height: 32px; height: 32px; padding: 0 var(--sp-2); font-size: var(--fs-xs); line-height: 1; }
.canvas__tools .canvas__btn::after { inset: -6px; }
/* How many pins are outside the view; a tap pans to the nearest. */
.canvas__more { position: absolute; left: 50%; top: var(--sp-3); z-index: 2; transform: translateX(-50%);
  min-height: 36px; padding: 0 var(--sp-3); border-radius: 999px; background: var(--color-surface); box-shadow: var(--shadow-2);
  font-size: var(--fs-xs); white-space: nowrap; }
.canvas__more[hidden] { display: none; }

/* Motion, a little (2026-11-20). Each one has a job: feedback on a tap, where something came
   from, or bridging a change that would otherwise jump. Transform, opacity and clip-path
   only; reduced motion shortens every animation to nothing (section 27), and app.js skips
   its own. Nothing moves on the canvas while dragging, on keyboard actions or in tables. */
/* Menus open from their button: a small scale and fade, closing at once. */
details.menu[open] > .menu__panel { animation: menu-in 160ms var(--ease-out); transform-origin: top right; }
details.menu[open] > .menu__panel--left, details.menu[open] > .menu__panel--flip { transform-origin: top left; }
details.menu[open] > .menu__panel--up { transform-origin: bottom right; animation-name: menu-in-up; }
@keyframes menu-in-up { from { opacity: 0; transform: scale(0.96) translateY(4px); } }
@keyframes menu-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
/* A task's tick fills with colour rather than snapping on. */
.task__check button { transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
/* The budget's paid bar draws in from the left when the page opens. */

/* Pins have no entrance of their own: the board is the screen opened most, and a ripple on
   every visit, chip tap and return from a pin only delayed reading it (audit M13). The page's
   own short fade is enough. Without one, ending the final-pick moment no longer restarts an
   entrance on every pin either (audit M2). */
/* Making a pin final is rare and worth a moment: its toast's ring swells once. */
.toast--final > svg { color: var(--color-success-on-inverse); animation: final-ring 520ms var(--ease-out) 200ms both; }
@keyframes final-ring { 0% { transform: scale(0.6) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: none; opacity: 1; } }

/* More motion (2026-11-20, second set). */
/* Switches: the chosen option's pill slides to its new place across the page load (the
   page's own cross-fade already runs; each switch names its pill once per page). */
.view-switch .segmented__btn[aria-current="true"] { view-transition-name: seg-layout; }
.segmented--icons .segmented__btn[aria-current="true"] { view-transition-name: seg-timeline; }
.plan-nav .segmented__btn[aria-current="true"] { view-transition-name: seg-plan; }
.pin-detail .segmented__btn[aria-pressed="true"] { view-transition-name: seg-status; }
::view-transition-group(seg-layout), ::view-transition-group(seg-timeline),
::view-transition-group(seg-plan), ::view-transition-group(seg-status) { animation-duration: 240ms; animation-timing-function: var(--ease-out); }
/* A busy save button: a small spinner, shown only once the save has taken a moment. */
.btn__spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  opacity: 0; animation: spin-in 160ms var(--ease-out) 250ms forwards, spin 700ms linear infinite; }
@keyframes spin-in { to { opacity: 0.8; } }
@keyframes spin { to { transform: rotate(360deg); } }
/* The RSVP thank-you: a tick that draws itself, once, as the page opens. */
.done-tick { width: 56px; height: 56px; margin-bottom: var(--sp-2); }
.done-tick circle { fill: var(--color-success-soft); transform-origin: 28px 28px; animation: tick-ring 320ms var(--ease-out) both; }
.done-tick path { fill: none; stroke: var(--color-success); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; animation: tick-draw 380ms var(--ease-out) 180ms both; }
@keyframes tick-ring { from { opacity: 0; transform: scale(0.8); } }
@keyframes tick-draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
/* A new plan's first page: what is on it rises in, a beat apart, under the welcome toast. */
body:has(.toast--welcome) #main > * { animation: welcome-in 480ms var(--ease-out) both; }
body:has(.toast--welcome) #main > :nth-child(2) { animation-delay: 80ms; }
body:has(.toast--welcome) #main > :nth-child(n+3) { animation-delay: 160ms; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(10px); } }
.toast--welcome > svg { color: var(--color-success-on-inverse); }
/* New wedding steps: the step just reached fills from the left instead of snapping on. */
.wizard__bar span { position: relative; overflow: hidden; }
.wizard__bar span.on:has(+ span:not(.on)), .wizard__bar span.on:last-child { background: var(--color-track); }
.wizard__bar span.on:has(+ span:not(.on))::after, .wizard__bar span.on:last-child::after {
  content: ""; position: absolute; inset: 0; background: var(--color-accent); transform-origin: left;
  animation: route-fill 360ms var(--ease-out) 120ms both; }

/* A small round + at the end of a section heading (Home's Events): the link before it takes
   the push to the right, so the two sit together. */

/* Event page: a plain invitation when there are no boards yet. */
.event-empty { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--r-lg); color: var(--color-text); text-decoration: none; }
.event-empty:hover { border-color: var(--color-accent); background: var(--color-surface); }
.event-empty > .icon { --icon: var(--icon-lg); --icon-stroke: 1.85; margin-block: calc((1lh - var(--icon)) / 2); color: var(--color-accent); }
.event-empty span { display: flex; flex-direction: column; gap: 2px; }
.event-empty small { color: var(--color-text-muted); font-size: var(--fs-sm); }

/* Guests' privacy (GDPR, 2026-11-20): a quiet line on the RSVP page, and a plain bulleted
   list of what removing their details deletes. */
.rsvp-privacy { margin-top: var(--sp-4); text-align: center; text-wrap: pretty; }
.rsvp-privacy a { white-space: nowrap; }
ul.bullets { list-style: disc; padding-left: 1.25rem; display: grid; gap: var(--sp-1); }

/* Privacy note: space between the paragraphs and lists inside one section. */
.legal section > * + * { margin-top: var(--sp-2); }

/* Print: the button needs JS, so without it the page says how to print instead. */
.print-only { display: none; }
@media print { .print-only { display: block; } }
.js .print-hint { display: none; }

/* An empty board invites ideas instead of looking like a picture that failed to load. */
.board-card__mosaic--empty { display: grid; place-items: center; background: var(--color-surface);
  border: 1.5px dashed var(--color-border-strong); }
.board-card__add { --icon: var(--icon-sm); --icon-stroke: 2.25; display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm);
  font-weight: var(--fw-semibold); color: var(--color-accent); }
.event-head__actions { flex: none; }
/* The undated group, opened, lays its cards out like the dated groups. */
.filters > .text-xs { flex: none; white-space: nowrap; }

/* ---------- UI audit area B (PR 3): Vision Board ---------- */
/* Compare: a card never grows past a readable width (B35). */
@container app (min-width: 48rem) { .compare__track { grid-template-columns: repeat(auto-fill, minmax(15rem, 18rem)); } }
.capture-what { display: grid; gap: var(--sp-3); }
.or-divider { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: .06em; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--color-border); }
ol.steps-list { list-style: decimal; padding-left: 1.25rem; }
.steps-list > li::marker { font-weight: var(--fw-semibold); color: var(--color-accent); }
.public__head .topbar__back { margin-bottom: var(--sp-3); }
/* Canvas: the help is visible; the zoom tools clear the phone tab bar (B9, B10). */
.canvas__help { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--color-text-muted); }
.canvas__btn { font-size: var(--fs-lg); line-height: 1; }
@container app (max-width: 40rem) {
  .canvas__tools { top: var(--sp-3); bottom: auto; }
  .board-head__bar .view-switch { grid-auto-columns: auto; }
  .board-head__bar .view-switch .segmented__btn { padding: 0 var(--sp-3); }
}
/* The shortlist star shows without hovering (B12). */
@media (hover: hover) { .pin__quick { opacity: 0.85; } }
/* Vote counts show only once someone has voted (B6). */
.vote-btn__count:empty { display: none; }
.only-mobile-inline { display: none; }
@container app (max-width: 40rem) { .only-desktop-inline { display: none; } .only-mobile-inline { display: inline; } }
/* Boards list: the event date sits beside its name (B1). */
/* Pin page: the edit fold looks like an action (B21). */
.fold__summary--action { color: var(--color-accent-ink); }
.fold__summary--action { --icon: var(--icon-sm); --icon-stroke: 2.25; }
/* Boards list: an empty board is smaller than one with pins, so content leads (B3). */
@container app (min-width: 48rem) { .board-card:has(.board-card__mosaic--empty) .board-card__mosaic { aspect-ratio: 2 / 1; } }
/* Decide: both choices on one row (B30). */
.action-bar > .btn { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; }
@container app (min-width: 62rem) { .action-bar > .btn { flex: 0 0 auto; } }
.section > .btn { align-self: flex-start; }

/* ---------- UI audit area C (PR 4): budget and vendors ---------- */
.table__caption { caption-side: top; text-align: right; padding: 0 0 var(--sp-2); font-size: var(--fs-xs); color: var(--color-text-muted); }

/* Lists: the amount lines up at the end; meta stays on one line (C8, C9). */
.list__amount, .list__end { flex: none; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; min-width: 7rem; }
.list__end-label { font-size: var(--fs-xs); color: var(--color-text-muted); }
.list__meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar--square { border-radius: var(--r-sm); flex: none; }
/* Estimates: one row per category: name, amount, then fixed slots for move and remove (C12, C15, C16). */
.est-head { display: grid; grid-template-columns: minmax(0, 1fr) 14rem 8.5rem; gap: var(--sp-3); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted); }
.est-list { display: grid; gap: var(--sp-3); }
.est-row { display: grid; grid-template-columns: minmax(0, 1fr) 14rem auto; gap: var(--sp-1) var(--sp-3); align-items: center; }
.est-row .input-affix--money { width: 100%; }
.est-row__tools { display: inline-flex; gap: var(--sp-1); }
.est-row__slot { display: inline-block; width: 36px; height: 36px; }
.est-row__locked { opacity: .35; cursor: not-allowed; }
.est-row__meta, .est-row > .field__error { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--color-text-muted); margin: 0; }
.est-row > .field__error { color: var(--color-danger-ink); }
@container app (max-width: 40rem) {
  .est-head { grid-template-columns: minmax(0, 1fr) 9.5rem; }
  .est-row { grid-template-columns: minmax(0, 1fr) 9.5rem; }
  .est-row__tools { grid-column: 1 / -1; justify-content: flex-end; }
}
.add-category .input { max-width: 24rem; }
/* Vendor page: contact as buttons (C33). */
.contact { margin-top: var(--sp-1); }

@container app (max-width: 40rem) {

  
  /* A paid payment has only its "⋯": it stays beside the amount, as on a wide screen, rather
     than alone on a line of its own (audit B7). */

}

.est-row__name { min-width: 0; }

@container app (max-width: 40rem) { .est-row .input-affix--money .input { font-size: var(--fs-base); } .est-row .input-affix__fix { padding-left: var(--sp-3); padding-right: var(--sp-2); } }

/* ---------- UI audit area D (PR 5): guests, seating, people, settings ---------- */
/* Sideways chip rows fade at the edge, so a cut chip reads as "more this way" (G5). */
@container app (max-width: 40rem) { .filters { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: var(--sp-6); } }
.hh__link { flex: none; }
/* On a phone the link button shows only its icon: square, as the "⋯" beside it (audit I42). */
@container app (max-width: 40rem) { .hh__link { width: 36px; padding: 0; } }
.input[type="tel"] { width: 16rem; max-width: 100%; }
.check-grid { display: grid; }
@container app (min-width: 40rem) { .check-grid { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); column-gap: var(--sp-4); } }
@container app (max-width: 30rem) { .form-actions { flex-direction: column; align-items: stretch; } }
.link-actions { align-items: flex-start; }
@container app (min-width: 48rem) { .guest-card > .guest-card__remove { grid-column: 1 / -1; } }
/* Invitation ticks keep a full tap height on a phone (E5). */
@container app (max-width: 48rem) { .guest-card__invites .check { min-height: var(--tap); padding-block: 10px; } }
/* Weddings list: a picture or a short coloured band, in a grid (W1, W3); the logo shows on bare pages (W4). */
.wedding-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.wedding-card__cover--band { aspect-ratio: 3 / 1; display: grid; place-items: center; }
.wedding-card__mono { font-family: var(--font-display); font-size: var(--fs-3xl); color: var(--color-text); opacity: .55; }
.shell--bare .topbar .brand { display: inline-flex; }
.table--compact td, .table--compact th { padding: var(--sp-2) var(--sp-3); }
.wizard .wizard__count { margin: 0 0 var(--sp-2); }
.wizard__count + .wizard__bar { margin-top: 0; }
@container app (min-width: 56rem) { .settings-grid { align-items: stretch; } }
.ctl-row__end { margin-left: auto; display: inline-flex; }

/* ---------- UI audit area E (PR 6): roles, public pages, empty plans ---------- */
.brief__lead { margin-top: var(--sp-2); }
.brief-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 20rem)); justify-content: center; }
/* Home: the hero's own buttons; Get started; numbers beside their labels (R10); due dates not cut off (R6). */
.btn--on-dark { --btn-bg: rgb(255 255 255 / 0.92); --btn-fg: #17171C; --btn-bd: transparent; }

.ledger__row { column-gap: var(--sp-2); }

/* Four tabs: the "+" goes last so the bar stays balanced (R3). */
.tabbar--4 .tabbar__add { order: 5; }
/* Phone: the plan switcher spans the row like the cards below (E10). */
@container app (max-width: 40rem) { .plan-nav.segmented, nav.segmented.plan-nav { display: grid; width: 100%; grid-auto-columns: 1fr; } }

/* ---------- UI audit polish (follow-up PR) ---------- */
/* Home's task cards say they open (A2). */
.task--go { grid-template-columns: auto 1fr auto auto; }
.task__go { align-self: center; color: var(--color-text-muted); width: 18px; height: 18px; }
/* An event whose boards are all empty: one short list, not a wall of tiles. */
.board-names .list__row { color: inherit; text-decoration: none; }
.board-names__add { --icon: var(--icon-sm); --icon-stroke: 2.25; display: inline-flex; align-items: center; gap: var(--sp-1); flex: none; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-accent); }
@media (hover: hover) { .board-names .list__row:hover .list__title { color: var(--color-accent); } }
/* Household page at a reading width on a laptop (D3). */
.page.page--medium { max-width: calc(52rem + 2 * var(--sp-6)); }
.form--danger { max-width: 44rem; }
/* Privacy and Terms headings in the display serif, like the other public pages. */
.public section > .h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xl); letter-spacing: 0; }

/* Board on a phone: Canvas/Grid moves into ··· so the controls fit one row (B11). */
.menu__layout a[aria-current="true"] { font-weight: var(--fw-semibold); }
@container app (min-width: 40rem) { .menu__layout { display: none !important; } .only-mobile-menu { display: none; } }
@container app (max-width: 40rem) { .board-head__bar .view-switch { display: none !important; } }
/* The role, on a phone, for anyone who is not the couple (R4). */
.topbar__role { flex: none; }

/* Home: events in date order, one equal row each (2026-11-19). */
.event-list { max-width: 48rem; }

.event-list .list__row { color: inherit; text-decoration: none; }
/* A list row's leading mark: one 40px round well, one glyph, quiet when it has no date yet
   (audit I7, B8, I50). */
.row-lead { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-accent-soft); color: var(--color-accent-ink); --icon: var(--icon-lg); --icon-stroke: 1.85; }
.row-lead--quiet { background: var(--color-surface-alt); color: var(--color-text-muted); }

.event-row__go, .row-go { --icon: var(--icon-md); --icon-stroke: 2; flex: none; color: var(--color-text-muted); }
.event-row--past .list__title { color: var(--color-text-muted); }
.event-list .list__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .event-list .list__row:hover .list__title { color: var(--color-accent); } }

/* Budget, payments first (Kwabena, 2026-11-20): one total, what is owed next, and only the
   categories with money in them. The bar is an SVG because the CSP forbids inline styles. */
.spend__label { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; }
.spend__figure { font-size: var(--fs-xl); font-weight: var(--fw-semibold); margin: var(--sp-1) 0 0; font-variant-numeric: tabular-nums; }
.spend__of { font-size: var(--fs-base); font-weight: var(--fw-regular); color: var(--color-text-muted); }
.spend__bar { display: block; width: 100%; height: 8px; margin-top: var(--sp-3); border-radius: var(--r-pill); overflow: hidden; }
.spend__track { fill: var(--color-track); }
.spend__paid { fill: var(--color-success); }
.spend__owed { fill: var(--color-accent); stroke: var(--color-surface); stroke-width: 2px; vector-effect: non-scaling-stroke; paint-order: stroke; }
.spend__legend { list-style: none; padding: 0; font-size: var(--fs-sm); color: var(--color-text-muted); margin: var(--sp-2) 0 0; display: grid; gap: var(--sp-1); }
.spend__key { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; margin: 0 0.35em 0 0.6em; }
.spend__legend .spend__key { margin-left: 0; }
.spend__key--paid { background: var(--color-success); }
.spend__key--owed { background: var(--color-accent); }
.pay-next form { flex: 0 0 auto; }

/* A long event name in the line's chip is cut short, not pushed past the amount. */

.spend .is-over, .list__meta.is-over { color: var(--color-danger-ink); }
.spend__total .cluster { margin-top: var(--sp-1); }

.spend__total { max-width: 28rem; }
/* On a phone the name and its due date get the whole width; amount and button go below. */
@media (max-width: 40rem) {
  .pay-next { flex-wrap: wrap; row-gap: var(--sp-1); }
  .pay-next .list__main { flex: 1 1 100%; }
  .pay-next .list__amount { margin-right: auto; }
}

/* ---------- The landing page (signed out, 2026-11-20) ----------
   What bridalbook is, before any form. One section per screen at 1440x900 (the hero exactly
   one, each feature one), every block on the same content edges, one primary and one
   secondary button. Screens are WebP captures of a sandbox, light and dark. */
.site { --site-bar-h: 4.25rem; --site-edge: max(clamp(1rem, 5vw, 7.5rem), (100% - 75rem) / 2);
  min-height: 100dvh; background: var(--color-bg); color: var(--color-text); container: app / inline-size; }
.site-bar { position: sticky; top: 0; z-index: 10; padding-top: var(--safe-top, 0px);
  background: var(--color-bg); border-bottom: 1px solid var(--color-border); transition: box-shadow var(--dur-2) var(--ease-out); }
.site-bar[data-stuck] { box-shadow: 0 6px 20px -12px rgb(0 0 0 / 0.25); }
.site-bar__in { height: var(--site-bar-h); display: flex; align-items: center; gap: var(--sp-5); padding-inline: var(--site-edge); }
.site-bar__nav { display: none; gap: var(--sp-5); }
.site-bar__nav a { color: var(--color-text); text-decoration: none; font-size: var(--fs-sm); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--dur-2) var(--ease-out); padding-block: var(--sp-1); }
.site-bar__nav a[aria-current] { background-size: 100% 1px; }
@media (hover: hover) and (pointer: fine) { .site-bar__nav a:hover { background-size: 100% 1px; } }
.site-bar__actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
@media (min-width: 64rem) { .site-bar__nav { display: flex; } }
@media (max-width: 30rem) { .site-bar .brand { font-size: 1.3rem; } .site-bar__actions .btn--secondary { display: none; } }
/* One button shape on the page: the large buttons' radius, the bar's ones a size smaller. */
.site .btn { border-radius: var(--r-pill); }
.site .wrap { padding-inline: var(--site-edge); width: 100%; }
.site-hero { min-height: calc(100svh - var(--site-bar-h)); display: flex; align-items: center; }
.site-hero > .wrap { display: grid; gap: var(--sp-6); align-items: center; padding-block: var(--sp-6); }
@media (min-width: 52rem) { .site-hero { height: calc(100svh - var(--site-bar-h)); min-height: 36rem; } .site-hero > .wrap { height: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: var(--sp-5); } }
@media (min-width: 72rem) { .site-hero > .wrap { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--sp-7); } }
.site-hero__text { display: flex; flex-direction: column; gap: var(--sp-4); }
.site-hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 1.4rem + 4vw, 4.6rem); line-height: 1; letter-spacing: -0.015em; max-width: 14ch; }
.site-hero__title em { font-style: normal; color: var(--color-accent); }
.site-hero__lead { font-size: var(--fs-md); max-width: 34rem; line-height: 1.55; }
.site-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }
.site-hero__note { font-size: var(--fs-sm); max-width: 32rem; }
/* The screens sit in an iPhone drawn in CSS: titanium edge, Dynamic Island, status bar,
   side buttons and the home bar. --iw is the phone's width; everything scales from it. */
.site-hero__stage { display: grid; place-items: center; }
.iphone { --iw: 18rem; position: relative; width: var(--iw); margin: 0; flex: none;
  padding: calc(var(--iw) * 0.034); border-radius: calc(var(--iw) * 0.17);
  background: linear-gradient(150deg, #5b5b63 0%, #232328 22%, #18181c 55%, #3a3a41 80%, #1d1d22 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22), inset 0 0 0 calc(var(--iw) * 0.012) #09090b,
    0 50px 90px -45px rgb(30 10 25 / 0.55), 0 24px 40px -24px rgb(0 0 0 / 0.35); }
/* Side buttons: the action button and volume on the left, the side button on the right. */
.iphone::before, .iphone::after { content: ""; position: absolute; width: 3px; background: linear-gradient(90deg, #2c2c32, #4a4a52); }
.iphone::before { left: -3px; top: 17%; height: 4.5%; border-radius: 2px 0 0 2px;
  box-shadow: 0 calc(var(--iw) * 0.17) 0 #34343b, 0 calc(var(--iw) * 0.34) 0 #34343b; }
.iphone::after { right: -3px; top: 27%; height: 12%; border-radius: 0 2px 2px 0; }
.iphone__screen { position: relative; overflow: hidden; border-radius: calc(var(--iw) * 0.136); background: var(--color-bg);
  padding-bottom: calc(var(--iw) * 0.1); }
.iphone__status { position: relative; height: calc(var(--iw) * 0.13); display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--iw) * 0.012) calc(var(--iw) * 0.075) 0 calc(var(--iw) * 0.11); color: var(--color-text); }
.iphone__time { font-weight: var(--fw-semibold); font-size: calc(var(--iw) * 0.05); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.iphone__island { position: absolute; left: 50%; top: calc(var(--iw) * 0.032); transform: translateX(-50%);
  width: 32%; height: calc(var(--iw) * 0.088); border-radius: var(--r-pill); background: #000; }
.iphone__icons { width: calc(var(--iw) * 0.19); height: auto; fill: currentColor; }
.iphone picture, .iphone img { display: block; width: 100%; height: auto; }
.iphone img { transition: transform var(--dur-3) var(--ease-out); transform-origin: 50% 0; }
@media (hover: hover) and (pointer: fine) { .iphone:hover img { transform: scale(1.025); } }
.iphone__home { position: absolute; left: 50%; bottom: calc(var(--iw) * 0.034); transform: translateX(-50%);
  width: 36%; height: calc(var(--iw) * 0.013); min-height: 3px; border-radius: var(--r-pill); background: var(--color-text); opacity: 0.85; }
/* A laptop drawn the same way: a dark lid around the screen and a base with a thumb notch.
   It is its own container, so every measure is a share of its width (cqw). */
.laptop { position: relative; width: 100%; margin: 0; container-type: inline-size; filter: drop-shadow(0 28px 34px rgb(30 10 25 / 0.28)); }
.laptop__lid { margin-inline: 7%; padding: 1.5cqw 1.5cqw 1.9cqw; border-radius: 2.2cqw 2.2cqw 0 0; background: #0b0b0d;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2); }
.laptop picture { display: block; overflow: hidden; border-radius: 0.5cqw; background: var(--color-bg); }
.laptop img { display: block; width: 100%; height: auto; transition: transform var(--dur-3) var(--ease-out); transform-origin: 50% 0; }
@media (hover: hover) and (pointer: fine) { .laptop:hover img { transform: scale(1.02); } }
.laptop__base { display: block; position: relative; height: 1.9cqw; border-radius: 0.4cqw 0.4cqw 2.4cqw 2.4cqw / 0.4cqw 0.4cqw 1.7cqw 1.7cqw;
  background: linear-gradient(180deg, #6a6a73 0%, #3b3b42 28%, #1f1f24 100%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35); }
.laptop__base::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 13cqw; height: 0.65cqw;
  border-radius: 0 0 1cqw 1cqw; background: #17171b; }
/* Laptop and phone together: the phone stands in front of the laptop's right corner.
   The pair is a container too, so the phone keeps its share of the pair at any width. */
.duo { position: relative; width: 100%; padding: 0 0 5% 0; container-type: inline-size; }
.duo .laptop { width: 90%; }
.duo .iphone { position: absolute; right: 0; bottom: 0; --iw: 19cqw; }
.site-hero__stage .duo { max-width: calc((100svh - var(--site-bar-h) - 5rem) * 1.7); }
@media (max-width: 51.99rem) { .site-hero__stage { padding-block: var(--sp-4); } .duo .iphone { --iw: 22cqw; } }
/* The hero enters once, on load: its lines one after another, then the screens. */
@media (prefers-reduced-motion: no-preference) {
  .site-enter, .site-enter--seq > * { animation: site-enter 700ms var(--ease-out) both; }
  .site-enter--seq > :nth-child(2) { animation-delay: 50ms; }
  .site-enter--seq > :nth-child(3) { animation-delay: 100ms; }
  .site-enter--seq > :nth-child(4) { animation-delay: 150ms; }
  .site-enter--seq > :nth-child(5) { animation-delay: 200ms; }
  .site-enter--late { animation-delay: 180ms; }
}
@keyframes site-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.site-section { min-height: 100svh; box-sizing: border-box; padding-block: var(--sp-8); border-top: 1px solid var(--color-border);
  scroll-margin-top: var(--site-bar-h); display: flex; align-items: center; }
.site-section > .wrap { display: flex; flex-direction: column; gap: var(--sp-6); }
.site-section__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.1rem, 1.5rem + 2vw, 3.1rem); line-height: 1.05; max-width: 22ch; }
.site-step__icon { --icon: var(--icon-lg); --icon-stroke: 1.85; width: 2.5rem; height: 2.5rem; flex: none; border-radius: var(--r-md); display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent); }
.site-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.site-step { background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.site-step__title, .site-card__title { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.site-roles { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.site-roles li { display: flex; gap: var(--sp-3); align-items: center; }
.site-roles strong { display: block; }
/* A feature: a picture beside its words. Each one shows its part of the app a different way
   (pins on a wall, budget cards, a guest's phone), and the picture changes side as you go. */
.site-feature > .wrap { display: grid; align-items: center; gap: var(--sp-6); }
.site-feature > .wrap > .iphone { justify-self: center; --iw: min(16rem, 66vw); }
.site-feature__text { display: flex; flex-direction: column; gap: var(--sp-4); max-width: 34rem; }
@media (min-width: 52rem) { .site-feature > .wrap { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--sp-8); } .site-feature > .wrap > .iphone { --iw: min(18rem, calc((100svh - 6rem) / 2.5)); }
  .site-feature--flip > .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .site-feature--even > .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-feature--flip > .wrap > :not(.site-feature__text) { order: 2; } }
/* Beside their words the screens run at 85% of the room they have (Kwabena, 2026-11-21:
   a little smaller). Stacked on a narrow screen they keep the full width, to stay readable. */
@media (min-width: 52rem) {
  .site-hero__stage .duo, .site-end .laptop { width: 85%; justify-self: center; }
  .site-feature > .wrap > .iphone { --iw: min(15.3rem, calc((100svh - 6rem) / 2.95)); }
}
/* Boards: the pins themselves, three columns with the middle one set lower, like a board. */
.pinwall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; justify-self: center; width: 100%; max-width: 28rem; }
.pinwall__col { display: grid; gap: var(--sp-4); }
.pinwall__col:nth-child(2) { margin-top: var(--sp-6); }
.pinwall picture { display: block; overflow: hidden; padding: var(--sp-2); border-radius: var(--r-lg); background: var(--color-bg);
  border: 1px solid var(--color-border); box-shadow: var(--shadow-2); transition: translate var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out); }
.pinwall img, .stack img, .rsvp-pair__tally img { display: block; width: 100%; height: auto; }
@media (hover: hover) and (pointer: fine) { .pinwall picture:hover { translate: 0 -4px; box-shadow: var(--shadow-3); } }
/* Budget: the total, and the payments that come next laid over its corner. The radii are
   the cards' own 20px, as a share of each picture. */
.stack { display: grid; justify-self: center; width: 100%; max-width: 36rem; }
.stack picture { display: block; overflow: hidden; width: 86%; background: var(--color-surface); box-shadow: var(--shadow-3); }
.stack__under { border-radius: 3.07% / 8.57%; }
.stack__over { position: relative; justify-self: end; margin-top: -7%; border-radius: 3.07% / 8.7%; }
/* Guests: what a guest sees on their phone, and the tally the couple sees filling up. */
.rsvp-pair { position: relative; display: grid; justify-items: end; justify-self: center; width: 100%; max-width: 33rem; }
.rsvp-pair .iphone { --iw: min(15.3rem, 58vw, calc((100svh - 6rem) / 2.6)); margin-right: 4%; }
.rsvp-pair__tally { position: absolute; left: 0; bottom: 14%; display: block; overflow: hidden; width: 66%; border-radius: 6.86% / 17.9%;
  background: var(--color-surface); box-shadow: var(--shadow-3); }
.site-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.site-ticks li { padding-left: 1.6rem; position: relative; }
.site-ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 0.9rem; height: 0.5rem; border-left: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); transform: rotate(-45deg); }
.site-split { display: grid; gap: var(--sp-6); }
@media (min-width: 64rem) { .site-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.site-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.site-card { background: var(--color-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.site-faq { display: grid; gap: var(--sp-2); }
.site-faq details { background: var(--color-surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: var(--sp-4) var(--sp-5); }
.site-faq summary { cursor: pointer; font-weight: var(--fw-semibold); list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3); min-height: 2.75rem; align-items: center; }
.site-faq summary::-webkit-details-marker { display: none; }
.site-faq summary::after { content: "+"; color: var(--color-accent); font-size: 1.25rem; line-height: 1; transition: rotate var(--dur-2) var(--ease-out); }
.site-faq details[open] summary::after { rotate: 45deg; }
.site-faq details p { margin-top: var(--sp-2); }
.site-faq__more { margin-top: var(--sp-3); }
.site-end { min-height: calc(100svh - 9rem); }
.site-end > .wrap { display: grid; gap: var(--sp-6); align-items: center; }
.site-end__text { display: flex; flex-direction: column; gap: var(--sp-4); }
@media (min-width: 52rem) { .site-end > .wrap { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.site-foot { min-height: 9rem; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: var(--sp-3) var(--sp-6); padding: var(--sp-5) var(--site-edge) calc(var(--sp-5) + var(--safe-bottom, 0px)); border-top: 1px solid var(--color-border); }
.site-foot__links { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.site-foot__links a { color: var(--color-text); }
.site-foot__note { flex-basis: 100%; font-size: var(--fs-xs); color: var(--color-text-muted); }

/* Sign in and sign up on a wide screen: the app on the left, the form on the right
   (2026-11-20). On a phone the form stands alone, as before. */
.auth__art, .auth__legal { display: none; }
@media (min-width: 60rem) {
  /* A wide plum panel (about 64%) and a narrow form column that runs top to bottom like an
     app screen: the form in the middle, Privacy and Terms at the foot. The form sits flat on
     the page; the logo moves to the panel's top-left corner. */
  .auth--split { grid-template-columns: minmax(0, 1.8fr) minmax(24rem, 1fr); place-items: stretch; padding: 0; gap: 0; background: var(--color-bg); }
  .auth--split .auth__card { position: relative; align-self: stretch; justify-content: center; max-width: 20rem; margin: 0 var(--sp-6);
    padding: var(--sp-8) 0; gap: var(--sp-5); background: none; box-shadow: none; border-radius: 0; justify-self: center; width: 100%; }
  .auth--split .auth__card .form { gap: var(--sp-4); }  /* sign-up's longer form still fits one screen */
  .auth--split .auth__card > .brand { display: none; }  /* the panel carries the logo */
  .auth--split .auth__lede { display: none; }  /* the panel carries the brand line */
  .auth--split .auth__tag { font-size: clamp(2rem, 1.4rem + 1vw, 2.4rem); }
  .auth--split .auth__legal { display: flex; gap: var(--sp-2); position: absolute; bottom: var(--sp-5); left: 0; font-size: var(--fs-xs); color: var(--color-text-subtle); }
  .auth--split .auth__legal a { color: inherit; text-decoration: none; }
  @media (hover: hover) and (pointer: fine) { .auth--split .auth__legal a:hover { color: var(--color-text); } }
  .auth__art { display: flex; flex-direction: column; gap: var(--sp-6); position: sticky; top: 0; height: 100dvh;
    overflow: hidden; isolation: isolate; padding: var(--sp-6) 0 0 var(--sp-7); color: #fff; background: linear-gradient(160deg, #4A1A31 0%, #2A0F1D 100%); }
  .auth__art::before { content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none; filter: blur(30px);
    background: radial-gradient(40% 45% at 30% 12%, rgb(236 72 153 / 0.6), rgb(236 72 153 / 0) 70%),
      radial-gradient(35% 45% at 10% 95%, rgb(255 170 120 / 0.45), rgb(255 170 120 / 0) 70%); }
  .auth__art-brand { color: #fff; align-self: flex-start; }
  .auth__art-line { font-family: var(--font-display); font-size: clamp(2.3rem, 1.4rem + 1.9vw, 3.2rem); line-height: 1.02;
    padding-right: var(--sp-7); margin-top: var(--sp-5); }
  .auth__art-line em { font-style: normal; color: #F9A8CB; }
  /* The app at a size you can read: Home, its countdown in view, running off the panel's
     right and bottom edges rather than shrunk to fit. */
  .auth__art-pic { display: block; flex: 1; min-height: 0; position: relative; }
  .auth__art-shot { position: absolute; left: 0; top: 0; height: 100%; width: auto; min-width: 150%; max-width: none;
    object-fit: cover; object-position: left top; border-radius: var(--r-lg) 0 0 0;
    box-shadow: 0 30px 70px -20px rgb(0 0 0 / 0.55), 0 0 0 1px rgb(255 255 255 / 0.12); }
}

/* Landing motion as you scroll. app.js marks each block data-rv and adds data-seen once it
   is in view: it fades up and stays. Rows that arrive together follow one another 60ms
   apart. Without the script nothing is hidden; with less motion asked for, it only fades. */
[data-rv] { transition: opacity 600ms var(--ease-out), translate 700ms var(--ease-out);
  transition-delay: calc(var(--rv-base, 0ms) + var(--rv-i, 0) * 60ms); }
[data-rv]:not([data-seen]) { opacity: 0; }
:is(.site-step, .site-roles li, .site-card, .site-ticks li, .site-faq > *, .site-feature__text > p, .site-end__text > *):nth-child(2) { --rv-i: 1; }
:is(.site-step, .site-roles li, .site-card, .site-ticks li, .site-faq > *, .site-end__text > *):nth-child(3) { --rv-i: 2; }
:is(.site-step, .site-roles li, .site-card, .site-ticks li, .site-faq > *):nth-child(4) { --rv-i: 3; }
:is(.site-faq > *):nth-child(n+5) { --rv-i: 4; }
.site-roles, .site-faq { --rv-base: 240ms; }
.site-ticks { --rv-base: 160ms; }
@media (prefers-reduced-motion: no-preference) {
  [data-rv]:not([data-seen]) { translate: 0 16px; }
  /* On a wide screen the picture comes in from its own side. */
  @media (min-width: 52rem) { .site-feature > .wrap > :not(.site-feature__text)[data-rv]:not([data-seen]) { translate: -24px 0; }
    .site-feature--flip > .wrap > :not(.site-feature__text)[data-rv]:not([data-seen]) { translate: 24px 0; } }
  @media (max-width: 40rem) { [data-rv]:not([data-seen]) { translate: 0 12px; } }
  /* The closing picture is uncovered from the top down instead. */
  .site-end .laptop[data-rv] { transition: clip-path 1000ms var(--ease-in-out); clip-path: inset(-7rem); }
  .site-end .laptop[data-rv]:not([data-seen]) { opacity: 1; translate: none; clip-path: inset(-7rem -7rem 100% -7rem); }
  /* Each feature screen drifts a little slower than the page, as if it floated above it. */
  @supports (animation-timeline: view()) {
    .site-feature > .wrap > :not(.site-feature__text) { animation: phone-drift linear both; animation-timeline: view(); }
  }
  /* FAQ answers slide open instead of jumping; the + turns to a ×. */
  @supports (interpolate-size: allow-keywords) {
    .site-faq { interpolate-size: allow-keywords; }
    .site-faq details::details-content { block-size: 0; overflow: clip;
      transition: block-size 260ms var(--ease-out), content-visibility 260ms allow-discrete; }
    .site-faq details[open]::details-content { block-size: auto; }
  }
}
@keyframes phone-drift { from { transform: translateY(1.5rem); } to { transform: translateY(-1.5rem); } }

/* Sign-in and sign-up: the panel's words then its picture come up once on load; the form
   stays still, and a "wrong password" note fades in rather than popping. */
@media (prefers-reduced-motion: no-preference) {
  .auth__art-line, .auth__art-pic { animation: site-enter 700ms var(--ease-out) both; }
  .auth__art-pic { animation-delay: 140ms; }
  .auth .callout--danger { animation: fade-in var(--dur-2) var(--ease-out) both; }
}

/* The landing page on a phone: wider margins, more room between blocks, and each feature
   reads heading, words, then its screen, so the phone never arrives without context. */
@media (max-width: 40rem) {
  .site { --site-edge: 1.5rem; }
  .site-section { min-height: 0; padding-block: var(--sp-9); }
  .site-section > .wrap { gap: var(--sp-7); }
  .site-hero > .wrap { gap: var(--sp-7); padding-block: var(--sp-7) var(--sp-8); }
  .site-hero__text { gap: var(--sp-5); }
  .site-hero__lead { font-size: var(--fs-base); line-height: 1.6; }
  .site-cta { flex-direction: column; margin-top: 0; }
  .site-cta > form, .site-cta .btn { width: 100%; }
  .site-feature > .wrap { gap: var(--sp-5); }
  .site-feature__text { display: contents; }
  .site-feature .site-section__title { order: 1; }
  .site-feature__text > p { order: 2; line-height: 1.6; }
  .site-feature > .wrap > :not(.site-feature__text) { order: 3; margin-block: var(--sp-5); }
  .pinwall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .pinwall__col { gap: var(--sp-3); }
  .pinwall__col:nth-child(3) { display: none; }
  .stack picture { width: 92%; }
  .rsvp-pair__tally { width: 70%; }
  .site-feature > .wrap > .iphone { --iw: min(14.5rem, 64vw); }
  .site-feature .site-ticks { order: 4; gap: var(--sp-3); }
  .site-steps, .site-cards { gap: var(--sp-5); }
  .site-roles { gap: var(--sp-5); }
  .site-end .laptop { margin-top: var(--sp-4); }
  /* The drift reads as the phone sitting off-centre on a narrow screen: keep it still. */
  .site-feature > .wrap > :not(.site-feature__text) { animation: none; }
}

/* ==========================================================================
   M8 (one-job redesign, 2026-11-23): the "More details" fold on add forms, the
   "· Change" default lines, and the Budget list of final picks not costed yet.
   Everything new for M8 lives in this block.
   ========================================================================== */
/* More details: a quiet disclosure under the fields that matter. The summary reuses
   .fold__summary (chevron, 44px target); the body lays its fields out like .form. */
.more { border-top: 1px solid var(--color-border); }
.more__summary { color: var(--color-text-muted); font-size: var(--fs-sm); }
.more__body { display: flex; flex-direction: column; gap: var(--sp-5); padding-block: var(--sp-2) var(--sp-3); }

/* "· Change" lines: the default said in words; Change opens the inputs that set it. */
.change > summary { list-style: none; cursor: pointer; display: block; min-height: var(--tap);
  padding-block: 10px; font-size: var(--fs-sm); }
.change__link::before { content: " "; }
.change > summary::-webkit-details-marker { display: none; }
.change__link { color: var(--color-accent-ink); font-weight: var(--fw-semibold); }
.change[open] > summary .change__link { display: none; }
.change__body { display: flex; flex-direction: column; gap: var(--sp-4); padding-bottom: var(--sp-3); }
@media (hover: hover) { .change > summary:hover .change__link { text-decoration: underline; } }

/* Budget: final picks not costed yet. A small square picture, then the pick and its board;
   a board with no category asks its question once above its picks. */
.pick-row { align-items: flex-start; flex-wrap: wrap; }
.pick-row .list__main { flex-basis: 0; min-width: 9rem; }
.pick-row .list__meta { white-space: normal; }
.pick-row > .btn { margin-left: calc(var(--thumb, 48px) + var(--sp-3)); }
@media (min-width: 30rem) { .pick-row > .btn { margin-left: 0; } }
.pick-row__thumb { flex: none; width: 48px; height: 48px; border-radius: var(--r-sm); overflow: hidden;
  background: var(--color-surface-alt); display: grid; place-items: center; }
.pick-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-row__mark { width: 100%; height: 100%; display: grid; place-items: center; font-weight: var(--fw-semibold);
  background: var(--tint-bg); color: var(--tint-ink); }
.pick-ask { display: flex; flex-direction: column; gap: var(--sp-3); }
.pick-ask__form { display: flex; flex-direction: column; gap: var(--sp-2); }

/* The pin page of a final pick: one read-only line saying whether it is costed (ADR-0015). */
.pick-line { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--color-text-muted); }
.pick-line { --icon: var(--icon-md); --icon-stroke: 2; }
.pick-line .icon { color: var(--color-accent); }
.pick-line--todo { color: var(--color-text); }

/* ==========================================================================
   M9 (one-job redesign, 2026-11-23): the vendor's contact page, "Who's making
   what" on Budget, the Events list, and the Guests line for the reply date. Everything new for M9 lives in this block.
   ========================================================================== */
/* The vendor's own page: the name with its menu beside it, then rows that say what is
   booked. A row reuses the square picture of Budget's pick rows (.pick-row__thumb). */
.vendor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.vendor-head .page__title { min-width: 0; overflow-wrap: anywhere; }
.making__row { color: inherit; text-decoration: none; }
.making__row .list__meta { white-space: normal; }

.making__row .pick-row__thumb > .icon { --icon: var(--icon-lg); --icon-stroke: 1.85; color: var(--color-accent); }
.making__go { flex: none; width: 18px; height: 18px; color: var(--color-text-muted); }
@media (hover: hover) { a.making__row:hover .list__title { color: var(--color-accent); } }
a.making__row:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--r-sm); }

/* Budget, "Who's making what": vendors grouped by what they do. The name opens the
   contact page and the amount opens the vendor's money, so a row holds two links. */

/* The Events list: the venue is one of the three things a row says, so it wraps on a
   phone instead of being cut short. */
.event-list--full .list__meta { white-space: normal; overflow: visible; }
/* Guests filtered by an event: the reply date, a default line
   with a "· Change" (.change, M8) that opens its own short form. */
.guest-lines { display: flex; flex-direction: column; max-width: 34rem; }
.guest-lines > * + * { border-top: 1px solid var(--color-border); }
.guest-lines .input[type="date"] { width: auto; }
/* A board's menu: who it is shared with, read only; "Change" opens People. */
.menu__panel .menu__sharing { gap: var(--sp-1); white-space: nowrap; }
.menu__change { color: var(--color-accent-ink); font-weight: var(--fw-semibold); }
.member:target { scroll-margin-top: var(--sp-8); background: var(--color-accent-soft); border-radius: var(--r-sm); }
/* Timeline rows are two lines: what to do, then who and which event in grey. A payment
   puts its amount beside the title and a one-tap Mark paid (rule 3: taps travel) beside
   the grey line. The title link covers the whole row, so the button sits above it. */
.pay-mark { position: relative; z-index: 2; flex: none; }
.agenda__row { align-items: flex-start; padding-block: var(--sp-2); line-height: var(--lh-snug); }
.agenda__row + .agenda__row { border-top: 1px solid var(--color-border); }
.agenda__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* A payment's lead column, as wide as a task's tick and empty (no wallet icon, Kwabena 2026-11-25),
   so every title in a day starts at one edge (audit I22, I24). */
.agenda__lead { flex: none; width: 24px; }
.agenda__main .agenda__title { flex: none; font-weight: var(--fw-semibold); }
.agenda__sub { font-size: var(--fs-sm); color: var(--color-text-muted); overflow-wrap: anywhere; }
.agenda__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); }
.agenda__row--money .agenda__side, .kanban__row--money .agenda__side { align-self: flex-start; }

/* ==========================================================================
   M10 (one-job redesign, 2026-11-23): Home, "E · Calm". A plum countdown card, one
   next step, a short journey line with a Today marker, and three rows of Up next.
   Everything new for M10 lives in this block.
   ========================================================================== */
.calm { display: grid; gap: var(--sp-6); padding-top: var(--sp-2); }
.calm > * { min-width: 0; }

/* One-line notices above the page: only when they apply. */
.home-note { display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-3); font-size: var(--fs-sm); color: var(--color-text-muted); }
.home-note .icon { --icon: var(--icon-md); --icon-stroke: 2; margin-block: calc((1lh - var(--icon)) / 2); color: var(--color-accent); }
.home-note a { color: var(--color-accent-ink); font-weight: var(--fw-semibold); }
.home-note--danger { color: var(--color-text); }
.home-note--danger .icon { color: var(--color-danger); }

/* The countdown: the .feature card with one big line. The whole card is the link. */
.count { gap: var(--sp-2); padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-6); justify-content: flex-start; }
.count__hi { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.86); }
.count__line { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-2xl); line-height: 1.08; text-wrap: balance; overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums; }  /* the number steps without the line rewrapping (audit M24) */
.count__line a { color: inherit; text-decoration: none; }
.count__line a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.count__line a:focus-visible { outline: none; }
.count__line a:focus-visible::after { outline: 2px solid #fff; outline-offset: -4px; }
.count__meta { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.84); }

/* Do this next: a label, a title, one primary button and at most one quiet one beside it. */
.quiet-next { display: grid; gap: var(--sp-2); padding: var(--sp-5); border-radius: var(--r-xl); background: var(--color-surface); box-shadow: var(--shadow-1); }
.quiet-next__label { font-size: var(--fs-sm); color: var(--color-text-muted); }
.quiet-next__label .is-late { color: var(--color-danger-ink); }
.quiet-next__title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-snug); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.quiet-next__title .money__cur { color: inherit; }
.quiet-next__rest { font-size: var(--fs-sm); color: var(--color-text-muted); }
.quiet-next__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.quiet-next__progress { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--color-border); }
.quiet-next__sum { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--color-text-muted); }
.quiet-next__sum .is-late { color: var(--color-danger-ink); }
.quiet-next__actions > .btn { flex: 1 1 auto; min-width: 0; }
.quiet-next__actions > form { flex: 0 1 auto; display: flex; }
.quiet-next__actions > form > .btn { white-space: nowrap; }

/* The journey: Today, then one stop per event on a single line. Names are cut by CSS. */
.route { display: grid; gap: var(--sp-3); }
.route__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.route__title { font-size: var(--fs-base); font-weight: var(--fw-semibold); }
.route__head a { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-accent-ink); text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
/* min-width: 0, because a grid item will not shrink below its content: one long single-word
   name ("Thanksgiving") used to widen the whole line past a 320px screen. */
.route__line { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; min-width: 0; --r-rest: color-mix(in srgb, var(--color-border-strong) 45%, var(--color-bg)); }
.route__stop { position: relative; flex: 1 1 0; min-width: 0; }
.route__stop::before, .route__today::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--r-rest); }
.route__stop:first-child::before { left: 50%; }
.route__stop:last-child::before { right: 50%; }
.route__stop:only-child::before { content: none; }
/* Today is where the filled part of the line ends (Kwabena's phone check, 2026-11-25: a
   flag above the line read as out of place). Events that are over, and the line through
   them, take the accent; a small ring marks today at the end of it, with the word above.
   The marker takes no width, so six stops still get 60px each at 390px. */
.route .route__line { position: relative; padding-top: 22px; }
.route__today { position: relative; flex: 0 0 0; width: 0; }
.route__today::before { content: none; }
.route__flag { position: absolute; top: -22px; left: 0; transform: translateX(-50%); z-index: 1; color: var(--color-accent-ink);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); line-height: 1.3; white-space: nowrap; }
.route__today:first-child .route__flag { transform: none; }
.route__today--end .route__flag { transform: translateX(-100%); }
.route__today::after { content: ""; position: absolute; z-index: 2; top: 3px; left: -5px; width: 10px; height: 10px; box-sizing: border-box;
  border-radius: 50%; background: var(--color-bg); border: 3px solid var(--color-accent); }
.route__today:first-child::after { left: 0; }
.route__today--end::after { left: auto; right: 0; }
.route__stop.is-past::before { top: 6px; height: 4px; border-radius: 2px; background: var(--color-accent); }
/* One event: its dot goes to the far end from Today, so the line runs the whole width
   between the two instead of stopping halfway. */
.route__today:first-child + .route__stop:last-child .route__link { align-items: flex-end; }
.route__today:first-child + .route__stop:last-child .route__name { text-align: right; margin-inline: 0; max-width: 100%; }
.route__today:first-child + .route__stop:last-child::before { right: 8px; }
.route__stop:first-child:has(+ .route__today--end) .route__link { align-items: flex-start; }
.route__stop:first-child:has(+ .route__today--end) .route__name { text-align: left; margin-inline: 0; max-width: 100%; }
.route__stop:first-child:has(+ .route__today--end)::before { left: 8px; right: 0; }
.route__link { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); min-height: var(--tap); padding-bottom: var(--sp-1);
  color: var(--color-text-muted); text-decoration: none; font-size: 0.6875rem; font-weight: var(--fw-semibold); border-radius: var(--r-sm); }
@container app (min-width: 40rem) { .route__link { font-size: var(--fs-xs); } }
/* Under 390px a stop is too narrow for "thanksgiving" at 11px; a touch smaller keeps it whole. */
@container app (max-width: 24.3rem) { .route__link { font-size: 0.625rem; } }
.route__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.route__dot { position: relative; z-index: 1; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--color-bg); box-shadow: inset 0 0 0 2px var(--color-border-strong); }
/* A name wraps at its spaces and hyphens over up to three lines, then is cut. It may run
   4px into the gap on each side, which is what lets "Honeymoon" stay whole at 390px. A
   single word wider than its stop breaks where it must (overflow-wrap: anywhere, which
   also lowers the line's minimum width) rather than run under its neighbour or widen the
   page; that only happens near 320px. Automatic hyphens were tried and dropped: they split
   "Pre-wed-ding" at 390px and did nothing at 320px (2026-12-01). */
.route__name { max-width: calc(100% + 8px); margin-inline: -4px; text-align: center; line-height: 1.25; letter-spacing: -0.01em; overflow: hidden;
  overflow-wrap: anywhere; -webkit-hyphens: manual; hyphens: manual;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.route__stop.is-next .route__dot { box-shadow: inset 0 0 0 5px var(--color-accent); }
.route__stop.is-next .route__link { color: var(--color-text); }
.route__stop.is-past .route__dot { background: var(--color-accent); box-shadow: none; }
.route__stop.is-undated .route__dot { box-shadow: none; border: 2px dashed var(--color-border-strong); }
/* Every board of the event decided: its stop carries a small green tick, which draws once the
   first time it is seen (motion proposal C8; app.js adds .is-new). */
.route__stop.is-decided .route__dot { display: grid; place-items: center; border: 0; background: var(--color-success); box-shadow: none;
  color: var(--color-on-success); --icon: 12px; --icon-stroke: 3.5; }
@media (prefers-reduced-motion: no-preference) {
  .route__stop.is-decided.is-new .route__dot { animation: decided-ring 900ms var(--ease-out) 400ms both; }
  .route__stop.is-decided.is-new .route__dot svg { stroke-dasharray: 23; animation: toast-tick 420ms var(--ease-out) 700ms both; }
}
@keyframes decided-ring { 0% { transform: scale(0.6); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 45%, transparent); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-success) 25%, transparent); }
  100% { transform: none; box-shadow: 0 0 0 10px transparent; } }
@media (hover: hover) { .route__link:hover { color: var(--color-text); } }
.route__sum { font-size: var(--fs-sm); color: var(--color-text-muted); }
.route__sum .is-late { color: var(--color-danger-ink); }
.route__sum a { color: var(--color-accent-ink); font-weight: var(--fw-semibold); }

/* The thin bar in Home's Do this next card: tasks done out of all tasks. */
.meter { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; border: 0;
  border-radius: var(--r-pill); background: var(--color-track); overflow: hidden; color: var(--color-accent); }
.meter::-webkit-progress-bar { background: var(--color-track); border-radius: var(--r-pill); }
.meter::-webkit-progress-value { background: var(--color-success); border-radius: var(--r-pill); }
.meter::-moz-progress-bar { background: var(--color-success); border-radius: var(--r-pill); }

/* Up next: three rows, the title on the left and a short date on the right. */
.soon { padding: 0 var(--sp-5); border-radius: var(--r-xl); background: var(--color-surface); box-shadow: var(--shadow-1); }
.soon__title { font-size: var(--fs-base); font-weight: var(--fw-semibold); padding: var(--sp-4) 0 var(--sp-2); }
.soon__list { list-style: none; margin: 0; padding: 0; }
.soon__list li + li { border-top: 1px solid var(--color-border); }
.soon__row { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--row-dense); color: inherit; text-decoration: none; }
.soon__what { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.soon__row { padding-block: var(--sp-2); }
/* The amount never gives way to a long title: the title is cut, the figure stays whole. */
.soon__amount { flex: none; }
.soon__amount .money { font-weight: var(--fw-semibold); }
.soon__when { flex: none; font-size: var(--fs-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.soon__when.is-late { color: var(--color-danger-ink); }
.soon__row:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--r-sm); }
@media (hover: hover) { .soon__row:hover .soon__what { text-decoration: underline; text-underline-offset: 3px; } }
.soon__none { padding-bottom: var(--sp-4); font-size: var(--fs-sm); color: var(--color-text-muted); }
.soon__foot { display: flex; align-items: center; min-height: var(--row-dense); border-top: 1px solid var(--color-border); }
.soon__foot a { display: flex; align-items: center; min-height: var(--row-dense); flex: 1; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-accent-ink); text-decoration: none; }

/* Family: the countdown and one line. */
.calm__shared { font-size: var(--fs-base); color: var(--color-text-muted); }
.calm__shared a { color: var(--color-accent-ink); font-weight: var(--fw-semibold); }

@container app (min-width: 62rem) {
  .calm { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; padding-top: var(--sp-4);
    grid-template-areas: "count route" "next soon"; }
  .calm > .count { grid-area: count; } .calm > .route { grid-area: route; align-self: center; }
  .calm > .quiet-next { grid-area: next; } .calm > .soon { grid-area: soon; }
  .calm--family { grid-template-columns: minmax(0, 36rem); grid-template-areas: "count" "shared"; }
  .calm--family > .calm__shared { grid-area: shared; }
}
/* On a small laptop half the page gives six stops about 60px each, and "Honeymoon" broke
   across two lines (known bug, 2026-11-26). Below 76rem, and for seven events or more at
   any width, the journey takes a row of its own under the countdown. */
@container app (min-width: 62rem) and (max-width: 75.99rem) {
  .calm:not(.calm--family) { grid-template-areas: "count count" "route route" "next soon"; }
}
@container app (min-width: 62rem) {
  /* Seven stops, counted by class: the Today marker is an <li> too. */
  .calm:not(.calm--family):has(.route__stop ~ .route__stop ~ .route__stop ~ .route__stop ~ .route__stop ~ .route__stop ~ .route__stop) { grid-template-areas: "count count" "route route" "next soon"; }
}
/* A category picker's "New category…" (ADR-0017): the name field shows only once that
   option is chosen. Without :has() it is simply always there, and a name typed with
   nothing chosen still counts. */
@supports selector(:has(*)) {
  .field:has(> select[data-cat-pick]) + .field { display: none; }
  .field:has(> select[data-cat-pick] option[value="new"]:checked) + .field { display: flex; }
  select[data-cat-pick] ~ .cat-new { display: none; }
  select[data-cat-pick]:has(option[value="new"]:checked) ~ .cat-new { display: block; }
  /* Beside a Save button (Budget's question): the picker takes the first row and the
     name sits with Save on the second, so neither is cut short on a phone. */
  .cluster:has(> select[data-cat-pick] option[value="new"]:checked) { flex-wrap: wrap; }
  .cluster > select[data-cat-pick]:has(option[value="new"]:checked) { flex: 1 1 100%; }
}
/* Categories: the suggestions not used yet, one tap each. */
.cat-suggest { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
/* Guests: finding one household among hundreds (search, answer and side filters, pages). */
.guest-find { display: flex; gap: var(--sp-2); max-width: 48rem; }
.guest-find__box { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
.guest-find__box .icon { position: absolute; left: var(--sp-3); top: 50%; --icon: var(--icon-md); --icon-stroke: 2; transform: translateY(-50%); color: var(--color-text-subtle); pointer-events: none; }
.guest-find__box .input { width: 100%; padding-left: calc(var(--sp-3) + var(--icon-md) + var(--sp-2)); }
/* With JS the list follows the typing, so the button is only for people without it. */
.guest-find.is-live > .btn { display: none; }
/* Under the answer chips: how many match on the left, the side menu on the right. */
/* On a wide screen everything on Guests shares the list's reading width (audit B11). */
#guest-live > :is(.ledger, .ctl-row, .filters) { max-width: 48rem; }
.guest-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); max-width: 48rem; margin-top: var(--sp-2); }
.guest-bar .menu { flex: none; }
.guest-count { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); color: var(--color-text-muted); }
.guest-count a { margin-left: var(--sp-2); color: var(--color-accent-ink); font-weight: var(--fw-semibold); }
/* A long list: tighter rows, so a phone shows eight or nine households, not six. */
.hh-list--long { margin-top: var(--sp-2); }
.hh-list--long .hh { min-height: var(--row); padding-block: var(--sp-1); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-3); max-width: 48rem; margin-top: var(--sp-4); }
.pager > :last-child { justify-self: end; }
.pager > :first-child { justify-self: start; }
.pager__where { font-size: var(--fs-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
/* Plan pages (Events, Timeline, Budget). On a phone the three tabs name the page, so its
   title is for screen readers only. Where the side menu shows it already lists the three,
   so the tabs go and the title is shown instead. */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-4); }
.plan-head__link { margin-left: auto; }
/* The Vendors button jumps to a section: leave room so its heading is not under the top bar. */
#who { scroll-margin-top: 5rem; }
@container app (max-width: 61.99rem) {
  .plan-title { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@container app (min-width: 62rem) {
  .plan-nav.segmented, nav.segmented.plan-nav { display: none; }
  .plan-head { margin-top: 0; }
}
/* Timeline rows answering a tap (phone check, 2026-11-25). A ticked task strikes through
   before it folds away; a paid payment's button turns to a green "Paid". */
.agenda__row.task--done .agenda__title, .kanban__row.task--done .kanban__title { text-decoration: line-through; color: var(--color-text-muted); }
.agenda__row.is-paid .pay-mark .btn { background: var(--color-success-soft); border-color: transparent; color: var(--color-success-ink); opacity: 1; }
.agenda__row.is-paid .agenda__amount { color: var(--color-text-muted); }
/* Tapping the "no date yet" note lights the undated rows for a moment. */
html:not(.js) #tg-waiting:target .agenda__row, #tg-waiting.is-flash .agenda__row { animation: row-flash 1400ms var(--ease-out) 1; }
@keyframes row-flash { 0%, 35% { background: var(--color-accent-soft); box-shadow: 0 0 0 6px var(--color-accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
/* The "+" form's Paste link button and the short note beside it. */
.capture-paste { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: calc(-1 * var(--sp-1)); }
/* The pin just saved, when the board opens on it: a ring that fades. `:target` covers the
   grid view and browsers without JavaScript; the canvas adds the class itself. */
.pin:target, .board-grid > .pin:target, .canvas__world > .pin.pin--arrived { animation: pin-arrive 2200ms var(--ease-out) 1 both; scroll-margin-top: var(--sp-8); }
@keyframes pin-arrive { 0%, 45% { box-shadow: 0 0 0 4px var(--color-accent), var(--shadow-2); } 100% { box-shadow: 0 0 0 4px transparent, var(--shadow-1); } }
/* A final pick with no cost yet: the one next step, said plainly on the pin's page. */
.next-cost { display: grid; gap: var(--sp-2); justify-items: start; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--color-accent-soft); }
.next-cost__title { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-semibold); color: var(--color-accent-ink); }
.next-cost__title { --icon: var(--icon-md); --icon-stroke: 2; }
.next-cost__text { font-size: var(--fs-sm); color: var(--color-text); }
/* Keeping your place (walk-through, 2026-11-25). */
/* A toast that would cover the control just tapped shows at the top instead (app.js adds
   the class). Phones only: on a wide screen toasts sit in the corner, clear of the page. */
@media (max-width: 63.99rem) {
  .toasts.toasts--top { bottom: auto; top: calc(var(--topbar-h) + var(--safe-top) + var(--sp-3)); }
  .toasts--top .toast { animation-name: toast-in-top; }
  .toasts--top .toast.is-leaving { animation-name: toast-out-top; }
}
@keyframes toast-in-top { from { opacity: 0; transform: translateY(-12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out-top { to { opacity: 0; transform: translateY(-8px); } }
/* The chosen filter chip's pill slides to its new place, whether the list is swapped in
   place or the page loads. Guests has two rows of chips, so each has its own name. */
.vt-swap .filters .filter[aria-current="true"] { view-transition-name: filter-pill; }
.vt-swap .filters--events .filter[aria-current="true"] { view-transition-name: filter-pill-events; }
::view-transition-group(filter-pill), ::view-transition-group(filter-pill-events) { animation-duration: 240ms; animation-timing-function: var(--ease-out); }
/* The row just added, when the page opens on it: it lights, then settles. */
.agenda__row:target, .hh:target, .cost-row:target { animation: row-flash 1800ms var(--ease-out) 1; border-radius: var(--r-sm); scroll-margin-block: 30vh; }
/* Budget: a payment marked paid turns green where it stands before it folds away. */
.pay-next.is-paid .pay-mark .btn { background: var(--color-success-soft); border-color: transparent; color: var(--color-success-ink); opacity: 1; }
.pay-next.is-paid .list__amount { color: var(--color-text-muted); }
@media (prefers-reduced-motion: reduce) {
  .agenda__row:target, .hh:target, .cost-row:target { animation: none; background: var(--color-accent-soft); }
}
/* Moments (motion proposal C8 and C9, 2026-11-25). All of it is skipped when the person
   asked for less motion; the pages then just show where things stand. */
/* Boards index: a group with every board decided reads as done, with a tick. */
.vb-head__count.is-complete { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--color-success-ink); }
.vb-head__count.is-complete { --icon: var(--icon-xs); --icon-stroke: 2.5; }
@media (prefers-reduced-motion: no-preference) {
  /* A final pick, on the pin's own page: a frame closes around the picture and lets go,
     and the next step rises in a beat later. */
  body:has(.toast--final) .pin-detail__media { position: relative; }
  body:has(.toast--final) .pin-detail__media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    border: 4px solid var(--color-success); animation: final-frame 1800ms var(--ease-out) 150ms both; }
  body:has(.toast--final) .next-cost { animation: welcome-in 480ms var(--ease-out) 450ms both; }
  /* Back on the board: the chosen pin keeps a ring for a moment while the others step back. */
  .is-deciding .pin:not(.pin--decided) { animation: pin-dim 1900ms var(--ease-standard) 1 both; }
  .is-deciding .pin.pin--decided { animation: pin-decided 1900ms var(--ease-out) 1 both; }
  /* The tick of a group seen complete for the first time. */
  .vb-head__count.is-new .icon { animation: final-ring 520ms var(--ease-out) 300ms both; }
  /* Home, first visit of the day: the line fills stop by stop up to today's ring. */
  .calm--fresh .route__stop.is-past::before { transform-origin: left center; animation: route-fill 380ms var(--ease-out) both; }
  .calm--fresh .route__line > :nth-child(2)::before { animation-delay: 140ms; }
  .calm--fresh .route__line > :nth-child(3)::before { animation-delay: 280ms; }
  .calm--fresh .route__line > :nth-child(4)::before { animation-delay: 420ms; }
  .calm--fresh .route__line > :nth-child(5)::before { animation-delay: 560ms; }
  .calm--fresh .route__line > :nth-child(n+6)::before { animation-delay: 700ms; }
  .calm--fresh .route__today::after { animation: today-pop 420ms var(--ease-out) 620ms both; }
  .calm--fresh .route__flag { animation: fade-in 320ms var(--ease-out) 760ms both; }
}
@keyframes final-frame { 0% { opacity: 0; transform: scale(1.04); } 25%, 60% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes pin-dim { 0%, 100% { opacity: 1; } 20%, 65% { opacity: 0.4; } }
@keyframes pin-decided { 0% { box-shadow: 0 0 0 0 var(--color-success), var(--shadow-2); } 20%, 65% { box-shadow: 0 0 0 4px var(--color-success), var(--shadow-2); } 100% { box-shadow: 0 0 0 4px transparent, var(--shadow-1); } }
@keyframes route-fill { from { transform: scaleX(0); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes today-pop { from { opacity: 0; transform: scale(0.4); } }
/* Motion, the rest of the first batch (proposal A1, A2, B5, B7; 2026-11-26). */
/* B5: success and failure feel different. A done message draws its tick; an error does not
   rise in cheerfully, it simply appears, and stays until it is closed (app.js). */
.toasts .toast.toast--error:not(.is-leaving) { animation-name: fade-in; }
@media (prefers-reduced-motion: no-preference) {
  .toast:not(.toast--error):not(.toast--final) > svg { stroke-dasharray: 23; animation: toast-tick 360ms var(--ease-out) 140ms both; }
}
@keyframes toast-tick { from { stroke-dashoffset: 23; } to { stroke-dashoffset: 0; } }
/* A1: a tag that changed since this browser last showed it (a pin's status, a guest's
   answer, a cost marked paid) settles into place once, with a ring in its own colour. */
@media (prefers-reduced-motion: no-preference) {
  .is-changed { animation: tag-change 560ms var(--ease-out) both; }
}
@keyframes tag-change {
  0% { opacity: 0; transform: scale(0.85); box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 30%, transparent); }
  45% { opacity: 1; transform: scale(1.06); box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }
  100% { transform: none; box-shadow: 0 0 0 6px transparent; }
}

/* Pressed: every chip, tab, row and menu item answers a tap at once (audit M5). Cards
   press in a little, flat things darken; buttons already scale. */
:is(.filter, .vb-chip, .segmented__btn, .tabbar__item, .menu__panel a, .menu__panel button, .list__row, .soon__row, .hh__main, .fold__summary, .timeline__fold > summary, .nav__item):active {
  background-color: color-mix(in srgb, var(--color-text) 8%, transparent); }
:is(.event-card, .wedding-card, .board-card, .pin__link, .route__link):active { transform: scale(0.98); }
/* Waiting on the server: a block being swapped dims only if the answer is slow (audit M12),
   and a tick box that is on its way says so. */
[data-live][aria-busy="true"] { opacity: 0.6; transition: opacity 0s 300ms; }
.task__check button:disabled { opacity: 0.6; cursor: progress; }
/* A vendor's name is a link beside another link in the same row: its tap area reaches 44px
   without moving the text (audit B16). */

/* A close or back icon button opening the top bar lines its glyph up with the page's 16px
   edge, as the plain back link does (audit I30). */
.topbar > .btn--icon:first-child { margin-left: calc((var(--icon-xl) - var(--tap)) / 2); }
/* A chip inside a line of text keeps the line's height (audit I44). */
:is(.list__meta, .link-meta, .agenda__sub) .chip { min-height: 20px; vertical-align: 1px; margin-block: -2px; }
/* An invite row leads with a link mark where a member row has a face, so both lists start
   their names at one edge (audit I51). */
.avatar--icon { background: var(--color-surface-alt); color: var(--color-text-muted); --icon: var(--icon-sm); --icon-stroke: 2.25; }

/* Costs (ADR-0018): one row per cost on Budget and a vendor's page. The name and its line
   (vendor, date) take the width and wrap; the amount sits over Mark paid or the Paid tag. */
.cost-row { align-items: flex-start; }
.cost-row .list__main { flex: 1; min-width: 0; }
.cost-row .list__meta { white-space: normal; }
.cost-row .list__meta .is-over { color: var(--color-danger-ink); }
.cost-row__name { color: inherit; text-decoration: none; }
@media (hover: hover) { .cost-row__name:hover { color: var(--color-accent); } }
.cost-row__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); }
.cost-row__amount { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-row.is-paid .cost-row__amount { color: var(--color-text-muted); }
.cost-state { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) var(--sp-4); }
.cost-state__line { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.vendor-link { color: inherit; text-decoration: none; }
.vendor-link__go { flex: none; color: var(--color-text-muted); --icon: var(--icon-sm); }

/* ---------- The + menu (Kwabena, 2026-11-29) ----------
   Pills rise out of the + in a column, Pin first, 30ms apart; the + turns into an x. Opens in
   about 310ms, closes together in 150ms. Transitions, not keyframes, so a second tap mid-way
   turns it back. Reduced motion: a plain fade. Without JS the + is a link to Add a pin. */
.addmenu { position: fixed; inset: 0; z-index: 29; } /* under the tab bar (30), so the x stays tappable */
.addmenu[hidden] { display: none; }
.addmenu { --addmenu-scrim: rgb(14 14 18 / 0.38); --addmenu-pill: var(--color-surface); }
.addmenu__scrim { position: absolute; inset: 0; background: var(--addmenu-scrim); opacity: 0;
  transition: opacity 150ms var(--ease-out); }
.addmenu__list { position: absolute; left: var(--add-x, 50%); bottom: var(--add-y, calc(var(--tabbar-h) + var(--tabbar-lift) + var(--sp-3)));
  transform: translateX(-50%); display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-3); min-width: 9.5rem; }
.addmenu__item {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 48px; padding: 0 var(--sp-5) 0 var(--sp-4);
  border-radius: var(--r-pill); background: var(--addmenu-pill); color: var(--color-text);
  border: 1px solid var(--color-border);
  font-size: var(--fs-base); font-weight: var(--fw-semibold); text-decoration: none;
  box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(12px) scale(0.9); transform-origin: 50% 100%;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.addmenu__item svg { --icon: var(--icon-lg); color: var(--color-accent); }
.addmenu__item:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.addmenu.is-open .addmenu__scrim { opacity: 1; transition-duration: 200ms; }
.addmenu.is-open .addmenu__item { opacity: 1; transform: none; transition-duration: 220ms; }
.addmenu.is-open .addmenu__item:nth-last-child(2) { transition-delay: 30ms; }
.addmenu.is-open .addmenu__item:nth-last-child(3) { transition-delay: 60ms; }
.addmenu.is-open .addmenu__item:nth-last-child(4) { transition-delay: 90ms; }
.addmenu.is-open .addmenu__item:active { transform: scale(0.97); transition-duration: 100ms; transition-delay: 0s; }
.tabbar__add .tabbar__plus svg { transition: transform 200ms var(--ease-out); }
.tabbar__add[aria-expanded="true"] .tabbar__plus svg { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) {
  .addmenu .addmenu__item, .addmenu.is-open .addmenu__item { transform: none !important; }
  .addmenu .addmenu__item, .addmenu .addmenu__scrim { transition-property: opacity !important; transition-duration: 150ms !important; }
  .tabbar__add[aria-expanded="true"] .tabbar__plus svg { transform: none; }
}
@media (forced-colors: active) { .addmenu__item { border: 1px solid CanvasText; } }

/* Dark: a deeper dim and a lighter pill, so the pills stand off the page (2026-11-29). */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .addmenu { --addmenu-scrim: rgb(0 0 0 / 0.62); --addmenu-pill: var(--color-surface-alt); }
}
[data-theme="dark"] .addmenu { --addmenu-scrim: rgb(0 0 0 / 0.62); --addmenu-pill: var(--color-surface-alt); }


/* The first-run tour (Kwabena, 2026-11-29; mocks "A" and "C"). app.js draws it over the real
   page: a light frosted veil with a hole at the control (no ring around it: Kwabena,
   2026-11-29), and either a serif margin note with a drawn arrow, or the things the control
   opens floating out of it. */
.tour { --tour-veil: rgb(246 246 248 / 0.84); --tour-pill: var(--color-surface); position: fixed; inset: 0; z-index: 100; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tour { --tour-veil: rgb(14 14 18 / 0.86); --tour-pill: var(--color-surface-alt); }
}
[data-theme="dark"] .tour { --tour-veil: rgb(14 14 18 / 0.86); --tour-pill: var(--color-surface-alt); }
html.tour-open { overflow: hidden; }
.tour__veil { position: absolute; inset: 0; background: var(--tour-veil); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.tour__ink { position: fixed; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.tour__ink path { fill: none; stroke: var(--color-accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.tour__note { position: fixed; left: 24px; width: min(300px, calc(100vw - 48px)); color: var(--color-text); }
.tour__note--center { left: 0; right: 0; width: auto; padding: 0 28px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tour__count { margin: 0 0 var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.tour__text { margin: 0; max-width: 300px; font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; line-height: 1.08; text-wrap: balance; }
.tour__text em { font-style: normal; color: var(--color-accent); }
.tour__actions { display: flex; align-items: center; gap: var(--sp-1); margin-top: var(--sp-5); }
.tour__note--center .tour__actions { flex-direction: row-reverse; }
.tour__next { min-height: 44px; border-radius: 999px; gap: 2px; }
.tour__skip { min-height: 44px; padding: 0 var(--sp-4); border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 500; color: var(--color-text-muted); cursor: pointer; }
.tour__skip[hidden] { display: none; }
.tour__pill { position: fixed; display: inline-flex; align-items: center; gap: var(--sp-2); height: 44px; padding: 0 var(--sp-4) 0 var(--sp-3);
  border-radius: 999px; background: var(--tour-pill); border: 1px solid var(--color-border); box-shadow: var(--shadow-3);
  color: var(--color-text); font-weight: var(--fw-semibold); white-space: nowrap; pointer-events: none; animation: tour-bob 4.6s ease-in-out infinite; }
.tour__pill .icon { color: var(--color-accent); }
@keyframes tour-bob { 50% { translate: 0 -3px; } }
/* The note and pills are measured right after they move (the arrow starts at the note's last
   word), so they never transition; the reduced-motion rule's 1ms would hand back the old spot. */
.tour__note, .tour__pill { transition-property: none !important; }
@media (prefers-reduced-motion: reduce) {
  .tour__pill { animation: none; }
}

/* ---------- Visual pass (2026-12-01): pictures lead ----------
   A board's cover is its own photos: one fills the card, two sit side by side, three are
   one large and two small (the grid above). */
.board-card__mosaic--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.board-card__mosaic--1 > :first-child { grid-row: auto; }
.board-card__mosaic--2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.board-card__mosaic--2 > :first-child { grid-row: auto; }
.board-card__mosaic > img { display: block; }

/* Home's countdown over the couple's final pick: the photo under the colour, a darker veil
   at the foot so the white text keeps its contrast. */
.count__photo { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; }
.count--photo::before { opacity: 0.45; }
.count--photo::after { background: linear-gradient(180deg, rgb(42 15 29 / 0.35) 0%, rgb(42 15 29 / 0.82) 100%); }
/* Home's picks: a strip of the couple's own pictures, final first. */
.picks { display: grid; gap: var(--sp-3); }
.picks__strip { list-style: none; margin: 0; padding: 0 0 var(--sp-1); display: grid; grid-auto-flow: column;
  grid-auto-columns: 7.5rem; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.picks__strip::-webkit-scrollbar { display: none; }
.picks__item { scroll-snap-align: start; }
.picks__item a { position: relative; display: grid; gap: var(--sp-2); color: var(--color-text); text-decoration: none; }
.picks__item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-lg); background: var(--color-surface-sunken); display: block;
  transition: transform var(--dur-2) var(--ease-out); }
@media (hover: hover) { .picks__item a:hover img { transform: translateY(-2px); } }
.picks__name { font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: var(--lh-snug);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.picks__final { position: absolute; top: var(--sp-2); left: var(--sp-2); display: inline-flex; align-items: center; gap: 2px;
  padding: 2px var(--sp-2); border-radius: var(--r-pill); background: var(--color-success); color: #fff; font-size: 0.6875rem; font-weight: var(--fw-semibold); --icon: var(--icon-xs); --icon-stroke: 2.5; }
.picks__item a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--r-lg); }
@container app (min-width: 62rem) { .calm > .picks { grid-column: 1 / -1; } }

/* Add forms open as a card of their own, not loose fields on the page. */
#add-cost > form, details.ctl-add > form { background: var(--color-surface); border-radius: var(--r-xl); padding: var(--sp-5) var(--sp-4); box-shadow: var(--shadow-2); }

/* ---------- Direction B (Kwabena, 2026-12-02): Home's countdown on a phone ----------
   The photo runs edge to edge under the top bar and fades into the page; the words sit
   below it in ink, on the faded part, never on the busy part. Wider screens keep the card. */
@container app (max-width: 61.99rem) {
  .count--photo {
    margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0;
    padding: 13.5rem var(--sp-5) var(--sp-2);
    border-radius: 0; box-shadow: none; background: transparent; color: var(--color-text);
  }
  .count--photo::before, .count--photo::after { content: none; }
  .count--photo .count__photo {
    inset: 0 0 auto; height: 17rem; z-index: -1;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 96%);
            mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 96%);
  }
  .count--photo .count__hi { color: var(--color-text-muted); }
  .count--photo .count__line { font-size: var(--fs-3xl); letter-spacing: -0.035em; line-height: 1.02; }
  .count--photo .count__meta { color: var(--color-text-muted); }
  .count--photo .count__line a:focus-visible::after { outline-color: var(--color-focus); }
}


/* ---------- Motion pass (Kwabena, 2026-12-03: "clicks and movements seem bland and raw") ----------
   Quick and calm: every tap answers, pages arrive rather than blink, things that open in
   place unfold. All of it off when motion is reduced. */
@media (prefers-reduced-motion: no-preference) {
  /* Page to page: the new page comes in over the old one, which holds still underneath, so
     the screen never goes pale between them (2026-12-04: fading the old out first left a
     washed-out frame). Normal blending, so the two are never added together. The new page
     is solid by halfway and keeps settling after. The bars are held still (above). */
  ::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
  ::view-transition-new(root) { animation: vt-cover 300ms var(--ease-out) both; mix-blend-mode: normal; }
  /* A piece named on one page only (Plan's switches, arriving from Home) comes in with its
     page instead of popping up ahead of it; one on the old page only fades as it is covered. */
  ::view-transition-new(*):only-child { animation: vt-cover 300ms var(--ease-out) both; }
  ::view-transition-old(*):only-child { animation: vt-fade-out 150ms var(--ease-out) both; }

  /* Every tap answers: cards press in, rows and pills tint under the finger. */
  :is(.card--link, .event-card, .board-card, .wedding-card, .pin, .stat, .quiet-next a, .tile) {
    transition: transform 160ms var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
  :is(.card--link, .event-card, .board-card, .wedding-card, .pin, .tile):active { transform: scale(0.98); }
  a.list__row, .agenda__row, .filter, .segmented__btn, .addmenu__item {
    transition: background-color 120ms var(--ease-standard), transform 160ms var(--ease-out); }
  a.list__row:active, .agenda__row:active { background-color: var(--color-surface-alt); }
  .filter:active, .segmented__btn:active { transform: scale(0.96); }
  .tabbar__item .tabbar__icon { transition: transform 160ms var(--ease-out); }
  .tabbar__item:active .tabbar__icon { transform: scale(0.9); }

  /* Things that open in place (Add a cost, + Task, Set a budget target, More details,
     Change…) unfold instead of snapping open. */
  details[open] > :not(summary) { animation: unfold 260ms var(--ease-out) both; }
  details.menu[open] > .menu__panel { animation: menu-in 180ms var(--ease-out); }

  /* The + menu: the dim comes up a touch slower and the options rise with a little more travel. */
  .addmenu__item { transform: translateY(18px) scale(0.92); }
  .addmenu.is-open .addmenu__item { transition-duration: 280ms; }
  .addmenu.is-open .addmenu__item:nth-last-child(2) { transition-delay: 40ms; }
  .addmenu.is-open .addmenu__item:nth-last-child(3) { transition-delay: 80ms; }
  .addmenu.is-open .addmenu__item:nth-last-child(4) { transition-delay: 120ms; }

  /* Home, first visit of the day: the photo settles into place and the words follow it in. */
  .calm--fresh .count__photo { animation: photo-settle 1100ms var(--ease-out) both; }
  .calm--fresh .count > :not(img) { animation: vt-rise-in 520ms var(--ease-out) both; }
  .calm--fresh .count > .count__line { animation-delay: 80ms; }
  .calm--fresh .count > .count__meta { animation-delay: 160ms; }
}
@keyframes vt-rise-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes vt-cover { from { opacity: 0; transform: translateY(12px); } 50% { opacity: 1; } }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
@keyframes photo-settle { from { opacity: 0; transform: scale(1.06); } }

/* Events in the Timeline's look (Kwabena, 2026-12-03): each row is one link to the event. */
.event-agenda .agenda__head { font-size: var(--fs-base); font-weight: var(--fw-bold); }
.event-agenda .agenda__row { color: inherit; text-decoration: none; align-items: center; }
.event-agenda .agenda__title { font-weight: var(--fw-semibold); }
.event-agenda .event-row__go { color: var(--color-text-subtle); }
.event-agenda .event-row--past .agenda__title { color: var(--color-text-muted); }
@media (hover: hover) { .event-agenda .agenda__row:hover .agenda__title { color: var(--color-accent); } }
.event-agenda .agenda__row:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------- Budget on a wide screen (Kwabena, 2026-12-04) ----------
   From the side-menu width up, the summary card gains the months chart as its second
   half, and the costs share the page with "Where it goes". A phone keeps the page as it
   was: everything new is .only-desktop, and the rules below sit inside the container
   query. Charts are SVG with printed attributes (the CSP forbids inline styles); green is
   paid, the accent is still to pay, amber is late or over. vendors/charts.py draws them. */
.spend__key--left { display: none; }
.spend__key--late { background: var(--color-warning); }
.tone-1 { --tone: color-mix(in srgb, var(--color-accent) 62%, var(--color-text)); }
.tone-2 { --tone: var(--color-accent); }
.tone-3 { --tone: color-mix(in srgb, var(--color-accent) 70%, var(--color-surface)); }
.tone-4 { --tone: color-mix(in srgb, var(--color-accent) 46%, var(--color-surface)); }
.tone-5 { --tone: color-mix(in srgb, var(--color-accent) 28%, var(--color-surface)); }
.tone-6 { --tone: color-mix(in srgb, var(--color-accent) 15%, var(--color-surface)); }
@container app (min-width: 62rem) {
  .spend { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding: 0; }
  .spend__main { padding: var(--sp-5) var(--sp-6); }
  .spend__when { padding: var(--sp-5) var(--sp-6) var(--sp-4); border-left: 1px solid var(--color-border); }
  .spend__figure { font-family: var(--font-display); font-weight: 500; font-size: 3.25rem; line-height: 1; letter-spacing: -0.02em;
    margin-top: var(--sp-2); font-variant-numeric: normal; }
  .spend__figure .money--lg { font-size: inherit; font-weight: inherit; }
  .spend__figure > .money > .money__cur { font-size: 0.55em; color: var(--color-text-muted); margin-right: 0.08em; letter-spacing: 0; }
  .spend__of { display: block; margin-top: var(--sp-2); font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.4; letter-spacing: 0; }
  .spend__of .money__cur { font-size: 1em; color: inherit; margin-right: 0; }
  .spend__bar { height: 10px; margin-top: var(--sp-5); }
  /* The legend reads as three figures: a word over its amount. */
  .spend__legend { display: flex; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-4); }
  .spend__legend li { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; min-width: 0; }
  .spend__key { border-radius: 3px; width: 9px; height: 9px; margin-right: 6px; }
  .spend__key--left { display: inline-block; background: var(--color-track); }
  .spend__word { order: 1; font-size: var(--fs-xs); white-space: nowrap; }
  .spend__word::first-letter { text-transform: uppercase; }
  .spend__num { order: 2; flex: 0 0 100%; margin-top: 3px; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md);
    color: var(--color-text); }
  .spend__legend .is-over .spend__num { color: inherit; }

  .chart-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
  .chart-key { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--color-text-muted); }
  .chart-key li { display: flex; align-items: center; }
  .due-wrap { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-2); }
  .due { flex: 1 1 auto; min-width: 0; height: auto; }
  .due__grid { stroke: var(--color-border); }
  .due__axis { stroke: var(--color-border-strong); }
  .due__tick, .due__mon { font-size: 10.5px; fill: var(--color-text-subtle); }
  .due__mon { font-size: 11.5px; }
  .due__mon.is-now { font-weight: 700; fill: var(--color-text); }
  .due__val { font-size: 11.5px; font-weight: 600; fill: var(--color-text); }
  .due__paid { fill: var(--color-success); }
  .due__owed { fill: var(--color-accent); }
  .due__late { fill: var(--color-warning); }
  /* What has no month on it: small figures beside the chart, quieter than the chart. */
  .due-asides { list-style: none; margin: 0; flex: none; width: 7rem; padding: 2px 0 2px var(--sp-4);
    border-left: 1px solid var(--color-border); display: grid; gap: var(--sp-4); }
  .due-asides li { display: grid; gap: 1px; }
  .due-asides__label, .due-asides__what { font-size: 0.72rem; color: var(--color-text-muted); }
  .due-asides__num { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }

  .bud-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); align-items: start; }
  /* Only the costs (no category has money or a target): the list keeps the page's width. */
  .bud-cols > :only-child { grid-column: 1 / -1; }
  /* The filters move up beside "Costs", so both halves start their cards on one line. */
  .bud-cols > #costs { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--sp-3); }
  .bud-cols > #costs > * { grid-column: 1 / -1; }
  .bud-cols > #costs > .section__head { grid-column: 1; }
  .bud-cols > #costs > .filters { grid-column: 2; justify-self: end; max-width: 100%; margin: 0; padding-inline: 0; }
  .bud-cols > .section { margin-top: 0; }
  .bud-cols .section__head { min-height: 40px; }
  .where { padding: var(--sp-5); }
  .split { width: 100%; height: 12px; border-radius: var(--r-pill); overflow: hidden; }
  .split rect { fill: var(--tone); }
  .where__rows { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
  .where__row { padding: var(--sp-3) 0; border-top: 1px solid var(--color-border); }
  .where__row:first-child { border-top: 0; }
  .where__row:last-child { padding-bottom: 0; }
  .where__top { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
  .where__sw { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--tone); }
  .where__name { font-weight: var(--fw-semibold); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .where__share { margin-left: auto; flex: none; font-size: var(--fs-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
  .where__amount { flex: none; min-width: 5.5rem; text-align: right; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
  .meter { display: block; width: calc(100% - 18px); height: 6px; margin: var(--sp-2) 0 6px 18px; border-radius: var(--r-pill); overflow: hidden; }
  .meter__track { fill: var(--color-accent-soft); }
  .meter__fill { fill: var(--color-accent); }
  .meter--paid .meter__track { fill: var(--color-success-soft); }
  .meter--paid .meter__fill { fill: var(--color-success); }
  .meter--over .meter__track { fill: var(--color-warning-soft); }
  .meter--over .meter__fill { fill: var(--color-warning); }
  .where__note { margin: 0 0 0 18px; font-size: var(--fs-xs); color: var(--color-text-muted); }
  .where__over { color: var(--color-warning-ink); font-weight: var(--fw-semibold); }
}
