/* The Recon Rally Field Guide (server/fieldguide/pages.ts): the night header with the breathing logo and
   the rally strip's slanted red tag; pages light or dark (the app's own setting, else the device's). */
:root {
  --accent: #e8442e; --accent-2: #d23a25; --glow-rim: #ff5a3c;
  --night: #15171a; --night-2: #1e2125; --night-ink: #e6e8eb; --night-muted: #9aa1a9; --night-line: #2a2e33;
  --bg: #f7f7f4; --panel: #fff; --text: #1b1d20; --text-2: #4a5057; --muted: #6b7178; --line: #e3e4e0; --code: #f0f1ee;
  --tip: #0f8a6c; --note: #3b6fd8; --careful: #c2410c;
  --cond: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif-condensed, system-ui, sans-serif;
  --max: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #15171a; --panel: #1e2125; --text: #e6e8eb; --text-2: #b8bec6; --muted: #9aa1a9; --line: #2e3238; --code: #262a2f; --tip: #34d399; --note: #7aa2f7; --careful: #fb923c; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #15171a; --panel: #1e2125; --text: #e6e8eb; --text-2: #b8bec6; --muted: #9aa1a9; --line: #2e3238; --code: #262a2f; --tip: #34d399; --note: #7aa2f7; --careful: #fb923c; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
img { max-width: 100%; }
.fg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fg-skip { position: absolute; left: -999px; top: 8px; z-index: 30; padding: 8px 12px; background: var(--accent); color: #fff; border-radius: 8px; }
.fg-skip:focus { left: 8px; }

/* ---- the header: night, the logo breathing ---- */
.fg-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px max(16px, calc((100% - var(--max)) / 2));
  background: rgba(21,23,26,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--night-line); color: var(--night-ink); }
.fg-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--night-ink); text-decoration: none; flex: none; }
.fg-brand .brand-mark { width: 34px; height: 34px; }
.fg-word svg { display: block; height: 14px; width: auto; }
.breathe { position: relative; }
.breathe::before { content: ""; position: absolute; left: 17px; top: 50%; width: 46px; height: 50px; margin: -25px 0 0 -23px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,59,31,.95), rgba(255,59,31,.45) 50%, transparent); opacity: 0; pointer-events: none; animation: fg-breathe 5.5s ease-in-out 3; }
.breathe .brand-mark { position: relative; }
@keyframes fg-breathe { 0%, 100% { opacity: 0; transform: scale(.75); } 50% { opacity: .75; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .breathe::before { animation: none; } }
/* The rally strip's tag: slanted, red, condensed italic capitals. */
.fg-tag { flex: none; display: inline-block; padding: 5px 14px 5px 12px; background: var(--accent); color: #fff; font: italic 800 13px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.fg-tag:hover { color: #fff; background: var(--accent-2); }
.fg-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.fg-search input { width: 100%; padding: 9px 14px; border-radius: 999px; border: 1px solid #3a3f45; background: #23272b; color: var(--night-ink); font: inherit; font-size: 14.5px; }
.fg-search input::placeholder { color: var(--night-muted); }
.fg-search input:focus { outline: 2px solid var(--glow-rim); outline-offset: 1px; border-color: transparent; }
.fg-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.25); overflow: hidden; }
.fg-suggest a { display: block; padding: 9px 14px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.fg-suggest a:first-child { border-top: 0; }
.fg-suggest a:hover, .fg-suggest a.is-on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fg-suggest small { display: block; color: var(--muted); font-size: 12.5px; }
.fg-open { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 0 0 1px rgba(255,90,60,.35), 0 0 10px rgba(255,59,31,.45); }
.fg-open:hover { color: #fff; background: var(--accent-2); }
@media (max-width: 720px) {
  .fg-header { flex-wrap: wrap; gap: 8px 10px; }
  .fg-word { display: none; }
  .fg-search { order: 3; flex-basis: 100%; max-width: none; }
  .fg-open { margin-left: auto; padding: 7px 12px; font-size: 13px; }
}

/* ---- pages ---- */
.fg-main { max-width: var(--max); margin: 0 auto; padding: 18px 16px 56px; min-height: 60vh; }
.fg-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; font-size: 13.5px; color: var(--muted); }
.fg-crumbs a { color: var(--muted); text-decoration: none; }
.fg-crumbs a:hover { color: var(--accent); }
.fg-kicker { margin: 0 0 6px; }
.fg-kicker span { color: var(--accent); font: italic 800 13px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.fg-page-head { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; }
.fg-page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -.02em; }
.fg-summary { margin: 8px 0 0; font-size: 18px; color: var(--text-2); max-width: 720px; }
.fg-icon { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fg-icon.lg { width: 44px; height: 44px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* The guide's front page. */
.fg-hero { border-radius: 0 0 18px 18px; margin: -18px -16px 28px; padding: 46px max(16px, calc((100% - var(--max)) / 2 + 16px)) 40px; color: var(--night-ink);
  background: radial-gradient(ellipse 60% 80% at 80% 30%, rgba(232,68,46,.24), transparent 70%), radial-gradient(ellipse 40% 50% at 5% 0%, rgba(232,68,46,.1), transparent 70%), var(--night); border-bottom: 1px solid var(--night-line); }
.fg-hero .fg-kicker span { color: var(--glow-rim); text-shadow: 0 0 12px rgba(255,59,31,.55); }
.fg-hero h1 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -.03em; }
.fg-lead { max-width: 720px; font-size: 18.5px; color: #b8bec6; }
.fg-lead p { margin: 0 0 10px; }
.fg-lead a { color: #ff8a70; }
.fg-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.fg-btn { display: inline-block; padding: 11px 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 0 0 1px rgba(255,90,60,.35), 0 0 12px rgba(255,59,31,.45); }
.fg-btn:hover { color: #fff; background: var(--accent-2); }
.fg-btn.ghost { background: transparent; border: 1.5px solid #464b52; color: var(--night-ink); box-shadow: none; }
.fg-btn.ghost:hover { border-color: var(--night-ink); }
.fg-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.fg-tile { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.fg-tile:hover { color: inherit; border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.fg-tile b { font-size: 17px; }
.fg-tile span { color: var(--text-2); font-size: 14.5px; line-height: 1.45; }
.fg-tile small { margin-top: auto; color: var(--muted); font-size: 12.5px; }
.fg-tiles.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.fg-tiles.small .fg-tile { flex-direction: row; align-items: center; padding: 12px 14px; }
.fg-all { margin-top: 40px; }
.fg-all h2 { font-size: 22px; }
.fg-index { columns: 3 260px; column-gap: 28px; }
.fg-index > div { break-inside: avoid; margin: 0 0 18px; }
.fg-index h3 { margin: 0 0 4px; font-size: 15px; }
.fg-index h3 a { color: var(--text); text-decoration: none; }
.fg-index ul { margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.fg-index li { padding: 2px 0; }
.fg-index a { text-decoration: none; }

/* Lists of pages. */
.fg-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fg-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; }
.fg-card:hover { color: inherit; border-color: var(--accent); }
.fg-card b { font-size: 16px; }
.fg-card span { color: var(--text-2); font-size: 14px; line-height: 1.45; }

/* A page: the section's pages beside it (a computer), its words. */
.fg-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
.fg-side { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; font-size: 14px; }
.fg-side-h { margin: 0 0 8px; font-weight: 800; }
.fg-side-h a { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.fg-side-h .fg-icon { width: 20px; height: 20px; }
.fg-side ul { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.fg-side li a { display: block; padding: 5px 0 5px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; line-height: 1.35; }
.fg-side li a:hover { color: var(--accent); }
.fg-side li a[aria-current] { border-left-color: var(--accent); color: var(--text); font-weight: 700; }
@media (max-width: 900px) { .fg-layout { grid-template-columns: minmax(0, 1fr); } .fg-side { display: none; } }
.fg-article { max-width: 780px; }
.fg-toc { margin: 0 0 22px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 14.5px; }
.fg-toc b { display: block; margin-bottom: 4px; color: var(--muted); font: italic 800 12.5px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.fg-toc ul { margin: 0; padding-left: 18px; columns: 2 220px; }
.fg-prose { font-size: 16.5px; }
.fg-prose h2 { margin: 34px 0 10px; font-size: 24px; line-height: 1.25; letter-spacing: -.01em; }
.fg-prose h3 { margin: 24px 0 6px; font-size: 18.5px; }
.fg-prose h2, .fg-prose h3 { position: relative; scroll-margin-top: 80px; }
.fg-anchor { position: absolute; left: -22px; color: var(--muted); opacity: 0; text-decoration: none; font-weight: 400; }
.fg-prose h2:hover .fg-anchor, .fg-prose h3:hover .fg-anchor { opacity: .7; }
.fg-prose p { margin: 0 0 14px; }
.fg-prose ul, .fg-prose ol { margin: 0 0 16px; padding-left: 24px; }
.fg-prose li { margin: 4px 0; }
.fg-prose li > ul, .fg-prose li > ol { margin: 4px 0; }
.fg-prose code { padding: 1px 6px; border-radius: 6px; background: var(--code); font-size: .9em; }
.fg-prose kbd { display: inline-block; min-width: 1.6em; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--panel); font: 600 .85em/1.5 system-ui, sans-serif; text-align: center; }
/* Steps: numbered in the logo's red. */
.fg-steps { counter-reset: fg-step; list-style: none; padding-left: 0 !important; }
.fg-steps > li { counter-increment: fg-step; position: relative; padding-left: 40px; margin: 10px 0; }
.fg-steps > li::before { content: counter(fg-step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  font: italic 800 15px/28px var(--cond); text-align: center; box-shadow: 0 0 8px rgba(255,59,31,.35); }
.fg-shot { margin: 16px 0 22px; }
.fg-shot img { display: block; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(15,23,42,.12); background: var(--panel); height: auto; }
.fg-shot .fg-dark { display: none; }
:root[data-theme="dark"] .fg-shot .fg-light { display: none; }
:root[data-theme="dark"] .fg-shot .fg-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fg-shot .fg-light { display: none; } :root:not([data-theme="light"]) .fg-shot .fg-dark { display: block; } }
.fg-steps .fg-shot { margin: 10px 0 18px; }
.fg-shot figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }
.fg-callout { margin: 16px 0; padding: 12px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--panel)); --c: var(--note); }
.fg-callout b { display: block; color: var(--c); font: italic 800 13px/1.3 var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.fg-callout p { margin: 4px 0 0; }
.fg-tip { --c: var(--tip); }
.fg-phone { --c: var(--accent); }
.fg-careful { --c: var(--careful); }
.fg-table { overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.fg-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fg-table th, .fg-table td { padding: 9px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.fg-table thead th { border-top: 0; color: var(--muted); font: italic 800 12.5px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.fg-table tbody th { font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .fg-table tbody th { white-space: normal; } }
.fg-updated { margin: 28px 0 0; color: var(--muted); font-size: 13.5px; }
.fg-helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.fg-helpful span { font-weight: 700; margin-right: 6px; }
.fg-helpful button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.fg-helpful button:hover { border-color: var(--accent); }
.fg-helpful.done { color: var(--tip); font-weight: 700; }
.fg-related { margin-top: 34px; }
.fg-related h2 { font-size: 20px; }
.fg-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.fg-pager a { flex: 1; max-width: 48%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; color: var(--text); font-weight: 700; }
.fg-pager a.next { text-align: right; margin-left: auto; }
.fg-pager a:hover { border-color: var(--accent); }
.fg-pager small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* ---- the footer: night ---- */
.fg-footer { background: var(--night); color: var(--night-muted); border-top: 1px solid var(--night-line); }
.fg-footer-in { max-width: var(--max); margin: 0 auto; padding: 34px 16px; display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.fg-footer h2 { margin: 0 0 8px; color: var(--night-ink); font: italic 800 13px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.fg-footer ul { margin: 0; padding: 0; list-style: none; columns: 2 160px; font-size: 14px; }
.fg-footer li { padding: 3px 0; }
.fg-footer a { color: var(--night-muted); text-decoration: none; }
.fg-footer a:hover { color: var(--night-ink); }
.fg-fine { grid-column: 1 / -1; margin: 0; font-size: 13px; }
@media (max-width: 720px) { .fg-footer-in { grid-template-columns: 1fr; } }
@media print { .fg-header, .fg-footer, .fg-side, .fg-helpful, .fg-pager { display: none; } body { background: #fff; color: #000; } }
