/* HydraCal — shared styles.
   Self-contained: no external fonts, no CDN, no trackers.

   Palette sampled from the app icon: terracotta, apricot, sage and warm cream.
   Neutrals are warm rather than grey, so nothing reads as clinical. */

:root {
  color-scheme: light dark;
  --bg: #fdf9f5;
  --surface: #f8efe6;
  --border: #ebdccd;
  --text: #3d2c23;
  --muted: #7b6557;
  --heading: #2b1d16;
  --accent: #c2571f;
  --accent-soft: #f6e2d2;
  --sage: #6e8a3b;
  --note-bg: #fdf0da;
  --note-border: #f3dcb4;
  --note-text: #6b4520;
  --note-heading: #8a5316;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1310;
    --surface: #291c16;
    --border: #453227;
    --text: #f0e3d8;
    --muted: #b49c8b;
    --heading: #fbf3ec;
    --accent: #ef8b4e;
    --accent-soft: #3a2318;
    --sage: #9cbb6a;
    --note-bg: #3a2611;
    --note-border: #5e4218;
    --note-text: #fbe9cd;
    --note-heading: #f2c579;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main { max-width: 46rem; margin: 0 auto; }

header.page-head {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  color: var(--heading);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.updated { color: var(--muted); font-size: 0.9375rem; margin: 0; }

h2 {
  font-size: 1.3125rem;
  color: var(--heading);
  margin: 2.75rem 0 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.0625rem;
  color: var(--heading);
  margin: 1.75rem 0 0.5rem;
}

p, li { color: var(--text); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.45rem; }
strong { color: var(--heading); font-weight: 600; }
a { color: var(--accent); }

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.summary h2 { margin-top: 0; font-size: 1.0625rem; }
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  color: var(--note-text);
}

.note h2, .note h3 { color: var(--note-heading); margin-top: 0; }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--note-heading); }
.note a { color: var(--note-heading); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { color: var(--heading); font-weight: 600; background: var(--surface); }

.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
.table-wrap table { margin: 0; min-width: 30rem; }

footer.page-foot {
  max-width: 46rem;
  margin: 4rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

footer.page-foot a { color: var(--muted); }
footer.page-foot nav { margin-bottom: 0.75rem; }
footer.page-foot nav a { margin-right: 1.25rem; white-space: nowrap; }

/* Top navigation — every page needs a route home, not just the footer. */
.site-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-nav .inner {
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}
.site-nav .brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.site-nav .brand img { width: 26px; height: 26px; border-radius: 7px; }
.site-nav a.navlink {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
}
.site-nav a.navlink:hover, .site-nav a.navlink[aria-current="page"] { color: var(--accent); }
.site-nav a.navlink[aria-current="page"] { font-weight: 600; }
@media (max-width: 30rem) {
  .site-nav .inner { gap: 0.9rem; padding: 0.75rem 0; }
  .site-nav a.navlink { font-size: 0.875rem; }
}
