/* SARtale guide: the app's radar palette, a reading column and a sticky contents rail. */
:root {
  --ground: #050d16;
  --panel: #0b1825;
  --panel-2: #102233;
  --line: #1e3a52;
  --text: #e9f1f6;
  --muted: #a9bccb;
  --cyan: #7dd8f2;
  --amber: #ffc46b;
  --teal: #5eead4;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 1rem/1.65 var(--body); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--cyan); color: var(--ground); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 24px; background: rgba(5, 13, 22, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.2rem/1 var(--display); letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; padding: 2px; }
.brand small { font: 500 0.85rem/1 var(--body); color: var(--muted); letter-spacing: 0; }
.bar-links { margin-left: auto; display: flex; gap: 20px; font-size: 0.92rem; }
.bar-links a { color: var(--muted); text-decoration: none; }
.bar-links a:hover { color: var(--text); }

/* frame: rail + reading column */
.frame { display: grid; grid-template-columns: 248px minmax(0, 1fr); max-width: 1200px; margin: 0 auto; }
.rail { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; padding: 32px 16px 32px 24px; border-right: 1px solid var(--line); }
.rail h2 { margin: 20px 0 6px; padding-left: 12px; font: 600 0.8rem/1.4 var(--body); color: var(--muted); }
.rail h2:first-child { margin-top: 0; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.93rem; }
.rail a:hover { background: var(--panel); }
.rail a[aria-current="page"] { background: var(--panel-2); color: var(--cyan); box-shadow: inset 2px 0 0 var(--cyan); }
.menu { display: none; }

main { min-width: 0; padding: 48px 56px 96px; }
.doc { max-width: 72ch; }
.doc > :first-child { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; margin: 0 0 16px; }
h2 { font-size: 1.6rem; font-weight: 650; margin: 56px 0 12px; padding-top: 8px; }
h3 { font-size: 1.15rem; font-weight: 650; margin: 32px 0 8px; letter-spacing: -0.01em; }
p, ul, ol { margin: 0 0 16px; }
li { margin-bottom: 6px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.anchor { color: var(--line); text-decoration: none; margin-left: 8px; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { color: var(--muted); }

code { font: 0.88em/1.5 var(--mono); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { margin: 0 0 20px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; font-size: 0.86rem; line-height: 1.6; }
pre .c { color: var(--muted); }

table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 0.94rem; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; }
.table-wrap table { margin: 0; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.86rem; }
td code { white-space: nowrap; }

.note { margin: 0 0 24px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.note.caution { border-color: rgba(255, 196, 107, 0.45); }
.note.caution strong { color: var(--amber); }
.note p:last-child { margin: 0; }

figure { margin: 8px 0 32px; }
figure img { border: 1px solid var(--line); border-radius: 12px; }
figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--muted); }

/* method steps: a real sequence, so numbered */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 20px 52px; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--cyan); border-radius: 50%; color: var(--cyan); font: 600 0.95rem/1 var(--display); }
.steps > li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 6px; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps strong { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 2px; }

/* home: the radar picture is the hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 40px; align-items: center; margin-bottom: 48px; }
.radar { margin: 0; }
.radar-frame { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.radar-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; }
.radar .water { opacity: 0; animation: water 2.4s ease-out 0.4s forwards; }
.radar figcaption { margin-top: 10px; }
@keyframes water { to { opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) { .radar .water { animation: none; opacity: 0.8; } }
.hero h1 { font-size: clamp(2.2rem, 3.6vw, 3.1rem); }
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 32px; padding: 0; list-style: none; }
.paths a { display: block; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); background: var(--panel); }
.paths a:hover { border-color: var(--cyan); }
.paths b { display: block; font: 650 1.05rem/1.3 var(--display); color: var(--cyan); margin-bottom: 4px; }
.paths span { color: var(--muted); font-size: 0.93rem; }
.wide { max-width: none; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; }
.pager small { display: block; color: var(--muted); font-size: 0.8rem; }
footer.foot { margin-top: 32px; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 900px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .menu { display: block; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  .menu summary { padding: 12px 16px; cursor: pointer; font-weight: 600; min-height: 44px; }
  .menu nav { padding: 0 8px 12px; }
  .menu a { display: block; padding: 10px 12px; text-decoration: none; color: var(--text); border-radius: 8px; }
  .menu a[aria-current="page"] { color: var(--cyan); background: var(--panel-2); }
  main { padding: 32px 20px 72px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .radar { max-width: 360px; }
  .bar-links { display: none; }
}
@media (max-width: 560px) { .paths { grid-template-columns: minmax(0, 1fr); } }
@media print { .bar, .rail, .menu, .pager { display: none; } .frame { display: block; } body { background: #fff; color: #000; } }

/* Videos on the overview page */
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 8px 0 12px; }
.videos figure { margin: 0; }
.videos video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }
