/* Ultimate Man design system. Tokens on :root, dark mode below.
   Feature pages may add their own stylesheet via {% block head %}; reuse these classes first. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece4;
  --ink: #121a26;
  --ink-2: #4a5566;
  --line: #ddd8cc;
  --brand: #0f1b2d;          /* deep navy */
  --accent: #e0911f;         /* amber */
  --accent-ink: #1b1200;
  --accent-soft: #fbecd2;
  --good: #1e7a4c;
  --bad: #b3261e;
  --focus: #2f6fde;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c121c; --surface: #141c29; --surface-2: #1b2535; --ink: #edf0f5; --ink-2: #a7b1c2;
    --line: #2a3547; --brand: #e9edf4; --accent: #f2a93b; --accent-ink: #1b1200; --accent-soft: #3a2a10;
    --good: #4cc38a; --bad: #ff8a80; --focus: #8ab4ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c121c; --surface: #141c29; --surface-2: #1b2535; --ink: #edf0f5; --ink-2: #a7b1c2;
  --line: #2a3547; --brand: #e9edf4; --accent: #f2a93b; --accent-ink: #1b1200; --accent-soft: #3a2a10;
  --good: #4cc38a; --bad: #ff8a80; --focus: #8ab4ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.hidden { display: none !important; }

/* top bar + footer */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 14px; font-size: .95rem; }
.nav a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--ink); }
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; background: var(--surface); font-size: .9rem; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-2); }
.disclosure-short { font-weight: 600; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.05); border-color: var(--accent); }
.btn-dark { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 600; }
.pill-accent { background: var(--accent-soft); color: var(--ink); }

/* forms */
.field { display: block; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-2); font-size: .875rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 1rem var(--font); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; }
.error { color: var(--bad); font-weight: 600; }

/* tap-card choices (quiz). Markup: <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; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice-body { display: flex; flex-direction: column; gap: 4px; min-height: 64px; height: 100%; padding: 14px; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: var(--surface); font-weight: 600; }
.choice-body .emoji { font-size: 1.6rem; line-height: 1; }
.choice-body small { font-weight: 400; color: var(--ink-2); }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }

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

/* gift pick card */
.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; color: var(--ink); }
.pick .meta { color: var(--ink-2); font-size: .9rem; }
.pick .buy { margin-top: auto; }
.pick-disclosure { font-size: .8rem; color: var(--ink-2); margin: 0; }

/* flashes */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.flash-error { border-color: var(--bad); }
.flash-success { border-color: var(--good); }

/* hero */
.hero { padding: 28px 0 8px; }
.hero .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }

@media (max-width: 520px) {
  .nav { gap: 10px; font-size: .9rem; }
  .card { padding: 16px; }
}
@media (max-width: 400px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
