@import url('/assets/fonts/fonts.css');

/* Design tokens. Values come from the 2026-09-27 design draft (see TODO.md,
   "Site restyle"): warm off-white page, white surfaces, a stone border, olive
   accent, near-black bands. Saira for display/buttons, Inter for text. Corners
   are tight (2px controls, 4px cards) and the skewed olive bar is the one
   decorative motif -- see .slash. */
:root {
  color-scheme: light;
  --bg: #FAF9F7;
  --surface: #FFFFFF;
  --surface-2: #F3F1EC;
  --sand: #DAD7CF;
  --border: #C0BFBE;
  --border-soft: #DAD7CF;
  --ink: #111418;
  --ink-soft: #6B6F72;
  --accent: #556B2F;
  --accent-hover: #445626;
  --accent-light: #9BB068;
  --accent-soft: rgba(85, 107, 47, 0.12);
  --dark: #111418;
  --dark-line: #3A3F45;
  --dark-ink: #CFD1D1;
  --dark-input: #1A1E22;
  --dark-input-border: #7C8185;
  --r-control: 2px;
  --r-card: 4px;
  --good: #2F7A4D;
  --warn: #B9862C;
  --bad: #B23A2E;
  /* Footer is a fixed dark "bookend" in both themes, not theme-reactive --
     a deliberate dark olive-black (complements --accent's hue rather than a
     generic gray) rather than flipping with the rest of the page. Contrast
     vs. this surface validated with dataviz's validate_palette.js. */
  --footer-bg: #111418;
  --footer-ink: #FFFFFF;
  --footer-ink-soft: #CFD1D1;
  --footer-accent: #9BB068;
  /* Chart-only categorical pair (Ewe vs. Lamb, Wool vs. Hair, etc.) -- kept
     separate from --accent because --accent alone doesn't need to clear the
     colorblind-safe categorical-pair gate (single series never does), but a
     genuine 2-series comparison does. Validated with dataviz's
     validate_palette.js against this surface: all checks pass. --chart-2 is
     the only place blue appears in the UI -- reserved for that pairing, not
     reused as a generic link/info color. */
  --chart-1: #6B8E23;
  --chart-2: #2A6FB0;
  /* Favorite-star gold. Distinct from --warn (#B9862C already means "caution")
     even though both are amber-family -- reusing a status color for a
     different meaning would blur both. Contrast-checked vs. this surface. */
  --favorite: #A6790F;
  --font-display: 'Saira', 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #111418;
    --surface: #1A1E22;
    --surface-2: #20242A;
    --sand: #20242A;
    --border: #3A3F45;
    --border-soft: #2A2F35;
    --ink: #F1EFEA;
    --ink-soft: #A3A9AD;
    --accent: #9BB068;
    --accent-hover: #B3C684;
    --accent-light: #9BB068;
    --accent-soft: rgba(155, 176, 104, 0.16);
    /* good/warn/bad intentionally unchanged -- validated against the dark
       surface (validate_palette.js): good/warn clear 3:1, bad sits at a 2.79
       WARN, which is an acceptable relief case here because every place that
       uses it (.notice.err, .status.Rejected, etc.) already pairs the color
       with visible text, never color alone. */
    --chart-1: #008300;
    --chart-2: #3987e5;
    --favorite: #E0B93E;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111418;
  --surface: #1A1E22;
  --surface-2: #20242A;
  --sand: #20242A;
  --border: #3A3F45;
  --border-soft: #2A2F35;
  --ink: #F1EFEA;
  --ink-soft: #A3A9AD;
  --accent: #9BB068;
  --accent-hover: #B3C684;
  --accent-light: #9BB068;
  --accent-soft: rgba(155, 176, 104, 0.16);
  --chart-1: #008300;
  --chart-2: #3987e5;
  --favorite: #E0B93E;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; }
h1 { font-weight: 800; text-transform: uppercase; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Saira eyebrow label -- the small tracked caps line above a heading. */
.eyebrow {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-display); font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft);
}
.eyebrow::after { content: ""; flex: 1; max-width: 160px; height: 1px; background: var(--border); }
.eyebrow.full::after { max-width: none; }
.eyebrow.plain::after { display: none; }
/* The skewed olive bar: bullet, hero accent, button arrow. */
.slash { display: inline-block; width: 6px; height: 16px; background: var(--accent); transform: skewX(-41deg); }
.slash.white { background: #fff; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1200px; }

/* Site header: a full-bleed white bar with a stone rule under it (the draft's
   72px header). Inner row shares the page's max-width. Escapes the parent
   .wrap the same way footer does, so no page markup had to change. */
nav.top {
  background: var(--surface); border-bottom: 1px solid var(--border);
  margin: 0 calc(50% - 50vw) 32px; padding: 0 24px;
  display: flex; justify-content: center; font-size: 14px; position: relative; z-index: 60;
}
nav.top .nav-inner {
  width: 100%; max-width: 1200px; height: 72px;
  display: flex; align-items: center; gap: 32px;
}
nav.top a { color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
nav.top a.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
nav.top a.brand img { display: block; height: 32px; width: auto; }
:root[data-theme="dark"] nav.top a.brand img.logo-dark { display: none; }
:root:not([data-theme="dark"]) nav.top a.brand img.logo-light { display: none; }
/* Auto on a dark device: the same weight as the rule above, so it wins (with :where() it lost and no logo showed, 2026-10-21). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) nav.top a.brand img.logo-dark { display: none; }
  :root:not([data-theme="light"]) nav.top a.brand img.logo-light { display: block; }
}
nav.top .links { display: flex; gap: 28px; align-items: center; flex: 1; }
nav.top .links .spacer { flex: 1; }
nav.top a:hover { color: var(--accent); }
nav.top a.signin { color: var(--accent); }
nav.top .btn { height: 44px; padding: 0 20px; display: inline-flex; align-items: center; }
nav.top .menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--ink-soft); border-radius: var(--r-control);
  color: var(--ink); cursor: pointer; padding: 0; margin-left: auto;
}
nav.top .menu-btn svg { display: block; }
nav.top.coming-soon .nav-inner { justify-content: space-between; }
nav.top.coming-soon .spacer { flex: 1; }
nav.top .account-link {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-control); color: var(--ink); font-weight: 600;
}
nav.top .account-link:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) { nav.top .account-link span { display: none; } nav.top .account-link { width: 44px; height: 44px; padding: 0; justify-content: center; } }
footer .letter-cta { grid-column: 8 / span 5; display: flex; justify-content: flex-end; }
@media (max-width: 860px) { footer .letter-cta { grid-column: 1 / -1; justify-content: flex-start; } }

/* Generic nav dropdown -- Registry, Market, and Account all use this same
   trigger-button + panel mechanism (see the delegated click handler in
   nav.php). .account-* classes below are positioning/spacing modifiers only,
   not a separate component. */
.nav-menu { position: relative; }
.nav-toggle {
  background: transparent; color: var(--ink); border: 0; border-radius: var(--r-control);
  padding: 8px 0; height: auto; font-size: 14px; font-weight: 600; font-family: var(--font-body);
  letter-spacing: 0; text-transform: none; white-space: nowrap; line-height: 1.2;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.nav-toggle:hover { background: transparent; }
.nav-toggle:hover { color: var(--accent); }
.nav-toggle.active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle.account-toggle { border: 1px solid var(--border); padding: 0 12px; height: 40px; }
.nav-toggle .caret { font-size: 0.7rem; color: var(--ink-soft); }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: 0 20px 40px -16px rgba(17,20,24,0.18); padding: 6px; z-index: 50;
  display: none; flex-direction: column;
}
.nav-menu.open .nav-dropdown { display: flex; }
.nav-dropdown a, .nav-dropdown .dropdown-label {
  display: block; padding: 8px 10px; border-radius: var(--r-control); font-size: 0.88rem;
  color: var(--ink); text-decoration: none; font-weight: 500;
}
.nav-dropdown a:hover { background: var(--accent-soft); color: var(--accent); }
/* Account is the rightmost trigger -- its panel right-aligns so it never
   overhangs the viewport edge. Registry/Market sit further left, so their
   panels left-align under their own trigger instead. */
.account-dropdown { left: auto; right: 0; min-width: 200px; }
.nav-dropdown .dropdown-label { color: var(--ink-soft); font-size: 0.78rem; border-bottom: 1px solid var(--border); margin-bottom: 4px; padding-bottom: 10px; }
.nav-dropdown .dropdown-label:not(:first-child) { margin-top: 8px; }

header.hero { padding: 48px 0 40px; text-align: center; }
header.hero.compact { padding: 28px 0 32px; }
header.hero h1 {
  font-family: var(--font-display);
  font-size: 2.6rem; line-height: 1.05; margin: 0 0 12px; letter-spacing: 0.01em; font-weight: 800;
  text-transform: uppercase; color: var(--ink);
}
header.hero.compact h1 { font-size: 1.8rem; }
header.hero p { color: var(--ink-soft); font-size: 1.08rem; max-width: 640px; margin: 0 auto; }
.badge {
  display: inline-block; font-family: var(--font-display); font-size: 12px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-soft); padding: 0; margin-bottom: 18px; font-weight: 600;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 32px 0 48px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px;
}
.card h2 { font-family: var(--font-display); font-weight: 700; margin: 0 0 4px; font-size: 1.5rem; color: var(--ink); }
.card .sub { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 18px; }
.stat-row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--border); font-size: 0.92rem; }
.stat-row:first-of-type { border-top: none; }
.stat-row strong { font-variant-numeric: tabular-nums; color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; }
.stat-row.address-row strong { text-align: right; line-height: 1.5; font-weight: 600; }
.print-only { display: none; }
.cta {
  display: inline-block; margin-top: 18px; font-family: var(--font-display); font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); text-decoration: none; font-weight: 700;
}
.cta:hover { color: var(--accent-hover); }
.cta.disabled { color: var(--ink-soft); cursor: default; }
.cta-stack { display: flex; flex-direction: column; gap: 6px; }
.cta-stack .cta { margin-top: 12px; }
a.back { color: var(--ink-soft); font-size: 0.85rem; text-decoration: none; }

.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 8px; color: var(--border); }
.breadcrumbs .current { color: var(--ink); font-weight: 600; }
a.back:hover { color: var(--accent); }

section.panel {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card); padding: 30px; margin-bottom: 24px;
}
section.panel h3 { font-family: var(--font-display); font-weight: 700; margin-top: 0; font-size: 1.35rem; color: var(--ink); }
section.panel p.sub { color: var(--ink-soft); font-size: 0.85rem; margin-top: -8px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--ink-soft); font-weight: 600; font-family: var(--font-display); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em; }
td { color: var(--ink); }
tr:hover td { background: rgba(17,20,24,0.02); }
td a, .ppp-link { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--ink-soft); }
td a:hover { color: var(--accent); border-color: var(--accent); }
.ppp { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.why-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; align-items: stretch; }
.why-item {
  background: transparent; border: 0; border-top: 2px solid var(--ink); border-radius: 0;
  padding: 20px 0 0; display: flex; flex-direction: column;
}
.why-item h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 8px; font-size: 1.25rem; color: var(--ink); }
.why-item p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }

/* Page-highlight cards (how-it-works.php): screenshot frame + title + blurb.
   The frame is a CSS background-image, not <img>, so a missing screenshot
   degrades to the labeled fallback box below rather than a broken-image icon. */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.shot-card { scroll-margin-top: 90px; }
.shot-frame {
  display: block; aspect-ratio: 16 / 10; border-radius: var(--r-card); border: 1px solid var(--border);
  background-color: var(--surface-2); background-size: cover; background-position: top center;
  margin-bottom: 12px; position: relative; overflow: hidden;
}
.shot-frame .shot-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; color: var(--ink-soft); font-size: 0.82rem; font-weight: 600;
  background: repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(107,111,114,0.05) 10px, rgba(107,111,114,0.05) 20px);
}
.shot-card h4 { font-family: var(--font-display); font-weight: 800; margin: 0 0 6px; font-size: 0.98rem; }
.shot-card h4 a { color: var(--ink); text-decoration: none; }
.shot-card h4 a:hover { color: var(--accent); }
.shot-card p { margin: 0; color: var(--ink-soft); font-size: 0.86rem; }

/* Sits inline at the end of the page's <h1> (same pattern as .favorite-star.large)
   so "what is this page" reads as part of the title, not an orphaned line of text
   floating below the intro paragraph. */
.page-explainer-link {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  margin-left: 12px; padding: 4px 12px; border-radius: var(--r-control);
  border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-body); text-transform: none; letter-spacing: 0;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.01em; color: var(--ink-soft); text-decoration: none;
  white-space: nowrap; transition: border-color .15s, color .15s, background .15s;
}
.page-explainer-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Shared 2-series chart legend (dot + label per series, color set inline or
   via a modifier class -- see market/ewes.php and market/trends.php). */
.legend-key { display: flex; gap: 18px; margin-bottom: 14px; font-size: 0.82rem; color: var(--ink-soft); }
.legend-key .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.legend-key .dot.chart1 { background: var(--chart-1); }
.legend-key .dot.chart2 { background: var(--chart-2); }

footer {
  color: var(--footer-ink); background: var(--footer-bg);
  font-size: 14px; padding: 72px 24px 40px; margin-top: 112px;
  /* Full-bleed without touching every page's markup: escape the parent
     .wrap's max-width via negative margins (no explicit width -- that would
     need `100vw`, which overflows past a scrollbar's width on some browsers). */
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
footer .footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }
footer a { color: var(--footer-ink); text-decoration: none; }
footer a:hover { color: var(--footer-accent); }
footer .footer-note { text-align: center; color: var(--footer-ink-soft); }
footer .footer-note a { border-bottom: 1px solid rgba(255,255,255,0.22); }
footer .letter { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 28px; align-items: end; }
footer .letter .copy { grid-column: span 6; display: flex; flex-direction: column; gap: 16px; }
footer .letter .eyebrow { color: var(--footer-accent); }
footer .letter .eyebrow::after { display: none; }
footer .letter h2 { margin: 0; font-size: 40px; line-height: 46px; font-weight: 800; text-transform: uppercase; color: #fff; }
footer .letter p { margin: 0; font-size: 16px; line-height: 26px; color: var(--footer-ink-soft); }
footer form.letter-form { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 12px; }
footer form.letter-form label { font-size: 14px; font-weight: 600; color: #fff; }
footer form.letter-form .row { display: flex; gap: 12px; }
footer form.letter-form input[type=email] {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid var(--dark-input-border);
  border-radius: var(--r-control); background: var(--dark-input); color: #fff; font-family: var(--font-body); font-size: 16px;
}
footer form.letter-form input[type=email]::placeholder { color: #8a8f93; }
footer form.letter-form button { height: 52px; padding: 0 24px; }
footer form.letter-form .fine { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--footer-ink-soft); }
footer form.letter-form .notice { margin: 0; text-align: left; }
footer .rule { height: 1px; background: var(--dark-line); }
footer .cols { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
footer .cols .brand { display: flex; flex-direction: column; gap: 16px; }
footer .cols .brand img { display: block; height: 36px; width: auto; }
footer .cols .brand span { font-size: 14px; line-height: 22px; color: var(--footer-ink-soft); }
footer nav.footer-nav { display: flex; gap: 64px; font-size: 14px; line-height: 22px; }
footer nav.footer-nav div { display: flex; flex-direction: column; gap: 10px; }
footer nav.footer-nav .eyebrow { color: var(--footer-accent); }
footer nav.footer-nav .eyebrow::after { display: none; }
footer .legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--footer-ink-soft); }
footer .legal a { color: var(--footer-ink-soft); }
@media (max-width: 860px) {
  footer { padding: 56px 24px 32px; }
  /* One column: eleven 32px gutters alone are wider than a small phone. */
  footer .letter { grid-template-columns: minmax(0, 1fr); }
  footer .letter .copy, footer form.letter-form { grid-column: 1 / -1; }
  footer .letter h2 { font-size: 30px; line-height: 34px; }
  footer form.letter-form .row { flex-direction: column; }
  footer nav.footer-nav { gap: 40px; }
}

/* Shown while a filter form navigates to reload the page with new query
   params (see nav.php's delegated submit handler) -- no explicit hide, the
   overlay is part of the page being replaced by that navigation. */
.page-loading-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  opacity: 0; pointer-events: none; transition: opacity 0.12s ease;
}
.page-loading-overlay.visible { opacity: 1; pointer-events: auto; }
.page-loading-overlay .spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: page-loading-spin 0.7s linear infinite;
}
@keyframes page-loading-spin { to { transform: rotate(360deg); } }

.notice {
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(85, 107, 47, 0.25);
  border-radius: var(--r-control); padding: 10px 16px; font-size: 0.85rem; text-align: center; margin-bottom: 24px;
}
.notice.ok { background: rgba(47, 122, 77, 0.12); color: var(--good); border-color: rgba(47,122,77,0.3); }
.notice.err { background: rgba(178, 58, 46, 0.1); color: var(--bad); border-color: rgba(178,58,46,0.3); }
.notice ul { margin: 6px 0 0; padding-left: 18px; text-align: left; }

/* Filter / search forms */
form.filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 22px;
}
form.filters .field { display: flex; flex-direction: column; gap: 5px; justify-content: flex-end; }
form.filters label {
  font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em;
  display: block; height: 14px; line-height: 14px; white-space: nowrap;
}
form.filters input[type=text], form.filters select { height: 38px; box-sizing: border-box; }
form.filters button { height: 38px; }
.field-spacer { height: 14px; line-height: 14px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft);
  color: var(--accent); border: 1px solid rgba(85, 107, 47, 0.25); border-radius: var(--r-control);
  padding: 5px 10px 5px 12px; font-size: 0.8rem; font-weight: 600; text-decoration: none;
}
.chip:hover { background: rgba(85, 107, 47, 0.2); }
.chip .x { font-size: 0.95rem; line-height: 1; opacity: 0.8; }

form.search-box { display: flex; gap: 10px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], select {
  padding: 9px 11px; border-radius: var(--r-control); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-size: 0.92rem; font-family: var(--font-body);
}
/* Chrome/Safari force a stale autofill background otherwise. */
input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0px 1000px var(--surface) inset;
  transition: background-color 9999s ease-in-out 0s;
}
.pw-meter { display: flex; gap: 4px; margin-top: 6px; }
.pw-meter .seg { height: 4px; flex: 1; border-radius: 2px; background: var(--border); }
.pw-meter .seg.weak { background: var(--bad); }
.pw-meter .seg.fair { background: var(--warn); }
.pw-meter .seg.strong { background: var(--good); }
.pw-hint { font-size: 0.78rem; margin-top: 4px; }
.pw-hint.weak { color: var(--bad); }
.pw-hint.fair { color: var(--warn); }
.pw-hint.strong { color: var(--good); }
.field-error { font-size: 0.78rem; color: var(--bad); margin-top: 4px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button, .btn {
  background: var(--accent); color: #ffffff; border: none; border-radius: var(--r-control);
  padding: 0 20px; height: 44px; font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; line-height: 1;
  white-space: nowrap;
}
button:hover, .btn:hover { background: var(--accent-hover); color: #ffffff; }
.btn.secondary, button.secondary {
  background: transparent; color: var(--ink); border: 1px solid var(--ink-soft);
}
.btn.secondary:hover, button.secondary:hover { background: var(--accent-soft); color: var(--ink); }
.btn.large, button.large { height: 52px; padding: 0 24px; }
button.save { padding: 0 10px; height: 28px; font-size: 11px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status { display: inline-block; padding: 2px 8px; border-radius: var(--r-control); font-size: 0.75rem; font-weight: 700; }
.status.Pending, .status.pending { background: rgba(185,134,44,0.14); color: var(--warn); }
.status.Approved, .status.good { background: rgba(47,122,77,0.14); color: var(--good); }
.status.Rejected, .status.bad { background: rgba(178,58,46,0.14); color: var(--bad); }

.pill { display: inline-block; padding: 2px 9px; border-radius: var(--r-control); font-size: 0.72rem; font-weight: 700;
  background: rgba(107,111,114,0.12); color: var(--ink-soft); }
.empty { color: var(--ink-soft); padding: 30px; text-align: center; }
/* Small muted aside next to a name -- a flock ID, a city/state, anything that
   disambiguates without competing with the name itself. */
.meta-note { color: var(--ink-soft); font-size: 0.8rem; margin-left: 8px; }

/* Favorite star toggle -- outline when inactive, filled gold when active.
   Used both inline in table cells (small) and beside a page h1 (larger, via
   .favorite-star.large). */
.favorite-star {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--ink-soft); font-size: 1.1rem; line-height: 1;
  transition: color 0.15s ease, transform 0.1s ease;
}
.favorite-star:hover { color: var(--favorite); transform: scale(1.12); }
.favorite-star.active { color: var(--favorite); }
.favorite-star.large { font-size: 1.6rem; vertical-align: middle; margin-left: 10px; }

/* Bloodline watch toggle -- same shape/interaction as .favorite-star (muted
   bell = off, filled bell = on), just its own color so the two read as
   distinct actions when they sit side by side in an h1. */
.watch-star {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--ink-soft); font-size: 1.1rem; line-height: 1;
  transition: color 0.15s ease, transform 0.1s ease;
}
.watch-star:hover { color: var(--accent); transform: scale(1.12); }
.watch-star.active { color: var(--accent); }
.watch-star.large { font-size: 1.5rem; vertical-align: middle; margin-left: 10px; }

.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 20px; font-size: 0.85rem; }
.pagination a, .pagination span { color: var(--ink-soft); text-decoration: none; padding: 4px 10px; border-radius: var(--r-control); }
.pagination a:hover { color: var(--accent); }
.pagination .current { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.signup-box {
  max-width: 560px; margin: 0 auto 36px; background: var(--surface-2); color: var(--ink);
  border-radius: var(--r-card); padding: 30px 36px; text-align: center;
  border: 1px solid var(--border);
}
.signup-box h2 { margin: 0 0 8px; font-size: 1.25rem; color: var(--ink); }
.signup-box p { margin: 0 0 20px; color: var(--ink-soft); font-size: 0.9rem; }
.signup-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.signup-actions .btn-primary {
  background: var(--accent); color: #ffffff; font-weight: 700; padding: 0 20px; height: 44px;
  display: inline-flex; align-items: center; border-radius: var(--r-control); text-decoration: none;
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
}
.signup-actions .btn-primary:hover { background: var(--accent-hover); }
.signup-actions .or { color: var(--ink-soft); font-size: 0.82rem; }
.signup-actions .btn-secondary {
  color: var(--ink); font-weight: 700; padding: 0 18px; height: 44px; display: inline-flex; align-items: center;
  border-radius: var(--r-control); text-decoration: none; font-family: var(--font-display); font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--ink-soft);
}
.signup-actions .btn-secondary:hover { background: var(--accent-soft); }

.sparkline { width: 100%; height: auto; margin: 4px 0 18px; }
.sparkline circle { transition: r 0.15s ease; }
.sparkline circle:hover { r: 5; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0; }
.mini-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px; }
.mini-stat .label { font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.mini-stat .value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Form pages (join-new, login, renew) */
.wrap.narrow { max-width: 720px; padding-top: 56px; padding-bottom: 80px; }
.wrap.narrow h1 { font-family: var(--font-display); font-weight: 800; font-size: 2rem; margin: 18px 0 6px; }
.wrap.narrow p.lede { color: var(--ink-soft); margin: 0 0 32px; }
.wrap.narrow form {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px;
}
.wrap.narrow fieldset { border: none; padding: 0; margin: 0 0 26px; }
.wrap.narrow legend { font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; padding: 0; color: var(--ink); }
.radio-row { display: flex; gap: 24px; margin-bottom: 18px; font-size: 0.92rem; }
.radio-row label { display: flex; align-items: center; gap: 6px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 5px; }
.field .hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wrap.narrow form input[type=text], .wrap.narrow form input[type=email],
.wrap.narrow form input[type=tel], .wrap.narrow form input[type=url],
.wrap.narrow form input[type=password] { width: 100%; }

/* Print: keep what's worth putting on paper (who this is, contact info if a
   superuser can see it, and whatever table/list is currently on screen),
   drop everything that's only useful interactively. .print-hide is for a
   page's own on-screen-only elements (e.g. breeder.php's stat tiles) that
   don't fit either global rule below. */
@media print {
  nav.top, footer, .page-loading-overlay, .page-explainer-link,
  form.filters, form.search-box, .pagination, .favorite-star, .watch-star, .breadcrumbs,
  .print-hide, .screen-only {
    display: none !important;
  }
  .print-only { display: inline; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: none; }
  .stat-row.address-row strong { text-align: left; line-height: 1.35; }
}

/* ------------------------------------------------------------------------
   Mobile header: below 900px the link row collapses behind the hamburger
   into a full-width panel under the bar (the draft's 390px "Home (mobile)"
   page). Dropdown menus become plain stacked lists inside that panel.
   ------------------------------------------------------------------------ */
@media (max-width: 900px) {
  nav.top { padding: 0 24px; }
  nav.top .nav-inner { height: 64px; gap: 16px; }
  nav.top a.brand img { height: 28px; }
  nav.top .menu-btn { display: inline-flex; }
  nav.top .links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 24px;
    box-shadow: 0 24px 40px -24px rgba(17,20,24,0.3);
  }
  nav.top.menu-open .links { display: flex; }
  nav.top .links > a, nav.top .links .nav-toggle {
    display: flex; align-items: center; justify-content: flex-start; width: 100%; padding: 14px 0; font-size: 16px;
    border-bottom: 1px solid var(--border-soft); border-radius: 0;
  }
  nav.top .links .spacer { display: none; }
  nav.top .links .btn { margin-top: 16px; height: 52px; justify-content: center; }
  nav.top .nav-menu { position: static; }
  nav.top .nav-toggle.account-toggle { border: 0; height: auto; padding: 14px 0; }
  nav.top .nav-toggle.active { box-shadow: none; }
  nav.top .nav-dropdown {
    position: static; min-width: 0; border: 0; box-shadow: none; padding: 0 0 8px 16px;
    background: transparent;
  }
  nav.top .account-dropdown { right: auto; }
}

/* ------------------------------------------------------------------------
   Logged-out homepage (index.php). Full-bleed bands; each band's inner
   column shares the 1200px header width.
   ------------------------------------------------------------------------ */
.landing { margin: -32px calc(50% - 50vw) 0; }
.landing .band { display: flex; justify-content: center; padding: 96px 24px; }
.landing .band-inner { width: 100%; max-width: 1200px; }
.landing .hero-band { background: var(--bg); padding: 112px 24px 128px; }
.landing .hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 40px; align-items: center; }
.landing .hero-copy { grid-column: span 7; display: flex; flex-direction: column; gap: 28px; }
.landing .hero-copy h1 { margin: 0; font-size: 72px; line-height: 72px; font-weight: 800; letter-spacing: 0.01em; text-transform: uppercase; }
.landing .hero-copy .lede { margin: 0; max-width: 560px; font-size: 20px; line-height: 30px; color: var(--ink); }
.landing .hero-actions { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 8px; }
.landing .hero-copy .fine { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-soft); }
.landing .bench { grid-column: span 5; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.landing .bench-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.landing .bench-head .eyebrow::after { display: none; }
.landing .tag { font-size: 12px; font-weight: 600; padding: 4px 8px; border: 1px solid var(--ink-soft); border-radius: var(--r-control); color: var(--ink); white-space: nowrap; }
.landing .bench-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.landing .bench-stat { display: flex; flex-direction: column; gap: 4px; }
.landing .bench-stat .value { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 40px; line-height: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.landing .bench-stat .value .slash { width: 5px; height: 28px; }
.landing .bench-stat .label { font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.landing .bench svg { width: 100%; height: auto; display: block; }
.landing .bench-legend { display: flex; gap: 20px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.landing .bench-legend span { display: flex; align-items: center; gap: 6px; }
.landing .bench-legend .solid { width: 16px; height: 3px; background: var(--accent); }
.landing .bench-legend .dashed { width: 16px; height: 0; border-top: 2px dashed var(--ink-soft); }
.landing .bench .rule { height: 1px; background: var(--border); }
.landing .bench .source { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-soft); }
.landing .bench .source a { color: var(--ink-soft); }
.landing .photo { display: block; width: 100%; height: 560px; object-fit: cover; object-position: 50% 72%; }
.landing .statement { position: relative; background: var(--dark); color: #fff; overflow: hidden; }
.landing .statement .wedge { position: absolute; right: -60px; top: 0; bottom: 0; width: 180px; background: #556B2F; transform: skewX(-41deg); }
.landing .statement .band-inner { position: relative; display: flex; flex-direction: column; gap: 20px; }
.landing .statement .eyebrow { color: var(--accent-light); }
.landing .statement .eyebrow::after { display: none; }
.landing .statement h2 { margin: 0; font-size: 56px; line-height: 60px; font-weight: 800; letter-spacing: 0.01em; color: #fff; text-transform: uppercase; }
.landing .statement .rule { width: 96px; height: 1px; background: var(--dark-line); margin-top: 8px; }
.landing .statement p { margin: 0; max-width: 620px; font-size: 18px; line-height: 28px; color: var(--dark-ink); }
.landing .products { background: var(--sand); }
.landing .products .eyebrow { color: var(--ink); }
.landing .products .eyebrow::after { background: var(--ink-soft); }
.landing .section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.landing .section-head h2 { margin: 0; font-size: 36px; line-height: 42px; font-weight: 700; text-transform: uppercase; }
.landing .two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.landing .three-up { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.landing .product { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.landing .product svg.icon { display: block; color: var(--ink); }
.landing .product .eyebrow::after { display: none; }
.landing .product h3 { margin: 8px 0 0; font-size: 28px; line-height: 34px; font-weight: 700; }
.landing .product p { margin: 0; font-size: 16px; line-height: 26px; }
.landing .product ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 22px; }
.landing .product li { display: flex; gap: 12px; }
.landing .product li .slash { flex-shrink: 0; width: 4px; height: 14px; margin-top: 4px; }
.landing .product .cta { margin-top: auto; font-size: 14px; padding-top: 8px; }
.landing .why-point { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--ink); }
.landing .why-point h3 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.landing .why-point p { margin: 0; font-size: 16px; line-height: 26px; color: var(--ink-soft); }
.landing .plans { background: var(--surface); border-top: 1px solid var(--border); }
.landing .plan { border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px; display: flex; flex-direction: column; gap: 24px; background: var(--bg); }
.landing .plan.featured { border: 2px solid var(--ink); padding: 31px; background: var(--surface); }
.landing .plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.landing .plan-head .name { display: flex; align-items: center; gap: 12px; }
.landing .plan h3 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 700; }
.landing .plan .price { font-family: var(--font-display); font-size: 36px; font-weight: 700; }
.landing .plan .chip { font-size: 12px; font-weight: 600; padding: 4px 8px; background: var(--ink); color: var(--bg); border: 0; border-radius: var(--r-control); }
.landing .plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 24px; }
.landing .plan li { display: flex; gap: 12px; align-items: flex-start; }
.landing .plan li svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.landing .plan .btn { margin-top: auto; align-self: flex-start; height: 48px; padding: 0 24px; }
@media (max-width: 1000px) {
  .landing .hero-copy, .landing .bench { grid-column: 1 / -1; }
  .landing .hero-copy h1 { font-size: 56px; line-height: 58px; }
  .landing .two-up, .landing .three-up { grid-template-columns: 1fr; }
  .landing .statement h2 { font-size: 40px; line-height: 44px; }
}
@media (max-width: 640px) {
  .landing .band, .landing .hero-band { padding: 64px 24px; }
  .landing .hero-copy { gap: 24px; }
  .landing .hero-copy h1 { font-size: 48px; line-height: 50px; }
  .landing .hero-copy .lede { font-size: 18px; line-height: 28px; }
  .landing .hero-actions { flex-direction: column; }
  .landing .hero-actions .btn { width: 100%; }
  .landing .bench { padding: 24px; gap: 16px; }
  .landing .bench-stat .value { font-size: 28px; line-height: 32px; }
  .landing .bench-stat .value .slash { display: none; }
  .landing .photo { height: 280px; object-position: 45% 70%; }
  .landing .statement .wedge { right: -70px; width: 90px; }
  .landing .statement .band-inner { padding-right: 40px; }
  .landing .statement h2 { font-size: 32px; line-height: 36px; }
  .landing .section-head h2 { font-size: 28px; line-height: 34px; }
  .landing .product, .landing .plan { padding: 24px; }
  .landing .plan.featured { padding: 23px; }
  .landing .plan .btn { align-self: stretch; }
}
