/* ==================================================================
   MOTHER ART — storybook theme
   Day  : dawn over the dunes — warm paper, sand, ink-navy, rose red
   Night: the sky above the desert — deep indigo, gold stars
   Type : Cormorant Garamond (display) · Caveat (hand) · Nunito Sans (text)
================================================================== */

:root {
  /* — day / dawn — */
  --bg: #F7EFDB;
  --bg-2: #F0E4C6;
  --surface: #FDF8EC;
  --ink: #2A3452;
  --ink-2: #47526E;
  --muted: #8B7E66;
  --line: #E3D5B8;
  --accent: #B8483A;
  --green: #B7CDA6;
  --lilac: #CFC6E2;
  --accent-ink: #FFF8EE;
  --accent-soft: #F6E3D8;
  --gold: #D99B2E;
  --star: #C9A227;
  --focus: #C4503F;

  /* watercolor washes */
  --w-sky: #CFE0EE;
  --w-rose: #F0D6CD;
  --w-sand: #EDDDBC;
  --w-violet: #DCD4EA;
  --w-sea: #CCE3DC;
  --w-leaf: #D6E3C9;
  --w-gold: #F4E4BC;

  --hill-far: #D9D2E6;
  --hill-near: #C6D9B4;
  --petal: #C0533F;
  --stem: #8FA878;

  --sky-top: #E7D6BC;
  --sky-bottom: #FBF4E4;
  --star-alpha: 0.25;

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --hand: "Caveat", "Segoe Script", cursive;
  --sans: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1180px;
  --r-tile: 22px;
  --r-ctl: 999px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 18px 40px -28px rgba(30, 42, 70, .55);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1230;
    --bg-2: #111B40;
    --surface: #15204A;
    --ink: #F3EBD9;
    --ink-2: #D5CCBA;
    --muted: #97A3C4;
    --line: #26325E;
    --accent: #E4796B;
    --accent-ink: #16112A;
    --accent-soft: #1D2751;
    --gold: #F2C75C;
    --star: #FFE9A8;
    --focus: #F2C75C;
    --w-sky: #16274F;
    --w-rose: #3A2437;
    --w-sand: #302819;
    --w-violet: #272249;
    --w-sea: #143030;
    --w-leaf: #1C2C23;
    --w-gold: #342A19;
    --green: #2A3D2C;
    --lilac: #2E2A48;
    --hill-far: #151E44;
    --hill-near: #1C2A3C;
    --petal: #E4796B;
    --stem: #5C7A5E;
    --sky-top: #060B21;
    --sky-bottom: #0A1230;
    --star-alpha: 1;
    --shadow: 0 20px 44px -26px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1230;
  --bg-2: #111B40;
  --surface: #15204A;
  --ink: #F3EBD9;
  --ink-2: #D5CCBA;
  --muted: #97A3C4;
  --line: #26325E;
  --accent: #E4796B;
  --accent-ink: #16112A;
  --accent-soft: #1D2751;
  --gold: #F2C75C;
  --star: #FFE9A8;
  --focus: #F2C75C;
  --w-sky: #16274F;
  --w-rose: #3A2437;
  --w-sand: #302819;
  --w-violet: #272249;
  --w-sea: #143030;
  --w-leaf: #1C2C23;
  --w-gold: #342A19;
  --sky-top: #060B21;
  --sky-bottom: #0A1230;
  --star-alpha: 1;
  --shadow: 0 20px 44px -26px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(60% 40% at 12% 8%, color-mix(in srgb, var(--w-rose) 70%, transparent), transparent 70%),
    radial-gradient(45% 35% at 88% 22%, color-mix(in srgb, var(--w-sky) 50%, transparent), transparent 72%),
    radial-gradient(55% 30% at 70% 68%, color-mix(in srgb, var(--w-leaf) 60%, transparent), transparent 70%),
    radial-gradient(40% 30% at 20% 88%, color-mix(in srgb, var(--w-gold) 55%, transparent), transparent 72%),
    linear-gradient(180deg, var(--sky-top) 0%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 92vh;
  background-attachment: fixed, fixed, fixed, fixed, scroll;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .38; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.5'/></svg>");
}
:root[data-theme="dark"] body::after,
:root:not([data-theme="light"]) body::after { mix-blend-mode: overlay; opacity: .2; }
#star-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--star-alpha); transition: opacity .8s ease; }
.site-header, main, .site-footer { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
main { outline: none; min-height: 60vh; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0;
}
.display { font-size: clamp(2.6rem, 6.2vw, 5rem); font-weight: 300; }
.h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.h3 { font-size: 1.25rem; }
.display em, .h1 em, .h2 em {
  font-family: var(--hand);
  font-style: normal;
  color: var(--accent);
  font-size: 1.12em;
  line-height: .9;
  display: inline-block;
}
p { margin: 0; }

.label {
  font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .78em 1.5em;
  border-radius: var(--r-ctl);
  border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; position: relative;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -14px var(--accent); }
.btn-primary:hover { box-shadow: 0 16px 30px -14px var(--accent); }
.btn-ghost { border-color: var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: .58em 1.15em; font-size: .86rem; }

.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; gap: .45em; align-items: center; color: var(--accent); }
.link-arrow::after { content: "→"; transition: transform .25s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

.chip {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .4em 1em; border-radius: var(--r-ctl);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent);
  font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; overflow: visible; }
.brand-mark .planet { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.brand-mark .dune { fill: var(--accent); }
.brand-mark .spark { fill: var(--gold); transform-origin: 30px 12px; animation: twinkle 3.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .55; transform: scale(.85) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(15deg); } }
.brand-name { font-family: var(--display); font-size: 1.55rem; letter-spacing: .01em; }
.brand:hover .brand-name { color: var(--accent); }
.site-nav { display: flex; gap: 2px; }
.site-nav a { text-decoration: none; padding: .45em .95em; border-radius: var(--r-ctl); font-weight: 600; color: var(--ink-2); position: relative; }
.site-nav a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 4px; height: 2px;
  background: var(--accent); border-radius: 2px; transition: left .25s ease, right .25s ease;
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { left: .95em; right: .95em; }
.site-nav a[aria-current="page"] { color: var(--ink); }

.theme-toggle, .menu-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent);
  cursor: pointer; display: grid; place-items: center; flex: none;
  transition: transform .3s ease, border-color .2s ease;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--accent); transform: rotate(-12deg); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun, :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon, :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-toggle .sun { display: block; } :root:not([data-theme="dark"]) .theme-toggle .moon { display: none; } }

.menu-toggle { display: none; position: relative; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  position: absolute; left: 12px; width: 18px; height: 1.8px; background: var(--ink); content: ""; border-radius: 2px;
  transition: transform .25s ease, background-color .2s ease;
}
.menu-toggle .bars { top: 20px; }
.menu-toggle .bars::before { left: 0; top: -6px; }
.menu-toggle .bars::after { left: 0; top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .menu-toggle { display: grid; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 18px;
    display: none;
  }
  .site-nav.open { display: flex; animation: drop .3s ease both; }
  @keyframes drop { from { transform: translateY(-8px); opacity: .4; } }
  .site-nav a { padding: .85em 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; font-family: var(--display); }
  .site-nav a::after { display: none; }
  .site-nav a:last-child { border-bottom: 0; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(28px, 5vw, 64px) clamp(40px, 7vw, 92px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; position: relative; z-index: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero-note { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note span::before {
  content: "✦"; color: var(--gold); font-size: .8em;
}

/* floating scene pieces injected by scene.js */
.deco { position: absolute; pointer-events: none; z-index: 0; }
.deco-moon { top: 12px; right: 3%; width: clamp(64px, 9vw, 108px); animation: bob 9s ease-in-out infinite; }
.deco-moon .moon-body, .deco-moon .sun-body { fill: var(--gold); opacity: .95; }
.deco-moon .halo { fill: var(--gold); opacity: .13; }
/* daylight shows a sun, night shows a crescent */
.deco-moon .moon-body { display: none; }
:root[data-theme="dark"] .deco-moon .moon-body { display: block; }
:root[data-theme="dark"] .deco-moon .sun-body { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .deco-moon .moon-body { display: block; }
  :root:not([data-theme="light"]) .deco-moon .sun-body { display: none; }
}
.deco-plane { top: 14%; left: -12%; width: 74px; animation: flyby 34s linear infinite; }
.deco-plane path { fill: var(--surface); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.deco-plane .fold { fill: none; stroke: var(--ink); opacity: .45; }
.deco-plane .trail { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 7; opacity: .55; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes flyby {
  0%   { transform: translate(0, 0) rotate(-6deg); opacity: 0; }
  6%   { opacity: 1; }
  50%  { transform: translate(60vw, -26px) rotate(3deg); }
  94%  { opacity: 1; }
  100% { transform: translate(126vw, 22px) rotate(-4deg); opacity: 0; }
}

/* dunes under the hero */
.dunes { position: absolute; left: 50%; width: 100vw; transform: translateX(-50%); bottom: -2px; height: clamp(96px, 12vw, 158px); pointer-events: none; z-index: 0; }
.dunes .d1 { fill: var(--w-sand); }
.dunes .d2 { fill: var(--w-gold); opacity: .85; }

/* the category "constellation" */
.wall {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(58px, 7vw, 86px); gap: 12px;
  position: relative; z-index: 1; isolation: isolate;
}
.wall a {
  border-radius: var(--r-tile); display: grid; place-items: center;
  color: var(--ink); text-decoration: none; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease;
}
.wall a::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 30% 20%, rgba(255,255,255,.5), transparent 60%);
  opacity: .6;
}
.wall a:hover { transform: translateY(-6px) rotate(-1.2deg); }
.wall a .ill { width: 40%; max-width: 88px; height: auto; position: relative; }
.wall a span {
  position: absolute; left: 14px; bottom: 10px;
  font-family: var(--hand); font-size: 1.05rem; color: var(--ink-2);
}
.wall .w1 { grid-column: 1 / 4; grid-row: 1 / 4; }
.wall .w2 { grid-column: 4 / 7; grid-row: 1 / 3; }
.wall .w3 { grid-column: 4 / 6; grid-row: 3 / 5; }
.wall .w4 { grid-column: 6 / 7; grid-row: 3 / 5; }
.wall .w5 { grid-column: 1 / 4; grid-row: 4 / 6; }
.wall .w6 { grid-column: 4 / 7; grid-row: 5 / 6; }
.wall .w4 span, .wall .w6 span { display: none; }
.wall .w1 .ill { width: 34%; }

@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .wall { grid-auto-rows: 66px; } .deco-moon { top: -6px; } }
@media (max-width: 480px) { .wall { grid-auto-rows: 50px; gap: 8px; } .wall a span { display: none; } }

/* ---------- washes ---------- */
.t-blue { background: var(--w-sky); }
.t-blush { background: var(--w-rose); }
.t-oat { background: var(--w-sand); }
.t-lilac { background: var(--w-violet); }
.t-mist { background: var(--w-sea); }
.t-sage { background: var(--w-leaf); }
.t-butter { background: var(--w-gold); }

/* ---------- sections ---------- */
.section { padding-block: clamp(48px, 7vw, 92px); }
.section-tight { padding-block: clamp(32px, 5vw, 60px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px 32px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head .stack { display: grid; gap: 10px; max-width: 40em; }
.section-head p { color: var(--muted); }

/* ---------- categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px;
  padding: 14px; border-radius: var(--r-tile);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .25s ease, box-shadow .3s ease;
}
.cat:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; }
.cat-icon .ill { width: 34px; height: 34px; transition: transform .35s ease; }
.cat:hover .cat-icon .ill { transform: rotate(-8deg) scale(1.08); }
.cat strong { display: block; font-weight: 700; }
.cat small { color: var(--muted); font-size: .85rem; }
@media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 470px) { .cat-grid { grid-template-columns: 1fr; } }

/* ---------- product cards ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(22px, 3vw, 34px) clamp(16px, 2.2vw, 26px); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: clamp(26px, 3vw, 36px) clamp(16px, 2.2vw, 26px); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tile {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%;
  border-radius: var(--r-tile); display: grid; place-items: center;
  color: var(--ink); overflow: hidden; text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease;
}
.tile::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(90% 70% at 25% 20%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(70% 60% at 85% 85%, rgba(0,0,0,.06), transparent 60%);
}
.tile .ill { width: 32%; height: auto; position: relative; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .tile { transform: translateY(-5px) rotate(-1deg); }
.card:hover .tile .ill { transform: scale(1.09) rotate(4deg); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--hand); font-size: .95rem; letter-spacing: .01em;
  background: var(--accent); color: var(--accent-ink);
  padding: .1em .8em .2em; border-radius: var(--r-ctl);
}
.card-body { display: grid; gap: 5px; }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.card-title { font-family: var(--display); font-size: 1.35rem; line-height: 1.2; text-decoration: none; }
.card-title:hover { color: var(--accent); }
.card-brand { color: var(--muted); font-size: .88rem; }
.card-summary { color: var(--ink-2); font-size: .93rem; }
.card-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.card-actions .more { font-size: .87rem; color: var(--muted); text-decoration: none; }
.card-actions .more:hover { color: var(--accent); }

@media (max-width: 560px) {
  .grid-4, .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
  .card { gap: 10px; }
  .card-summary { display: none; }
  .card-title { font-size: 1.15rem; }
  .card .label { font-size: .62rem; letter-spacing: .1em; }
  .card-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .card-actions .btn { padding: .62em .6em; font-size: .8rem; }
  .card-actions .more { text-align: center; }
  .badge { top: 8px; left: 8px; font-size: .85rem; }
}

/* ---------- guides ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 26px); }
.guide-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: clamp(22px, 2.6vw, 30px); border-radius: var(--r-tile);
  text-decoration: none; min-height: 270px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.guide-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 80% 10%, rgba(255,255,255,.45), transparent 60%);
  pointer-events: none;
}
.guide-card:hover { transform: translateY(-6px) rotate(.5deg); }
.guide-card h3 { font-size: clamp(1.45rem, 2.3vw, 1.8rem); position: relative; }
.guide-card p { color: var(--ink-2); margin-top: 10px; font-size: .95rem; position: relative; }
.guide-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .88rem; color: var(--ink-2); position: relative; }
.guides-page { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 26px); }
.guides-page .guide-card:first-child { grid-column: 1 / -1; min-height: 320px; }
.guides-page .guide-card:first-child h3 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); max-width: 16em; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } .guide-card { min-height: 0; } }
@media (max-width: 640px) { .guides-page { grid-template-columns: 1fr; } }

/* ---------- checklist teaser ---------- */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 76px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.stage-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stage-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding-left .3s ease, background-color .3s ease; }
.stage-list a:hover { padding-left: 14px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.stage-title { font-family: var(--display); font-size: 1.45rem; }
.stage-list a:hover .stage-title { color: var(--accent); }
.stage-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* ---------- newsletter ---------- */
.news {
  position: relative; overflow: hidden;
  border-radius: calc(var(--r-tile) + 10px);
  background: linear-gradient(135deg, var(--w-violet), var(--w-sky));
  padding: clamp(30px, 5vw, 58px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: center;
  box-shadow: var(--shadow);
}
.news::before {
  content: "✦ ✧ ✦"; position: absolute; top: 14px; right: 24px;
  color: var(--gold); letter-spacing: .6em; opacity: .7; font-size: .9rem;
}
.news h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.news p { color: var(--ink-2); margin-top: 10px; }
.news-form { display: flex; gap: 8px; flex-wrap: wrap; }
.news-form input {
  flex: 1 1 220px; min-width: 0;
  padding: .82em 1.2em; border-radius: var(--r-ctl);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.news-msg { font-size: .9rem; color: var(--ink-2); margin-top: 10px; min-height: 1.4em; }
@media (max-width: 820px) { .news { grid-template-columns: 1fr; } }

/* ---------- shop ---------- */
.page-head { padding-block: clamp(28px, 5vw, 56px) clamp(20px, 3vw, 30px); display: grid; gap: 12px; }
.page-head p { color: var(--muted); max-width: 40em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; padding-block: 16px; border-block: 1px solid var(--line); margin-bottom: clamp(24px, 4vw, 40px); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.field { padding: .55em 1em; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); font-size: .9rem; min-width: 0; }
input.field { width: 220px; max-width: 100%; }
.result-count { color: var(--muted); font-size: .9rem; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.empty { padding: 48px 0; color: var(--muted); font-family: var(--hand); font-size: 1.4rem; }

/* ---------- product detail ---------- */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); padding-top: clamp(20px, 3vw, 32px); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); padding-block: 24px clamp(48px, 7vw, 80px); align-items: start; }
.detail .tile { aspect-ratio: 1 / 1; }
.detail .tile .ill { width: 36%; }
.detail-copy { display: grid; gap: 18px; }
.detail-copy .brand-line { color: var(--muted); font-size: 1.05rem; margin-top: -10px; }
.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.why li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--ink-2); }
.why li::before { content: "✦"; color: var(--gold); line-height: 1.6; }
.note { padding: 15px 18px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px dashed var(--line); font-size: .94rem; color: var(--ink-2); }
.note strong { color: var(--ink); }
.buy { display: flex; flex-wrap: wrap; gap: 10px; }
.fine { font-size: .82rem; color: var(--muted); }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } .detail .tile { aspect-ratio: 4 / 3; } }

/* ---------- article ---------- */
.article-head { padding-block: clamp(28px, 5vw, 60px) clamp(20px, 3vw, 32px); display: grid; gap: 16px; max-width: 820px; }
.article-head .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); }
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.article-band { height: 12px; border-radius: 999px; margin-bottom: clamp(28px, 4vw, 46px); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 6vw, 76px); padding-bottom: clamp(48px, 8vw, 92px); align-items: start; }
.prose { max-width: 42rem; font-size: 1.07rem; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.75rem; color: var(--ink); margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose .aside { font-family: var(--hand); font-size: 1.15rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1em; margin-top: 2em; }
.table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: .7em .8em .7em 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.picks-rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); display: grid; gap: 14px; }
.mini { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; padding: 8px; margin: -8px; border-radius: 16px; transition: background-color .25s ease; }
.mini:hover { background: color-mix(in srgb, var(--surface) 75%, transparent); }
.mini .tile { aspect-ratio: 1; border-radius: 14px; box-shadow: none; }
.mini .tile .ill { width: 58%; }
.mini strong { display: block; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.mini small { color: var(--muted); }
@media (max-width: 920px) { .article-layout { grid-template-columns: 1fr; } .picks-rail { position: static; } }

/* ---------- checklist ---------- */
.progress { display: grid; gap: 8px; min-width: min(320px, 100%); }
.progress-bar { height: 10px; background: color-mix(in srgb, var(--line) 70%, transparent); border-radius: 999px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: inherit; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.progress-text { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; }
.cl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-nav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 70px); z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); padding-block: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.stage { padding-block: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); scroll-margin-top: 150px; display: grid; grid-template-columns: 280px 1fr; gap: 20px clamp(24px, 5vw, 64px); }
.stage:last-child { border-bottom: 0; }
.stage-side { display: grid; gap: 10px; align-content: start; }
.stage-side p { color: var(--muted); font-size: .95rem; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 30px 1fr auto; gap: 4px 12px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.item input {
  appearance: none; -webkit-appearance: none; width: 23px; height: 23px; margin: 3px 0 0;
  border: 1.6px solid var(--muted); border-radius: 8px; background: var(--surface); cursor: pointer;
  display: grid; place-items: center; transition: background-color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.2,1.6,.4,1);
}
.item input::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.item input:checked { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.item input:checked::after { opacity: 1; }
.item label { cursor: pointer; }
.item .t { display: block; font-weight: 600; }
.item .n { display: block; color: var(--muted); font-size: .88rem; }
.item input:checked + label .t { color: var(--muted); text-decoration: line-through; }
.item a { font-size: .87rem; white-space: nowrap; color: var(--accent); text-decoration: none; font-weight: 700; padding-top: 3px; }
.item a:hover { text-decoration: underline; }
@media (max-width: 820px) { .stage { grid-template-columns: 1fr; } }
@media (max-width: 470px) { .item { grid-template-columns: 30px 1fr; } .item a { grid-column: 2; } }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 76px); padding-block: 8px clamp(48px, 8vw, 92px); }
.about .prose h2:first-child { margin-top: 0; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(24px, 4vw, 48px); background: color-mix(in srgb, var(--bg-2) 45%, transparent); }
.footer-inner { padding-block: clamp(40px, 6vw, 64px) 32px; display: grid; gap: 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-top h4 { margin: 0 0 12px; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-top a { text-decoration: none; color: var(--ink-2); }
.footer-top a:hover { color: var(--accent); }
.footer-about p { color: var(--muted); margin-top: 12px; max-width: 26em; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--line); padding-top: 20px; font-size: .84rem; color: var(--muted); }
.footer-bottom p { max-width: 56em; }
@media (max-width: 880px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- motion ---------- */
.view { animation: fade .5s ease both; }
@keyframes fade { from { transform: translateY(12px); } }
.reveal { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { transform: translateY(24px); } }

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

@media print {
  .site-header, .site-footer, .cl-nav, .cl-actions, .item a, #star-canvas, body::after { display: none !important; }
  body { background: #fff; color: #000; }
  .stage { break-inside: avoid; grid-template-columns: 1fr; }
}

/* ==================================================================
   WATERCOLOUR LAYER
   Washes get ragged, bleeding edges through an SVG displacement
   filter; a second, blurred layer pools pigment like wet paper.
================================================================== */
.t-blue   { --wash: var(--w-sky); }
.t-blush  { --wash: var(--w-rose); }
.t-oat    { --wash: var(--w-sand); }
.t-lilac  { --wash: var(--w-violet); }
.t-mist   { --wash: var(--w-sea); }
.t-sage   { --wash: var(--w-leaf); }
.t-butter { --wash: var(--w-gold); }

.tile, .wall a, .guide-card, .cat-icon, .article-band, .news { background: transparent; }

.tile, .wall a, .guide-card { overflow: visible; box-shadow: none; isolation: isolate; }
.cat-icon, .article-band, .news { position: relative; }

/* the painted shape */
.tile::before,
.wall a::before,
.guide-card::before,
.cat-icon::before,
.article-band::before,
.news::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: var(--wash, var(--w-sand));
  border-radius: var(--r-tile);
  filter: url(#wc);
}
.wall a::before, .guide-card::before { filter: url(#wc) drop-shadow(0 16px 24px rgba(60, 50, 40, .18)); }
.cat-icon::before { border-radius: 16px; }
.article-band::before { border-radius: 999px; }
.news::before { background: linear-gradient(120deg, var(--w-violet), var(--w-sky) 60%, var(--w-rose)); border-radius: 28px; }

/* pigment pooling — darker where the "water" gathered */
.tile::after,
.wall a::after,
.guide-card > .pool {
  content: "";
  position: absolute; inset: 10% 12% 22% 8%; z-index: 0;
  background: radial-gradient(60% 60% at 70% 75%, rgba(70, 55, 45, .16), transparent 70%),
              radial-gradient(50% 50% at 25% 30%, rgba(255, 255, 255, .5), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
:root[data-theme="dark"] .tile::after,
:root[data-theme="dark"] .wall a::after { opacity: .5; }

/* vary the bleed so no two shapes repeat */
.card:nth-child(even) .tile::before,
.wall a:nth-child(3n)::before,
.guide-card:nth-child(even)::before { filter: url(#wc2); }
.card:nth-child(3n) .tile::before,
.wall a:nth-child(4n)::before { filter: url(#wc3); }

.tile .ill, .wall a .ill, .cat-icon .ill, .guide-card h3, .guide-card p, .guide-card .foot, .guide-card .label,
.news > div { position: relative; z-index: 1; }
.tile .badge { position: absolute; z-index: 2; }
.tile img { border-radius: var(--r-tile); position: relative; z-index: 1; }

/* pencil-soft illustrations */
.ill { stroke-linecap: round; }
.tile .ill, .wall a .ill { opacity: .92; }

/* ---------- hills behind the hero ---------- */
.dunes .d1 { fill: var(--hill-far); opacity: .95; }
.dunes .d2 { fill: var(--hill-near); opacity: .9; }
.dunes { filter: url(#wc-soft); }

/* ---------- meadow of small flowers ---------- */
.meadow { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.flower { position: absolute; width: 16px; transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite; }
.flower .petal { fill: var(--petal); }
.flower .stem { stroke: var(--stem); stroke-width: 1.4; fill: none; stroke-linecap: round; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- book-plate caption ---------- */
.plate-caption {
  position: relative; z-index: 1;
  margin-top: 26px; text-align: center;
  font-family: var(--display); font-style: italic; font-size: 1.05rem;
  color: var(--muted); letter-spacing: .01em;
}

/* the filter host never shows */
#wc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .flower { animation: none; } }
@media print { .meadow, .dunes, .plate-caption { display: none !important; } }

/* phone: keep the sky simple so nothing crowds the headline */
@media (max-width: 760px) {
  .deco-moon { display: none; }
  .deco-plane { width: 56px; top: 8%; }
  .plate-caption { font-size: .95rem; margin-top: 18px; }
}
@media (max-width: 480px) {
  .hero .label { font-size: .64rem; letter-spacing: .1em; }
}

/* ==================================================================
   ACCOUNTS — forms, cabinet, admin
================================================================== */

/* header additions */
.nav-cta { border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav-cta::after { display: none; }
.nav-account { display: inline-flex !important; align-items: center; gap: 8px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: .78rem; font-weight: 700;
}
.nav-admin { color: var(--accent) !important; }

/* flash + alerts */
.flash-wrap { padding-top: 16px; }
.alert { padding: 12px 16px; border-radius: 14px; font-size: .95rem; border: 1px solid transparent; margin: 0 0 16px; }
.alert a { font-weight: 700; }
.alert-success { background: color-mix(in srgb, var(--w-leaf) 80%, transparent); border-color: color-mix(in srgb, var(--w-leaf) 50%, var(--ink) 12%); }
.alert-error { background: color-mix(in srgb, var(--w-rose) 85%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.alert-info { background: color-mix(in srgb, var(--w-sky) 80%, transparent); border-color: color-mix(in srgb, var(--w-sky) 50%, var(--ink) 12%); }

/* auth shell */
.auth-shell { padding-block: clamp(28px, 6vw, 72px); display: grid; place-items: center; }
.auth-card {
  width: min(520px, 100%); display: grid; gap: 16px; position: relative;
  padding: clamp(24px, 4vw, 40px); border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.auth-card .h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.auth-lede { color: var(--ink-2); }
.auth-switch { text-align: center; color: var(--muted); font-size: .95rem; }
.auth-switch a, .f-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-alt { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: .92rem; }
.auth-alt a { color: var(--accent); font-weight: 600; }
.email-hint {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.1rem; letter-spacing: .04em;
  padding: 12px 16px; border-radius: 12px; background: var(--w-sand); text-align: center; word-break: break-all;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* form controls */
.form { display: grid; gap: 18px; }
.form-wide { max-width: 880px; }
.form-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-group { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.f-label { font-weight: 700; font-size: .92rem; padding: 0; }
.f-optional { font-weight: 400; color: var(--muted); font-size: .85rem; }
.f-input {
  width: 100%; min-width: 0; padding: .72em .95em; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.f-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.f-input:user-invalid { border-color: var(--accent); }
.f-input-sm { padding: .5em .75em; font-size: .92rem; width: auto; }
.f-num { width: 5.5em; }
.f-multi { min-height: 180px; }
.f-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.55; }
textarea.f-input { resize: vertical; }
.f-hint { font-size: .85rem; color: var(--muted); }
.f-hint.ok { color: color-mix(in srgb, var(--ink) 60%, #3E7A4A); }
.f-error { font-size: .88rem; color: var(--accent); font-weight: 600; }
.f-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.f-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.f-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f-inline { display: flex; gap: 8px; }
@media (max-width: 720px) { .f-cols, .f-cols-3 { grid-template-columns: 1fr; } }
.f-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.f-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-danger:hover { background: var(--accent); color: var(--accent-ink); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.link-btn {
  background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer;
  text-decoration: none; font-size: .92rem;
}
.link-btn:hover { text-decoration: underline; }
.danger { color: var(--accent); }
.code-input {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.6rem; letter-spacing: .45em;
  text-align: center; padding: .5em .5em .5em .95em;
}
.form-inline .code-input { width: 11ch; font-size: 1.3rem; }

/* password */
.pw-wrap { position: relative; }
.pw-wrap .f-input { padding-right: 4.6em; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--accent); font-weight: 700; font-size: .85rem; padding: 6px 10px; cursor: pointer; border-radius: 8px;
}
.meter { display: flex; align-items: center; gap: 12px; }
.meter-bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.meter-bars i { height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--line) 80%, transparent); transition: background-color .3s ease; }
.meter-label { font-size: .85rem; color: var(--muted); min-width: 8.5em; text-align: right; font-variant-numeric: tabular-nums; }
.meter[data-score="0"] .meter-bars i:nth-child(-n+1) { background: #C0533F; }
.meter[data-score="1"] .meter-bars i:nth-child(-n+1) { background: #D2743B; }
.meter[data-score="2"] .meter-bars i:nth-child(-n+2) { background: #D99B2E; }
.meter[data-score="3"] .meter-bars i:nth-child(-n+3) { background: #7FA35C; }
.meter[data-score="4"] .meter-bars i:nth-child(-n+4) { background: #4E8A55; }
.meter[data-score="0"] .meter-label, .meter[data-score="1"] .meter-label { color: #B8483A; }
.meter[data-score="3"] .meter-label, .meter[data-score="4"] .meter-label { color: #4E8A55; }
.pw-rules { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; font-size: .84rem; color: var(--muted); }
.pw-rules li { display: flex; gap: 8px; align-items: baseline; }
.pw-rules li::before { content: "○"; color: var(--muted); }
.pw-rules li.ok { color: var(--ink-2); }
.pw-rules li.ok::before { content: "✓"; color: #4E8A55; font-weight: 700; }
@media (max-width: 520px) { .pw-rules { grid-template-columns: 1fr; } }
:root[data-theme="dark"] .meter[data-score="3"] .meter-label, :root[data-theme="dark"] .meter[data-score="4"] .meter-label,
:root[data-theme="dark"] .pw-rules li.ok::before { color: #9CCB8F; }

/* cabinet layout */
.acct { padding-bottom: clamp(48px, 8vw, 96px); }
.acct-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; }
.acct-tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tabs a {
  padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.acct-tabs a:hover { color: var(--accent); }
.acct-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.acct-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
@media (max-width: 860px) { .acct-grid { grid-template-columns: 1fr; } }
.panel {
  padding: clamp(18px, 2.4vw, 26px); border-radius: 22px; position: relative;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line);
  display: grid; gap: 12px; align-content: start; min-width: 0;
}
.panel + .panel { margin-top: 0; }
.form.panel { margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-danger { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.stat { font-family: var(--display); font-size: 3rem; line-height: 1; }
.empty-state { padding: 36px 0; display: grid; gap: 10px; justify-items: start; }
.empty-title { font-family: var(--display); font-size: 1.6rem; }
.row-actions { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.pill {
  display: inline-block; padding: .2em .7em; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--w-violet); color: var(--ink); white-space: nowrap;
}
.pill-ok { background: var(--w-leaf); }
.pill-warn { background: var(--w-rose); color: var(--accent); }

.sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sec-list li { padding-left: 24px; position: relative; }
.sec-list li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.sec-list li.ok::before { content: "✓"; color: #4E8A55; }
.sec-list li.warn::before { content: "!"; color: var(--accent); }

/* children */
.kid-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.kid-list li { display: flex; gap: 12px; align-items: center; }
.kid-list small { display: block; color: var(--muted); }
.kid-dot {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--display); font-size: 1.3rem; background: var(--w-violet);
}
.kid-girl { background: var(--w-rose); }
.kid-boy { background: var(--w-sky); }
.kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.kid-top { display: flex; gap: 14px; align-items: center; }
.kid-top .kid-dot { width: 54px; height: 54px; font-size: 1.6rem; }
.kid-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.kid-facts dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.kid-facts dd { margin: 0; }
.kid-row { display: grid; gap: 6px; }
.kid-notes { font-family: var(--display); font-style: italic; color: var(--ink-2); }
.swatches, .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: .2em .7em .2em .3em; border-radius: 999px; border: 1px solid var(--line); }
.swatch::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--sw, var(--w-sand)); border: 1px solid rgba(0,0,0,.08); }
.swatch-custom { padding-left: .7em; }
.swatch-custom::before { display: none; }
.tag { font-size: .82rem; padding: .2em .7em; border-radius: 999px; background: var(--w-sand); }
.tag-warn { background: var(--w-rose); color: var(--accent); font-weight: 600; }

.chip-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick { position: relative; cursor: pointer; }
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick span {
  display: inline-flex; align-items: center; gap: 7px; padding: .42em .95em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 600;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip-pick input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-warn input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--sw); border: 1px solid rgba(0,0,0,.1); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); width: fit-content; max-width: 100%; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; padding: .45em 1em; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); }

/* wishlist */
.wish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wish-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.wish-tile { aspect-ratio: 1; border-radius: 16px; }
.wish-tile .ill { width: 52%; }
.wish-main { display: grid; gap: 4px; min-width: 0; }
.wish-note { font-style: italic; color: var(--ink-2); }
.wish-edit summary { cursor: pointer; font-size: .88rem; color: var(--accent); font-weight: 600; margin-top: 6px; }
.wish-edit .form-inline { margin-top: 8px; }
.wish-actions { display: grid; gap: 8px; justify-items: end; }
@media (max-width: 720px) {
  .wish-row { grid-template-columns: 72px minmax(0, 1fr); }
  .wish-actions { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
}

/* hearts on cards */
.card { position: relative; }
.heart-form { position: absolute; top: 10px; right: 10px; z-index: 3; margin: 0; }
.heart {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 0; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--accent);
  box-shadow: 0 6px 14px -8px rgba(40, 30, 20, .5);
  transition: transform .25s cubic-bezier(.2,1.6,.4,1), background-color .2s ease;
}
.heart-link { position: absolute; top: 10px; right: 10px; z-index: 3; }
.heart svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.heart:hover { transform: scale(1.12); }
.heart.is-saved svg { fill: currentColor; }
.heart.is-saved { animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 50% { transform: scale(1.25); } }
.buy-secondary { margin-top: -6px; }

/* reminders */
.rem-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rem-mini li { display: grid; grid-template-columns: 8.5em 1fr; gap: 12px; align-items: baseline; }
.rem-mini small { color: var(--muted); }
.rem-date { font-size: .85rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.rem-table, .admin-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rem-table th, .rem-table td, .admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rem-table th, .admin-table th { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rem-table tr.is-paused td { opacity: .55; }
.admin-table tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.admin-table code, .kv code { font-size: .82rem; }
.table-wrap { overflow-x: auto; }

/* security */
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sec-grid #twofa { grid-row: span 2; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } .sec-grid #twofa { grid-row: auto; } }
.choice-list { display: grid; gap: 10px; }
.choice .btn { white-space: nowrap; }
.choice { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.choice.is-on { border-color: color-mix(in srgb, #4E8A55 50%, var(--line)); }
details > summary { list-style: none; cursor: pointer; width: fit-content; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 12px; }
.danger-zone summary { color: var(--accent); font-weight: 600; font-size: .9rem; }
.session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.totp .steps { margin: 0; padding-left: 1.3em; display: grid; gap: 22px; }
.totp .steps li { display: grid; gap: 8px; padding-left: 6px; }
.totp .steps li::marker { font-family: var(--display); font-size: 1.3rem; color: var(--accent); }
.qr { width: fit-content; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr img { display: block; width: 200px; height: 200px; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .08em; padding: 8px 12px; background: var(--w-sand); border-radius: 10px; width: fit-content; max-width: 100%; word-break: break-all; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.codes code { display: block; text-align: center; font-size: 1.1rem; letter-spacing: .08em; padding: 10px; border-radius: 12px; background: var(--w-sand); }

/* admin */
.admin-head .label { max-width: 100%; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi {
  display: grid; gap: 2px; padding: 18px 20px; border-radius: 20px; text-decoration: none;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line);
}
a.kpi:hover { border-color: var(--accent); }
.kpi-n { font-family: var(--display); font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-l { font-weight: 700; }
.kpi-s { font-size: .82rem; color: var(--muted); }
.rank { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.rank li { display: flex; justify-content: space-between; gap: 12px; }
.audit-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.audit-mini li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ev { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82rem; padding: .1em .5em; border-radius: 6px; background: var(--w-sky); }
.ev-security, .ev-server { background: var(--w-rose); color: var(--accent); }
.ev-admin { background: var(--w-violet); }
.ev-account { background: var(--w-leaf); }
.ev-mail { background: var(--w-gold); }
.audit-table .detail { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8rem; color: var(--muted); max-width: 380px; word-break: break-word; }
.audit-filter { margin-bottom: 16px; flex-wrap: wrap; }
.kv { margin: 0; display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; word-break: break-word; }
.action-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-rows { display: grid; gap: 8px; }
.link-row { display: grid; grid-template-columns: 9em 10em minmax(0, 1fr) 11em; gap: 8px; }
.link-row .f-input-sm { width: 100%; }
@media (max-width: 760px) { .link-row { grid-template-columns: 1fr 1fr; } }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-layout .form .h3 { margin-top: 8px; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } }
.row-new td { background: color-mix(in srgb, var(--w-leaf) 35%, transparent); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }

@media print {
  .acct-tabs, .acct-head form, .form-actions, .panel-head a { display: none !important; }
  .codes code { border: 1px solid #999; }
}
