/* Shared styles for the Annotation Explorer help pages. Colors match the app. */
:root {
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-2: #f0f2ef;
  --border: #dde1dc;
  --text: #1c2321;
  --muted: #5f6b67;
  --faint: #8c9692;
  --accent: #0f7c6e;
  --accent-soft: #d9efe9;
  --tier-preferred: #1d7f4e;
  --tier-caution: #a86a00;
  --tier-later: #4a6bb0;
  --tier-exclude: #b23b3b;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111615;
    --surface: #182020;
    --surface-2: #1f2928;
    --border: #2c3836;
    --text: #e4ebe8;
    --muted: #9fb0aa;
    --faint: #6f807a;
    --accent: #3fbfa8;
    --accent-soft: #1d3b36;
    --tier-preferred: #5cc98f;
    --tier-caution: #e0a83e;
    --tier-later: #84a5ea;
    --tier-exclude: #ec7d7d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
kbd {
  background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; padding: 0 5px;
}
pre {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; overflow-x: auto; font: 13px/1.5 var(--mono);
}
pre code { background: none; border: 0; padding: 0; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.top .brand { font-weight: 650; color: var(--text); text-decoration: none; }
.top .brand span { color: var(--muted); font-weight: 400; }
.top .back { font-size: 13px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 20px 16px 48px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
nav.toc { position: sticky; top: 16px; align-self: start; font-size: 14px; }
nav.toc h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
nav.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
nav.toc a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
nav.toc a:hover { background: var(--surface-2); }
nav.toc a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

main { min-width: 0; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
.lede { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
h2 { font-size: 19px; margin: 30px 0 8px; padding-top: 8px; border-top: 1px solid var(--border); }
h3 { font-size: 15.5px; margin: 20px 0 4px; }
h2:target, h3:target { color: var(--accent); }
p, ul, ol { margin: 0 0 12px; }
li { margin-bottom: 4px; }

table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

.note, .warn {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 10px 12px; border-radius: 6px; margin: 12px 0 16px;
}
.warn { border-left-color: var(--tier-caution); background: var(--surface-2); }
.note p:last-child, .warn p:last-child { margin: 0; }

.tier { display: inline-block; color: #fff; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 6px; }
.tier.preferred { background: var(--tier-preferred); }
.tier.caution { background: var(--tier-caution); }
.tier.later { background: var(--tier-later); }
.tier.exclude { background: var(--tier-exclude); }

/* Schematic of the app layout on the overview page */
.schematic {
  display: grid; gap: 6px; grid-template-columns: 1fr 2fr; grid-template-rows: auto auto;
  grid-template-areas: "list top" "list bottom"; margin: 10px 0 18px; font-size: 13px;
}
.schematic > a {
  display: block; border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 10px 12px; color: var(--text); text-decoration: none;
}
.schematic > a:hover { border-color: var(--accent); }
.schematic b { display: block; color: var(--accent); }
.schematic .s-list { grid-area: list; min-height: 160px; }
.schematic .s-top { grid-area: top; }
.schematic .s-bottom { grid-area: bottom; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.cards a {
  display: block; border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 10px 12px; color: var(--text); text-decoration: none;
}
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; color: var(--accent); margin-bottom: 2px; }
.cards span { color: var(--muted); font-size: 13.5px; }

.status { font-size: 13.5px; color: var(--muted); }
footer.page-foot { margin-top: 36px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--faint); font-size: 12.5px; }

@media (max-width: 760px) {
  .wrap { grid-template-columns: 1fr; gap: 12px; }
  nav.toc { position: static; }
  nav.toc ol { display: flex; flex-wrap: wrap; gap: 4px; }
  nav.toc a { border: 1px solid var(--border); font-size: 13px; padding: 2px 8px; }
  .schematic { grid-template-columns: 1fr; grid-template-areas: "list" "top" "bottom"; }
  .schematic .s-list { min-height: 0; }
  table { font-size: 13px; }
}
