/* Calm directory layout, v2 (November 2026).
   Each page sets its palette in an inline :root block. Defaults below are a
   neutral sage so the sheet still works without it. */
:root {
  --primary: #4F6B45; --primary-dark: #34482E; --primary-soft: #E3EBDA;
  --accent: #D9926A; --accent-text: #9A4F2C; --accent-soft: #F4E3D6;
  --bg: #F5F6EE; --card: #FFFEFA; --text: #2B3227; --muted: #5D6656; --line: #E1E4D3;
  --header-bg: rgba(255, 254, 250, 0.9); --footer-bg: #E6EDDD; --footer-text: #2B3227;
  --on-primary: #FFFFFF;
  --radius: 20px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 40, 30, 0.04), 0 10px 30px rgba(30, 40, 30, 0.07);
  --shadow-hover: 0 2px 6px rgba(30, 40, 30, 0.06), 0 20px 44px rgba(30, 40, 30, 0.11);
  --max: 1160px;
  --font: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.7; font-size: 1.03rem; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px;
}
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--primary-dark); margin: 0 0 0.6em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1.05rem; }
.muted, .lede { color: var(--muted); }
.lede { font-size: 1.15rem; max-width: 40rem; line-height: 1.75; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--on-primary); padding: .5rem 1rem; z-index: 100; border-radius: var(--radius-sm); }
.skip-link:focus { left: .75rem; top: .75rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40; background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: 0 8px 24px rgba(30, 40, 30, 0.045);
}
.header-inner { display: flex; align-items: center; gap: 1.1rem; min-height: 74px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--primary-dark); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; white-space: nowrap; letter-spacing: -0.015em; }
.logo:hover { color: var(--primary); }
.logo-mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 11px; background: var(--primary); color: var(--on-primary); font-size: 1.1rem; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.logo span.logo-sub { color: var(--muted); font-weight: 500; font-family: var(--font); font-size: .9rem; }
nav.main-nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
nav.main-nav a { color: var(--text); text-decoration: none; font-size: .95rem; padding: .45rem .85rem; border-radius: 999px; transition: background .2s, color .2s; }
nav.main-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
nav.main-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.search-box { position: relative; }
.search-box input { width: 13rem; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .55rem 1rem; font: inherit; font-size: .92rem; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-results { display: none; position: absolute; right: 0; top: calc(100% + .5rem); width: 20rem; max-width: 86vw; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-hover); padding: .4rem; z-index: 50; }
.search-results.open { display: block; }
.search-results a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .93rem; }
.search-results a:hover { background: var(--primary-soft); }
.search-results .sr-meta { color: var(--muted); font-size: .8rem; }
.search-results .empty { padding: .6rem .7rem; color: var(--muted); font-size: .9rem; }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--primary-dark); border-radius: 999px; padding: .45rem 1rem; font: inherit; font-size: .92rem; cursor: pointer; }

/* Hero */
.hero-band { position: relative; overflow-x: clip; overflow-y: visible; isolation: isolate; }
.hero-band::before, .hero-band::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.hero-band::before { width: 640px; height: 640px; top: -260px; right: -160px; background: radial-gradient(closest-side, var(--primary-soft), transparent 72%); opacity: .95; }
.hero-band::after { width: 560px; height: 560px; bottom: -280px; left: -200px; background: radial-gradient(closest-side, var(--accent-soft), transparent 72%); }
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4.5rem); }
.hero h1 { margin-bottom: .45em; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: var(--accent-text); margin-bottom: 1.1rem; }
.eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-art { position: relative; }
.art-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-hover); padding: 1.4rem; transform: rotate(.6deg); }
.art-card svg { display: block; width: 100%; height: auto; border-radius: 18px; }
.art-stats { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.1rem; padding: 0 .3rem; }
.art-stats div { text-align: center; flex: 1; }
.art-stats strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--primary-dark); line-height: 1.1; }
.art-stats span { font-size: .8rem; color: var(--muted); }
.art-chip { position: absolute; left: -1.2rem; top: 1.6rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .55rem 1rem; font-size: .85rem; color: var(--primary-dark); font-weight: 600; box-shadow: var(--shadow); display: inline-flex; gap: .5rem; align-items: center; }
.art-chip::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--primary); color: var(--on-primary); text-decoration: none; border: 1px solid var(--primary); border-radius: 999px; padding: .78rem 1.5rem; font: inherit; font-weight: 600; font-size: .98rem; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.08); transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--on-primary); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--primary-dark); border-color: var(--primary); box-shadow: none; }
.btn-secondary:hover { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary-dark); }

/* Notices */
.good-to-know { display: flex; gap: 1rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; box-shadow: var(--shadow); }
.good-to-know strong { display: block; font-family: var(--serif); color: var(--primary-dark); font-size: 1.05rem; margin-bottom: .2rem; }
.good-to-know p { margin: 0; color: var(--muted); }
.gtk-icon { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-family: var(--serif); font-weight: 700; }
.notice, .legal-notice { background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.4rem 0; color: var(--text); }

/* Sections and grids */
.section { position: relative; z-index: 1; padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; }
.section-head a::after { content: " →"; }
.section-intro { color: var(--muted); max-width: 40rem; margin-top: -.6rem; margin-bottom: 1.6rem; }
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover, .tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-soft); }
.card h3 { margin: .9rem 0 .4rem; }
.card p:last-child { margin-bottom: 0; }
.icon-bubble { width: 2.9rem; height: 2.9rem; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.grid-4 .card:nth-child(even) .icon-bubble { background: var(--accent-soft); color: var(--accent-text); }
.card-count { display: inline-block; margin-top: .6rem; font-size: .82rem; font-weight: 600; color: var(--primary); }
.tool-card { display: flex; flex-direction: column; }
.tool-card .tool-name { color: var(--primary-dark); text-decoration: none; }
.tool-card .tool-name:hover { color: var(--primary); text-decoration: underline; }
.tool-card .fact-source { margin-top: auto; padding-top: .8rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .6rem; }
.badge { display: inline-block; background: var(--primary-soft); color: var(--primary-dark); border-radius: 999px; padding: .2rem .75rem; font-size: .8rem; font-weight: 600; text-decoration: none; }
a.badge:hover { background: var(--primary); color: var(--on-primary); }
.badge-editorial { background: var(--accent-soft); color: var(--accent-text); }
.fact-source { font-size: .88rem; color: var(--muted); }
.fact-source a { font-weight: 600; }

/* Steps band */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 1.4rem; }
.step-num { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 700; font-family: var(--serif); }
.cta-band { margin-top: clamp(2.5rem, 6vw, 4.5rem); background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); border-radius: 28px; padding: clamp(1.8rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: .3rem; }
.cta-band p { margin: 0; color: var(--text); max-width: 36rem; }

/* Inner pages */
.page-head { padding: clamp(2.5rem, 5vw, 4rem) 0 1rem; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: .45rem; }
.tool-hero { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; align-items: start; }
.tool-hero-top { display: flex; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.tool-hero-top h1 { margin: 0; }
.editorial-flag { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0 1.4rem; }
.editorial-label { margin: 0; font-size: .9rem; color: var(--muted); }
.side-box { position: sticky; top: 96px; }
.side-box h2 { font-size: 1.2rem; }
table.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 1.5rem 0; }
table.compare th, table.compare td { padding: .9rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.compare thead th { background: var(--primary-soft); color: var(--primary-dark); font-family: var(--serif); }
table.compare tbody th { color: var(--primary-dark); font-weight: 600; }
table.compare tr:last-child td, table.compare tr:last-child th { border-bottom: 0; }
.placeholder-field { background: var(--accent-soft); border: 1px dashed var(--accent-text); border-radius: 6px; padding: 0 .35rem; color: var(--accent-text); }
.legal-doc h2 { font-size: 1.3rem; }
form.stack { display: grid; gap: .45rem; max-width: 34rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
form.stack label { font-weight: 600; margin-top: .6rem; color: var(--primary-dark); }
form.stack input, form.stack select, form.stack textarea { font: inherit; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .9rem; background: #fff; color: var(--text); }
form.stack input:focus, form.stack select:focus, form.stack textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
form.stack textarea { min-height: 8rem; resize: vertical; }
form.stack .btn { justify-self: start; margin-top: 1rem; }
.form-note { font-size: .88rem; color: var(--muted); margin: .4rem 0 0; }
.form-status { color: var(--primary-dark); font-weight: 600; margin: 0; }

/* Footer */
.site-footer { margin-top: clamp(3.5rem, 8vw, 6rem); background: var(--footer-bg); color: var(--footer-text); padding: 3.5rem 0 2rem; border-top: 1px solid var(--line); }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: var(--primary-dark); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1.05rem; margin-bottom: .8rem; color: var(--primary-dark); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; font-size: .93rem; }
.footer-brand p { color: var(--footer-text); opacity: .85; font-size: .95rem; max-width: 22rem; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,.08); font-size: .84rem; color: var(--footer-text); }
.footer-legal p { margin-bottom: .45rem; opacity: .9; }

/* Cookie banner */
.cookie-banner { display: none; position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; }
.cookie-banner.open { display: block; }
.cookie-inner { display: flex; align-items: center; gap: 1.2rem; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 1rem 1.3rem; max-width: 60rem; }
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--text); }
.cookie-actions { display: flex; gap: .5rem; flex: none; }
.cookie-actions .btn { padding: .55rem 1.1rem; font-size: .9rem; }

/* Gallery (index of all sites) */
.swatch-row { display: flex; gap: .35rem; margin-top: .8rem; }
.swatch { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.palette-page { padding: 3rem 0; }

@media (max-width: 1020px) {
  .search-box input { width: 10rem; }
  nav.main-nav a { padding: .4rem .6rem; }
}
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-hero { grid-template-columns: 1fr; }
  .side-box { position: static; }
  .header-inner { flex-wrap: wrap; padding: .6rem 0; }
  .nav-toggle { display: inline-block; }
  nav.main-nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; margin: 0; padding: .4rem 0 .6rem; }
  nav.main-nav.open { display: flex; }
  .search-box { order: 4; width: 100%; padding-bottom: .6rem; }
  .search-box input { width: 100%; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 32rem; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .grid-2, .grid-4, .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2.4rem; }
  .art-chip { left: .4rem; top: -.9rem; }
  .art-card { transform: none; }
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .cta-band { border-radius: 22px; }
  .logo span.logo-sub { display: none; }
  table.compare { display: block; overflow-x: auto; }
}
