/* Network Recorder site. Same tokens as the extension UI (src/ui/tokens.css):
   minimal developer-tool look, one accent, status colours only reinforce text labels. */
:root {
  color-scheme: light dark;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #ffffff;
  --surface: #f6f6f7;
  --line: #e4e4e7;
  --fg: #18181b;
  --muted: #6b6b72;
  --accent: #2557d6;
  --accent-fg: #ffffff;
  --error: #b42318;
  --ok: #1d7a3a;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --surface: #1f1f22;
    --line: #34343a;
    --fg: #ececef;
    --muted: #9b9ba3;
    --accent: #6d95ff;
    --accent-fg: #0d1117;
    --error: #ff7b72;
    --ok: #56d364;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--font); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; height: auto; }
code, pre, kbd { font-family: var(--mono); font-size: 0.875em; }
code { overflow-wrap: anywhere; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bg); color: var(--fg); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; text-decoration: none; }
.brand img { display: block; border-radius: 6px; }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-nav a:hover { color: var(--fg); text-decoration: underline; }
.site-nav a[aria-current='page'] { color: var(--fg); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

main { padding: 36px 0 56px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 36px 0 8px; }
h3 { font-size: 1rem; margin: 20px 0 4px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 0 0 6px; }
.lead { font-size: 1.125rem; color: var(--fg); max-width: 62ch; }
.meta { color: var(--muted); font-size: 0.9rem; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 0.875rem; }

.shot { margin: 28px 0 8px; }
.shot img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.shot figcaption { margin-top: 8px; color: var(--muted); font-size: 0.875rem; }

.links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.links li { margin: 0; }
.btn { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.pending { color: var(--muted); font-style: italic; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 16px 0; }
.card > :last-child { margin-bottom: 0; }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); padding: 10px 14px; border-radius: var(--radius); margin: 16px 0; }
.notice > :last-child { margin-bottom: 0; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; margin: 10px 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
pre.nowrap { white-space: pre; overflow-wrap: normal; }

table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 0.8125rem; color: var(--muted); font-weight: 600; }
.policy td:first-child, .policy th:first-child { white-space: nowrap; }

.expect { font-family: var(--mono); font-size: 0.8125rem; font-weight: 600; }
.expect.ok, .got.ok::before { color: var(--ok); }
.expect.error, .got.error::before { color: var(--error); }
.got { font-size: 0.875rem; }
.got.ok::before { content: 'Saved — '; font-weight: 600; }
.got.error::before { content: 'Error — '; font-weight: 600; }

.record { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; align-items: center; }
.record dt { color: var(--muted); font-size: 0.875rem; }
.record dd { margin: 0; }
input[type='text'] { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg); width: min(100%, 360px); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head h2 { margin: 0; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 8px; }

.site-footer { border-top: 1px solid var(--line); padding: 20px 0 36px; color: var(--muted); font-size: 0.875rem; }
.site-footer p { margin: 0 0 6px; }
.site-footer nav { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  h1 { font-size: 1.65rem; }
  main { padding-top: 24px; }
  .cases thead { display: none; }
  .cases, .cases tbody, .cases tr, .cases td { display: block; width: 100%; }
  .cases tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cases td { border: 0; padding: 3px 0; }
  .policy td:first-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
