/*
 * Styles for server-rendered public pages (/features, /guides).
 *
 * Standalone on purpose: no app JS, no webfont fetch. Palette and chrome match
 * the marketing + app shell (pine field, hi-vis orange, Figtree/Syne stand-ins)
 * so these pages read as K9 SAR Log — not Parks Manager broadsheet chrome.
 *
 * CSP keeps style-src at 'self'. No inline <style> or SVG style="" attributes.
 */

:root {
  --bg: #eef2ea;
  --bg-deep: #e2e8dc;
  --surface: #f7f9f4;
  --ink: #16241b;
  --muted: #4a5c4f;
  --line: #cfd8c8;
  --line-strong: #b7c4ae;
  --accent: #b54308;
  --accent-deep: #8f3606;
  --hi-vis: #c84f11;
  --pine: #1d3529;
  --pine-soft: #355846;
  --pine-night: #102319;
  --paper: #f5f8f2;
  --wash: color-mix(in srgb, var(--bg) 70%, white);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page:
    radial-gradient(ellipse 1100px 640px at 0% -10%, rgba(217, 81, 11, 0.13), transparent 58%),
    radial-gradient(ellipse 900px 560px at 100% 0%, rgba(29, 53, 41, 0.14), transparent 52%),
    linear-gradient(180deg, #e7eee2 0%, var(--bg) 36%, var(--bg-deep) 100%);
  /* Match the app / marketing shell — light field wash only. */
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
  z-index: 10;
  padding: 0.55rem 0.8rem;
  background: var(--pine);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

a {
  color: var(--pine-soft);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--pine);
}

:focus-visible {
  outline: 2px solid var(--hi-vis);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: var(--pine-night);
  color: var(--paper);
}

.masthead .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 0.7rem;
  background: #fff4e8;
  color: var(--pine);
  font-size: 1.45rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.brand-mark svg {
  display: block;
  width: 1em;
  height: 1em;
}

.brand-name {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #f8faf5;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  align-items: center;
}

.masthead nav a:not(.cta) {
  color: color-mix(in srgb, #f5f8f2 88%, #c5d4c8);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
}

.masthead nav a:not(.cta):hover {
  color: #fff;
  text-decoration: underline;
}

/* Hi-vis fill + white label — same as marketing CTAs. */
a.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--hi-vis);
  border: 1px solid #f4a574;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

a.cta:hover {
  background: var(--accent);
  color: #ffffff;
}

/* ----------------------------------------------------------------- main */

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.35rem clamp(1rem, 4vw, 1.75rem) 3rem;
}

.page-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 70%, var(--hi-vis));
}

h1 {
  font-family: var(--font);
  font-size: clamp(1.75rem, 4.8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0.15rem 0 1rem;
  color: var(--pine);
  text-wrap: balance;
}

h2 {
  font-family: var(--font);
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 2.15rem 0 0.7rem;
  color: var(--pine);
}

h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 1.25rem 0 0.35rem;
  color: var(--pine);
}

p {
  margin: 0 0 0.9rem;
  max-width: 40rem;
  color: var(--ink);
}

/* ---------------------------------------------------------- breadcrumbs */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--line-strong);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--pine);
  text-decoration: underline;
}

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

figure.hero,
figure.field-hero {
  margin: 0 0 1.15rem;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--pine-night);
  line-height: 0;
}

figure.hero img,
figure.field-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 18rem;
  object-fit: cover;
  object-position: 68% 58%;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.photo-strip a {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.photo-strip img {
  display: block;
  width: 100%;
  height: 7rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.photo-strip span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  font-weight: 650;
}

/* ---------------------------------------------------------------- tiles */

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tile {
  padding: 0.75rem 0.85rem;
  background: color-mix(in srgb, var(--bg) 70%, white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.tile a {
  text-decoration: none;
  color: inherit;
}

.tile-title {
  display: block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--pine);
}

.tile-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.tile p {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: none;
}

.tile:hover {
  border-color: color-mix(in srgb, var(--hi-vis) 45%, var(--line));
  background: color-mix(in srgb, var(--surface) 80%, #fff1e7);
}

/* --------------------------------------------------------- link columns */

.link-columns {
  columns: 2 11rem;
  column-gap: 1.5rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.link-columns li {
  break-inside: avoid;
  margin-bottom: 0.28rem;
}

/* --------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

caption {
  text-align: left;
  padding: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

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

thead th {
  background: color-mix(in srgb, var(--pine) 8%, var(--surface));
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pine);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

th[scope="row"] {
  font-weight: 650;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ topic nav */

.topic-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 1rem 0 1.5rem;
  padding: 0 0 0.65rem;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.topic-nav li {
  font-size: 0.92rem;
  font-weight: 650;
}

.topic-nav li[aria-current="page"] {
  color: var(--pine);
  box-shadow: inset 0 -2px 0 var(--hi-vis);
}

.topic-nav a {
  text-decoration: none;
  color: var(--muted);
}

.topic-nav a:hover {
  color: var(--pine);
}

.pillar-link {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ faq/points */

.faq-item {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 0.25rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

ul.points {
  margin: 0.4rem 0 1rem;
  padding-left: 1.2rem;
  max-width: 40rem;
}

ul.points li {
  margin-bottom: 0.35rem;
}

/* ---------------------------------------------------------------- glance */

.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.55rem;
  margin: 1.1rem 0 1.6rem;
  padding: 0;
  list-style: none;
}

.glance li {
  padding: 0.65rem 0.75rem;
  background: color-mix(in srgb, var(--bg) 70%, white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.glance-value {
  display: block;
  font-family: var(--font);
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
}

.glance-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
}

/* --------------------------------------------------------------- signup */

.signup {
  margin: 2.75rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.signup-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 65%, var(--hi-vis));
}

.signup h2 {
  margin: 0 0 0.55rem;
  color: var(--pine);
}

.signup p {
  color: var(--muted);
  max-width: 32rem;
}

.signup .cta {
  margin-top: 0.35rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  font-size: 1rem;
}

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

.site-footer {
  padding: 1.75rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  background: var(--pine-night);
  color: color-mix(in srgb, #f5f8f2 82%, #c5d4c8);
}

.site-footer .footer-lead {
  max-width: 40rem;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  max-width: 40rem;
  margin: 0 auto 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer a {
  color: #f4a574;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer .fine {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 0.78rem;
  color: color-mix(in srgb, #f5f8f2 55%, #8aa090);
}

/* ------------------------------------------------------- feature banners */

.feature-art {
  margin: 0.15rem 0 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  overflow: hidden;
  line-height: 0;
  background: var(--pine-night);
}

.feature-art svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 1;
}

@media (prefers-reduced-motion: no-preference) {
  a.cta,
  .tile {
    transition: background-color 180ms var(--ease), color 180ms var(--ease),
      border-color 180ms var(--ease);
  }
}
