/* AGN Troubleshooter — brand styles.
   Palette taken from the AGN Troubleshooter badge: deep navy shield, electric blue
   circuitry, chrome lettering, amber for the warning triangle. Amber is reserved
   for warnings here, exactly as it is in the logo — it never decorates. */

:root {
  --navy-900: #070b14;
  --navy-800: #0a0f1a;
  --navy-700: #101726;
  --navy-600: #162032;
  --navy-500: #1d2942;
  --line: #24314c;
  --line-soft: #1a2439;

  --blue-400: #4db4ff;
  --blue-500: #1e9bff;
  --blue-600: #0b7ad6;
  --blue-glow: rgba(30, 155, 255, 0.22);

  --text: #e9f1ff;
  --text-dim: #a9bad4;
  --text-faint: #7387a3;

  --pass: #3fd08a;
  --warn: #ffb429;
  --fail: #ff5f6d;
  --info: #7aa7d6;

  --chrome: linear-gradient(180deg, #ffffff 0%, #cfe4f8 46%, #7fb6e8 54%, #e8f3ff 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy-800);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

body {
  background-image:
    radial-gradient(1200px 500px at 50% -260px, rgba(30, 155, 255, 0.16), transparent 70%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800) 380px);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue-400); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
main { flex: 1 0 auto; padding-block: 28px 56px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-head .wrap { display: flex; align-items: center; gap: 18px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; display: block; }
.brand-text { line-height: 1.15; }
.brand-name { font-weight: 800; letter-spacing: 0.4px; font-size: 1.06rem; }
.brand-sub { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1.6px; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  color: var(--text-dim);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.nav a:hover { background: var(--navy-600); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); border-color: var(--line); background: var(--navy-700); }
.nav a.cta { background: var(--blue-600); color: #fff; border-color: var(--blue-500); }
.nav a.cta:hover { background: var(--blue-500); }

/* ── Type ───────────────────────────────────────────────────────────────── */
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.18; margin: 0 0 12px; letter-spacing: -0.4px; }
h2 { font-size: 1.32rem; margin: 30px 0 12px; letter-spacing: -0.2px; }
h3 { font-size: 1.06rem; margin: 20px 0 8px; }
p { margin: 0 0 14px; }
.lede { font-size: 1.1rem; color: var(--text-dim); max-width: 74ch; }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); font-size: 0.88rem; }
.small { font-size: 0.88rem; }

/* ── Cards, grids ───────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card.tight { padding: 14px 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.tile {
  display: block;
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.tile:hover {
  text-decoration: none;
  border-color: var(--blue-600);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -14px var(--blue-glow);
}
.tile-title { font-weight: 650; margin-bottom: 4px; }
.tile-sub { color: var(--text-dim); font-size: 0.9rem; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { display: flex; gap: 28px; align-items: center; padding: 22px 0 10px; flex-wrap: wrap; }
.hero-mark { width: 148px; height: 148px; flex: none; filter: drop-shadow(0 10px 28px rgba(30, 155, 255, 0.28)); }
.hero-body { flex: 1 1 380px; }
.hero h1 { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Status chips ───────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.chip.pass { color: var(--pass); }
.chip.warn { color: var(--warn); }
.chip.fail { color: var(--fail); }
.chip.info, .chip.skip { color: var(--info); }
.chip.confirmed { color: var(--pass); }
.chip.likely { color: var(--blue-400); }
.chip.possible { color: var(--warn); }
.chip.none { color: var(--text-faint); }
.chip.draft { color: var(--warn); }
.chip.in_review { color: var(--blue-400); }
.chip.approved { color: var(--pass); }
.chip.rejected, .chip.retired { color: var(--text-faint); }
.chip.critical, .chip.high { color: var(--fail); }
.chip.medium { color: var(--warn); }
.chip.low { color: var(--info); }

/* ── Callouts ───────────────────────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--blue-500);
  background: rgba(30, 155, 255, 0.07);
  padding: 13px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 16px;
}
.callout.warn { border-left-color: var(--warn); background: rgba(255, 180, 41, 0.08); }
.callout.danger { border-left-color: var(--fail); background: rgba(255, 95, 109, 0.08); }
.callout.good { border-left-color: var(--pass); background: rgba(63, 208, 138, 0.08); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: #fff; }

.promise {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--pass);
  color: var(--pass);
  background: rgba(63, 208, 138, 0.07);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-weight: 620;
  margin-bottom: 16px;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; margin: 14px 0 5px; font-size: 0.93rem; }
label .hint { display: block; font-weight: 400; color: var(--text-faint); font-size: 0.85rem; margin-top: 2px; }
input[type=text], input[type=password], input[type=email], input[type=search], input[type=number], select, textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 120px; font-family: var(--mono); font-size: 0.86rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-600); outline-offset: 1px; border-color: var(--blue-600); }
input[type=checkbox], input[type=radio] { width: auto; margin-right: 8px; accent-color: var(--blue-500); }
.check-row { display: flex; align-items: flex-start; gap: 4px; margin: 10px 0; }
.check-row label { margin: 0; font-weight: 500; }

.btn {
  display: inline-block;
  padding: 10px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--navy-600);
  color: var(--text);
  font: inherit;
  font-weight: 620;
  cursor: pointer;
}
.btn:hover { background: var(--navy-500); text-decoration: none; }
.btn.primary { background: var(--blue-600); border-color: var(--blue-500); color: #fff; }
.btn.primary:hover { background: var(--blue-500); }
.btn.danger { border-color: var(--fail); color: var(--fail); background: transparent; }
.btn.danger:hover { background: rgba(255, 95, 109, 0.12); }
.btn.small { padding: 5px 11px; font-size: 0.86rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--text-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.9px; font-weight: 700; }
tbody tr:hover { background: rgba(30, 155, 255, 0.05); }
.table-wrap { overflow-x: auto; }

/* ── Code / preview ─────────────────────────────────────────────────────── */
pre, code, .mono { font-family: var(--mono); }
pre {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow: auto;
  font-size: 0.84rem;
  line-height: 1.55;
  max-height: 520px;
  white-space: pre-wrap;
  word-break: break-word;
}
code:not(pre code) {
  background: var(--navy-900);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.87em;
}
.error-text {
  font-family: var(--mono);
  background: var(--navy-900);
  border-left: 3px solid var(--fail);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.87rem;
  overflow-x: auto;
}

/* ── Lists ──────────────────────────────────────────────────────────────── */
ul.steps { padding-left: 0; list-style: none; counter-reset: step; }
ul.steps li {
  counter-increment: step;
  position: relative;
  padding: 7px 0 7px 38px;
  border-bottom: 1px solid var(--line-soft);
}
ul.steps li:last-child { border-bottom: none; }
ul.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--navy-600);
  border: 1px solid var(--blue-600);
  color: var(--blue-400);
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
ul.plain { padding-left: 20px; }
ul.plain li { margin-bottom: 5px; }

.kv { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 6px 18px; font-size: 0.93rem; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--navy-900);
  padding: 22px 0 30px;
  font-size: 0.86rem;
  color: var(--text-faint);
  flex: none;
}
.site-foot a { color: var(--text-dim); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.foot-disclaimer { max-width: 88ch; line-height: 1.55; }

/* ── Staff ──────────────────────────────────────────────────────────────── */
.staff-bar {
  background: var(--navy-600);
  border-bottom: 1px solid var(--line);
  font-size: 0.87rem;
}
.staff-bar .wrap { display: flex; gap: 14px; align-items: center; padding-block: 8px; flex-wrap: wrap; }
.staff-bar a { color: var(--text-dim); }
.stat { text-align: center; padding: 14px; }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-label { color: var(--text-faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 13px; color: var(--text-dim); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-bottom-color: var(--blue-500); }

.copy-wrap { position: relative; }
.copy-btn { position: absolute; top: 8px; right: 8px; }

@media print {
  .site-head, .site-foot, .staff-bar, .btn, .nav { display: none !important; }
  body { background: #fff; color: #000; }
}
