@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/fonts/public-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/martian-mono-latin.woff2") format("woff2");
}

:root {
  --navy-950: #04131f;
  --navy-900: #071b2b;
  --navy-850: #0a2234;
  --navy-800: #0d2b41;
  --navy-700: #143a55;
  --paper: #e9edea;
  --paper-raised: #f7f8f4;
  --white: #fffefa;
  --ink: #102532;
  --ink-soft: #334955;
  --muted: #5b6a70;
  --line: #c9cbc2;
  --line-dark: #264356;
  --signal: #ff5b2e;
  --signal-dark: #e84417;
  --cyan: #28d2ce;
  --office: #32b77c;
  --yellow: #f5c84b;
  --violet: #a78bfa;
  --sky: #7fb4ff;
  --success: #16734a;
  --error: #b3261e;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Public Sans", "Segoe UI", sans-serif;
  --mono: "Martian Mono", "Cascadia Mono", monospace;
  --shell: 1360px;
  --gutter: clamp(18px, 4.2vw, 56px);
  --section-y: clamp(68px, 8vw, 120px);
  --focus: 0 0 0 3px var(--navy-900), 0 0 0 6px var(--signal);
  --shadow: 0 22px 60px -34px rgba(4, 19, 31, 0.55);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { min-height: 100%; }
body.site, body.app, body.console { display: flex; flex-direction: column; min-height: 100vh; }
body.site > #main,
body.app > .app-layout,
body.console > .console-layout { flex: 1 0 auto; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

::selection { color: var(--navy-900); background: var(--cyan); }

:focus-visible { outline: none; box-shadow: var(--focus); }

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

p { margin: 0 0 1rem; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

h1 { font-size: clamp(2.8rem, 6.1vw, 5.6rem); }
h2 { font-size: clamp(2.1rem, 4.1vw, 3.75rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); letter-spacing: -0.025em; }
h4 { font-size: 1.05rem; letter-spacing: -0.015em; line-height: 1.2; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

code, pre {
  font-family: var(--mono);
  font-size: 0.78em;
  letter-spacing: -0.02em;
}

code {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
}

pre {
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  color: var(--paper-raised);
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
}

pre code { color: inherit; font-size: 0.76rem; line-height: 1.75; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 1.05rem 0; font-weight: 650; cursor: pointer; }
summary::marker { color: var(--signal-dark); }
details p { padding: 0 0 1rem; color: var(--ink-soft); max-width: 68ch; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; }

.shell { width: min(100% - (var(--gutter) * 2), var(--shell)); margin-inline: auto; }
.narrow-shell { width: min(100% - (var(--gutter) * 2), 780px); margin-inline: auto; }

.section { padding-block: var(--section-y); }
.section--paper { background: var(--paper); }
.section--white { background: var(--white); }
.section--navy { color: var(--paper-raised); background: var(--navy-900); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--signal-dark);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.eyebrow--cyan { color: var(--cyan); }
.eyebrow__line { width: 26px; height: 2px; background: currentColor; }

.mono-label {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}
.section--navy .mono-label, .panel--dark .mono-label, .console-panel--dark .mono-label { color: #9db3c0; }

.fine-print { color: var(--muted); font-size: 0.78rem; line-height: 1.6; }
.label-hint { display: block; margin-top: 3px; color: var(--muted); font-size: 0.72rem; font-weight: 400; line-height: 1.45; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--navy-800);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: var(--signal-dark); }
.text-link--light { color: var(--paper-raised); }
.text-link--light:hover { text-decoration-color: var(--cyan); }

.link-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-button--danger { color: var(--error); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 690;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.button--primary { color: var(--navy-900); background: var(--signal); }
.button--primary:hover { background: #ff744f; }
.button--outline-dark { color: var(--navy-900); border-color: var(--navy-800); background: transparent; }
.button--outline-dark:hover { color: var(--paper-raised); background: var(--navy-900); }
.button--outline-light { color: var(--paper-raised); border-color: #597386; background: transparent; }
.button--outline-light:hover { border-color: var(--cyan); color: var(--cyan); }
.button--light { color: var(--navy-900); background: var(--paper-raised); }
.button--light:hover { background: var(--white); }
.button--ghost { color: inherit; border-color: transparent; background: transparent; }
.button--ghost:hover { border-color: currentColor; }
.button--small { min-height: 38px; padding: 9px 13px; font-size: 0.8rem; }
.button--full { width: 100%; }
.button--danger { color: var(--white); background: var(--error); }
.button[disabled] { cursor: not-allowed; opacity: 0.55; }

.checks { list-style: none; margin: 1.2rem 0; padding: 0; display: grid; gap: 0.7rem; }
.checks li { position: relative; padding-left: 1.55rem; color: var(--ink-soft); }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--signal);
  transform: rotate(45deg);
}
.checks--light li { color: #c3d0d7; }
.checks--light li::before { background: var(--cyan); }

.flash {
  margin: 0 0 1.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky);
  background: var(--white);
  color: var(--ink);
  font-size: 0.88rem;
}
.flash--error { border-left-color: var(--error); background: #fdf3f2; }
.flash--info { border-left-color: var(--sky); }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper-raised);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-chip--ok { color: #0b5c3c; border-color: #9dcbb5; background: #e5f4eb; }
.status-chip--warn { color: #6e4b00; border-color: #e0c47d; background: #fbf2d8; }
.status-chip--bad { color: #8c1d18; border-color: #e4aaa5; background: #fcebea; }
.status-chip--neutral { color: var(--muted); }

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(40, 210, 206, 0.14);
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.live-pill--dark { color: #b8cbd5; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.2rem; }
.tag-list span, .tag {
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.3;
}
.tag { display: inline-block; margin: 2px 4px 2px 0; }

label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 0.78rem; font-weight: 650; }
label.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; line-height: 1.45; }
label.check input { width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background: var(--white);
  font-family: var(--body);
  font-size: 0.9rem;
  line-height: 1.45;
}
textarea { min-height: 110px; resize: vertical; }
input[type="radio"], input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  flex: none;
  accent-color: var(--signal);
}
input::placeholder, textarea::placeholder { color: #879399; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-800); outline: none; box-shadow: 0 0 0 3px rgba(20, 58, 85, 0.12); }
button[type="submit"] { font-family: var(--display); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stack-form { display: grid; gap: 13px; }
.inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form label { flex: 1 1 180px; }

progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--line);
  appearance: none;
}
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--signal); }
progress::-moz-progress-bar { background: var(--signal); }

.meter { height: 9px; background: #d6d9d2; overflow: hidden; }
.meter--large { height: 14px; }
.meter__fill { display: block; height: 100%; background: var(--signal); }
.meter__fill--96 { width: 96%; }

.table-wrap { overflow-x: auto; }
.empty { padding: 1.5rem; border: 1px dashed var(--line); background: var(--paper-raised); }
.empty strong { display: block; margin-bottom: 0.3rem; font-family: var(--display); font-size: 1.15rem; }
.empty p { margin: 0 0 1rem; color: var(--muted); font-size: 0.85rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--signal);
  color: var(--navy-900);
  font-weight: 700;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--navy-900);
  text-decoration: none;
}
.brand--light { color: var(--paper-raised); }
.brand__logo { display: block; width: 138px; max-width: 100%; height: auto; }
.brand__by {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand--light .brand__by { border-left-color: var(--line-dark); color: #9db3c0; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--small { width: 13px; height: 13px; }
.icon--large { width: 20px; height: 20px; }
.icon--inline { display: inline-block; margin-right: 5px; vertical-align: -2px; }

.text-danger { color: var(--error) !important; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .button { width: 100%; }
  .inline-form { align-items: stretch; }
  .inline-form label { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
