/* =========================================================================
   Royal Park — design system
   Palette: deep park green, brass, warm sand. One accent, used sparingly.
   Type:    Fraunces (display serif) + Inter (text), with system fallbacks.
   ====================================================================== */

:root {
  /* Brand */
  --green-900: #0c231c;
  --green-800: #10382c;
  --green-700: #17493a;
  --green-600: #1f6a52;
  --green-300: #7fbfa6;
  --green-100: #dcece4;

  --brass-700: #7d5c1a; /* text-safe on sand: 5.8:1 */
  --brass-600: #84621d;
  --brass-500: #c9a24a;
  --brass-300: #e5cd90;

  --sand-50: #fbf9f5;
  --sand-100: #f4efe6;
  --sand-200: #e8e0d2;
  --sand-300: #d6cab5;

  --ink-900: #161a18;
  --ink-700: #33403a;
  --ink-500: #5d6b64;
  --ink-300: #8b9791;

  /* Semantic (light) */
  --bg: var(--sand-50);
  --bg-raised: #ffffff;
  --bg-sunken: var(--sand-100);
  --bg-inverse: var(--green-900);
  --text: var(--ink-900);
  --text-soft: var(--ink-500);
  --text-inverse: #f3f7f4;
  --text-inverse-soft: #a9c4b8;
  --line: var(--sand-200);
  --line-strong: var(--sand-300);
  --accent: var(--brass-600);
  --accent-soft: var(--brass-300);
  --brand: var(--green-700);
  --brand-soft: var(--green-100);
  --on-brand: #ffffff; /* text that sits on --brand */

  --ok-bg: #e6f4ec;
  --ok-fg: #1c6b42;
  --warn-bg: #fdf1dc;
  --warn-fg: #8a5b12;
  --err-bg: #fbe9e7;
  --err-fg: #9c2f22;
  --info-bg: #e7eef6;
  --info-fg: #2b5279;

  /* Type scale — fluid, no media queries needed */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino,
    'Times New Roman', serif;
  --font-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.36vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.95rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.3vw, 2.7rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.3vw, 3.9rem);
  --step-5: clamp(2.6rem, 1.8rem + 3.6vw, 5.2rem);

  /* Space & shape */
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --measure: 68ch;
  --wrap: 1220px;
  --wrap-narrow: 780px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(12, 35, 28, 0.06), 0 2px 8px rgba(12, 35, 28, 0.05);
  --shadow-md: 0 2px 6px rgba(12, 35, 28, 0.07), 0 14px 34px rgba(12, 35, 28, 0.09);
  --shadow-lg: 0 4px 12px rgba(12, 35, 28, 0.08), 0 28px 60px rgba(12, 35, 28, 0.14);

  --ease: cubic-bezier(0.22, 0.68, 0, 1);
}

/* Dark: system preference, overridable by the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0a1712;
    --bg-raised: #10241d;
    --bg-sunken: #081310;
    --bg-inverse: #061009;
    --text: #eaf2ed;
    --text-soft: #9db3a8;
    --text-inverse: #eaf2ed;
    --text-inverse-soft: #8fae9f;
    --line: #1d3a2f;
    --line-strong: #2a4f40;
    --accent: var(--brass-500);
    --accent-soft: var(--brass-600);
    --brand: var(--green-300);
    --brand-soft: #143528;
    --on-brand: #06120c;

    --ok-bg: #12301f;
    --ok-fg: #7fd6a3;
    --warn-bg: #33260e;
    --warn-fg: #e8c274;
    --err-bg: #37160f;
    --err-fg: #f0a394;
    --info-bg: #10263a;
    --info-fg: #9cc6ef;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.45), 0 30px 70px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme='dark'] {
  --bg: #0a1712;
  --bg-raised: #10241d;
  --bg-sunken: #081310;
  --bg-inverse: #061009;
  --text: #eaf2ed;
  --text-soft: #9db3a8;
  --text-inverse: #eaf2ed;
  --text-inverse-soft: #8fae9f;
  --line: #1d3a2f;
  --line-strong: #2a4f40;
  --accent: var(--brass-500);
  --accent-soft: var(--brass-600);
  --brand: var(--green-300);
  --brand-soft: #143528;
  --on-brand: #06120c;
  --ok-bg: #12301f;
  --ok-fg: #7fd6a3;
  --warn-bg: #33260e;
  --warn-fg: #e8c274;
  --err-bg: #37160f;
  --err-fg: #f0a394;
  --info-bg: #10263a;
  --info-fg: #9cc6ef;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.45), 0 30px 70px rgba(0, 0, 0, 0.55);
}

/* ------------------------------------------------------------------ reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  color-scheme: light dark;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}
p,
li {
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration-color: color-mix(in oklab, var(--accent) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.18s var(--ease);
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--accent-soft);
  color: var(--ink-900);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -150%;
  z-index: 200;
  background: var(--bg-raised);
  color: var(--text);
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  transition: translate 0.2s var(--ease);
}
.skip-link:focus {
  translate: -50% 0;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ----------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow {
  max-width: var(--wrap-narrow);
}
.section {
  padding-block: clamp(3rem, 8vw, 7rem);
}
.section-tight {
  padding-block: clamp(2rem, 5vw, 4rem);
}
.section-sunken {
  background: var(--bg-sunken);
  border-block: 1px solid var(--line);
}
.section-inverse {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.section-inverse h2,
.section-inverse h3 {
  color: var(--text-inverse);
}
.stack > * + * {
  margin-top: var(--stack-gap, 1rem);
}
.grid {
  display: grid;
  gap: clamp(1.1rem, 2.6vw, 2rem);
}
.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.split {
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.prose {
  max-width: var(--measure);
}
.prose > * + * {
  margin-top: 1.1em;
}
.prose h3,
.prose h4 {
  margin-top: 2em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.2rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--text-soft);
}
.prose code {
  background: var(--bg-sunken);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-size: 0.9em;
}
.prose img {
  border-radius: var(--radius);
  margin-block: 1.6em;
}

/* --------------------------------------------------------------- eyebrows */

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: clamp(1.2rem, 3vw, 2.4rem);
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  flex: none;
}
.section-inverse .eyebrow {
  color: var(--brass-300);
}
.lede {
  font-size: var(--step-1);
  color: var(--text-soft);
  max-width: 46ch;
  line-height: 1.5;
}
.section-inverse .lede {
  color: var(--text-inverse-soft);
}

/* --------------------------------------------------------------- controls */

.btn {
  --btn-bg: var(--brand);
  --btn-fg: var(--on-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8em 1.5em;
  min-height: 44px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), color 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
}
.btn-accent {
  --btn-bg: var(--brass-500);
  --btn-fg: #1a1405;
}
.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: var(--accent);
  --btn-fg: var(--accent);
}
.section-inverse .btn-ghost {
  --btn-fg: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-sm {
  padding: 0.5em 1em;
  min-height: 36px;
  font-size: 0.8rem;
}
.btn-danger {
  --btn-bg: transparent;
  --btn-fg: var(--err-fg);
  border-color: color-mix(in oklab, var(--err-fg) 40%, transparent);
  box-shadow: none;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--brand);
}
.link-arrow::after {
  content: '→';
  transition: translate 0.2s var(--ease);
}
.link-arrow:hover::after {
  translate: 4px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3em 0.75em;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.chip-brand {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand);
}
.chip-accent {
  background: color-mix(in oklab, var(--accent) 16%, transparent);
  border-color: transparent;
  color: var(--accent);
}
.chip[aria-current='true'],
.chip.is-active {
  background: var(--brand);
  border-color: transparent;
  color: var(--on-brand);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-block: 0.3rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.chip-scroll::-webkit-scrollbar {
  height: 4px;
}
.chip-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25em 0.7em;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-open {
  background: var(--info-bg);
  color: var(--info-fg);
}
.status-in_progress {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.status-answered {
  background: var(--ok-bg);
  color: var(--ok-fg);
}
.status-closed {
  background: var(--bg-sunken);
  color: var(--text-soft);
}
.status-pending {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.status-active {
  background: var(--ok-bg);
  color: var(--ok-fg);
}
.status-suspended {
  background: var(--err-bg);
  color: var(--err-fg);
}
.status-draft {
  background: var(--bg-sunken);
  color: var(--text-soft);
}
.status-published {
  background: var(--ok-bg);
  color: var(--ok-fg);
}

/* ------------------------------------------------------------ site header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  transition: min-height 0.3s var(--ease);
}
.site-header.is-stuck .header-inner {
  min-height: 3.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
  flex: none;
}
.brand-mark {
  width: 2.3rem;
  height: 2.3rem;
  flex: none;
  transition: rotate 0.5s var(--ease);
}
.brand:hover .brand-mark {
  rotate: -8deg;
}
.brand-text {
  display: grid;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav a {
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.28rem;
  height: 1.5px;
  background: var(--accent);
  scale: 0 1;
  transform-origin: left;
  transition: scale 0.25s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current='page']::after {
  scale: 1 1;
}
.nav a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease),
    rotate 0.4s var(--ease);
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  rotate: 12deg;
}
.nav-toggle {
  display: none;
}

/* Mobile drawer */
@media (max-width: 62rem) {
  .nav-toggle {
    display: grid;
  }
  .nav {
    position: fixed;
    inset: 4.5rem 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem var(--gutter) 1.4rem;
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.35s var(--ease);
  }
  .nav[data-open='true'] {
    clip-path: inset(0 0 0 0);
  }
  .nav a:not(.btn) {
    padding: 0.95rem 0.4rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.02rem;
    border-radius: 0;
  }
  .nav a::after {
    display: none;
  }
  .nav .btn {
    margin-top: 1rem;
    justify-content: center;
  }
  .header-cta {
    display: none;
  }
  .nav .header-cta {
    display: inline-flex;
  }
}

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

.hero {
  position: relative;
  isolation: isolate;
  color: var(--text-inverse);
  background: var(--green-900);
  overflow: hidden;
  min-height: min(88svh, 46rem);
  display: grid;
  align-items: end;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img,
.hero-media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 26s var(--ease) infinite alternate;
}
@keyframes kenburns {
  from {
    scale: 1;
    translate: 0 0;
  }
  to {
    scale: 1.09;
    translate: -1.5% -1.5%;
  }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      to top,
      rgba(6, 18, 13, 0.92) 0%,
      rgba(6, 18, 13, 0.72) 40%,
      rgba(6, 18, 13, 0.2) 70%,
      rgba(6, 18, 13, 0.45) 100%
    ),
    radial-gradient(120% 90% at 15% 100%, rgba(12, 35, 28, 0.75), transparent 60%);
}
.hero-inner {
  padding-block: clamp(3rem, 12vh, 8rem) clamp(2.5rem, 6vh, 4.5rem);
  display: grid;
  gap: 1.6rem;
  max-width: 54rem;
}
.hero h1 {
  font-size: var(--step-5);
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
  /* Keeps the headline legible over any photograph that goes in behind it. */
  text-shadow: 0 1px 24px rgba(4, 14, 10, 0.55);
}
.hero .lede {
  color: rgba(238, 247, 242, 0.9);
  text-shadow: 0 1px 16px rgba(4, 14, 10, 0.5);
  max-width: 44ch;
  font-size: var(--step-1);
}
.hero .eyebrow {
  color: var(--brass-300);
}
.hero-scroll {
  position: absolute;
  bottom: 1.2rem;
  right: var(--gutter);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238, 247, 242, 0.6);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, currentColor, transparent);
}
@media (max-width: 48rem) {
  .hero-scroll {
    display: none;
  }
}

/* Weather chip in the hero */
.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 1.1rem 0.6rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  width: fit-content;
  text-decoration: none;
  color: inherit;
  font-size: 0.84rem;
}
.weather-chip:hover {
  color: inherit;
  border-color: var(--brass-300);
}
.weather-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-300);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--green-300) 70%, transparent);
  animation: pulse 2.4s ease-out infinite;
  flex: none;
  margin-inline: 0.3rem;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
.weather-chip strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.weather-chip small {
  color: rgba(238, 247, 242, 0.6);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------ stats band */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  border-top: 1px solid var(--line);
}
.stat {
  padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 0.25rem;
  align-content: start;
}
.stat:last-child {
  border-right: none;
}
.stat-value {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  color: var(--brand);
  font-variation-settings: 'SOFT' 10, 'WONK' 1;
}
.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-note {
  font-size: var(--step--1);
  color: var(--text-soft);
}

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 3vw, 2rem);
  display: grid;
  gap: 0.7rem;
  align-content: start;
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in oklab, var(--accent) 45%, var(--line));
}
.card h3 {
  font-size: var(--step-1);
}
.card p {
  color: var(--text-soft);
  font-size: 0.95rem;
}
.card-note {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.card-icon {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--brand);
}
.card-link {
  text-decoration: none;
  color: inherit;
}
.card-link:hover {
  color: inherit;
}

/* Numbered feature list */
.numbered {
  display: grid;
  gap: 1.6rem;
  counter-reset: n;
  list-style: none;
  padding: 0;
}
.numbered li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  align-items: start;
}
.numbered li::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  border-top: 2px solid var(--accent);
  padding-top: 0.35rem;
}
.numbered h4 {
  margin-bottom: 0.2rem;
}
.numbered p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------- estate map */

.map-panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 1.8rem);
  box-shadow: var(--shadow-sm);
}
.estate-map {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-sunken);
}
.estate-map .zone {
  cursor: pointer;
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease);
}
.estate-map .zone:hover,
.estate-map .zone.is-active {
  filter: brightness(1.15) saturate(1.3);
}
.estate-map.has-active .zone:not(.is-active) {
  opacity: 0.35;
}
.estate-map .zone-label {
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: #fff;
  pointer-events: none;
}
.map-legend {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.2rem;
}
.map-legend button {
  display: grid;
  grid-template-columns: 0.85rem 1fr auto;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.map-legend button:hover,
.map-legend button.is-active {
  background: var(--bg-sunken);
  border-color: var(--line);
}
.map-legend .swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 4px;
  flex: none;
}
.map-legend .legend-name {
  font-weight: 600;
  font-size: 0.92rem;
}
.map-legend .legend-kind {
  font-size: 0.76rem;
  color: var(--text-soft);
  display: block;
  font-weight: 400;
}
.map-readout {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: var(--bg-sunken);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  min-height: 5.5rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.map-readout strong {
  color: var(--text);
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.map-readout em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* -------------------------------------------------------------- news list */

.news-grid {
  display: grid;
  gap: clamp(1.1rem, 2.6vw, 1.8rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.news-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.news-card:hover {
  color: inherit;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.news-card-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-sunken);
  overflow: hidden;
}
.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.5s var(--ease);
}
.news-card:hover .news-card-media img {
  scale: 1.05;
}
.news-card-body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}
.news-card h3 {
  font-size: var(--step-1);
}
.news-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.03em;
}
.news-featured {
  display: grid;
  gap: clamp(1.2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.news-featured .news-card-media {
  aspect-ratio: 4 / 3;
  height: 100%;
}
.news-featured-body {
  padding: clamp(1.4rem, 4vw, 3rem);
  display: grid;
  gap: 0.9rem;
  align-content: center;
}
.news-featured h2 {
  font-size: var(--step-2);
}

.article-header {
  display: grid;
  gap: 1rem;
  padding-block: clamp(2rem, 6vw, 4rem) clamp(1.4rem, 3vw, 2.2rem);
}
.article-hero {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-sunken);
  margin-bottom: clamp(1.6rem, 4vw, 3rem);
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ------------------------------------------------------------------ board */

.board-list {
  display: grid;
  gap: 0.8rem;
}
.board-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem 1rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.board-row:hover {
  color: inherit;
  border-color: color-mix(in oklab, var(--accent) 45%, var(--line));
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}
.board-kind {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 1.1rem;
  background: var(--brand-soft);
  color: var(--brand);
}
.board-kind[data-kind='notification'] {
  background: var(--info-bg);
  color: var(--info-fg);
}
.board-kind[data-kind='request'] {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.board-main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.board-main h3 {
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}
.board-sub {
  font-size: 0.8rem;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
}
.board-side {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}
.reply-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 40rem) {
  .board-row {
    grid-template-columns: auto 1fr;
  }
  .board-side {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 0.3rem;
    border-top: 1px solid var(--line);
  }
}

.thread {
  display: grid;
  gap: 1rem;
}
.message {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  display: grid;
  gap: 0.6rem;
}
.message-council {
  border-color: color-mix(in oklab, var(--brand) 40%, var(--line));
  background: var(--brand-soft);
}
.message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  font-size: 0.85rem;
}
.message-author {
  font-weight: 600;
}
.message-time {
  color: var(--text-soft);
  font-size: 0.8rem;
}
.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  font-size: 0.78rem;
  font-weight: 700;
  flex: none;
  letter-spacing: 0.02em;
}
.avatar-council {
  background: var(--brass-500);
  color: #1a1405;
}

/* ------------------------------------------------------------------ forms */

.form {
  display: grid;
  gap: 1.1rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field > label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.field .hint {
  font-size: 0.8rem;
  color: var(--text-soft);
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='file'],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.6;
  font-family: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 49%, currentColor 50%),
    linear-gradient(-45deg, transparent 49%, currentColor 50%);
  background-size: 6px 6px, 6px 6px;
  background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.75rem) 55%;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.radio-cards {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.radio-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-card:hover {
  border-color: var(--accent-soft);
}
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
}
.radio-card:has(input:focus-visible) {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}
.radio-card strong {
  font-size: 0.94rem;
}
.radio-card span {
  font-size: 0.8rem;
  color: var(--text-soft);
}
.checkline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
}
.checkline input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--brand);
  flex: none;
}
.form-panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------- messages */

.alert {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.alert-success {
  background: var(--ok-bg);
  color: var(--ok-fg);
  border-color: color-mix(in oklab, var(--ok-fg) 25%, transparent);
}
.alert-error {
  background: var(--err-bg);
  color: var(--err-fg);
  border-color: color-mix(in oklab, var(--err-fg) 25%, transparent);
}
.alert-info {
  background: var(--info-bg);
  color: var(--info-fg);
  border-color: color-mix(in oklab, var(--info-fg) 25%, transparent);
}
.alert ul {
  margin: 0;
  padding-left: 1.1rem;
}
.flash-slot {
  padding-top: 1.2rem;
}

.empty {
  text-align: center;
  padding: clamp(2.5rem, 8vw, 5rem) 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}
.empty h3 {
  color: var(--text);
}

/* ------------------------------------------------------------------ admin */

.admin-shell {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  grid-template-columns: minmax(0, 1fr);
  padding-block: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 60rem) {
  .admin-shell {
    grid-template-columns: 15rem minmax(0, 1fr);
    align-items: start;
  }
  .admin-nav {
    position: sticky;
    top: 6rem;
  }
}
.admin-nav {
  display: grid;
  gap: 0.2rem;
  align-content: start;
}
.admin-nav a {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: background 0.2s var(--ease);
}
.admin-nav a:hover {
  background: var(--bg-sunken);
  color: inherit;
}
.admin-nav a[aria-current='page'] {
  background: var(--brand);
  color: var(--on-brand);
}
.admin-nav .count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--brass-500);
  color: #1a1405;
}
.admin-nav a[aria-current='page'] .count {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand);
}

.tile-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
}
.tile {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.15rem;
}
.tile-value {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1;
  color: var(--brand);
}
.tile-label {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 34rem;
}
th,
td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--bg-sunken);
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: color-mix(in oklab, var(--accent) 5%, transparent);
}
td .btn-row {
  gap: 0.35rem;
}
.inline-form {
  display: inline;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  padding-block: clamp(1.6rem, 5vw, 3.4rem) clamp(1rem, 2.5vw, 1.8rem);
}
.page-head .stack {
  --stack-gap: 0.6rem;
}
.page-head h1 {
  font-size: var(--step-3);
}

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

.site-footer {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-grid h4 {
  font-family: var(--font-text);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-300);
  margin-bottom: 0.9rem;
  font-weight: 700;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.footer-grid a {
  text-decoration: none;
  color: var(--text-inverse-soft);
  font-size: 0.92rem;
}
.footer-grid a:hover {
  color: var(--brass-300);
}
.footer-brand p {
  color: var(--text-inverse-soft);
  font-size: 0.92rem;
  max-width: 32ch;
  margin-top: 0.8rem;
}
.footer-notices {
  padding-block: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-notice {
  font-size: 0.82rem;
  color: var(--text-inverse-soft);
  line-height: 1.6;
}
.footer-notice strong {
  color: var(--text-inverse);
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.86rem;
}
.footer-base {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-inverse-soft);
}

/* ------------------------------------------------------- scroll reveal */

/* Scoped to .js so that with scripting off — or if site.js fails to load —
   every section is simply visible rather than transparent. */
.js .reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    translate: 0 0;
  }
}

/* ------------------------------------------------------------------ print */

@media print {
  .site-header,
  .site-footer,
  .hero-media,
  .btn,
  .nav,
  .header-actions,
  .chip-scroll,
  .board-side,
  form {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .hero {
    min-height: auto;
    color: #000;
    background: none;
  }
  .hero::after {
    display: none;
  }
  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
    color: #555;
  }
  .card,
  .message,
  .table-scroll {
    border: 1px solid #bbb;
    box-shadow: none;
    break-inside: avoid;
  }
  .section {
    padding-block: 1rem;
  }
}
