/* Self-hosted fonts (Latin subset, variable weight). Baloo 2 and Nunito, SIL Open Font License 1.1. */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/baloo2-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/*
 * Design tokens: the only place colors, fonts, sizes, radii and shadows are defined.
 * Template: A - Crayon Pop. Change a value here and the whole site follows.
 */
:root {
  /* Color: light theme */
  --bg: #fffaf2;
  --surface: #ffffff;
  --surface-2: #fff1df;
  --text: #2b2118;
  --text-muted: #6f5d4c;
  --border: #f0dcc4;
  --primary: #c9451f;
  --primary-hover: #b03a18;
  --on-primary: #ffffff;
  --accent: #ffc43d;
  --success: #197842;
  --success-bg: #e3f5ea;
  --warning: #9a5b00;
  --warning-bg: #fff1d1;
  --danger: #c62f2f;
  --danger-bg: #fde4e2;
  --info: #1d63c2;
  --info-bg: #e2edfc;
  --focus: #1d63c2;
  --line-art: #2b2118;
  --paper: #ffffff;
  --overlay: rgba(43, 33, 24, 0.45);

  /* Typography */
  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;   /* 12 */
  --text-sm: 0.875rem;  /* 14 */
  --text-base: 1rem;    /* 16 */
  --text-lg: 1.125rem;  /* 18 */
  --text-xl: 1.375rem;  /* 22 */
  --text-2xl: 1.75rem;  /* 28 */
  --text-3xl: clamp(1.875rem, 4.5vw, 2.25rem); /* 30 -> 36 */
  --text-hero: clamp(2rem, 5.5vw, 3rem);
  --leading-body: 1.6;
  --leading-heading: 1.2;

  /* Spacing: multiples of 4px only */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Layout */
  --container: 1200px;
  --gutter: 16px;
  --header-h: 68px;
  --sidebar-w: 248px;

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-sm: 0 2px 0 var(--border);
  --shadow-md: 0 8px 24px rgba(120, 60, 10, 0.12);

  /* Controls: fixed sizes used everywhere */
  --control-sm: 36px;
  --control-md: 44px;
  --control-lg: 52px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration: 180ms;

  color-scheme: light;
}

/* Light is the default. Dark only when the visitor picks it with the theme button (data-theme="dark"). */
:root[data-theme="dark"] {
  --bg: #1a1511;
  --surface: #241d17;
  --surface-2: #2e251d;
  --text: #f6ece0;
  --text-muted: #c2ae98;
  --border: #3e3227;
  --primary: #ff7a52;
  --primary-hover: #ff936f;
  --on-primary: #1a1511;
  --accent: #ffcf5c;
  --success: #5fd394;
  --success-bg: #16301f;
  --warning: #f2b84b;
  --warning-bg: #33270f;
  --danger: #ff8a80;
  --danger-bg: #3a1a18;
  --info: #7fb2ff;
  --info-bg: #172a45;
  --focus: #7fb2ff;
  --line-art: #f6ece0;
  --overlay: rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

/* Base: reset, typography, layout helpers. Uses tokens only. */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--space-4)); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .2s, color .2s;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--leading-heading);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

[hidden] { display: none !important; }

.stack > * + * { margin-top: var(--space-4); }

.muted { color: var(--text-muted); }
.text-sm { font-size: var(--text-sm); }
.num { font-variant-numeric: tabular-nums; }

.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;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/*
 * Components.
 * PART 1 is copied 1:1 from the approved template (plan/templates/ui-templates.html, Template A).
 * Do not change PART 1 values without updating the template and getting approval.
 * PART 2 adds pieces the template does not cover (drawer, toast, modal, breadcrumb, admin page shell...).
 */

/* ======================= PART 1: approved template ======================= */

.container{max-width:1200px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 20px;border-radius:var(--radius-md);font:600 16px/1 var(--font-body);
  border:2px solid transparent;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}
.btn svg{width:20px;height:20px}
.btn-sm{height:36px;padding:0 12px;font-size:14px}.btn-sm svg{width:16px;height:16px}
.btn-lg{height:52px;padding:0 28px;font-size:18px}
.btn-primary{background:var(--primary);color:var(--on-primary)}.btn-primary:hover{background:var(--primary-hover);color:var(--on-primary)}
.btn-secondary{background:var(--surface);color:var(--text);border-color:var(--border)}.btn-secondary:hover{border-color:var(--primary);color:var(--primary)}
.btn-ghost{background:transparent;color:var(--text)}.btn-ghost:hover{background:var(--surface-2);color:var(--text)}
.btn-danger{background:var(--danger);color:#fff}.btn-danger:hover{color:#fff}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.icon-btn{width:44px;padding:0}
.badge{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700;background:var(--surface-2);color:var(--text-muted)}
.badge.easy{background:var(--success-bg);color:var(--success)}.badge.medium{background:var(--warning-bg);color:var(--warning)}.badge.hard{background:var(--danger-bg);color:var(--danger)}
.alert{display:grid;grid-template-columns:24px 1fr auto;gap:12px;align-items:start;padding:14px 16px;border-radius:var(--radius-md);border:1px solid transparent}
.alert svg{width:22px;height:22px;margin-top:1px}
.alert b{display:block;font-weight:700}
.alert-success{background:var(--success-bg);color:var(--success)}.alert-warning{background:var(--warning-bg);color:var(--warning)}
.alert-danger{background:var(--danger-bg);color:var(--danger)}.alert-info{background:var(--info-bg);color:var(--info)}
.alert p{color:var(--text)}
.alert .x{all:unset;cursor:pointer;opacity:.7;width:24px;height:24px;display:grid;place-items:center}
.input{width:100%;height:44px;padding:0 14px;border-radius:var(--radius-sm);border:1.5px solid var(--border);background:var(--surface);color:var(--text);font:16px var(--font-body)}
.input:focus{border-color:var(--primary);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 25%,transparent)}
label.lbl{display:block;font-size:14px;font-weight:600;margin-bottom:6px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}

/* Header + navbar */
.site-header{background:var(--surface);border-bottom:1px solid var(--border)}
.site-header .row{display:flex;align-items:center;gap:16px;height:68px}
.logo{display:flex;align-items:center;gap:8px;font-family:var(--font-display);font-weight:700;font-size:22px;color:var(--text);text-decoration:none;white-space:nowrap}
.logo:hover{color:var(--text)}
.logo svg{width:34px;height:34px}
.search{flex:1;max-width:420px;position:relative;min-width:0}
.search .input{padding-left:40px;border-radius:999px}
.search svg{position:absolute;left:14px;top:12px;width:20px;height:20px;color:var(--text-muted)}
.header-actions{margin-left:auto;display:flex;gap:8px;align-items:center}
.nav{border-top:1px solid var(--border)}
.nav ul{list-style:none;margin:0;padding:0;display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.nav a{display:block;padding:12px 14px;color:var(--text-muted);font-weight:600;font-size:15px;text-decoration:none;white-space:nowrap;border-bottom:3px solid transparent}
.nav a[aria-current="page"],.nav a:hover{color:var(--text);border-color:var(--primary)}
@media (max-width:720px){.search{display:none}.hide-sm{display:none}}

/* Ad slot */
.ad{display:grid;place-items:center;min-height:100px;border:1.5px dashed var(--border);border-radius:var(--radius-md);color:var(--text-muted);font-size:12px;letter-spacing:.08em;text-transform:uppercase;background:var(--surface-2)}
.ad.tall{min-height:250px}

/* Home */
.hero{padding-block:48px 32px}
.hero-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:32px;align-items:center}
.hero h1{font-size:clamp(30px,5vw,48px)}
.hero h1 em{font-style:normal;color:var(--primary)}
.hero p{font-size:18px;color:var(--text-muted);margin-top:12px;max-width:52ch}
.hero .ctas{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.hero-art{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hero-art .tile{aspect-ratio:4/5;max-width:100%}
.hero-art .tile:nth-child(2){transform:translateY(24px)}
@media (max-width:820px){.hero-grid{grid-template-columns:1fr}.hero-art{max-width:420px}}
.section{padding-block:32px}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.section-head h2{font-size:28px}
.cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.cat{display:flex;align-items:center;gap:12px;padding:12px;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border);text-decoration:none;color:var(--text);font-weight:700}
.cat:hover{border-color:var(--primary);color:var(--text)}
.cat .dot{width:40px;height:40px;border-radius:var(--radius-sm);display:grid;place-items:center;background:var(--surface-2);flex:none}
.cat .dot svg{width:28px;height:28px;color:var(--line-art)}
.cat small{display:block;font-weight:500;color:var(--text-muted);font-size:13px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
.cc{text-decoration:none;color:var(--text);display:flex;flex-direction:column;gap:8px}
.cc:hover{color:var(--text)}
.tile{aspect-ratio:4/5;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);display:grid;place-items:center;overflow:hidden}
.tile svg{width:78%;height:78%;color:#2b2118}
.tile img{width:100%;height:100%;object-fit:contain}
.cc:hover .tile{box-shadow:var(--shadow-md);border-color:var(--primary)}
.cc h3{font-size:16px;font-family:var(--font-body);font-weight:700}
.cc .meta{display:flex;gap:6px;align-items:center;font-size:13px;color:var(--text-muted)}

/* Coloring page */
.crumb{font-size:14px;color:var(--text-muted);padding-block:16px}
.crumb a{color:var(--text-muted);text-decoration:none}.crumb a:hover{color:var(--primary)}
.page-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:32px}
@media (max-width:900px){.page-grid{grid-template-columns:1fr}.aside{display:none}}
.page-grid h1{font-size:clamp(26px,4vw,36px)}
.preview{margin-top:16px;display:grid;grid-template-columns:minmax(0,340px) 1fr;gap:24px;align-items:start}
@media (max-width:640px){.preview{grid-template-columns:1fr}}
.dl{display:grid;gap:10px}
.dl .btn{width:100%}
.facts{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.prose{max-width:68ch;display:flex;flex-direction:column;gap:14px;margin-top:24px}
.prose h2{font-size:22px;margin-top:8px}
.prose ul{margin:0;padding-left:20px}
.tips{padding:16px 18px;border-radius:var(--radius-md);background:var(--surface-2)}
.swatches{display:flex;gap:8px}.swatches i{width:28px;height:28px;border-radius:50%;border:2px solid var(--surface)}
.faq details{border-bottom:1px solid var(--border);padding-block:12px}
.faq summary{cursor:pointer;font-weight:700}
.faq p{color:var(--text-muted);margin-top:6px}

/* Footer */
.site-footer{margin-top:48px;background:var(--surface);border-top:1px solid var(--border);padding-block:32px;font-size:14px;color:var(--text-muted)}
.foot-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:24px}
.foot-grid h2{font-size:15px;color:var(--text);margin-bottom:8px}
.foot-grid ul{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.foot-grid a{color:var(--text-muted);text-decoration:none}.foot-grid a:hover{color:var(--primary)}
@media (max-width:720px){.foot-grid{grid-template-columns:1fr 1fr}}

/* Admin */
.sidebar{background:var(--surface);border-right:1px solid var(--border);padding:16px 12px;display:flex;flex-direction:column;gap:4px}
.sidebar .logo{font-size:18px;padding:4px 8px 16px}
.side-link{display:flex;align-items:center;gap:10px;height:40px;padding:0 12px;border-radius:var(--radius-sm);color:var(--text-muted);text-decoration:none;font-weight:600;font-size:15px}
.side-link svg{width:20px;height:20px}
.side-link:hover{background:var(--surface-2);color:var(--text)}
.side-link[aria-current="page"]{background:color-mix(in srgb,var(--primary) 14%,transparent);color:var(--primary)}
.side-sep{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);padding:12px 12px 4px}
.admin-main{display:flex;flex-direction:column;min-width:0}
.topbar{height:64px;display:flex;align-items:center;gap:12px;padding:0 20px;border-bottom:1px solid var(--border);background:var(--surface)}
.topbar h1,.topbar h2{font-size:20px}
.admin-body{padding:20px;display:flex;flex-direction:column;gap:20px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}
.stat{padding:16px}
.stat small{color:var(--text-muted);font-weight:600;font-size:13px}
.stat b{display:block;font-family:var(--font-display);font-size:30px;font-variant-numeric:tabular-nums;margin-top:4px}
.stat span{font-size:13px;color:var(--success);font-weight:700}
.tbl-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:14px;min-width:560px}
th,td{text-align:left;padding:12px 16px;border-bottom:1px solid var(--border)}
th{background:var(--surface-2);color:var(--text-muted);font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.05em}
td .mini{width:36px;height:44px;border-radius:6px;background:#fff;border:1px solid var(--border);display:grid;place-items:center}
td .mini svg{width:28px;height:28px;color:#2b2118}
td .mini img{width:100%;height:100%;object-fit:contain;border-radius:6px}

/* Login */
.auth{min-height:560px;display:grid;place-items:center;padding-block:40px}
.auth .card{width:100%;max-width:400px;padding:28px;display:flex;flex-direction:column;gap:16px}
.auth .logo{justify-content:center}
.auth h1{font-size:24px;text-align:center}
.auth .sub{color:var(--text-muted);text-align:center;font-size:14px;margin-top:-8px}
.check{display:flex;gap:8px;align-items:center;font-size:14px}

/* UI kit */
.kit{display:grid;gap:24px;padding-block:24px}
.kit .card{padding:20px;display:flex;flex-direction:column;gap:14px}
.kit h3{font-size:18px}
.kit .row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
.sw{border-radius:var(--radius-sm);overflow:hidden;border:1px solid var(--border);font-size:12px}
.sw i{display:block;height:44px}
.sw span{display:block;padding:6px 8px;font-family:ui-monospace,Menlo,monospace}
.spec{font-size:13px;color:var(--text-muted);font-family:ui-monospace,Menlo,monospace}

/* ======================= PART 2: additions (not in the template) ======================= */

/* Extra badge colors for admin status */
.badge-success{background:var(--success-bg);color:var(--success)}
.badge-warning{background:var(--warning-bg);color:var(--warning)}
.badge-danger{background:var(--danger-bg);color:var(--danger)}
.badge-info{background:var(--info-bg);color:var(--info)}
.badge-primary{background:var(--primary);color:var(--on-primary)}
.btn-block{width:100%}
.alert .x:focus-visible{outline:3px solid var(--focus)}

/* Form extras (same look as .input) */
.field{display:block}
.select,.textarea{width:100%;height:44px;padding:0 14px;border-radius:var(--radius-sm);border:1.5px solid var(--border);background:var(--surface);color:var(--text);font:16px var(--font-body)}
.textarea{height:auto;min-height:120px;padding:12px 14px;line-height:1.6;resize:vertical}
.select:focus,.textarea:focus{border-color:var(--primary);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 25%,transparent)}
.field-hint{display:block;margin-top:6px;font-size:14px;color:var(--text-muted)}
.field-error{display:block;margin-top:6px;font-size:14px;color:var(--danger);font-weight:600}
.has-error .input,.has-error .select,.has-error .textarea{border-color:var(--danger)}
.check input{accent-color:var(--primary)}

/* Breadcrumb (same look as the template .crumb) */
.crumb ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px}
.crumb li+li::before{content:"/";margin-right:4px}

/* Drawer: opens from the menu button on the right */
.drawer-backdrop{position:fixed;inset:0;background:var(--overlay);z-index:70}
.drawer{position:fixed;top:0;bottom:0;right:0;z-index:71;width:min(320px,86vw);background:var(--surface);border-left:1px solid var(--border);box-shadow:var(--shadow-md);
  padding:calc(env(safe-area-inset-top,0px) + 16px) max(16px,env(safe-area-inset-right,0px)) 24px 16px;overflow-y:auto;
  transform:translateX(100%);transition:transform .18s ease;display:flex;flex-direction:column;gap:8px}
.drawer.is-open{transform:none}
.drawer-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.drawer-link{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:var(--radius-sm);color:var(--text);font-weight:600;text-decoration:none}
.drawer-link:hover,.drawer-link[aria-current="page"]{background:var(--surface-2);color:var(--text)}
.drawer .sidebar{border:0;padding:0;background:none}

/* Toast */
.toast-region{position:fixed;z-index:60;display:flex;flex-direction:column;gap:8px;right:max(16px,env(safe-area-inset-right,0px));bottom:max(16px,env(safe-area-inset-bottom,0px));width:min(380px,calc(100vw - 32px))}
.toast-region .alert{box-shadow:var(--shadow-md);border-color:var(--border)}
@media (max-width:640px){.toast-region{left:50%;right:auto;transform:translateX(-50%)}}

/* Modal */
.modal{border:0;padding:0;border-radius:var(--radius-lg);background:var(--surface);color:var(--text);width:min(520px,calc(100vw - 32px));box-shadow:var(--shadow-md)}
.modal::backdrop{background:var(--overlay)}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 24px;border-bottom:1px solid var(--border)}
.modal-body{padding:24px}
.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--border)}

/* Empty state */
.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:48px 24px;border:1.5px dashed var(--border);border-radius:var(--radius-lg);background:var(--surface)}
.empty-state>svg{width:40px;height:40px;color:var(--primary)}
.empty-state p{color:var(--text-muted);max-width:46ch}

/* Ad slot: production without ads keeps the reserved space but no label */
.ad.is-live{border:0;background:none}

/* Home features row */
.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:16px}
.feature{display:flex;gap:12px;align-items:start}
.feature>svg{width:24px;height:24px;color:var(--primary);margin-top:2px;flex:none}
.feature h3{font-size:18px}
.feature p{color:var(--text-muted);font-size:14px;margin-top:4px}

/* Admin page shell: the template admin view as a full page */
.admin-shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100vh;background:var(--bg)}
.admin-shell>.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto}
.admin-menu-btn{display:none}
@media (max-width:820px){.admin-shell{grid-template-columns:1fr}.admin-shell>.sidebar{display:none}.admin-menu-btn{display:inline-flex}}

/* Admin forms and lists (built only from template tokens and sizes) */
.panel{padding:20px;display:flex;flex-direction:column;gap:16px}
.panel h2{font-size:18px}
.form-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}
.form-grid>aside{display:flex;flex-direction:column;gap:20px;position:sticky;top:20px}
@media (max-width:1100px){.form-grid{grid-template-columns:1fr}.form-grid>aside{position:static}}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:640px){.two-col{grid-template-columns:1fr}}
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.filters .input,.filters .select{width:auto;min-width:160px}
.pager{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;font-size:14px;color:var(--text-muted)}
.counter{font-size:13px;color:var(--text-muted);text-align:right;margin-top:4px}
.counter.over{color:var(--danger);font-weight:700}
.score{display:flex;align-items:center;gap:12px}
.score b{font-family:var(--font-display);font-size:40px;line-height:1}
.checks{list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:14px}
.checks li{display:grid;grid-template-columns:20px 1fr;gap:8px;align-items:start}
.checks svg{width:18px;height:18px;margin-top:2px}
.checks .ok svg{color:var(--success)}
.checks .no svg{color:var(--danger)}
.checks small{display:block;color:var(--text-muted)}
.checks-group{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);font-weight:700;margin-top:4px}
.asset-preview{display:grid;grid-template-columns:96px 1fr;gap:12px;align-items:center}
.asset-preview .tile{width:96px}
.asset-links{display:flex;flex-wrap:wrap;gap:6px}
.check-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}
.serp{border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;background:var(--surface)}
.serp .u{font-size:13px;color:var(--success)}
.serp .t{font-size:18px;color:var(--info);line-height:1.3;margin-top:2px}
.serp .d{font-size:14px;color:var(--text-muted);margin-top:4px}
.textarea.tall{min-height:360px;font-family:ui-monospace,Menlo,monospace;font-size:14px}

/* Online coloring tool (uses the template .preview / .dl / .tips / .swatches parts) */
.color-tool{grid-template-columns:minmax(0,1fr) 300px}
@media (max-width:820px){.color-tool{grid-template-columns:1fr}}
.color-canvas-wrap{padding:8px;place-items:center}
.color-canvas-wrap canvas{width:100%;height:auto;max-height:78vh;object-fit:contain;touch-action:manipulation;cursor:crosshair;display:block}
.palette{flex-wrap:wrap}
.palette button{width:32px;height:32px;border-radius:50%;border:2px solid var(--border);cursor:pointer;padding:0}
.palette button[aria-checked="true"]{outline:3px solid var(--text);outline-offset:2px}
.check input[type=color]{width:44px;height:32px;padding:0;border:1px solid var(--border);border-radius:8px;background:none}

/* Share bar (coloring page): template button styles only */
.share-bar{display:flex;flex-direction:column;gap:8px}
.share-bar b{font-size:14px}
.share-row{display:flex;flex-wrap:wrap;gap:8px}
.share-row .icon-btn{width:36px}

/* Coloring card with a colored version: half and half by default, the color follows the mouse */
.tile.reveal{position:relative;--x:50%}
.tile.reveal img{position:absolute;inset:0}
.tile.reveal .colored{clip-path:inset(0 calc(100% - var(--x)) 0 0);transition:clip-path .12s linear}
.tile.reveal .edge{position:absolute;top:0;bottom:0;left:var(--x);width:3px;margin-left:-1.5px;background:#fff;box-shadow:0 0 0 1px var(--border);transition:left .12s linear,opacity .15s;pointer-events:none}
.tile.reveal.full .edge{opacity:0}
@media (prefers-reduced-motion:reduce){.tile.reveal .colored,.tile.reveal .edge{transition:none}}

/* Footer with silo links: more columns than the template, same look */
@media (min-width:768px){.site-footer .foot-grid{grid-template-columns:2fr repeat(5,1fr)}}

/* Home page */
.home-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 26%,var(--bg)),color-mix(in srgb,var(--primary) 12%,var(--bg)));padding-block:56px;overflow:hidden}
.home-hero h1{font-size:clamp(32px,5vw,54px);margin-top:14px;line-height:1.1}
.home-hero h1 em{font-style:normal;color:var(--primary)}
.home-hero p{font-size:18px;color:var(--text-muted);margin-top:14px;max-width:46ch}
.home-hero .ctas{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.hero-fan{position:relative;height:380px}
.hero-fan img{position:absolute;top:0;left:50%;width:236px;height:auto;margin-left:-118px;background:#fff;border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:6px}
.hero-fan img:nth-child(1){transform:translateX(-150px) translateY(30px) rotate(-8deg)}
.hero-fan img:nth-child(2){transform:translateX(150px) translateY(30px) rotate(8deg)}
.hero-fan img:nth-child(3){z-index:1}
@media (max-width:820px){.home-hero{padding-block:32px}.hero-fan{height:260px}.hero-fan img{width:160px;margin-left:-80px}.hero-fan img:nth-child(1){transform:translateX(-96px) translateY(20px) rotate(-8deg)}.hero-fan img:nth-child(2){transform:translateX(96px) translateY(20px) rotate(8deg)}}
.home-facts{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:16px 20px;margin-top:-28px;position:relative;z-index:2;max-width:calc(var(--container) - 2 * var(--gutter))}
.home-facts div{display:flex;gap:10px;align-items:center}
.home-facts svg{width:28px;height:28px;color:var(--primary);flex:none}
.home-facts span{font-size:13px;color:var(--text-muted);line-height:1.3}
.home-facts b{display:block;color:var(--text);font-size:15px}
@media (max-width:820px){.home-facts{grid-template-columns:1fr 1fr;margin:-20px var(--gutter) 0;width:auto}}
.band{padding-block:44px}
.band-1{background:color-mix(in srgb,var(--accent) 16%,var(--bg))}
.band-2{background:var(--surface)}
.band-3{background:color-mix(in srgb,#6ec6f0 18%,var(--bg))}
.band-4{background:color-mix(in srgb,var(--primary) 7%,var(--bg))}
.band-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.band-head h2{font-size:clamp(24px,3vw,32px)}
.band-head h2 a{color:inherit;text-decoration:none}
.band-head h2 a:hover{color:var(--primary)}
.band-head p{color:var(--text-muted);font-size:15px}
.band-link{flex:none;padding:8px 16px;border-radius:var(--radius-full);background:var(--surface);border:1.5px solid var(--border);color:var(--text);font-weight:700;font-size:14px;text-decoration:none}
.band-link:hover{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.hubs{display:flex;flex-wrap:wrap;justify-content:center;gap:14px}
.hub{flex:0 1 calc((100% - 84px) / 7);min-width:0;display:flex;flex-direction:column;padding:8px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);color:var(--text);text-decoration:none;transition:transform var(--duration) var(--ease),box-shadow var(--duration) var(--ease)}
.hub:hover{transform:translateY(-4px);box-shadow:var(--shadow-md);color:var(--text)}
.hub-img{display:block;aspect-ratio:4/5;background:#fff;border-radius:var(--radius-sm)}
.hub-img img{display:block;width:100%;height:100%;object-fit:contain}
.hub-text{padding:10px 4px 6px;line-height:1.25;text-align:center}
.hub-text b{display:block;font-size:15px}
.hub-text small{color:var(--text-muted);font-size:12.5px}
.home-grid{display:grid;grid-template-columns:repeat(var(--n,5),minmax(0,1fr));gap:18px}
.home-grid .tile{box-shadow:var(--shadow-sm)}
@media (max-width:1000px){
  .hub{flex-basis:calc((100% - 42px) / 4)}
  .home-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:14px;margin-inline:calc(var(--gutter) * -1);padding-inline:var(--gutter);padding-bottom:6px;scrollbar-width:none}
  .home-grid::-webkit-scrollbar{display:none}
  .home-grid .cc{flex:0 0 28%;scroll-snap-align:center}
}
@media (max-width:600px){
  .band{padding-block:32px}
  .band-head p{display:none}
  .hubs{gap:10px}
  .hub{flex-basis:calc((100% - 20px) / 3)}
  .hub{padding:6px}
  .hub-text{padding:8px 2px 4px}
  .hub-text b{font-size:13px}
  .home-grid .cc{flex-basis:46%}
  .home-grid .cc h3{font-size:14px}
}
.home-about{background:var(--text);color:var(--bg);padding-block:52px}
[data-theme="dark"] .home-about{background:var(--surface);color:var(--text)}
.about-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:40px}
.home-about h2{font-size:clamp(24px,3vw,32px);color:inherit;margin-bottom:12px}
.home-about h3{font-size:18px;color:inherit;margin-top:22px;margin-bottom:10px}
.about-copy>p{opacity:.85}
.about-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.about-cards li{background:color-mix(in srgb,currentColor 9%,transparent);border-radius:var(--radius-md);padding:14px}
.about-cards b{display:block;margin-bottom:4px}
.about-cards span{font-size:14px;opacity:.9}
.home-about a{color:var(--accent)}
.home-faq{display:grid;gap:10px}
.home-faq details{background:var(--surface);color:var(--text);border-radius:var(--radius-md);padding:14px 16px}
.home-faq summary{cursor:pointer;font-weight:700}
.home-faq p{color:var(--text-muted);margin-top:6px;font-size:15px}
@media (max-width:820px){.about-grid,.about-cards{grid-template-columns:1fr}}
body:has(.home-about) .site-footer{margin-top:0}
.cat .dot{overflow:hidden}
.cat .dot img{width:100%;height:100%;object-fit:cover;transform:scale(1.14)}

/* Coloring page */
.pg-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 20%,var(--bg)),color-mix(in srgb,#6ec6f0 14%,var(--bg)));padding-block:28px 40px}
.pg-hero-grid{display:grid;grid-template-columns:minmax(0,430px) minmax(0,1fr);gap:40px;align-items:center}
.pg-art{position:relative;background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:12px}
.pg-art img{display:block;width:100%;height:auto;border-radius:var(--radius-sm)}
.pg-art picture[hidden],.pg-art img[hidden]{display:none}
.pg-switch{display:flex;gap:4px;margin-top:10px;padding:4px;background:var(--surface-2);border-radius:var(--radius-full)}
.pg-switch button{flex:1;padding:8px 10px;border:0;border-radius:var(--radius-full);background:none;color:var(--text-muted);font:inherit;font-weight:700;font-size:14px;cursor:pointer}
.pg-switch .on{background:var(--primary);color:var(--on-primary)}
.pg-info h1{font-size:clamp(30px,4.4vw,48px);line-height:1.1}
.pg-lead{font-size:18px;color:var(--text-muted);margin-top:12px;max-width:52ch}
.pg-info .facts{margin-top:14px}
.pg-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px;max-width:520px}
.pg-actions .btn-primary{grid-column:1/-1}
.pg-actions .btn{width:100%}
.pg-colors{display:flex;align-items:center;gap:12px;margin-top:18px;flex-wrap:wrap}
.pg-colors b{font-size:14px}
.pg-share{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px}
.pg-share .share-bar{flex-direction:row;align-items:center}
.pg-share .share-bar>b,.pg-share .share-bar>.btn{display:none}
.pg-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:48px;padding-block:40px;align-items:start}
.article{min-width:0;font-size:17px;line-height:1.75}
.article>*+*{margin-top:14px}
.article>p:first-of-type,.pg-toc-inline+p{font-size:19px;color:var(--text)}
.article h2{font-size:clamp(22px,2.6vw,28px);margin-top:36px;padding-left:14px;border-left:5px solid var(--accent);line-height:1.25;scroll-margin-top:90px}
.article ul{list-style:none;margin:16px 0 0;padding:16px 18px;background:color-mix(in srgb,var(--accent) 12%,var(--bg));border-radius:var(--radius-md);display:grid;gap:10px}
.article li{position:relative;padding-left:28px}
.article li a{color:var(--text);text-decoration:underline}
.article li::before{content:"";position:absolute;left:0;top:.5em;width:14px;height:8px;border-left:3px solid var(--primary);border-bottom:3px solid var(--primary);transform:rotate(-45deg) translateY(-3px)}
.article .home-faq{margin-top:16px}
.article .home-faq details{border:1px solid var(--border)}
.pg-toc-inline{display:none}
.pg-rail{position:sticky;top:var(--rail-top,88px);display:grid;gap:16px}
.rail-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px;box-shadow:var(--shadow-sm)}
.rail-card>b,.rail-cta>b{font-family:var(--font-display);font-size:19px;line-height:1.2;display:block}
.rail-cta{display:grid;gap:8px;padding:18px;border-radius:var(--radius-lg);text-align:center;background:linear-gradient(160deg,color-mix(in srgb,var(--accent) 34%,var(--bg)),color-mix(in srgb,var(--primary) 18%,var(--bg)))}
.rail-cta img{display:block;width:62%;height:auto;margin:0 auto 6px;background:#fff;padding:5px;border-radius:var(--radius-sm);box-shadow:var(--shadow-md);transform:rotate(-3deg);transition:transform var(--duration) var(--ease)}
.rail-cta:hover img{transform:rotate(0) scale(1.03)}
.rail-cta p{font-size:14px;color:var(--text-muted);margin:0 0 4px}
.rail-cta .btn{width:100%}
.rail-progress{display:block;height:5px;margin:10px 0 12px;background:var(--surface-2);border-radius:var(--radius-full);overflow:hidden}
.rail-progress i{display:block;height:100%;width:0;background:var(--primary);border-radius:inherit}
.rail-toc ol{list-style:none;margin:0;padding:0;counter-reset:toc;display:grid;gap:2px}
.rail-toc li{counter-increment:toc}
.rail-toc a{display:flex;gap:10px;align-items:baseline;padding:7px 8px;border-radius:var(--radius-sm);color:var(--text-muted);font-size:14px;line-height:1.3;text-decoration:none}
.rail-toc a::before{content:counter(toc);flex:none;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);font-size:11px;font-weight:700;color:var(--text-muted)}
.rail-toc a:hover{color:var(--text);background:var(--surface-2)}
.rail-toc a.on{color:var(--text);font-weight:700;background:color-mix(in srgb,var(--accent) 22%,var(--bg))}
.rail-toc a.on::before{background:var(--primary);color:var(--on-primary)}
.rail-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:4px}
.rail-list a{display:flex;gap:10px;align-items:center;padding:6px;border-radius:var(--radius-sm);color:var(--text);text-decoration:none;font-weight:700;font-size:14px;line-height:1.25}
.rail-list a:hover{background:var(--surface-2);color:var(--text)}
.rail-list img{width:50px;height:auto;flex:none;border-radius:6px;border:1px solid var(--border);background:#fff}
.rail-list small{display:block;margin-top:2px;font-weight:500;font-size:12px;color:var(--text-muted)}
.rail-all{display:block;margin-top:10px;padding:8px;text-align:center;border-radius:var(--radius-full);background:var(--surface-2);color:var(--text);font-size:13px;font-weight:700;text-decoration:none}
.rail-all:hover{background:var(--primary);color:var(--on-primary)}
.rail-hubs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}
.rail-hubs a{display:flex;align-items:center;gap:8px;min-width:0;padding:5px;border:1px solid var(--border);border-radius:var(--radius-full);color:var(--text);font-size:13px;font-weight:700;text-decoration:none;overflow:hidden;white-space:nowrap}
.rail-hubs a:hover{border-color:var(--primary);color:var(--primary)}
.rail-hubs img{width:28px;height:28px;flex:none;border-radius:50%;object-fit:cover}
@media (max-width:900px){
  .pg-hero-grid{grid-template-columns:1fr;gap:20px}
  .pg-art{max-width:300px;margin-inline:auto;width:100%;padding:8px}
  .pg-body{grid-template-columns:1fr;padding-block:28px}
  .pg-rail{display:none}
  .pg-toc-inline{display:block;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:12px 16px}
  .pg-toc-inline summary{font-weight:700;cursor:pointer}
  .pg-toc-inline ul{background:none;padding:8px 0 0;margin:0}
  .pg-toc-inline li{padding-left:0}.pg-toc-inline li::before{display:none}
}

/* Coloring studio: fits one screen */
.ct-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-block:6px 10px}
.ct-top h1{font-size:clamp(18px,2.4vw,26px)}
.ct{display:grid;grid-template-columns:76px minmax(0,1fr) 270px;gap:12px;height:640px;min-height:400px;margin-bottom:16px}
.ct:fullscreen{height:100vh;padding:12px;background:var(--bg);margin:0}
.ct-rail{display:flex;flex-direction:column;gap:4px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:6px;overflow-y:auto;scrollbar-width:none}
.ct-rail button{display:flex;flex-direction:column;align-items:center;gap:1px;flex:none;width:100%;padding:5px 2px;border:0;border-radius:var(--radius-sm);background:none;color:var(--text);font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.ct-rail button[hidden]{display:none}
.ct-rail button:hover:not(:disabled){background:var(--surface-2)}
.ct-rail button.on{background:var(--primary);color:var(--on-primary)}
.ct-rail button:disabled{opacity:.35;cursor:default}
.ct-rail svg{width:21px;height:21px}
.ct-rail i{flex:none;height:1px;background:var(--border);margin:3px 4px}
.ct-stage{position:relative;display:grid;place-items:center;min-height:0;min-width:0;overflow:hidden;background:var(--surface-2);border-radius:var(--radius-md);touch-action:none;padding:8px}
.ct-stage canvas{display:block;background:#fff;border-radius:6px;box-shadow:var(--shadow-sm);touch-action:none;cursor:crosshair;transform-origin:center}
.ct-stage [data-loading]{position:absolute}
.ct-stage.moving canvas{cursor:grab}
.ct-panel{display:flex;flex-direction:column;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px;overflow-y:auto;min-height:0}
.ct-panel>.btn{margin-top:auto;flex:none}
.ct-group b{display:block;font-size:13px;margin-bottom:6px}
.ct-swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}
.ct-swatches[hidden]{display:none}
.ct-swatches button{aspect-ratio:1;border-radius:50%;border:2px solid var(--border);padding:0;cursor:pointer}
.ct-swatches button.on{outline:3px solid var(--text);outline-offset:2px}
.ct-tabs{display:flex;gap:4px;margin-bottom:8px}
.ct-tabs button{flex:1;padding:5px 2px;border:0;border-radius:var(--radius-full);background:var(--surface-2);color:var(--text-muted);font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.ct-tabs .on{background:var(--text);color:var(--bg)}
.ct-custom,.ct-size,.ct-check{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700}
.ct-custom{justify-content:space-between}
.ct-custom input{width:44px;height:30px;padding:0;border:1px solid var(--border);border-radius:8px;background:none}
.ct-size{justify-content:space-between}
.ct-size input{flex:1;min-width:0;accent-color:var(--primary)}
.ct-check{margin-top:8px;font-weight:600}
.ct-check input{accent-color:var(--primary)}
.ct-dialog{border:0;border-radius:var(--radius-lg);padding:24px;max-width:680px;width:calc(100% - 24px);background:var(--surface);color:var(--text);box-shadow:var(--shadow-md)}
.ct-dialog::backdrop{background:var(--overlay)}
.ct-dialog-grid{display:grid;grid-template-columns:minmax(0,260px) 1fr;gap:20px;align-items:center}
.ct-dialog img{width:100%;height:auto;border-radius:var(--radius-sm);border:1px solid var(--border);background:#fff}
.ct-share{display:grid;gap:8px;margin-top:14px}
.ct-share .btn{width:100%}
.ct-share [hidden]{display:none}
.ct-note{font-size:12px;margin-top:10px}
.ct-close{position:absolute;top:10px;right:10px;width:36px;height:36px;border:0;border-radius:50%;background:var(--surface-2);color:var(--text);cursor:pointer;display:grid;place-items:center}
.ct-close svg{width:18px;height:18px}
@media (max-width:820px){
  .ct{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;gap:6px;margin-bottom:6px}
  .ct-stage{order:1;padding:4px}
  .ct-rail{order:2;flex-direction:row;overflow-x:auto;padding:4px}
  .ct-rail{gap:0;overflow-x:hidden}
  .ct-rail button{flex:1 1 0;min-width:0;width:auto;font-size:10px}
  .ct-rail i{display:none}
  .ct-rail [data-zoom]{display:none} /* phones pinch to zoom */
  .ct-panel{order:3;flex-direction:row;align-items:center;overflow-x:auto;padding:6px 8px;gap:10px;scrollbar-width:none}
  .ct-panel{scroll-padding-right:110px}
  .ct-panel>.btn{order:9;position:sticky;right:0;margin:0;padding-inline:12px;font-size:14px;min-height:40px;box-shadow:-10px 0 10px var(--surface)}
  body:has(.ct) .site-header .nav,body:has(.ct) .crumb{display:none}
  body:has(.ct) .toast-region{top:max(12px,env(safe-area-inset-top,0px));bottom:auto}
  .ct-top{padding-block:8px 6px}.ct-top h1{font-size:16px}
  .ct-group{flex:none}
  .ct-group b,.ct-tabs,.ct-custom,.ct-recent{display:none}
  .ct-swatches{display:flex;gap:6px}
  .ct-swatches[hidden]{display:flex}
  .ct-swatches button{width:30px;height:30px;flex:none}
  .ct-check{margin:0}.ct-size{min-width:120px}
  .ct-dialog-grid{grid-template-columns:1fr}.ct-dialog img{max-height:38vh;width:auto;margin-inline:auto}
}

/* Search */
.show-sm{display:none}
@media (max-width:720px){.show-sm{display:inline-flex}}
form[role=search]{position:relative}
.suggest{position:absolute;z-index:60;top:calc(100% + 6px);left:0;right:0;min-width:300px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:6px;max-height:70vh;overflow-y:auto}
.suggest[hidden]{display:none}
.suggest a{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:var(--radius-sm);color:var(--text);text-decoration:none;font-weight:700;font-size:14px}
.suggest a.on,.suggest a:hover{background:var(--surface-2);color:var(--text)}
.suggest img{width:38px;height:auto;flex:none;border-radius:4px;border:1px solid var(--border);background:#fff}
.suggest small{display:block;font-weight:500;font-size:12px;color:var(--text-muted)}
.suggest .sg-hub{background:color-mix(in srgb,var(--accent) 16%,var(--bg));margin-bottom:4px}
.suggest .sg-hub svg{position:static;width:20px;height:20px;margin:0 9px;color:var(--primary);flex:none}
.suggest .all{justify-content:center;color:var(--primary);margin-top:2px}
.suggest p{margin:0;padding:10px;font-size:14px;color:var(--text-muted)}
.search-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 22%,var(--bg)),color-mix(in srgb,#6ec6f0 14%,var(--bg)));padding-block:32px;text-align:center}
.search-hero h1{font-size:clamp(26px,4vw,40px)}
.search-big{display:flex;gap:8px;max-width:600px;margin:16px auto 0}
.search-big>svg{position:absolute;left:14px;top:13px;width:20px;height:20px;color:var(--text-muted);z-index:1}
.search-big .input{padding-left:42px;border-radius:999px;flex:1;min-width:0}
.search-big .suggest{right:100px;text-align:left}
.search-note{margin-top:10px}
.search-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:16px}
.search-chips a{padding:7px 14px;border-radius:var(--radius-full);background:var(--surface);border:1px solid var(--border);color:var(--text);font-size:14px;font-weight:700;text-decoration:none}
.search-chips a:hover{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.search-body{padding-block:24px 40px}
.search-hubs{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}
.search-hubs a{display:flex;align-items:center;gap:10px;padding:6px 16px 6px 6px;border:1px solid var(--border);border-radius:var(--radius-full);background:var(--surface);color:var(--text);font-weight:700;text-decoration:none}
.search-hubs a:hover{border-color:var(--primary);color:var(--text)}
.search-hubs img{width:44px;height:44px;border-radius:50%;object-fit:cover}
.search-hubs small{display:block;font-weight:500;font-size:12px;color:var(--text-muted)}

/* Off-screen home sections wait until they are near the screen. */
.band{content-visibility:auto;contain-intrinsic-size:auto 460px}

/* Category page */
.cat-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 26%,var(--bg)),color-mix(in srgb,var(--primary) 12%,var(--bg)));padding-block:36px 44px;overflow:hidden}
.cat-hero h1{font-size:clamp(30px,4.4vw,48px);line-height:1.1;margin-top:12px}
.cat-intro{margin-top:12px;font-size:17px;line-height:1.65;color:var(--text);max-width:56ch}
.cat-intro a{font-weight:700}
.cat-hero .ctas{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
.cat-hero .hero-fan{height:340px}
.cat-list{scroll-margin-top:0}
.cat-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.cat-levels{display:inline-flex;gap:4px;padding:4px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-full);box-shadow:var(--shadow-sm);max-width:100%;overflow-x:auto}
.cat-levels a{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:var(--radius-full);color:var(--text);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}
.cat-levels a:hover{background:var(--surface-2);color:var(--text)}
.cat-levels a span{font-size:12px;font-weight:700;color:var(--text-muted)}
.cat-levels a[aria-current]{background:var(--primary);color:var(--on-primary)}
.cat-levels a[aria-current] span{color:var(--on-primary)}
.cat-count{color:var(--text-muted);font-size:14px;margin:0}
.cat-pager{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;margin-top:28px}
.cat-pager a{min-width:40px;height:40px;padding:0 12px;display:inline-grid;place-items:center;border:1.5px solid var(--border);border-radius:var(--radius-full);background:var(--surface);color:var(--text);font-weight:700;text-decoration:none}
.cat-pager a:hover{border-color:var(--primary);color:var(--text)}
.cat-pager a[aria-current]{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.cat-pager span{color:var(--text-muted)}
@media (max-width:820px){.cat-hero{padding-block:24px 28px}.cat-hero .hero-fan{display:none}.cat-bar{align-items:flex-start;flex-direction:column}}

/* Collection hubs: a card with direct actions, grouped under headings */
.cc-item{display:flex;flex-direction:column;gap:8px}
.cc-item .cc{flex:1}
.cc-acts{display:flex;gap:8px}
.cc-acts .btn{flex:1;padding:0 8px}
.cat-group{margin:32px 0 8px}
.cat-group:first-of-type{margin-top:0}
.cat-group-text{margin:0 0 16px;color:var(--text-muted);max-width:720px}
@media (max-width:640px){.cat-list .grid{grid-template-columns:1fr 1fr;gap:12px}}
