/* Ultimate Man design system (v2).
   Tokens on :root, dark mode below, then shared components. Page stylesheets (public, quiz, account)
   build on these; reuse a class here before adding a new one.
   Fonts are self-hosted (OFL, see static/fonts/OFL-*.txt). No external hosts at runtime.
   The font URLs carry the same ?v=<content hash> that url_for('static') adds to the <link rel=preload> in
   base.html, so each font downloads once and is cached for a year (tests/test_visual.py keeps them in sync). */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2?v=3100e775e8") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-var.woff2?v=a97804dc9f") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #f7f2ea;            /* warm paper */
  --bg-2: #efe7da;          /* section bands */
  --surface: #ffffff;
  --surface-2: #f5efe5;
  --surface-3: #ece4d6;
  --ink: #141a24;
  --ink-2: #4c5564;         /* 6.6:1 on --bg */
  --line: #e6dccd;
  --line-2: #d4c7b3;
  --hero: #0f1b2d;          /* deep navy panels, both themes */
  --hero-2: #1a2a44;
  --on-hero: #f7f2ea;
  --on-hero-2: #b9c2d0;     /* 8.4:1 on --hero */
  --accent: #f2a03a;        /* amber, button fill (dark text on it: 9:1) */
  --accent-hover: #f6ad4f;
  --accent-ink: #1b1200;
  --accent-text: #8f4d00;   /* amber as text on light: 5.9:1 on white */
  --accent-soft: #fdebd0;
  --coral: #e2553e;
  --coral-soft: #fde4dd;
  --good: #1e7a4c;
  --good-soft: #dcf1e5;
  --bad: #b3261e;
  --bad-soft: #fbe3e1;
  --focus: #2f6fde;
  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(23, 18, 10, .06);
  --shadow: 0 1px 2px rgba(23, 18, 10, .05), 0 8px 24px -10px rgba(23, 18, 10, .16);
  --shadow-lg: 0 2px 4px rgba(23, 18, 10, .05), 0 24px 48px -20px rgba(23, 18, 10, .28);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 64px;
  --accent-glow: rgba(214, 120, 10, .75);
  --sage: #86c79c; --sage-soft: #dcf1e5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b111b; --bg-2: #0f1724; --surface: #141d2b; --surface-2: #1a2535; --surface-3: #223047;
    --ink: #f3efe8; --ink-2: #aeb7c5; --line: #253246; --line-2: #34435c;
    --hero: #142238; --hero-2: #1c2e4a; --on-hero: #f7f2ea; --on-hero-2: #b9c2d0;
    --accent: #f4a944; --accent-hover: #f7b862; --accent-ink: #1b1200; --accent-text: #f6b860; --accent-soft: #33240f;
    --coral: #ff7a62; --coral-soft: #3a1d18; --good: #5fd09a; --good-soft: #12301f; --bad: #ff8a80; --bad-soft: #3a1715;
    --focus: #8ab4ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 56px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b111b; --bg-2: #0f1724; --surface: #141d2b; --surface-2: #1a2535; --surface-3: #223047;
  --ink: #f3efe8; --ink-2: #aeb7c5; --line: #253246; --line-2: #34435c;
  --hero: #142238; --hero-2: #1c2e4a; --on-hero: #f7f2ea; --on-hero-2: #b9c2d0;
  --accent: #f4a944; --accent-hover: #f7b862; --accent-ink: #1b1200; --accent-text: #f6b860; --accent-soft: #33240f;
  --coral: #ff7a62; --coral-soft: #3a1d18; --good: #5fd09a; --good-soft: #12301f; --bad: #ff8a80; --bad-soft: #3a1715;
  --focus: #8ab4ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 56px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- Ultimate Man brand: bold and premium
   Dark navy/charcoal is the default (not a dark mode), warm gold accents, cream ink. Applies only to
   <html data-brand="man"> (base.html); the family brand keeps its own warm light theme below.
   Contrast: --ink 16:1 and --ink-2 9.6:1 on --bg; --accent-text 10:1 on --surface; --accent-ink on --accent 9.8:1. */
:root[data-brand="man"] {
  --bg: #0c121c; --bg-2: #101827; --surface: #141d2c; --surface-2: #1a2537; --surface-3: #243149;
  --ink: #f5eee2; --ink-2: #b3bccb; --line: #222e43; --line-2: #34425b;
  --hero: #080d15; --hero-2: #172235; --on-hero: #f5eee2; --on-hero-2: #b3bccb;
  --accent: #d9ab55; --accent-hover: #e6bd6f; --accent-ink: #171003; --accent-text: #e7c07a; --accent-soft: #2a2214;
  --accent-glow: rgba(217, 171, 85, .32);
  --coral: #ef8f73; --coral-soft: #3a1f19; --good: #6fd3a1; --good-soft: #11291d; --bad: #ff8a80; --bad-soft: #3a1715;
  --sage: #8cc6a2; --sage-soft: #14271d;
  --focus: #9cc0ff;
  --gold-line: rgba(217, 171, 85, .32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -12px rgba(0, 0, 0, .65);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 60px -22px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- Ultimate Family brand
   Same system, its own personality: evergreen panels, coral buttons, a marigold second color, on warm linen.
   Switched on by <html data-brand="family"> (base.html). Nothing below touches the Ultimate Man look. */
:root[data-brand="family"] {
  --bg: #fbf6f0; --bg-2: #f4ebe1; --surface: #ffffff; --surface-2: #f8f1ea; --surface-3: #efe4d8;
  --ink: #1c2826; --ink-2: #4f5b59; --line: #ece0d3; --line-2: #d9cab9;
  --hero: #1d3b36; --hero-2: #275049; --on-hero: #fbf6f0; --on-hero-2: #bfd3cd;
  --accent: #f28c6f; --accent-hover: #f59d83; --accent-ink: #2a0e05; --accent-text: #a63f25; --accent-soft: #fde6dd;
  --accent-glow: rgba(214, 92, 60, .55);
  --coral: #f2b84b; --coral-soft: #fdf0d2;
  --sage: #7fb7a4; --sage-soft: #e2f0ea;
  --good: #1e7a4c; --good-soft: #dcf1e5; --bad: #b3261e; --bad-soft: #fbe3e1;
  --radius-lg: 30px; --radius: 22px;
  --shadow: 0 1px 2px rgba(40, 28, 18, .05), 0 10px 26px -12px rgba(40, 28, 18, .18);
  --shadow-lg: 0 2px 4px rgba(40, 28, 18, .05), 0 26px 50px -22px rgba(40, 28, 18, .30);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="family"]:not([data-theme="light"]) {
    --bg: #0d1615; --bg-2: #111d1b; --surface: #16231f; --surface-2: #1c2c28; --surface-3: #243833;
    --ink: #f4efe9; --ink-2: #b3c2bd; --line: #24352f; --line-2: #34493f;
    --hero: #17302b; --hero-2: #21423b; --on-hero: #fbf6f0; --on-hero-2: #bfd3cd;
    --accent: #f59a7f; --accent-hover: #f7ad96; --accent-ink: #2a0e05; --accent-text: #f7a88f; --accent-soft: #3a201a;
    --accent-glow: rgba(0, 0, 0, .5);
    --coral: #f4c264; --coral-soft: #3a2e14; --sage: #8cc6b2; --sage-soft: #183028;
    --good: #5fd09a; --good-soft: #12301f; --bad: #ff8a80; --bad-soft: #3a1715;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 56px -20px rgba(0, 0, 0, .7);
  }
}
:root[data-brand="family"][data-theme="dark"] {
  --bg: #0d1615; --bg-2: #111d1b; --surface: #16231f; --surface-2: #1c2c28; --surface-3: #243833;
  --ink: #f4efe9; --ink-2: #b3c2bd; --line: #24352f; --line-2: #34493f;
  --hero: #17302b; --hero-2: #21423b; --on-hero: #fbf6f0; --on-hero-2: #bfd3cd;
  --accent: #f59a7f; --accent-hover: #f7ad96; --accent-ink: #2a0e05; --accent-text: #f7a88f; --accent-soft: #3a201a;
  --accent-glow: rgba(0, 0, 0, .5);
  --coral: #f4c264; --coral-soft: #3a2e14; --sage: #8cc6b2; --sage-soft: #183028;
  --good: #5fd09a; --good-soft: #12301f; --bad: #ff8a80; --bad-soft: #3a1715;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 56px -20px rgba(0, 0, 0, .7);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 .45em; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 7.5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 5vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -.015em; font-weight: 700; }
.h2 { font-family: var(--font-display); font-size: clamp(1.55rem, 5vw, 2.3rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; }
.h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
strong { font-weight: 700; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 10px 14px;
  z-index: 50; border-radius: 10px; box-shadow: var(--shadow); font-weight: 700; }
.skip:focus { left: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- layout helpers */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1 0 auto; padding-top: 24px; padding-bottom: 64px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.mid { max-width: 760px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.tiny { font-size: .8rem; }
.lede { font-size: clamp(1.08rem, 2.6vw, 1.25rem); line-height: 1.55; color: var(--ink-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 .78rem/1.2 var(--font);
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.section { margin-top: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head .link { font-weight: 600; font-size: .95rem; }

/* icons from static/icons.svg */
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.ico-lg { width: 28px; height: 28px; }

/* ---------------------------------------------------------------- header */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid transparent;
  transition: border-color .2s, background-color .2s; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
}
.topbar { border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-word { font: 800 1.2rem/1 var(--font-display); letter-spacing: -.03em; }
.brand-word b { color: var(--accent-text); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 999px;
  text-decoration: none; color: var(--ink-2); font-weight: 600; }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-icon { width: 44px; justify-content: center; padding: 0; }
@media (max-width: 720px) { .nav-wide { display: none; } }
/* The wordmark stays visible on every phone (it shrinks instead of disappearing). */
@media (max-width: 400px) {
  .brand { gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .brand-word { font-size: 1.02rem; }
  [data-brand="man"] .nav { gap: 2px; }
  [data-brand="man"] .nav-link.nav-squeeze { padding: 0 8px; min-width: 44px; justify-content: center; }
  [data-brand="man"] .nav-link.nav-squeeze span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-brand="man"] .nav .btn-sm { padding: 0 13px; }
}
.nav-label { display: none; }
.nav .btn { flex: none; white-space: nowrap; }   /* "+ Idea" never breaks onto two lines on a phone */
.brand { min-width: 0; }
@media (min-width: 560px) { .nav-label { display: inline; } .nav-icon.nav-labeled { width: auto; padding: 0 12px; } }
@media (max-width: 359px) { .nav-signin { display: none; } }
/* Ultimate Family: signed-in family nav (Everyone, Planner, + Idea, settings) fits 360px: icon-only links, names kept for screen readers */
@media (max-width: 460px) {
  [data-brand="family"] .nav { gap: 2px; }
  [data-brand="family"] .nav-link { padding: 0 8px; min-width: 44px; justify-content: center; }
  [data-brand="family"] .nav-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-brand="family"] .nav .btn-sm { padding: 0 12px; }
}

/* ---------------------------------------------------------------- footer */
.footer { flex-shrink: 0; background: var(--hero); color: var(--on-hero); padding: 48px 0 40px; font-size: .92rem; margin-top: auto; }
.footer a { color: var(--on-hero); }
.footer-top { display: grid; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 12px; }
.footer-brand strong { display: block; font: 800 1.3rem/1.1 var(--font-display); letter-spacing: -.03em; }
.footer-brand span { color: var(--on-hero-2); }
.footer-nav { display: flex; gap: 6px 4px; flex-wrap: wrap; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.footer-nav a:hover { background: var(--hero-2); }
.footer-legal { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--hero-2); color: var(--on-hero-2); }
.footer-legal p { margin: 0 0 6px; }
.disclosure-short { font-weight: 600; color: var(--on-hero); }
@media (min-width: 760px) { .footer-top { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------------------------------------------------------------- buttons */
.btn { --btn-bg: var(--surface); --btn-ink: var(--ink); --btn-line: var(--line-2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-ink);
  font: 650 1rem/1.1 var(--font); letter-spacing: -.005em; text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .15s, border-color .15s, filter .15s;
  -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn .ico { width: 1.15em; height: 1.15em; }
.btn-primary { --btn-bg: var(--accent); --btn-ink: var(--accent-ink); --btn-line: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 20px -10px var(--accent-glow); font-weight: 750; }
.btn-primary:hover { --btn-bg: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 24px -10px var(--accent-glow); }
.btn-dark { --btn-bg: var(--ink); --btn-ink: var(--bg); --btn-line: var(--ink); }
.btn-dark:hover { border-color: var(--ink); filter: brightness(1.15); }
.btn-ghost { --btn-bg: transparent; --btn-line: transparent; color: var(--ink-2); }
.btn-ghost:hover { --btn-bg: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn-on-hero { --btn-bg: transparent; --btn-ink: var(--on-hero); --btn-line: color-mix(in srgb, var(--on-hero) 40%, transparent); }
.btn-on-hero:hover { border-color: var(--on-hero); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-danger { --btn-bg: var(--bad); --btn-ink: #fff; --btn-line: var(--bad); }
:root[data-theme="dark"] .btn-danger { --btn-ink: #1b0605; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-danger { --btn-ink: #1b0605; } }
.btn-danger:hover { filter: brightness(1.06); border-color: var(--bad); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; font: inherit; min-height: 44px; }
.link { color: var(--accent-text); font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- cards, pills, chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-flat { box-shadow: none; }
.card-hero { background: var(--hero); color: var(--on-hero); border-color: var(--hero); }
.card-hero .muted { color: var(--on-hero-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: .8rem; font-weight: 650; line-height: 1.3; color: var(--ink); }
.pill-accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--ink); }
.pill-good { background: var(--good-soft); border-color: transparent; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2);
  font-size: .8rem; font-weight: 600; line-height: 1.35; color: var(--ink-2); }
.chip .ico { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- forms */
.field { display: block; }
.field > span:first-child, .field-label { display: block; font-weight: 650; margin-bottom: 8px; }
.field .hint, .hint { font-weight: 400; color: var(--ink-2); font-size: .9rem; }
input:not([type]), input[type=text], input[type=search], input[type=url], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: 1rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none; }
select { padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 80%, transparent); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent); }
input[aria-invalid="true"] { border-color: var(--bad); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.error { color: var(--bad); font-weight: 650; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* ---------------------------------------------------------------- tap-card choices (quiz, hint)
   <div class="choices"><label class="choice"><input type=radio|checkbox><span class="choice-body">...</span></label></div> */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.choice { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice-body { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 64px; height: 100%; padding: 14px 16px;
  border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 650; line-height: 1.3;
  box-shadow: var(--shadow-sm); transition: border-color .15s, background-color .15s, transform .15s var(--ease), box-shadow .15s; }
.choice:hover .choice-body { border-color: var(--ink-2); }
.choice:active .choice-body { transform: scale(.98); }
.choice-body .emoji { font-size: 1.6rem; line-height: 1; }
.choice-body small { font-weight: 450; color: var(--ink-2); font-size: .86rem; }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent) inset, var(--shadow-sm); }
.choice input:checked + .choice-body::after { content: ""; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231b1200' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:disabled + .choice-body { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------------- progress */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 0 0 20px; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------------------------------------------------------------- gift card (picks everywhere)
   Markup from templates/_ui.html gift(). Art tile tint comes from .tile-<art key>. */
.gift { position: relative; display: flex; flex-direction: column; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.gift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gift + .gift { margin-top: 0; }
.gift-art { position: relative; display: grid; place-items: center; height: 168px; background: var(--tile, var(--surface-2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); overflow: hidden; }
.gift-art::before { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .55), transparent); }
.gift-art img { position: relative; width: 132px; height: 132px; transition: transform .35s var(--ease); }
.gift:hover .gift-art img { transform: rotate(-4deg) scale(1.05); }
.gift-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border-radius: 999px; background: var(--hero); color: var(--on-hero); font: 700 .74rem/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.gift-badge .ico { width: 13px; height: 13px; color: var(--accent); }
.gift-num { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .8); color: #1d2433; font: 800 .85rem/1 var(--font-display); }
.gift-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 18px; flex: 1; }
.gift-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.gift-title { margin: 0; font: 750 1.14rem/1.25 var(--font-display); letter-spacing: -.015em; }
.gift-price { margin: 0; font: 800 1.05rem/1.2 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.gift-why { position: relative; margin: 6px 0 2px; padding: 12px 14px; border-radius: 4px 16px 16px 16px; background: var(--surface-2);
  font-size: .95rem; line-height: 1.5; color: var(--ink); }
.gift-why::before { content: ""; position: absolute; top: -7px; left: 0; width: 14px; height: 8px; background: var(--surface-2);
  clip-path: polygon(0 0, 0 100%, 100% 100%); }
.gift-actions { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 6px; }
.btn-buy { min-height: 54px; font-size: 1.02rem; }
.btn-buy .ico-out { width: 16px; height: 16px; opacity: .8; }
.gift-wow { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.pick-disclosure { font-size: .85rem; color: var(--ink-2); margin: 14px 0 0; display: flex; gap: 8px; align-items: flex-start; }
.pick-disclosure .ico { color: var(--good); margin-top: 2px; }
.gift-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.gift-grid > .gift { animation: rise .5s var(--ease) both; }
.gift-grid > .gift:nth-child(2) { animation-delay: .06s; }
.gift-grid > .gift:nth-child(3) { animation-delay: .12s; }
.gift-grid > .gift:nth-child(4) { animation-delay: .18s; }
.gift-grid > .gift:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* legacy compact pick (hint page and old markup) */
.pick { display: flex; flex-direction: column; gap: 10px; }
.pick-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pick h3 { margin: 0; }
.pick .why { margin: 0; }
.pick .meta { color: var(--ink-2); font-size: .9rem; }
.pick .buy { margin-top: auto; }

/* art tile tints, one per vocab.ART_KEYS key (+ who/spot art) */
.tile-jewelry { --tile: #efe4fb; } .tile-flowers { --tile: #ffe3ea; } .tile-candle { --tile: #fff0d4; }
.tile-kitchen { --tile: #e1efff; } .tile-cookware { --tile: #ffe5dc; } .tile-coffee { --tile: #f3e6d8; }
.tile-tech { --tile: #e3eafb; } .tile-headphones { --tile: #ece5ff; } .tile-book { --tile: #fdebc8; }
.tile-blanket { --tile: #e2f3e8; } .tile-beauty { --tile: #ffe4ef; } .tile-spa { --tile: #dcf2ef; }
.tile-fashion { --tile: #fde4da; } .tile-bag { --tile: #f6ead9; } .tile-tools { --tile: #fff2c4; }
.tile-grill { --tile: #ffe2d8; } .tile-bar { --tile: #f4e6d2; } .tile-outdoor { --tile: #e1f1dc; }
.tile-sports { --tile: #e0ecfc; } .tile-garden { --tile: #e3f4da; } .tile-toys { --tile: #fff1c2; }
.tile-games { --tile: #ebe3ff; } .tile-crafts { --tile: #ffe5ef; } .tile-giftcard { --tile: #fff0d4; }
.tile-who-heart { --tile: #ffe3df; } .tile-who-teddy { --tile: #f6ead9; } .tile-who-cheers { --tile: #fff2c4; }
.tile-spot-quiz { --tile: #e3eafb; } .tile-spot-calendar { --tile: #ffe5dc; } .tile-spot-bell { --tile: #fff0d4; }
.tile-spot-box { --tile: #f3e6d8; }
.tile-teacher { --tile: #e2f3e8; } .tile-party { --tile: #fff1c2; } .tile-host { --tile: #ffe5dc; } .tile-baby { --tile: #ffe4ef; }
.tile-who-cap { --tile: #e0ecfc; } .tile-who-teacup { --tile: #ffe3ea; } .tile-spot-list { --tile: #fdf0d2; } .tile-spot-team { --tile: #e2f0ea; }
.tile { background: var(--tile, var(--surface-2)); }
:root[data-theme="dark"] .tile, :root[data-theme="dark"] .gift-art { background: color-mix(in srgb, var(--tile, #888) 24%, var(--surface-2)); }
:root[data-theme="dark"] .gift-art::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--tile, #fff) 30%, transparent), transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile, :root:not([data-theme="light"]) .gift-art { background: color-mix(in srgb, var(--tile, #888) 24%, var(--surface-2)); }
  :root:not([data-theme="light"]) .gift-art::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--tile, #fff) 30%, transparent), transparent); }
}
/* Ultimate Man: art sits on a muted stone plate (the illustrations are drawn with dark outlines, so they
   need a light ground), a product-shot look inside the navy cards. */
:root[data-brand="man"] .tile, :root[data-brand="man"] .gift-art { background: color-mix(in srgb, var(--tile, #e8e0d2) 38%, #cbc2b3); }
:root[data-brand="man"] .gift-art { border-bottom-color: var(--line); }
:root[data-brand="man"] .gift-art::before { background: radial-gradient(closest-side, rgba(255, 250, 240, .5), transparent); }

/* Photo art (templates/_ui.html art(): img/art/<key>.webp when it exists, the SVG otherwise).
   The photo fills its tile edge to edge; it is a mood shot for the art key, never presented as the product. */
.art-photo { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.art-photo img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; transform: none !important; }
.gift-art:has(.art-photo)::before { display: none; }
.tile:has(.art-photo) { position: relative; overflow: hidden; }

/* ---------------------------------------------------------------- flashes */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 550; animation: rise .35s var(--ease) both; }
.flash::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.flash-error { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--bad-soft); }
.flash-error::before { background: var(--bad); }
.flash-success { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); background: var(--good-soft); }
.flash-success::before { background: var(--good); }

/* ---------------------------------------------------------------- last-minute mode (app/lastminute.py)
   Urgent but calm: an accent rule, a bolt, plain words. Tokens only, so both brands and themes follow. */
.rush { position: relative; margin: 0 0 18px; padding: 18px 18px 18px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); box-shadow: var(--shadow-sm); }
.rush-eyebrow, .quiz-picks-head.is-rush .rush-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 700 .76rem/1.2 var(--font);
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.rush-eyebrow .ico { width: 15px; height: 15px; color: var(--accent); }
.rush-h { margin: 0 0 8px; font-size: clamp(1.3rem, 5vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; }
.rush-sub { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.rush-nothing { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: .95rem; line-height: 1.5; }
.rush-more { margin-top: 22px; }
.rush-more-h { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 1.1rem; }
.rush-more-h .ico { width: 18px; height: 18px; color: var(--accent); flex: none; }
.rush-link { margin: 14px 0 0; font-weight: 600; }
.chip-rush { background: var(--accent-soft); color: var(--accent-text); }
.chip-rush .ico { color: var(--accent); }
.gift-rush { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.quiz-picks-head.is-rush h1 { font-size: clamp(1.7rem, 6.4vw, 2.6rem); }
@media (min-width: 720px) { .rush { padding: 22px 26px; } }

/* ---------------------------------------------------------------- avatars */
.avatar { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  font: 800 1.05rem/1 var(--font-display); color: #1d2433; background: var(--tile, var(--accent-soft)); border: 2px solid var(--surface); box-shadow: var(--shadow-sm); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.av-wife { --tile: #ffd9d1; } .av-mom { --tile: #ffd6e2; } .av-dad { --tile: #ffe8a8; } .av-kid { --tile: #cfe6ff; } .av-friend { --tile: #d4efd9; }

/* ---------------------------------------------------------------- empty states */
.empty { text-align: center; padding: 36px 22px; }
.empty img { width: 120px; height: 120px; margin: 0 auto 8px; display: block; }
.empty h1, .empty h2 { margin-bottom: 8px; }
.empty .btn { margin: 6px 4px 0; }

/* ---------------------------------------------------------------- small-screen tuning */
@media (max-width: 520px) {
  .card { padding: 18px; }
  .main { padding-top: 18px; }
  /* picks: a shorter art band so the title, price and why-line land in the first screen */
  .gift-art { height: 128px; }
  .gift-art::before { width: 150px; height: 150px; }
  .gift-art img { width: 100px; height: 100px; }
  .gift-body { padding: 16px; gap: 8px; }
  .gift-grid { gap: 14px; }
}
.gift:focus-within { box-shadow: var(--shadow-lg); }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- error / gate / simple status pages */
.status-card { text-align: center; margin-top: 12px; }
.status-card form { text-align: left; margin-top: 18px; }
.status-art { width: 128px; height: 128px; margin: 0 auto 16px; border-radius: 32px; display: grid; place-items: center; }
.status-art img { width: 104px; height: 104px; margin: 0; }
.status-actions { justify-content: center; margin-top: 8px; }

/* Season banner (templates/_season_banner.html), on the signed-in dashboards of both brands. */
.season-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 22px; padding: 16px 18px;
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.season-copy { flex: 1 1 260px; min-width: 0; }
.season-banner .eyebrow { margin-bottom: 4px; color: var(--accent-text); }
.season-title { margin: 0; font: 800 1.08rem/1.25 var(--font-display); }
.season-text { margin: 4px 0 0; color: var(--ink-2); }
.season-cta { flex: none; }
@media (max-width: 520px) { .season-cta { flex: 1 1 100%; } }
