/* jev-oncall site. Dark, cool graphite, one amber signal color.
   Red appears only where it means "page". Archivo everywhere, the same
   family as the dashboard; monospace only for code. */
:root {
  color-scheme: dark;
  --bg: #0F1317;        /* night */
  --shelf: #161B20;     /* raised: code, figures, tables */
  --shelf-2: #1C2228;
  --rule: #252C33;
  --rule-2: #323B44;
  --ink: #EEF1F3;
  --text: #BAC3CB;
  --muted: #8C97A2;
  --signal: #E8A33D;    /* the one accent: thresholds, focus, the review band */
  --signal-wash: rgba(232, 163, 61, .10);
  --page: #E5484D;      /* semantic: paged */
  --page-wash: rgba(229, 72, 77, .10);
  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r-sm: 6px;          /* inputs, code chips, buttons */
  --r-lg: 10px;         /* figures, code blocks, tables */
  /* legacy names the architecture diagrams use */
  --surface: var(--shelf); --surface-2: var(--shelf-2); --bg-2: var(--shelf);
  --border: var(--rule); --border-2: var(--rule-2); --dim: var(--muted);
  --red: var(--page); --amber: var(--signal); --green: #7FC8A9; --blue: #8FB3D9; --violet: #B7A8E0;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
code { font: 500 .88em var(--mono); color: var(--ink); background: var(--shelf-2); padding: .1em .35em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 560px) { .container { padding-inline: 16px; } }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 19, 23, .86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 700 18px/1 var(--sans); font-stretch: 112%; letter-spacing: -.01em; }
/* The mark is the instrument in miniature: a scale with the page bar. */
.mark { width: 22px; height: 14px; flex: none; position: relative; border-bottom: 2px solid var(--ink); }
.mark::before { content: ""; position: absolute; left: 70%; bottom: -2px; width: 2px; height: 14px; background: var(--signal); }
.mark::after { content: ""; position: absolute; left: 30%; bottom: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { text-decoration: none; color: var(--muted); font: 500 15px/1 var(--sans); padding: 0 12px;
  min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r-sm); transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a.gh { color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); margin-left: 6px; }
.nav-links a.gh:hover { box-shadow: inset 0 0 0 1px var(--muted); }
@media (max-width: 760px) { .nav-links a:not(.gh):not(.keep) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px; border-radius: var(--r-sm);
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 0; transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.copy { font: 500 14.5px/1 var(--mono); }
.copy .hint { font: 500 12.5px/1 var(--sans); color: var(--muted); }

/* Sections */
section { padding-block: 96px 104px; border-top: 1px solid var(--rule); }
@media (max-width: 700px) { section { padding-block: 64px 72px; } }
.section-head { display: grid; gap: 14px; max-width: 64ch; margin-bottom: 44px; }
.section-head h2 { font: 700 clamp(30px, 4.2vw, 44px)/1.08 var(--sans); font-stretch: 112%; letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: 18px; }

/* A raised block with an optional title row: code, figures */
.window { background: var(--shelf); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.window-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px;
  padding: 0 16px; border-bottom: 1px solid var(--rule); }
.window-bar i { display: none; }
.window-bar .tab { font: 500 13px/1 var(--mono); color: var(--muted); }

/* Code */
pre.code {
  margin: 0; padding: 20px 22px; overflow-x: auto;
  font: 400 14px/1.75 var(--mono); color: var(--text); background: var(--shelf);
}
pre.code code, pre.code span { background: none; padding: 0; }
.c { color: var(--muted); } .k { color: var(--ink); } .n { color: var(--signal); } .h { color: var(--ink); font-weight: 500; } .s { color: #C9D6A3; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--shelf); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; padding: 14px 18px; vertical-align: top; }
tbody tr + tr td { border-top: 1px solid var(--rule); }
th { font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--rule-2); }
td { color: var(--text); }
td.k { font: 500 14px/1.5 var(--mono); color: var(--ink); white-space: nowrap; }
td.v { font: 500 14px/1.5 var(--mono); color: var(--signal); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding-block: 40px 56px; color: var(--muted); font-size: 15px; }
footer .container { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
footer nav a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
footer nav a:hover { color: var(--ink); }
