:root {
  --bg: #15100c;
  --bg-deep: #0b0705;
  --glow: rgba(222, 112, 38, 0.24);
  --glow-2: rgba(160, 48, 34, 0.16);
  --text: #f2e7d7;
  --muted: #b8a693;
  --faint: #7f6d5d;
  --card: rgba(255, 232, 205, 0.035);
  --card-hover: rgba(255, 232, 205, 0.065);
  --line: rgba(255, 228, 196, 0.09);
  --line-strong: rgba(255, 228, 196, 0.18);
  --accent: #e8913f;
  --accent-ink: #1c0f05;
  --tile: rgba(255, 228, 196, 0.05);
  --ok: #a9c47f;
  --down: #e06c5a;
  --icon-a: #f2b04a;
  --icon-b: #c9452c;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6ecdc;
    --bg-deep: #ecdcc4;
    --glow: rgba(214, 100, 30, 0.22);
    --glow-2: rgba(150, 40, 30, 0.10);
    --text: #2a1a10;
    --muted: #6b5444;
    --faint: #937b68;
    --card: rgba(255, 250, 242, 0.72);
    --card-hover: #fffaf2;
    --line: rgba(70, 35, 10, 0.12);
    --line-strong: rgba(70, 35, 10, 0.24);
    --accent: #b04a1c;
    --accent-ink: #fff8ee;
    --tile: rgba(70, 35, 10, 0.05);
    --ok: #436a22;
    --down: #a8321f;
    --icon-a: #d9891c;
    --icon-b: #a3301b;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 85% -8%, var(--glow), transparent 65%),
    radial-gradient(900px 500px at -10% 10%, var(--glow-2), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  padding-top: 22px;
  font-size: 0.85rem; color: var(--faint);
}
.topbar a, .topbar button {
  font: inherit; color: var(--muted);
  background: none; border: 0; cursor: pointer;
  text-decoration: none;
}
.topbar a:hover, .topbar button:hover { color: var(--accent); }
.topbar form { display: inline; }

/* ---------- hero ---------- */
header.hero { padding: clamp(40px, 10vh, 110px) 0 clamp(36px, 7vh, 64px); position: relative; }
.sun {
  position: absolute;
  right: -40px; top: clamp(10px, 4vh, 50px);
  width: clamp(160px, 26vw, 280px); aspect-ratio: 2 / 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--accent), transparent 95%);
  opacity: 0.22;
  filter: blur(2px);
  pointer-events: none;
}
.sun::after {
  content: ""; position: absolute; left: -30%; right: -30%; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(4rem, 15vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.wordmark a { text-decoration: none; }
.wordmark .dot { color: var(--accent); font-style: normal; }
.definition {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--muted);
}
.definition em { color: var(--faint); font-style: italic; margin-right: 6px; }
.lede {
  margin-top: 28px;
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--muted);
}
.lede strong { color: var(--text); font-weight: 600; }

/* ---------- sections ---------- */
section { padding: 28px 0 8px; }
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
}
.section-head .rule { flex: 1; height: 1px; background: var(--line); }
.section-head .hint { font-size: 0.85rem; color: var(--faint); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 14px;
}
/* The public services: one row of four on desktop, two on tablets, one on phones. */
.grid.main { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid.main .card { padding: 20px 18px 16px; }
.grid.main .card-top { gap: 12px; }
@media (max-width: 900px) { .grid.main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.main { grid-template-columns: 1fr; } }
.grid.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }

/* ---------- cards ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px 22px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color .2s, background .2s, transform .2s;
}
.card:hover { border-color: var(--line-strong); background: var(--card-hover); transform: translateY(-2px); }
.card-top { display: flex; align-items: center; gap: 14px; }
.tile {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tile svg { width: 26px; height: 26px; }
.tile.mono { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--accent); }
.card h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.25; }
.card h3 a { text-decoration: none; }
/* Whole card is the link; buttons in the footer sit above it. */
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.kind { display: block; font-size: 0.8rem; color: var(--faint); font-weight: 400; }
.status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--faint);
  white-space: nowrap;
}
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--faint); opacity: .6;
}
.status[data-state="up"] { color: var(--ok); }
.status[data-state="up"]::before { background: var(--ok); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.status[data-state="down"] { color: var(--down); }
.status[data-state="down"]::before { background: var(--down); opacity: 1; }

.desc { margin-top: 14px; color: var(--muted); font-size: 0.95rem; line-height: 1.55; flex: 1; }
.card-foot {
  margin-top: 16px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.url { flex-basis: 100%; margin-bottom: 4px; font-family: var(--mono); font-size: 0.78rem; color: var(--faint); overflow-wrap: anywhere; }
.btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center;
  padding: 6px 13px;
  font: 600 0.8rem/1.2 var(--sans);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

.compact .card { padding: 16px 16px 14px; border-radius: 14px; }
.compact .card h3 a::after { border-radius: 14px; }
.compact .tile { width: 36px; height: 36px; border-radius: 10px; }
.compact .tile.mono { font-size: 1.15rem; }
.compact .desc { margin-top: 10px; font-size: 0.88rem; }
.compact .url { margin: 10px 0 0; }

/* ---------- footer ---------- */
footer {
  margin-top: 56px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--faint); font-size: 0.88rem;
}
footer .help { color: var(--muted); }

/* ---------- sign-in page ---------- */
.signin { max-width: 380px; padding-bottom: 80px; }
.signin h2 { font-family: var(--serif); font-weight: 400; font-size: 2rem; }
.signin p { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.signin label { display: block; margin-top: 22px; margin-bottom: 6px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.signin input {
  width: 100%;
  padding: 11px 14px;
  font: 1rem var(--sans);
  color: var(--text);
  background: var(--tile);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.signin input:focus { outline: none; border-color: var(--accent); }
.signin button {
  margin-top: 18px; width: 100%;
  padding: 11px 16px;
  font: 600 0.95rem var(--sans);
  color: var(--accent-ink); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px;
  cursor: pointer;
}
.signin button:hover { filter: brightness(1.08); }
.signin .error { margin-top: 16px; color: var(--down); font-size: 0.9rem; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .sun { right: -70px; opacity: .16; }
  .section-head .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}

/* ---------- guide pages (/photos) ---------- */
.guide-bar { justify-content: flex-start; }
.guide-bar .spacer { flex: 1; }
.topbar .mini-mark {
  font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1;
  color: var(--text) !important; text-decoration: none;
}
.mini-mark .dot { color: var(--accent); font-style: normal; }
.guide-hero { padding: clamp(40px, 9vh, 96px) 0 36px; max-width: 680px; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.guide-title {
  margin-top: 10px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3rem, 9vw, 5rem); line-height: 1; letter-spacing: -0.02em;
}
.btn-solid {
  margin-top: 26px; padding: 9px 18px; font-size: 0.88rem;
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-solid:hover { color: var(--accent-ink); filter: brightness(1.08); }

.prose { max-width: 680px; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.prose > * + * { margin-top: 14px; }
.prose h2 {
  margin-top: 52px; padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.15;
  color: var(--text);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 34px; font-size: 1.08rem; font-weight: 600; color: var(--text); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose code {
  font-family: var(--mono); font-size: 0.86em;
  padding: 2px 7px; border-radius: 6px;
  background: var(--tile); border: 1px solid var(--line); color: var(--text);
}
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--faint); }
.prose ol > li::marker { font-family: var(--mono); font-size: 0.85em; }
.prose table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  font-size: 0.95rem;
}
.prose th, .prose td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.prose th { color: var(--faint); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--text); white-space: nowrap; }

/* >>> docs-update (installed by docs-update/install-docs.sh) >>> */
/* ---------- owner docs (/docs) ---------- */
.docs-hero { padding-bottom: 28px; }
.docs-layout {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px;
  align-items: start;
}
.docs-nav { position: sticky; top: 24px; font-size: 0.9rem; }
.docs-nav ol { list-style: none; }
.docs-pages > li + li { margin-top: 2px; }
.docs-pages > li > a {
  display: block; padding: 6px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none;
  border-left: 2px solid transparent;
}
.docs-pages > li > a:hover { color: var(--text); background: var(--tile); }
.docs-pages > li.current > a { color: var(--text); font-weight: 600; background: var(--tile); border-left-color: var(--accent); }
.docs-pages li ol { margin: 4px 0 10px 14px; padding-left: 12px; border-left: 1px solid var(--line); }
.docs-pages li ol a {
  display: block; padding: 3px 0; font-size: 0.82rem; line-height: 1.35;
  color: var(--faint); text-decoration: none;
}
.docs-pages li ol a:hover { color: var(--accent); }

.docs-prose { max-width: 780px; font-size: 0.98rem; }
.docs-prose h2 { scroll-margin-top: 20px; font-size: 1.85rem; }
.docs-prose h3 { scroll-margin-top: 20px; }
.prose pre {
  padding: 14px 16px; border-radius: 12px; overflow-x: auto;
  background: var(--bg-deep); border: 1px solid var(--line);
  font-size: 0.84rem; line-height: 1.55;
}
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; color: var(--text); }
.prose blockquote {
  padding: 12px 16px; border-radius: 0 12px 12px 0;
  border-left: 3px solid var(--accent); background: var(--card);
  color: var(--muted);
}
.prose blockquote > * + * { margin-top: 8px; }
.table-wrap { overflow-x: auto; border-radius: 12px; }
.table-wrap table { min-width: 560px; }
.docs-prose td { vertical-align: top; }
.docs-prose td:first-child { white-space: normal; min-width: 8.5em; }
.docs-prose td code, .docs-prose th code { white-space: nowrap; }
.docs-prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.docs-index { margin-top: 24px; }
.docs-index .card h3 a { color: var(--text); }
.section-head .hint a { color: var(--muted); text-underline-offset: 3px; }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 20px; }
  .docs-nav { position: static; }
  .docs-pages li ol { display: none; }
  .docs-pages { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-pages > li + li { margin-top: 0; }
  .docs-pages > li > a { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
  .docs-pages > li.current > a { border-color: var(--accent); }
}
/* <<< docs-update <<< */
