/* NABS Confidence user guide. Colours from the extension rocket (#155781) and its lighter accent (#1c75ad). */

:root {
  --navy: #155781;
  --navy-deep: #0e3d58;
  --blue: #1c75ad;
  --ink: #142830;
  --muted: #4c6470;
  --paper: #f3f6f8;
  --surface: #ffffff;
  --line: #d3e0e7;
  --accent: #155781;
  --accent-ink: #ffffff;
  --wash: #e7f2f7;
  --coming-bg: #fff6e4;
  --coming-ink: #6a4810;
  --coming-line: #e6c98a;
  --focus: #1c75ad;
  --shadow: 0 10px 28px rgba(21, 87, 129, 0.08);
  --nav-width: 16.75rem;
  --header-h: 3.5rem;
  --measure: 40rem;
  --font: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Noto Serif", Georgia, serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #e7f0f5;
  --muted: #a8c0cc;
  --paper: #0c1c26;
  --surface: #132a36;
  --line: #2a4656;
  --accent: #8ec4e2;
  --accent-ink: #0c1c26;
  --wash: #173444;
  --coming-bg: #3a2c14;
  --coming-ink: #f6ddb0;
  --coming-line: #8d6b32;
  --focus: #9ed0ea;
  --shadow: none;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7f0f5;
    --muted: #a8c0cc;
    --paper: #0c1c26;
    --surface: #132a36;
    --line: #2a4656;
    --accent: #8ec4e2;
    --accent-ink: #0c1c26;
    --wash: #173444;
    --coming-bg: #3a2c14;
    --coming-ink: #f6ddb0;
    --coming-line: #8d6b32;
    --focus: #9ed0ea;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.05rem/1.6 var(--font);
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--navy);
  color: #fff;
  padding: 0.4rem 0.7rem;
  z-index: 50;
}
.skip:focus { top: 0.5rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand img { width: 1.75rem; height: 1.75rem; flex: none; }
.brand span { white-space: nowrap; }

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
}

.nav-toggle,
.theme-toggle {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  cursor: pointer;
}
.nav-toggle { display: none; background: var(--navy); color: #fff; border-color: var(--navy); }

.shell {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - var(--header-h));
}

.site-nav {
  position: sticky;
  top: var(--header-h);
  max-height: calc(100vh - var(--header-h));
  overflow: auto;
  padding: 1.1rem 0.85rem 2rem;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.nav-group {
  margin: 1.1rem 0.7rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-group:first-child { margin-top: 0.2rem; }

.site-nav a.item {
  display: block;
  margin: 0.1rem 0;
  padding: 0.38rem 0.7rem;
  border-radius: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.site-nav a.item:hover { background: var(--wash); }
.site-nav a.item[aria-current="page"] {
  background: var(--wash);
  border-left-color: var(--navy);
  font-weight: 700;
  color: var(--navy-deep);
}
:root[data-theme="dark"] .site-nav a.item[aria-current="page"],
:root:not([data-theme="light"]) .site-nav a.item[aria-current="page"] {
  color: var(--accent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-nav a.item[aria-current="page"] { color: var(--accent); }
}
:root[data-theme="light"] .site-nav a.item[aria-current="page"] { color: var(--navy-deep); }

main {
  min-width: 0;
  padding: 2.25rem 1.5rem 3.5rem;
  max-width: 58rem;
}

.hero { max-width: 40rem; }
.kicker {
  margin: 0 0 0.4rem;
  color: var(--navy);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
:root[data-theme="dark"] .kicker { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kicker { color: var(--accent); }
}

h1, h2, h3 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.1rem, 4vw, 3.15rem); margin: 0 0 0.7rem; }
h2 { font-size: 1.65rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 0.4rem; }
.lede { font-size: 1.18rem; color: var(--ink); max-width: var(--measure); }
p, li { max-width: 42rem; }
.hint, .meta { color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0.4rem; }
.button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 700;
}
.button.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.8rem;
  margin: 0.8rem 0 1rem;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: 0.85rem;
  padding: 0.95rem 1rem 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  min-height: 8.5rem;
}
.card:hover { border-color: var(--blue); }
.card strong { font-family: var(--serif); font-size: 1.15rem; }
.card span { color: var(--muted); }

.steps { display: grid; gap: 0.7rem; margin: 0.6rem 0 1rem; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}
.step b {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-size: 0.95rem;
}
.step p { margin: 0.15rem 0 0; }
.step h3 { margin: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1rem 1.05rem;
}
.panel.quiet { background: var(--wash); }

ol.task { padding-left: 1.2rem; }
ol.task > li { margin: 0.55rem 0; }
ol.task > li::marker { font-weight: 750; color: var(--navy); }

.note, .soon {
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  max-width: 42rem;
}
.note { background: var(--wash); border: 1px solid var(--line); }
.soon {
  background: var(--coming-bg);
  color: var(--coming-ink);
  border: 1px solid var(--coming-line);
}
.soon strong, .note strong { font-family: var(--serif); }
.soon p, .note p { margin: 0.35rem 0 0; color: inherit; }
.soon p:first-child, .note p:first-child { margin-top: 0; }

figure.shot { margin: 1.1rem 0 1.4rem; max-width: 48rem; }
.frame {
  background: #f7fafb;
  border: 1px solid #d5e1e8;
  border-radius: 0.85rem;
  padding: 0.45rem;
  overflow: hidden;
}
.frame img { display: block; width: 100%; height: auto; border-radius: 0.45rem; }
figcaption { margin-top: 0.45rem; color: var(--muted); font-size: 0.92rem; max-width: 46rem; }

.curve {
  margin: 1rem 0;
  background: #f7fafb;
  border: 1px solid #d5e1e8;
  border-radius: 0.85rem;
  padding: 0.6rem;
}
.curve img { display: block; width: 100%; height: auto; }

.stages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 0.8rem 0 1rem;
}
.stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.8rem;
}
.stage .plate {
  background: #f7fafb;
  border-radius: 0.55rem;
  padding: 0.4rem;
  margin-bottom: 0.55rem;
}
.stage img { display: block; width: 100%; height: auto; }
.stage h3 { margin: 0.2rem 0 0.25rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1.2rem;
  font-size: 0.95rem;
  max-width: 48rem;
}
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
code, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--wash); padding: 0.05em 0.3em; border-radius: 0.3em; overflow-wrap: anywhere; }
pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.8rem 1rem;
  overflow: auto;
  max-width: min(48rem, 100%);
}
pre code { background: none; padding: 0; }

.setting {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem 0.2rem;
  margin: 0.8rem 0;
  max-width: min(48rem, 100%);
  min-width: 0;
}
.setting h2 { font-size: 1.05rem; margin: 0 0 0.4rem; font-family: var(--mono); letter-spacing: 0; font-weight: 650; overflow-wrap: anywhere; }
.setting dl { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.2rem 0.6rem; margin: 0 0 0.6rem; }
.setting dl > * { min-width: 0; }
.setting pre { max-width: 100%; }
.setting dt { color: var(--muted); font-size: 0.85rem; }
.setting dd { margin: 0; }
.deprecated { color: var(--coming-ink); font-weight: 700; }

footer.site {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
footer.site p { margin: 0.25rem 0; }

.scrim { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .shell { display: block; }
  main { padding: 1.4rem 1rem 2.5rem; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: min(18.5rem, calc(100vw - 3.25rem));
    max-height: none;
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 160ms ease;
    box-shadow: var(--shadow);
  }
  body.nav-open .site-nav { transform: none; }
  .scrim {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(8, 20, 28, 0.48);
    z-index: 25;
  }
  body.nav-open .scrim { display: block; }
  .split, .stages { grid-template-columns: 1fr; }
  .setting dl { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .brand span { font-size: 0.95rem; }
  .theme-toggle, .nav-toggle { padding: 0.28rem 0.65rem; }
  h1 { font-size: 2rem; }
}

/* Activities and test coverage pages */
.level {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
  overflow-wrap: normal;
}
.level.high { background: #e1f3e6; color: #12461f; border-color: #8cc79c; }
.level.medium { background: var(--coming-bg); color: var(--coming-ink); border-color: var(--coming-line); }
.level.low { background: #fbe5e3; color: #6d1912; border-color: #e3a29c; }
:root[data-theme="dark"] .level.high { background: #163b24; color: #c4efd0; border-color: #3f8a56; }
:root[data-theme="dark"] .level.low { background: #44201d; color: #fbd3cf; border-color: #a2514a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .level.high { background: #163b24; color: #c4efd0; border-color: #3f8a56; }
  :root:not([data-theme="light"]) .level.low { background: #44201d; color: #fbd3cf; border-color: #a2514a; }
}
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.3rem 0 0.6rem; }
.chips .gap { width: 0.6rem; }
.tag { border: 1px solid var(--line); border-radius: 0.4rem; padding: 0.05rem 0.45rem; font-size: 0.82rem; color: var(--muted); }
article.activity {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.9rem 1.1rem;
  margin: 0.8rem 0;
  max-width: 48rem;
}
article.activity h3, article.activity h4 { margin: 0 0 0.3rem; font-size: 1.1rem; }
article.activity p { margin: 0.3rem 0; }
.facts { display: grid; gap: 0.35rem; margin: 0.6rem 0 0; }
.facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0.2rem 0.8rem; }
.facts dt { color: var(--muted); font-size: 0.85rem; }
.facts dd { margin: 0; }
.reason { color: var(--ink); }
details { margin: 0.5rem 0 0; }
summary { cursor: pointer; font-weight: 650; }
details ul { padding-left: 1.2rem; margin: 0.3rem 0; }
details li { max-width: none; font-size: 0.92rem; }
p.file { margin: 0.5rem 0 0; }
table.matrix { max-width: 48rem; }
@media (max-width: 860px) {
  .facts > div { grid-template-columns: minmax(0, 1fr); }
}
