/* ============================================================================
   The Virtual Steward — design system
   Palette: union navy + gold on warm paper. Type: Inter. Mobile-first.
   ========================================================================= */

:root {
  --navy-900: #101c36;
  --navy-800: #16264a;
  --navy-700: #1e3260;
  --gold-500: #f6b51e;
  --gold-400: #ffc83d;
  --gold-600: #d99a06;
  --paper: #faf7f1;
  --card: #ffffff;
  --ink: #1c2538;
  --ink-soft: #4a566e;
  --ink-faint: #76819a;
  --line: #e6e1d6;
  --green-600: #1c7c43;
  --red-600: #b3372e;
  --red-50: #fdf1ef;
  --shadow-sm: 0 1px 2px rgba(16, 28, 54, .06), 0 2px 8px rgba(16, 28, 54, .05);
  --shadow-md: 0 2px 6px rgba(16, 28, 54, .07), 0 12px 32px rgba(16, 28, 54, .10);
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--navy-700); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--navy-900); }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy-900); color: #fff; padding: .7rem 1.2rem; z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ----------------------------------------------------------- header / nav */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 28, 54, .96);
  backdrop-filter: saturate(140%) blur(10px);
  color: #fff;
  border-bottom: 3px solid var(--gold-500);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  color: #fff; text-decoration: none; font-weight: 800;
  font-size: 1.05rem; letter-spacing: -.01em;
  margin-right: auto;
}
.brand .mark {
  width: 34px; height: 34px; flex: none;
}
.brand small {
  display: block; font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  color: var(--gold-400); text-transform: uppercase;
}
.site-nav { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.site-nav a {
  color: #d9dfec; text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: .45rem .75rem; border-radius: 8px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .09); }
.site-nav a.support {
  color: var(--navy-900); background: var(--gold-500); margin-left: .35rem;
}
.site-nav a.support:hover { background: var(--gold-400); }

@media (max-width: 740px) {
  .site-header .wrap { flex-wrap: wrap; padding-block: .55rem; gap: .15rem; }
  .brand { font-size: .95rem; }
  .brand > span { white-space: nowrap; }
  .brand small { font-size: .6rem; }
  .brand .mark { width: 28px; height: 28px; }
  .site-nav {
    width: 100%; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: .45rem; margin-bottom: -.1rem;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; font-size: .84rem; padding: .35rem .6rem; }
}

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(2.6rem, 7vw, 5rem) 0 clamp(1.6rem, 4vw, 2.6rem); }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy-700);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .9rem; box-shadow: var(--shadow-sm);
}
.hero .kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); }
.wrap.prose { margin-inline: auto; max-width: var(--wrap); }
.wrap.prose > * { max-width: 70ch; }
.hero h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.4rem);
  line-height: 1.08; letter-spacing: -.025em; font-weight: 800;
  margin: 1rem 0 .9rem; color: var(--navy-900);
}
.hero h1 .underline {
  position: relative; white-space: nowrap;
}
.hero h1 .underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em;
  height: .28em; background: var(--gold-500); opacity: .45; z-index: -1; border-radius: 3px;
}
.hero .lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--ink-soft);
  max-width: 46ch; margin: 0;
}

/* ---------------------------------------------------------------- picker */

.picker {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.2rem, 3.5vw, 2rem);
  margin: 1.8rem 0 0;
}
.picker h2 { margin: 0 0 .25rem; font-size: 1.3rem; letter-spacing: -.01em; color: var(--navy-900); }
.picker > p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .98rem; }

.search-row { position: relative; }
.search-row svg {
  position: absolute; left: 1rem; top: 50%; translate: 0 -50%;
  width: 20px; height: 20px; color: var(--ink-faint); pointer-events: none;
}
#local-search {
  width: 100%;
  font: inherit; font-size: 1.1rem;
  padding: .95rem 1.1rem .95rem 3rem;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}
#local-search::placeholder { color: var(--ink-faint); }
#local-search:focus { border-color: var(--navy-700); outline: none; background: #fff; }
#local-search:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 1px; }

.results {
  list-style: none; margin: .8rem 0 0; padding: 0;
  display: grid; gap: .5rem;
}
.results li button {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.results li button:hover { border-color: var(--navy-700); box-shadow: var(--shadow-sm); }
.results .num {
  flex: none; min-width: 3.4rem; text-align: center;
  font-weight: 800; font-size: .95rem; color: var(--navy-900);
  background: var(--gold-500); border-radius: 7px; padding: .3rem .5rem;
}
.results .num.region { background: #e8ecf5; color: var(--navy-700); font-size: .78rem; }
.results .where { color: var(--ink-soft); font-size: .92rem; }
.results .label { font-weight: 650; }
.results .empty { color: var(--ink-soft); padding: .6rem .2rem; }

.region-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.region-chips button {
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  color: var(--navy-700); background: #fff;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .42rem .95rem;
}
.region-chips button:hover { border-color: var(--navy-700); background: #f3f5fa; }

.hint { font-size: .88rem; color: var(--ink-faint); margin-top: 1rem; }

/* ------------------------------------------------------------ result card */

.steward-card {
  margin-top: 1.2rem;
  border: 2px solid var(--navy-800); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800) 70%);
  color: #fff;
  padding: clamp(1.2rem, 3.5vw, 1.8rem);
  box-shadow: var(--shadow-md);
}
.steward-card h3 { margin: 0 0 .3rem; font-size: 1.35rem; letter-spacing: -.01em; }
.steward-card .docs { color: #c4cce0; font-size: .95rem; margin: 0 0 1.1rem; }
.steward-card .docs strong { color: var(--gold-400); font-weight: 650; }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; border-radius: 6px; padding: .22rem .6rem; margin-bottom: .8rem;
}
.badge.unverified { background: rgba(246, 181, 30, .18); color: var(--gold-400); border: 1px solid rgba(246, 181, 30, .45); }
.badge.unsupported { background: rgba(255, 255, 255, .1); color: #ffb4ad; border: 1px solid rgba(255, 180, 173, .4); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 750; font-size: 1.02rem; cursor: pointer;
  border: none; border-radius: var(--radius-sm);
  padding: .85rem 1.5rem;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-gold { background: var(--gold-500); color: var(--navy-900); box-shadow: 0 3px 0 var(--gold-600); }
.btn-gold:hover { background: var(--gold-400); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--gold-600); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.07); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.coming-soon { color: #c4cce0; font-size: .95rem; margin-top: .8rem; }

/* -------------------------------------------------------------- sections */

.section { padding: clamp(2.2rem, 6vw, 3.6rem) 0; }
.section h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem); letter-spacing: -.02em;
  color: var(--navy-900); margin: 0 0 .4rem;
}
.section .sub { color: var(--ink-soft); margin: 0 0 1.6rem; max-width: 60ch; }

.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.4rem; box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--navy-900); color: var(--gold-400);
  font-weight: 800; margin-bottom: .8rem;
}
.step h3 { margin: 0 0 .35rem; font-size: 1.08rem; color: var(--navy-900); }
.step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* --------------------------------------------------------- region directory */

.region-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .region-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .region-grid { grid-template-columns: repeat(3, 1fr); } }
.region-card {
  font: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: .3rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.05rem 1.15rem; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.region-card:hover { border-color: var(--navy-700); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rc-status {
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 5px; padding: .18rem .5rem;
}
.rc-status.live { background: #e5f4ea; color: var(--green-600); }
.rc-status.live::before { content: "● "; }
.rc-status.soon { background: #f0f1f5; color: var(--ink-faint); }
.rc-name { font-weight: 750; color: var(--navy-900); font-size: 1.02rem; }
.rc-states { font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }

/* --------------------------------------------------------- support banner */

.support-band {
  background: var(--navy-900); color: #fff;
  border-block: 3px solid var(--gold-500);
}
.support-band .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem;
  padding-block: clamp(1.8rem, 4.5vw, 2.6rem);
}
.support-band .text { flex: 1 1 34ch; }
.support-band h2 { margin: 0 0 .35rem; font-size: 1.35rem; color: #fff; }
.support-band p { margin: 0; color: #c4cce0; font-size: .98rem; max-width: 58ch; }
.support-band .kofi-note { font-size: .88rem; color: var(--ink-faint); }

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--navy-800); color: #aab4cc;
  font-size: .88rem; line-height: 1.6;
  padding: 2.2rem 0 2.6rem; margin-top: 0;
}
.site-footer a { color: #d9dfec; }
.site-footer .cols { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: .95rem; margin: 0 0 .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 1.6rem; padding-top: 1.2rem; }

/* ----------------------------------------------------------------- modal */

.gate[hidden] { display: none; }
.gate {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(12, 19, 38, .62);
  padding: 1rem;
}
.gate-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
  max-width: 540px; width: 100%;
  padding: clamp(1.4rem, 4vw, 2rem);
  border-top: 5px solid var(--gold-500);
  max-height: 90vh; overflow: auto;
}
.gate-card h2 { margin: 0 0 .8rem; font-size: 1.3rem; color: var(--navy-900); }
.gate-card .rules {
  margin: 0 0 1.1rem; padding: 1rem 1.1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .96rem; color: var(--ink-soft);
}
.gate-card .rules strong { color: var(--ink); }
.gate-card label.ack {
  display: flex; gap: .7rem; align-items: flex-start;
  font-weight: 600; font-size: .98rem; cursor: pointer; margin-bottom: 1.1rem;
}
.gate-card label.ack input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--navy-800); flex: none; }
.gate-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.gate-actions .btn-cancel { background: #eef0f5; color: var(--ink); }
.gate-actions .btn-cancel:hover { background: #e3e6ee; }

/* ----------------------------------------------------------- inner pages */

.page-hero { padding: clamp(2.2rem, 6vw, 3.4rem) 0 0; }
.page-hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.7rem); letter-spacing: -.02em; line-height: 1.12;
  color: var(--navy-900); margin: .2rem 0 .6rem;
}
.page-hero .lede { color: var(--ink-soft); font-size: 1.12rem; max-width: 58ch; margin: 0; }

.prose { max-width: 70ch; }
.prose h2 { color: var(--navy-900); letter-spacing: -.015em; margin-top: 2.2rem; }
.prose h3 { color: var(--navy-900); margin-top: 1.6rem; }
.prose li { margin-bottom: .35rem; }

.callout {
  border-left: 4px solid var(--gold-500);
  background: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.2rem; margin: 1.4rem 0;
}
.callout.warn { border-left-color: var(--red-600); background: var(--red-50); }
.callout p { margin: .2rem 0; }

.link-cards { display: grid; gap: .8rem; grid-template-columns: 1fr; padding: 0; list-style: none; margin: 1.2rem 0; }
@media (min-width: 680px) { .link-cards { grid-template-columns: 1fr 1fr; } }
.link-cards a {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .95rem 1.1rem; text-decoration: none; box-shadow: var(--shadow-sm);
}
.link-cards a:hover { border-color: var(--navy-700); }
.link-cards .t { display: block; font-weight: 700; color: var(--navy-900); margin-bottom: .15rem; }
.link-cards .d { display: block; font-size: .88rem; color: var(--ink-soft); }
