/* Hammond Enterprise design system: tokens, base, shell (header/footer),
   buttons, and homepage sections. Page-specific styles live in app.css,
   loan.css, and surveys.css. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --text: #0b1220;
  --text-2: #2a3345;
  --muted: #5b6478;
  --faint: #5f6879;
  --border: #e6e8ee;
  --border-strong: #d5d9e2;
  --accent: #3653e8;
  --accent-hover: #2b45cc;
  --accent-soft: #eef1ff;
  --accent-ink: #2a44c8;
  --btn-bg: #3653e8;
  --btn-bg-hover: #2b45cc;
  --ink: #070b16;          /* dark bands (hero, CTA) */
  --ink-2: #0e1528;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .05);
  --shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 4px 16px -4px rgba(11, 18, 32, .08);
  --shadow-lg: 0 2px 4px rgba(11, 18, 32, .04), 0 24px 48px -12px rgba(11, 18, 32, .18);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Chart palette: validated categorical order (light steps) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
  --diverge-pos: #2a78d6;
  --diverge-neg: #e34948;
  --chart-grid: #e8e9ee;
  --chart-axis: #c9ccd6;
  --chart-muted: #6b7285;

  /* Status (always paired with an icon + label) */
  --status-good: #0ca30c;
  --status-warn: #fab219;
  --status-bad: #d03b3b;
  --status-info: #2a78d6;
  --text-good: #006300;
  --text-bad: #b42323;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090c13;
    --bg-alt: #0d111a;
    --surface: #121722;
    --surface-2: #151b27;
    --text: #e9ecf3;
    --text-2: #c9cfdb;
    --muted: #98a1b3;
    --faint: #939bad;
    --border: #1f2635;
    --border-strong: #2b3446;
    --accent: #7088ff;
    --accent-hover: #8a9dff;
    --accent-soft: #1a2142;
    --accent-ink: #a5b3ff;
    --btn-bg: #4a61ea;
    --btn-bg-hover: #5b71f2;
    --ink: #05070d;
    --ink-2: #0b1122;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 16px -4px rgba(0, 0, 0, .4);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -12px rgba(0, 0, 0, .6);

    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --diverge-pos: #3987e5;
    --diverge-neg: #e66767;
    --chart-grid: #1f2635;
    --chart-axis: #2f384b;
    --chart-muted: #98a1b3;

    --status-info: #3987e5;
    --text-good: #3ccf3c;
    --text-bad: #ff7b7b;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Component display rules (grid, flex) must never un-hide [hidden] elements. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.022em; font-weight: 650; color: var(--text); }
h1 { letter-spacing: -0.035em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }

.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;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 650; font-size: 1rem; letter-spacing: -0.01em;
  min-width: 0;
}
.brand-logo { width: 30px; height: 30px; flex: none; display: block; }
.brand-name { white-space: nowrap; }
.brand-name span { color: var(--muted); font-weight: 500; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500; font-size: .92rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.site-nav a:not(.btn):hover { color: var(--text); background: var(--bg-alt); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.site-nav .btn { margin-left: 12px; }
.site-nav a.nav-account {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 8px; padding-left: 16px;
  border-left: 1px solid var(--border);
  border-radius: 0;
  max-width: 220px;
}
.site-nav a.nav-account:hover { background: transparent; }
.nav-avatar {
  flex: none;
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: .68rem; font-weight: 700; letter-spacing: .02em;
}
.nav-account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
  cursor: pointer; place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-toggle .icon-close { display: none; }
.site-header[data-open] .nav-toggle .icon-open { display: none; }
.site-header[data-open] .nav-toggle .icon-close { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: #fff;
  font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 2px rgba(11, 18, 32, .12), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-small { height: 36px; padding: 0 14px; font-size: .875rem; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 1rem; }
.btn-secondary {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--bg-alt); border-color: var(--faint); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.btn-danger { background: #c62f2f; color: #fff; }
.btn-danger:hover { background: #a92525; }
.btn-danger-outline { background: var(--surface); color: var(--text-bad); border-color: color-mix(in srgb, var(--status-bad) 45%, var(--border)); box-shadow: none; }
.btn-danger-outline:hover { background: color-mix(in srgb, var(--status-bad) 8%, var(--surface)); border-color: var(--status-bad); }
.btn-light { background: #fff; color: #0b1220; }
.btn-light:hover { background: #eef1f7; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--accent-ink); }
.link-arrow .arrow { transition: transform .15s; }

/* ---------- Page hero (tool pages) ---------- */
.page-hero {
  position: relative;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--bg-alt);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent 85%);
  pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: .35em; }
.page-hero p { color: var(--muted); font-size: 1.08rem; max-width: 42em; margin: 0; }
.page-hero .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: .8rem; font-weight: 500; color: var(--text-2);
}
.pill svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kicker {
  display: inline-block;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 12px;
}

/* ---------- Homepage: hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 104px;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 900px; height: 600px; right: -200px; top: -240px;
  background: radial-gradient(closest-side, rgba(84, 110, 255, .35), transparent);
  filter: blur(20px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  font-size: .82rem; color: #c9d1e6;
  margin-bottom: 24px;
}
.hero-badge b { background: rgba(112, 136, 255, .22); color: #c8d1ff; font-weight: 600; padding: 2px 8px; border-radius: 999px; font-size: .75rem; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.05; margin-bottom: 20px; }
.hero h1 .grad {
  background: linear-gradient(92deg, #9fb0ff, #6f8cff 50%, #8fd3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.15rem; line-height: 1.6; color: #aab4cc; max-width: 34em; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 28px 0 0; font-size: .88rem; color: #98a3bd; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 16px; height: 16px; fill: none; stroke: #7f95ff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Product preview (decorative mock built from the sample-data results) */
.preview { position: relative; padding: 0 0 80px 0; }
.preview-card {
  position: relative;
  background: linear-gradient(180deg, #121a30, #0d1426);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 22px;
  color: #dfe5f3;
}
.preview-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.preview-title { font-size: .82rem; color: #8f9ab4; font-weight: 500; }
.preview-tag { flex: none; white-space: nowrap; font-size: .72rem; color: #9fb0ff; background: rgba(112, 136, 255, .14); border: 1px solid rgba(112, 136, 255, .25); border-radius: 999px; padding: 2px 10px; }
.preview-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.preview-stat { background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; padding: 12px; }
.preview-stat span { display: block; font-size: .7rem; color: #8590aa; text-transform: uppercase; letter-spacing: .06em; }
.preview-stat strong { display: block; font-size: 1.2rem; font-weight: 650; letter-spacing: -0.02em; color: #fff; margin-top: 2px; font-variant-numeric: tabular-nums; }
.preview-stat em { font-style: normal; font-size: .74rem; color: #5fd68a; }
.preview-stat em.neutral { color: #8590aa; }
.preview-chart { display: block; width: 100%; height: auto; margin: 4px 0 14px; }
.preview-insight { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: #b8c1d6; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.preview-insight i { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .65rem; font-weight: 700; margin-top: 1px; }
.preview-insight + .preview-insight { margin-top: 10px; }
.i-good { background: #0ca30c; color: #fff; }
.i-warn { background: #fab219; color: #3a2a00; }
.preview-float {
  position: absolute; left: -36px; bottom: 0;
  display: flex; gap: 12px; align-items: center;
  background: #fff; color: #0b1220;
  border-radius: 14px;
  padding: 12px 16px 12px 12px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .55);
  font-size: .8rem;
  max-width: 320px;
}
.preview-float .float-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eef1ff; color: #2a44c8; font-weight: 700; }
.preview-float strong { display: block; font-size: .9rem; letter-spacing: -0.01em; }
.preview-float span { color: #5b6478; }

/* ---------- Homepage: sections ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tool-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tool-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tool-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  margin-bottom: 20px;
}
.tool-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tool-card h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-card .free { font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); border-radius: 999px; padding: 2px 8px; }
.tool-card > p { color: var(--muted); font-size: .97rem; }
.checklist { list-style: none; padding: 0; margin: 4px 0 24px; display: grid; gap: 10px; font-size: .92rem; color: var(--text-2); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tool-card .link-arrow { margin-top: auto; }
.tool-card .stretched::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.principle h3 { font-size: 1.1rem; margin: 16px 0 8px; }
.principle p { color: var(--muted); margin: 0; font-size: .97rem; }
.principle .tool-icon { margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 650; font-size: .9rem;
  margin-bottom: 16px;
}
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
  padding: 72px 48px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 80% at 50% 0%, rgba(84, 110, 255, .4), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 48px 48px;
}
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.cta-band p { color: #aab4cc; font-size: 1.1rem; max-width: 34em; margin: 0 auto 28px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Legal pages ---------- */
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 80px; align-items: start; }
.legal-toc { position: sticky; top: 88px; font-size: .88rem; }
.legal-toc-title { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 10px; }
.legal-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-left: 1px solid var(--border); }
.legal-toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.legal-toc a:hover { color: var(--text); border-left-color: var(--border-strong); }
.legal-body { max-width: 72ch; color: var(--text-2); font-size: 1rem; line-height: 1.7; }
.legal-body section { scroll-margin-top: 88px; padding-bottom: 8px; }
.legal-body h2 { font-size: 1.3rem; margin: 36px 0 12px; color: var(--text); }
.legal-body section:first-of-type h2 { margin-top: 8px; }
.legal-body ul { padding-left: 20px; margin: 0 0 1em; display: grid; gap: 6px; }
.legal-body strong { color: var(--text); }
.legal-body mark { background: color-mix(in srgb, var(--status-warn) 35%, transparent); color: var(--text); padding: 0 4px; border-radius: 4px; }
.legal-draft {
  padding: 12px 16px; margin-bottom: 28px;
  border: 1px solid color-mix(in srgb, var(--status-warn) 60%, var(--border));
  background: color-mix(in srgb, var(--status-warn) 12%, var(--surface));
  border-radius: 10px; font-size: .9rem;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); color: var(--muted); font-size: .9rem; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding: 56px 0 40px; }
.footer-top p { margin: 14px 0 0; max-width: 30em; }
.footer-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--faint); }
.footer-disclaimer { max-width: 52em; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .preview { max-width: 560px; padding-left: 24px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .site-header[data-open] .site-nav { display: flex; }
  .site-nav a:not(.btn) { padding: 12px; font-size: 1rem; }
  .site-nav a[aria-current="page"] { background: var(--bg-alt); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav .btn { margin: 8px 0 0; height: 44px; }
  .site-nav a.nav-account { margin: 4px 0 0; padding: 12px; border-left: 0; border-top: 1px solid var(--border); border-radius: 8px; max-width: none; }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
  .legal-toc { position: static; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 64px 0 72px; }
  .lede { font-size: 1.05rem; }
  .preview { padding-left: 0; padding-bottom: 72px; }
  .preview-card { padding: 16px; }
  .preview-stats { gap: 6px; }
  .preview-stat { padding: 10px 8px; }
  .preview-stat strong { font-size: 1rem; }
  .preview-float { left: 12px; right: 12px; max-width: none; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .tool-card { padding: 22px; }
  .cta-band { padding: 52px 22px; border-radius: 18px; }
  .page-hero { padding: 40px 0 28px; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .btn-lg { height: 48px; }
  .hero-actions .btn { flex: 1 1 auto; }
}


/* ---------- Analytics choice (js/consent.js) ---------- */
.consent-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 720px; margin: 0 auto; display: grid; gap: 12px; padding: 16px 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.consent-bar p { margin: 0; font-size: .92rem; line-height: 1.5; }
.consent-bar a { color: var(--accent-ink); text-decoration: underline; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-actions button { flex: 1 1 140px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.consent-actions button:hover { border-color: var(--accent); background: var(--accent-soft); }
.consent-actions button:focus-visible { outline: none; box-shadow: var(--ring); }
.consent-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.consent-link:hover { text-decoration: underline; }
.consent-link:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
@media print { .consent-bar { display: none !important; } }


/* ---------- Skip link: the first thing keyboard and screen reader users reach ---------- */
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 2000; padding: 10px 16px; background: var(--surface); color: var(--text); border: 2px solid var(--accent); border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; outline: none; box-shadow: var(--ring); }
main:focus { outline: none; }
