/* Layout: editorial single column with generous bands; display serif for headlines, clean sans for reading.
   Three brand palettes. Change the data-palette attribute on <html> to switch: rose (default), sage, mauve. */
:root, :root[data-palette="rose"] {
  --cream: #F7F0EA;      /* page ground */
  --paper: #FFFCF9;      /* cards */
  --ink: #2B2725;        /* deep charcoal text */
  --muted: #6F6560;      /* secondary text */
  --accent: #B5797A;     /* dusty rose */
  --accent-deep: #8A5056;
  --accent-soft: #F0DEDA;
  --gold: #B08D4C;       /* gold accents */
  --line: #E7DAD2;
  --good: #4C7A58; --good-soft: #E3EEE5;
  --warn: #A16A1F; --warn-soft: #F6EAD6;
  --alert: #A2463F; --alert-soft: #F5E0DD;
  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --body: "Jost", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
:root[data-palette="sage"] {
  --cream: #F3F1EA; --paper: #FFFEFA; --ink: #252A27; --muted: #626A64;
  --accent: #7F937A; --accent-deep: #4F6450; --accent-soft: #E0E7DA;
  --gold: #AF8F4F; --line: #DEDDD2;
}
:root[data-palette="mauve"] {
  --cream: #F5EDEE; --paper: #FFFAFA; --ink: #211C20; --muted: #6A5E65;
  --accent: #946578; --accent-deep: #643D50; --accent-soft: #EBDAE1;
  --gold: #A6884C; --line: #E4D5DA;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.55rem; }
em.serif { font-family: var(--display); font-style: italic; color: var(--accent-deep); }
p { margin: 0; }
a { color: var(--accent-deep); }
.eyebrow {
  font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; color: var(--gold);
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  background: var(--ink); color: var(--cream); text-decoration: none;
  font-family: var(--body); font-weight: 500; font-size: 0.98rem; letter-spacing: 0.02em;
  padding: 0.95em 1.6em; border-radius: 999px; border: 1px solid var(--ink);
  transition: background .2s, color .2s, transform .2s; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--cream); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.rule-gold { width: 56px; height: 1px; background: var(--gold); border: 0; margin: 0; }
.num { font-variant-numeric: tabular-nums; }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--cream); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.brand span { color: var(--gold); font-style: italic; font-weight: 500; }
.topbar nav { display: flex; align-items: center; gap: 22px; font-size: 0.92rem; }
.topbar nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.topbar nav a:not(.btn):hover { color: var(--ink); }
.topbar .btn { padding: 0.6em 1.15em; font-size: 0.88rem; }
@media (max-width: 760px) { .topbar nav a:not(.btn) { display: none; } }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--muted); font-size: 0.88rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Status pills (dashboard + report) */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); background: var(--good-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.alert { color: var(--alert); background: var(--alert-soft); }
.sample-tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-deep); border: 1px dashed var(--accent); border-radius: 999px; padding: 3px 12px; }

/* Palette picker (unused here) (preview only, removed in the Replit version) */
.picker { position: fixed; z-index: 40; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 14px; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 30px rgba(40,30,25,.12); font-size: 0.78rem; color: var(--muted); }
.picker button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--paper); outline: 1px solid var(--line); cursor: pointer; padding: 0; }
.picker button[aria-pressed="true"] { outline: 2px solid var(--ink); }
.picker .rose { background: linear-gradient(135deg, #B5797A 50%, #B08D4C 50%); }
.picker .sage { background: linear-gradient(135deg, #7F937A 50%, #AF8F4F 50%); }
.picker .mauve { background: linear-gradient(135deg, #946578 50%, #A6884C 50%); }
.about .portrait:has(img) { padding: 0; overflow: hidden; }
.about .portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
