/* ==========================================================================
   FestiveHelper - design system
   Original CSS. No frameworks, no external requests, no tracking.

   1.  Tokens
   2.  Reset and base
   3.  Layout primitives
   4.  Header and navigation
   5.  Hero
   6.  Cards and grids
   7.  Countdown
   8.  Forms and controls
   9.  Tool shell and results
   10. Secret Santa
   11. FAQ, related, ads
   12. Footer and cookie banner
   13. Utilities and print
   ========================================================================== */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  color-scheme: light;

  /* Brand */
  --evergreen-950: #062016;
  --evergreen-900: #0a3225;
  --evergreen-800: #0d4531;
  --evergreen-700: #0f5f41;
  --evergreen-600: #127a53;
  --evergreen-500: #199a69;
  --evergreen-100: #e3f2ea;
  --evergreen-50:  #f1f9f5;

  --cranberry-700: #a51f36;
  --cranberry-600: #c22843;
  --cranberry-500: #d94059;
  --cranberry-50:  #fdf0f2;

  --gold-600: #a97d16;
  --gold-500: #d3a12c;
  --gold-400: #eabc54;
  --gold-50:  #fbf4e3;

  /* Neutrals - very slightly warm so the page never feels clinical */
  --canvas:      #fbfaf8;
  --surface:     #ffffff;
  --surface-alt: #f5f5f2;
  --surface-sunk:#efefeb;
  --border:      #e6e5e0;
  --border-soft: #efeeea;
  --ink:         #0f1714;
  --ink-body:    #414d47;
  --ink-muted:   #6c7a73;
  --ink-faint:   #8c9a92;
  --on-dark:     #ffffff;
  --on-dark-soft:#c3d6cb;

  /* Roles */
  --primary:      var(--evergreen-700);
  --primary-hover:var(--evergreen-800);
  --primary-ink:  var(--evergreen-800);
  --primary-tint: var(--evergreen-50);
  --accent:       var(--cranberry-600);
  --accent-hover: var(--cranberry-700);
  --accent-tint:  var(--cranberry-50);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    system-ui, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.1875rem;
  --step-2:  clamp(1.25rem, 1.15rem + .45vw, 1.45rem);
  --step-3:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-4:  clamp(1.9rem, 1.5rem + 1.9vw, 2.75rem);
  --step-5:  clamp(2.25rem, 1.6rem + 3.1vw, 3.6rem);

  /* Space */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;
  --section: clamp(48px, 6vw, 88px);

  /* Shape */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Elevation - low contrast, layered, never muddy */
  --sh-xs: 0 1px 2px rgba(11, 26, 20, .05);
  --sh-sm: 0 1px 3px rgba(11, 26, 20, .06), 0 1px 2px rgba(11, 26, 20, .04);
  --sh-md: 0 6px 18px -6px rgba(11, 26, 20, .12), 0 2px 6px -2px rgba(11, 26, 20, .06);
  --sh-lg: 0 28px 56px -20px rgba(11, 26, 20, .22), 0 8px 20px -10px rgba(11, 26, 20, .10);
  --ring:  0 0 0 1px var(--border);
  --focus: 0 0 0 3px rgba(18, 122, 83, .28);

  --wrap: 1140px;
  --wrap-narrow: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --canvas:      #0a0f0d;
    --surface:     #121916;
    --surface-alt: #172019;
    --surface-sunk:#0e1411;
    --border:      #24302a;
    --border-soft: #1d2723;
    --ink:         #ecf2ee;
    --ink-body:    #b8c7bf;
    --ink-muted:   #8fa098;
    --ink-faint:   #74847c;

    --primary:      #2bab76;
    --primary-hover:#35c187;
    --primary-ink:  #4ccb92;
    --primary-tint: #11291f;
    --accent:       #e04f66;
    --accent-hover: #ea6478;
    --accent-tint:  #2a1418;

    --evergreen-100: #143324;
    --evergreen-50:  #11291f;
    --gold-50:  #2a2313;
    --gold-600: var(--gold-400);

    --sh-xs: 0 1px 2px rgba(0, 0, 0, .5);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, .55);
    --sh-md: 0 8px 22px -8px rgba(0, 0, 0, .65);
    --sh-lg: 0 30px 60px -22px rgba(0, 0, 0, .8);
    --focus: 0 0 0 3px rgba(43, 171, 118, .32);
  }
}

/* ==========================================================================
   2. Reset and base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink-body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.021em;
  line-height: 1.15;
  margin: 0 0 .55em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -.028em; }
h2 { font-size: var(--step-3); margin-top: 2em; }
h3 { font-size: var(--step-1); margin-top: 1.7em; letter-spacing: -.012em; }
h4 { font-size: var(--step-0); margin-top: 1.4em; }

p, ul, ol { margin: 0 0 1.1em; }
p, li, h1, h2, h3, h4, td, th { overflow-wrap: break-word; }

a { color: var(--primary-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-12) 0; }
small { font-size: var(--step--1); }
strong, b { font-weight: 650; color: var(--ink); }

code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  padding: .12em .38em;
  border-radius: 6px;
}

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

::selection { background: var(--evergreen-100); color: var(--evergreen-900); }

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-5); }
@media (min-width: 720px) { .wrap { padding: 0 var(--sp-8); } }

main { display: block; min-height: 60vh; }
.page { padding-block: var(--sp-8) var(--section); }

.page-head { max-width: 42rem; }
.page-head .lede {
  font-size: var(--step-2);
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 0;
  text-wrap: pretty;
}

.prose { max-width: var(--wrap-narrow); margin-top: var(--sp-12); }
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--primary); }
.prose p { text-wrap: pretty; }

.breadcrumbs { font-size: var(--step--1); margin: 0 0 var(--sp-5); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; }
.breadcrumbs li { color: var(--ink-faint); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--border); }
.breadcrumbs a { color: var(--ink-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary-ink); text-decoration: underline; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-ink);
}

/* ==========================================================================
   4. Header and navigation
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--evergreen-800);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
@supports not (backdrop-filter: blur(4px)) {
  .site-header { background: var(--canvas); }
}

.header-inner { display: flex; align-items: center; gap: var(--sp-4); min-height: 68px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -.024em;
  padding: var(--sp-2) 0;
}
.brand:hover { color: var(--ink); }
.brand .brand-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; }
.brand-name .lite { color: var(--primary); }

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 10px var(--sp-4);
  border-radius: var(--r-pill);
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh-xs);
}
.nav-toggle:hover { border-color: var(--primary); color: var(--primary-ink); }
.nav-toggle .bars { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; border-radius: 2px; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after  { top: 5px; }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }

.nav-link, .nav-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 9px var(--sp-3);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: .95rem;
  font-weight: 550;
  color: var(--ink-body);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background .14s ease, color .14s ease;
}
.nav-link:hover, .nav-btn:hover { background: var(--surface-alt); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--primary-ink); background: var(--primary-tint); font-weight: 650; }
.nav-btn[data-section-active="true"] { color: var(--primary-ink); font-weight: 650; }

.nav-btn .caret {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: .6;
  transition: transform .18s ease;
}
.nav-btn[aria-expanded="true"] .caret { transform: rotate(-135deg); }

.submenu li a {
  display: block;
  padding: 10px var(--sp-4);
  border-radius: var(--r-sm);
  font-size: .94rem;
  font-weight: 550;
  color: var(--ink-body);
  text-decoration: none;
}
.submenu li a[aria-current="page"] { color: var(--primary-ink); background: var(--primary-tint); }

@media (max-width: 899px) {
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    border-top: 1px solid var(--border-soft);
    margin-top: var(--sp-1);
  }
  .site-nav.is-open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .nav-list { padding: var(--sp-3) 0 var(--sp-5); }
  .nav-link, .nav-btn { padding: 11px var(--sp-3); font-size: 1rem; }
  .submenu {
    margin: var(--sp-1) 0 var(--sp-2) var(--sp-4);
    padding-left: var(--sp-3);
    border-left: 2px solid var(--border);
  }
  .submenu li a:hover { background: var(--surface-alt); }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 268px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    padding: var(--sp-2);
  }
  .submenu li a:hover { background: var(--surface-alt); color: var(--ink); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px var(--sp-4) 6px var(--sp-2);
  margin-bottom: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-xs);
  font-size: .85rem;
  font-weight: 550;
  color: var(--ink-body);
}
.hero-badge .dot {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--primary-tint);
  font-size: .78rem;
}
.hero-facts {
  display: flex;
  margin-top: var(--sp-6);
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3) var(--sp-6);
  list-style: none;
  margin: var(--sp-6) 0 0;
  padding: 0;
  font-size: .92rem;
  color: var(--ink-muted);
}
.hero-facts li { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hero-facts svg { width: 16px; height: 16px; color: var(--primary); flex: 0 0 auto; }

/* ==========================================================================
   6. Cards and grids
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--sh-sm);
}

.section-head { max-width: var(--wrap-narrow); margin: var(--section) 0 var(--sp-6); }
.section-head h2 { margin-top: 0; margin-bottom: var(--sp-2); }
.section-head p { color: var(--ink-muted); margin-bottom: 0; }

.tool-card-grid {
  display: grid;
  gap: var(--sp-4);
  padding: 0;
  margin: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-xs);
  transition: transform .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: inherit;
}
.tool-card .ico {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: var(--sp-4);
  font-size: 1.35rem;
  line-height: 1;
  border-radius: var(--r-md);
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
}
.tool-card[data-group="countdowns"] .ico { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 18%, transparent); }
.tool-card[data-group="calculators"] .ico { background: var(--gold-50); border-color: color-mix(in srgb, var(--gold-500) 22%, transparent); }
.tool-card[data-group="santa"] .ico { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 20%, transparent); }
.tool-card h3 {
  margin: 0 0 var(--sp-2);
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -.015em;
}
.tool-card p { margin: 0; font-size: .93rem; line-height: 1.6; color: var(--ink-muted); }
.tool-card .go {
  margin-top: auto;
  padding-top: var(--sp-5);
  font-size: .87rem;
  font-weight: 650;
  color: var(--primary-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-card .go::after {
  content: "\2192";
  transition: transform .18s ease;
}
.tool-card:hover .go::after { transform: translateX(4px); }

/* ==========================================================================
   7. Countdown
   ========================================================================== */
.countdown-panel {
  position: relative;
  overflow: hidden;
  max-width: 920px;
  background:
    radial-gradient(90% 140% at 12% -30%, rgba(25, 154, 105, .5), transparent 62%),
    linear-gradient(152deg, var(--evergreen-900), var(--evergreen-950));
  color: var(--on-dark);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 3vw, 36px);
  text-align: center;
  box-shadow: var(--sh-lg);
}
.countdown-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  pointer-events: none;
}
.countdown-panel .cd-label {
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-400);
  font-weight: 650;
  margin: 0 0 var(--sp-3);
}
.countdown-panel .cd-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.7vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.028em;
  line-height: 1.2;
  margin: 0 0 6px;
  color: #fff;
}
.countdown-panel .cd-date {
  color: var(--on-dark-soft);
  font-size: .97rem;
  margin: 0 0 var(--sp-8);
}

.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.4vw, 16px);
  max-width: 620px;
  margin: 0 auto;
}
.cd-cell {
  position: relative;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: var(--r-md);
  padding: clamp(12px, 2vw, 20px) 4px clamp(10px, 1.6vw, 14px);
  backdrop-filter: blur(2px);
}
.cd-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1rem + 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.cd-unit {
  display: block;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin-top: var(--sp-3);
}
.cd-extra {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  justify-content: center;
  margin: var(--sp-6) 0 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  color: var(--on-dark-soft);
}
.cd-extra li { display: inline-flex; align-items: center; gap: var(--sp-2); }
.cd-extra li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}
.cd-note { margin: var(--sp-6) 0 0; font-size: .94rem; color: var(--on-dark-soft); }
.cd-note a { color: var(--gold-400); text-underline-offset: 3px; }
.cd-note a:hover { color: #fff; }
.cd-celebrate {
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--gold-400);
  margin: var(--sp-5) 0 0;
}

/* ==========================================================================
   8. Forms and controls
   ========================================================================== */
/* No fieldset border: a legend is rendered into the border edge by the
   browser, which leaves the rule running straight through the heading.
   Sections are separated by space and type weight instead. */
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--sp-10);
}
fieldset:last-of-type { margin-bottom: 0; }
legend {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: -.012em;
  padding: 0;
  margin-bottom: var(--sp-1);
}
legend .hint { color: var(--ink-faint); font-weight: 450; }

label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: var(--sp-2); }
.hint {
  display: block;
  font-weight: 400;
  color: var(--ink-muted);
  font-size: .86rem;
  line-height: 1.55;
  margin-top: var(--sp-2);
}
legend + .hint { margin-top: 0; margin-bottom: var(--sp-4); }

input[type="text"], input[type="number"], input[type="email"],
input[type="time"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px var(--sp-4);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color .14s ease, box-shadow .14s ease;
}
input::placeholder { color: var(--ink-faint); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}
input[type="number"] { font-variant-numeric: tabular-nums; }

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: var(--sp-10);
}

.field { margin-bottom: var(--sp-5); }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.field-group { border: 0; border-top: 0; padding: 0; margin: 0 0 var(--sp-5); }
.field-group > legend {
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

/* Radio groups read as a modern segmented control. */
.radio-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  font-weight: 550;
  font-size: .93rem;
  color: var(--ink-body);
  padding: 10px var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.radio-row label:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.radio-row input { accent-color: var(--primary); margin: 0; }
.radio-row label:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.radio-row label:has(input:checked) input { accent-color: #fff; }
.radio-row label:has(input:focus-visible) { box-shadow: var(--focus); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font: inherit;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -.01em;
  line-height: 1.2;
  min-height: 46px;
  padding: 12px var(--sp-6);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--sh-xs);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--sh-sm); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
  box-shadow: none;
}
.btn--ghost:hover {
  background: var(--surface-alt);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  color: var(--ink);
}
.btn--sm { min-height: 38px; padding: 8px var(--sp-4); font-size: .9rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* ==========================================================================
   9. Tool shell and results
   ========================================================================== */
.tool { margin: var(--sp-6) 0 0; }
/* A tool that is not split into two columns keeps a comfortable reading
   measure rather than stretching inputs across the full page width. */
.card.tool { max-width: 760px; }
.people-list, .santa-list { max-width: 560px; }
.tool-layout { display: grid; gap: var(--sp-5); align-items: start; }
.tool-layout > * { min-width: 0; }
@media (min-width: 940px) {
  .tool-layout { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: var(--sp-6); }
  .tool-layout > .result-panel { position: sticky; top: 92px; }
}

.result-panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--sh-sm);
}
.result-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--evergreen-600), var(--evergreen-500) 45%, var(--gold-500));
}
.result-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -.03em;
  margin: var(--sp-2) 0 var(--sp-2);
  font-variant-numeric: tabular-nums;
}
.result-sub { color: var(--ink-muted); margin: 0 0 var(--sp-5); font-size: .94rem; }

.stat-list { list-style: none; margin: 0; padding: 0; }
.stat-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: .95rem;
  color: var(--ink-muted);
}
.stat-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-list li > span:first-child { min-width: 0; }
.stat-list .v {
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
}
.stat-list li.is-total {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  margin-top: var(--sp-2);
  padding-top: var(--sp-4);
  color: var(--ink);
  font-weight: 600;
}
.stat-list li.is-total .v { color: var(--primary-ink); font-size: 1.05rem; }
.stat-list li.is-over .v { color: var(--accent); }
.stat-list li.is-under .v { color: var(--primary-ink); }

.people-list { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: grid; gap: var(--sp-3); }
.person-row { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2); align-items: center; }
.person-row--amount { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; }

.icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.icon-btn:hover { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }

.alert {
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  font-size: .94rem;
  line-height: 1.6;
  margin: 0 0 var(--sp-4);
  border: 1px solid;
}
.alert p:last-child { margin-bottom: 0; }
.alert--info    { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 26%, transparent); color: var(--ink-body); }
.alert--warn    { background: var(--gold-50); border-color: color-mix(in srgb, var(--gold-500) 35%, transparent); color: var(--ink-body); }
.alert--error   { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 32%, transparent); color: var(--ink-body); }
.alert--success { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--ink-body); }
.safety-note { display: flex; gap: var(--sp-4); align-items: flex-start; }
.safety-note .ico { font-size: 1.25rem; line-height: 1.3; flex: 0 0 auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 5px var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--gold-50);
  color: var(--gold-600);
  border: 1px solid color-mix(in srgb, var(--gold-500) 32%, transparent);
}

/* ==========================================================================
   10. Secret Santa
   ========================================================================== */
.santa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.santa-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.santa-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  min-height: 56px;
}
.santa-btn:hover { background: var(--surface-alt); }
.santa-btn .tag {
  font-size: .74rem;
  font-weight: 650;
  color: var(--primary-ink);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  padding: 4px var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--primary-tint);
}
.santa-reveal { padding: 0 var(--sp-5) var(--sp-5); margin: 0; }
.santa-reveal .name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.022em;
  color: var(--primary-ink);
  margin-bottom: 2px;
}
.santa-reveal small { color: var(--ink-muted); }
.santa-item.is-open {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: var(--sh-sm);
}
.santa-item.is-open .santa-btn .tag { background: var(--surface-alt); color: var(--ink-muted); }

/* ==========================================================================
   11. FAQ, related links, ad slots
   ========================================================================== */
.faq { margin-top: var(--sp-12); }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-3);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--primary) 32%, var(--border)); box-shadow: var(--sh-xs); }
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: -.012em;
  padding: var(--sp-4) 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background:
    linear-gradient(var(--ink-muted), var(--ink-muted)) center/9px 1.5px no-repeat,
    linear-gradient(var(--ink-muted), var(--ink-muted)) center/1.5px 9px no-repeat;
  transition: transform .2s ease, background-size .2s ease;
}
.faq details[open] summary::after {
  background:
    linear-gradient(var(--primary), var(--primary)) center/9px 1.5px no-repeat,
    linear-gradient(var(--primary), var(--primary)) center/1.5px 0 no-repeat;
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  transform: rotate(180deg);
}
.faq details p { margin-top: 0; color: var(--ink-body); }
.faq details p:last-child { margin-bottom: var(--sp-5); }

.related { margin-top: var(--section); }
.related h2 { margin-top: 0; }
.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.related a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.related a:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
  color: var(--ink);
}

.ad-slot { margin: var(--sp-10) auto; text-align: center; color: var(--ink-faint); font-size: .76rem; }
.ad-slot:empty { display: none; }

/* ==========================================================================
   12. Footer and cookie banner
   ========================================================================== */
.site-footer {
  background: var(--evergreen-950);
  color: var(--on-dark-soft);
  margin-top: var(--section);
  padding: var(--section) 0 var(--sp-8);
  font-size: .94rem;
}
.site-footer a { color: var(--on-dark-soft); text-decoration: none; transition: color .14s ease; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  gap: var(--sp-10) var(--sp-8);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-grid h2 {
  font-family: var(--font-sans);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 var(--sp-5);
  font-weight: 650;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: var(--sp-3); }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -.024em;
  margin-bottom: var(--sp-4);
}
.footer-brand svg { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; }
.footer-brand .lite { color: var(--gold-400); }
.footer-about p { color: var(--on-dark-soft); margin-bottom: 0; max-width: 32ch; line-height: 1.7; }

.footer-bottom {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  justify-content: space-between;
  align-items: center;
  color: var(--ink-faint);
  font-size: .87rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom button {
  background: none;
  border: 0;
  color: var(--on-dark-soft);
  font: inherit;
  font-size: .87rem;
  cursor: pointer;
  padding: 6px 0;
  min-height: 28px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-bottom button:hover { color: #fff; }

.cookie-banner {
  position: fixed;
  z-index: 200;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-4);
  background: var(--surface);
  color: var(--ink-body);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: var(--sp-5) var(--sp-6);
  max-width: 560px;
  margin: 0 auto;
}
.cookie-banner h2 {
  font-size: 1.02rem;
  margin: 0 0 var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.cookie-banner p { font-size: .89rem; line-height: 1.6; color: var(--ink-muted); margin: 0 0 var(--sp-5); }
.cookie-banner .btn-row { justify-content: flex-start; gap: var(--sp-2); }
.cookie-banner .btn { min-height: 42px; font-size: .94rem; }

/* ==========================================================================
   13. Utilities and print
   ========================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.1em;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
table { border-collapse: collapse; width: 100%; font-size: .94rem; min-width: 460px; }
th, td { text-align: left; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border-soft); }
tbody tr:last-child td { border-bottom: 0; }
th {
  font-size: .76rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-alt);
}
td { color: var(--ink-body); }
td:first-child { font-weight: 600; color: var(--ink); }
tbody tr:hover td { background: color-mix(in srgb, var(--primary-tint) 55%, transparent); }

.error-page { text-align: center; padding: var(--sp-12) 0 var(--sp-8); }
.error-page h1 { margin-bottom: var(--sp-4); }
.error-page .lede { max-width: 48ch; margin: 0 auto var(--sp-8); font-size: var(--step-2); color: var(--ink-muted); }
.error-h2 { text-align: center; margin-bottom: var(--sp-6); }
.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 2rem + 11vw, 8rem);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1;
  margin: 0 0 var(--sp-4);
  background: linear-gradient(140deg, var(--evergreen-600), var(--evergreen-500) 50%, var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media print {
  .site-header, .site-footer, .cookie-banner, .ad-slot, .btn-row,
  .related, .faq, .no-print, .breadcrumbs, .hero-badge, .hero-facts { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, .result-panel, .santa-item { border: 1px solid #bbb; box-shadow: none; }
  .result-panel::before { display: none; }
  .santa-reveal[hidden] { display: block !important; }
  .countdown-panel { background: #fff !important; color: #000 !important; border: 1px solid #bbb; }
  .countdown-panel .cd-title, .cd-num { color: #000 !important; }
  .countdown-panel .cd-label, .cd-unit, .cd-date, .cd-extra { color: #444 !important; }
  .header-cta, .steps-grid, .filter-bar, .search-box, .chip-row { display: none !important; }
}

/* ==========================================================================
   14. Colour identities, illustrated hero, page headers
   ========================================================================== */

/* Every tool has a hue. Set once on an element with data-hue, inherited by
   the icon tiles and bands inside it. */
[data-hue="red"]    { --hue-a: #fde3e6; --hue-b: #f6c0c8; --hue-ink: #a51f36; }
[data-hue="green"]  { --hue-a: #ddf2e7; --hue-b: #b9e3cc; --hue-ink: #0d4531; }
[data-hue="gold"]   { --hue-a: #fdf1d3; --hue-b: #f5dc98; --hue-ink: #7a560e; }
[data-hue="pink"]   { --hue-a: #fde5ef; --hue-b: #f6c1d7; --hue-ink: #9a2a5e; }
[data-hue="orange"] { --hue-a: #fde9d8; --hue-b: #f8cda2; --hue-ink: #8a4712; }
[data-hue="blue"]   { --hue-a: #e2ecfa; --hue-b: #c2d6f2; --hue-ink: #1f4d8c; }

@media (prefers-color-scheme: dark) {
  [data-hue="red"]    { --hue-a: #35171c; --hue-b: #4a1f27; --hue-ink: #f3a5ae; }
  [data-hue="green"]  { --hue-a: #12301f; --hue-b: #17402a; --hue-ink: #7fd4a7; }
  [data-hue="gold"]   { --hue-a: #332913; --hue-b: #45371a; --hue-ink: #f0c866; }
  [data-hue="pink"]   { --hue-a: #35182a; --hue-b: #4a1f39; --hue-ink: #f3a3c9; }
  [data-hue="orange"] { --hue-a: #35210f; --hue-b: #4a2d14; --hue-ink: #f3b981; }
  [data-hue="blue"]   { --hue-a: #14223a; --hue-b: #1b2f4f; --hue-ink: #9bbdf0; }
}

/* Icon tiles: cards, page headers, menus and related links */
.tool-card[data-hue] .ico,
.page-ico,
.menu-ico {
  background: linear-gradient(135deg, var(--hue-a), var(--hue-b));
  border: 1px solid color-mix(in srgb, var(--hue-b) 80%, transparent);
}
.tool-card[data-hue] .ico { width: 50px; height: 50px; font-size: 1.45rem; }

.menu-ico {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: .95rem;
  margin-right: var(--sp-3);
  flex: 0 0 auto;
}
.submenu li a { display: flex; align-items: center; }

/* Header call to action, desktop only */
.header-cta { display: none; margin-left: var(--sp-2); }
@media (min-width: 1100px) {
  .header-cta { display: inline-flex; }
  .site-nav { margin-left: auto; margin-right: var(--sp-1); }
}

/* Page header band for tool and information pages */
.page-hero {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hue-a) 70%, var(--canvas)) 0%, var(--canvas) 100%);
  border-bottom: 1px solid var(--border-soft);
}
.page-hero .wrap { padding-top: var(--sp-6); padding-bottom: clamp(28px, 4vw, 44px); }
.page-hero .breadcrumbs { margin-bottom: var(--sp-6); }
.page-head { display: flex; gap: var(--sp-5); align-items: flex-start; max-width: 56rem; }
.page-head-text { min-width: 0; }
.page-head-text h1 { margin-bottom: .4em; }
.page-ico {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  font-size: 2.3rem;
  line-height: 1;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  margin-top: 2px;
}
@media (max-width: 599px) {
  .page-head { gap: var(--sp-4); }
  .page-ico { width: 56px; height: 56px; font-size: 1.7rem; border-radius: var(--r-md); }
}

/* Steps */
.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.steps-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--sh-xs);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--evergreen-900);
  color: var(--gold-400);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}
.steps-grid h3 { margin: 0 0 var(--sp-2); font-size: 1.05rem; }
.steps-grid p { margin: 0; color: var(--ink-muted); font-size: .94rem; line-height: 1.6; }

/* Related links pick up the same tiles */
.related a { padding: var(--sp-3) var(--sp-4); }

@media (prefers-color-scheme: dark) {
  .page-hero { border-bottom-color: var(--border); }
}

/* ==========================================================================
   15. Birthday card maker
   ========================================================================== */
.card-maker { display: grid; gap: var(--sp-5); align-items: start; }
.card-maker > * { min-width: 0; }
@media (min-width: 940px) {
  .card-maker { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); }
  .card-maker__preview { order: 2; position: sticky; top: 92px; }
}
.card-maker__preview { text-align: center; }
#bc-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 480px;
  margin: 0 auto var(--sp-4);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  cursor: grab;
  touch-action: none;
  background: var(--surface-alt);
}
#bc-canvas.is-dragging { cursor: grabbing; }
.card-maker__preview .btn-row { justify-content: center; margin-top: var(--sp-2); }

.tpl-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.tpl-btn {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: stretch;
  padding: 6px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  font: inherit;
  color: var(--ink-body);
  transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}
.tpl-btn canvas { display: block; width: 100%; height: auto; border-radius: 8px; }
.tpl-btn span { font-size: .78rem; font-weight: 600; text-align: center; line-height: 1.25; padding-bottom: 2px; }
.tpl-btn:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-2px); }
.tpl-btn[aria-checked="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--primary-ink);
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  margin: 0 0 var(--sp-5);
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  cursor: pointer;
  font-weight: 400;
  color: var(--ink-body);
  transition: border-color .14s ease, background .14s ease;
}
.drop-zone:hover, .drop-zone.is-over {
  border-color: var(--primary);
  background: var(--primary-tint);
}
.drop-zone:focus-within { box-shadow: var(--focus); border-color: var(--primary); }
.drop-zone__icon { font-size: 1.9rem; line-height: 1; }
.drop-zone__text strong { color: var(--primary-ink); }
.drop-zone .hint { margin-top: 2px; }

input[type="range"] {
  width: 100%;
  height: 34px;
  accent-color: var(--primary);
  margin: var(--sp-1) 0;
  cursor: pointer;
}
textarea { resize: vertical; min-height: 72px; line-height: 1.5; }

/* ==========================================================================
   16. Browse home: search hero, filter bar, tool gallery, design strip
   ========================================================================== */
.browse-hero {
  background:
    radial-gradient(56% 90% at 88% -10%, color-mix(in srgb, var(--evergreen-500) 16%, transparent), transparent 70%),
    radial-gradient(46% 80% at 4% 0%, color-mix(in srgb, var(--gold-400) 15%, transparent), transparent 66%),
    var(--canvas);
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}
.browse-hero .wrap {
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(24px, 3vw, 36px);
  max-width: 800px;
}
.browse-hero h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  letter-spacing: -.032em;
  margin-bottom: var(--sp-4);
}
.browse-hero h1 .accent {
  background: linear-gradient(100deg, var(--evergreen-700) 5%, var(--evergreen-500) 65%, var(--gold-500) 125%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.browse-hero .hero-sub {
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 34rem;
  margin: 0 auto var(--sp-6);
  text-wrap: pretty;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
}
.search-box .search-icon {
  position: absolute;
  left: 20px;
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  min-height: 58px;
  padding: 14px 52px;
  font-size: 1.05rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--sh-md);
}
.search-box input:focus { box-shadow: var(--sh-md), var(--focus); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--ink-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.search-clear:hover { background: var(--accent-tint); color: var(--accent); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.chip-label { font-size: .86rem; color: var(--ink-muted); font-weight: 600; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px var(--sp-4);
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink-body);
  text-decoration: none;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-tint); }

/* ---- filter bar ---- */
.browse { margin-top: var(--sp-6); }
.filter-bar {
  position: sticky;
  top: 68px;
  z-index: 40;
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: var(--sp-3) 0;
  margin-bottom: var(--sp-2);
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.filter-bar::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px var(--sp-4);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-body);
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.pill:hover { border-color: var(--primary); color: var(--primary-ink); }
.pill-count {
  font-size: .76rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--ink-muted);
}
.pill[aria-selected="true"] {
  background: var(--evergreen-900);
  border-color: var(--evergreen-900);
  color: #fff;
}
.pill[aria-selected="true"] .pill-count { background: rgba(255, 255, 255, .18); color: #fff; }

.result-count { font-size: .88rem; color: var(--ink-muted); margin: 0 0 var(--sp-4); }
.no-results { text-align: center; padding: var(--sp-12) 0; color: var(--ink-muted); }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--primary-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---- the gallery ---- */
.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gallery-item[hidden] { display: none !important; }

.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-lg);
  transition: transform .18s cubic-bezier(.2, .7, .3, 1);
}
.tile:hover { transform: translateY(-4px); color: inherit; }

.tile-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  aspect-ratio: 4 / 3;
  box-shadow: var(--sh-xs);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.tile:hover .tile-thumb { box-shadow: var(--sh-md); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.tile-art { display: block; width: 100%; height: 100%; font-family: var(--font-display); }

.tile-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(6, 32, 22, .05), rgba(6, 32, 22, .55));
  opacity: 0;
  transition: opacity .18s ease;
}
.tile:hover .tile-overlay, .tile:focus-visible .tile-overlay { opacity: 1; }
.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px var(--sp-5);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--evergreen-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  box-shadow: var(--sh-md);
  transform: translateY(6px);
  transition: transform .18s ease;
}
.tile-cta::after { content: "\2192"; }
.tile:hover .tile-cta { transform: translateY(0); }

.tile-body { display: block; padding: var(--sp-4) var(--sp-1) 0; }
.tile-kicker {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--hue-ink);
  margin-bottom: 5px;
}
.tile-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
  margin-bottom: 4px;
}
.tile-blurb { display: block; font-size: .91rem; line-height: 1.55; color: var(--ink-muted); }

/* ---- birthday card design strip ---- */
.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  max-width: none;
  flex-wrap: wrap;
}
.section-head--row p { margin-bottom: 0; }

.design-strip {
  list-style: none;
  margin: 0;
  padding: 0 var(--sp-1) var(--sp-3);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(176px, 1fr);
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.design-card {
  display: block;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}
.design-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  background: var(--surface-alt);
}
.design-card:hover img { transform: translateY(-4px); box-shadow: var(--sh-md); }
.design-card span {
  display: block;
  margin-top: var(--sp-3);
  font-size: .88rem;
  font-weight: 650;
  color: var(--ink);
  text-align: center;
}

.next-up { margin-top: var(--section); }
.designs { margin-top: var(--section); }
.hero-facts--row { justify-content: flex-start; margin-top: var(--sp-8); }

@media (max-width: 899px) {
  .filter-bar { top: 0; }
}
