/* ============================================================
   mockbay — portal UI
   A technical console for HTTP mock endpoints. The HTTP method
   vocabulary is the color system; each endpoint renders as a
   "route line". Type: Space Grotesk (display) /
   IBM Plex Sans (UI) / IBM Plex Mono (data).
   ============================================================ */

:root {
  --ink: #101826;
  --ink-soft: #26324a;
  --paper: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --line: #d8deea;
  --line-strong: #c2cad9;
  --muted: #64708a;
  --muted-2: #8791a6;

  --brand: #3a36e0;
  --brand-ink: #2a27b8;
  --brand-tint: #ecebfd;

  --get:  #1f8a5b; --get-tint:  #e2f2eb;
  --post: #2563c9; --post-tint: #e5edfb;
  --put:  #9c6413; --put-tint:  #f5ebda;
  --del:  #c1394a; --del-tint:  #f8e6e8;
  --other:#5a4bd0; --other-tint:#ebe9fa;

  --ok: #1f8a5b; --redir: #2563c9; --client: #9c6413; --server: #c1394a;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,38,.05), 0 8px 24px -14px rgba(16,24,38,.22);
  --shadow-lg: 0 30px 70px -34px rgba(16,24,38,.45);
  --grid-dot: rgba(16,24,38,.055);

  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1060px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--grid-dot) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--brand); color: #fff; }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 14px;
  border-radius: var(--radius-sm); z-index: 100; transition: top .15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---- eyebrow / labels -------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- app chrome (instrument bezel) ------------------------------------- */
.chrome {
  position: sticky; top: 0; z-index: 40;
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid #000;
}
.chrome__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px;
}
.brand { display: flex; align-items: baseline; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand__mark {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  letter-spacing: -0.02em;
}
.brand__mark::before { content: "◆ "; color: var(--brand); font-size: 13px; }
.brand__tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #8ea0c9;
}
.chrome__spacer { flex: 1; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #c3cde3; font-weight: 500; font-size: 14px;
  padding: 6px 11px; border-radius: 7px;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.09); text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.14); }

.whoami {
  font-family: var(--font-mono); font-size: 12px; color: #8ea0c9;
  white-space: nowrap;
}
.whoami b { color: #fff; font-weight: 500; }

/* ---- page shell -------------------------------------------------------- */
.page {
  max-width: var(--maxw); margin: 0 auto;
  padding: 40px 24px 96px;
  animation: rise .4s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pagehead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.pagehead h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.pagehead__lead { color: var(--muted); margin-top: 8px; max-width: 52ch; }
.count-pill {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 3px 11px; background: var(--surface);
}

/* ---- buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  line-height: 1; cursor: pointer;
  padding: 11px 17px; border-radius: var(--radius-sm);
  border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--primary { --btn-bg: var(--brand); --btn-fg: #fff; --btn-bd: var(--brand-ink); }
.btn--primary:hover { --btn-bg: var(--brand-ink); }
.btn--ghost { --btn-bg: transparent; --btn-bd: rgba(255,255,255,.28); --btn-fg: #eaf0ff; }
.btn--ghost:hover { --btn-bg: rgba(255,255,255,.12); }
.btn--danger { --btn-fg: var(--del); --btn-bd: #e6bcc1; }
.btn--danger:hover { --btn-bg: var(--del); --btn-fg: #fff; --btn-bd: var(--del); }
.btn--sm { padding: 7px 12px; font-size: 13px; }

/* button_to renders a form; keep it inline and margin-free */
form.button_to { display: inline; margin: 0; }

/* ---- cards ------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---- method badge (the color vocabulary) ------------------------------- */
.method {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 11.5px;
  letter-spacing: 0.06em;
  padding: 4px 8px; border-radius: 6px; min-width: 54px;
  background: var(--other-tint); color: var(--other);
  border: 1px solid color-mix(in srgb, var(--other) 22%, transparent);
}
.method--get  { background: var(--get-tint);  color: var(--get);  border-color: color-mix(in srgb, var(--get) 22%, transparent); }
.method--post { background: var(--post-tint); color: var(--post); border-color: color-mix(in srgb, var(--post) 22%, transparent); }
.method--put  { background: var(--put-tint);  color: var(--put);  border-color: color-mix(in srgb, var(--put) 24%, transparent); }
.method--del  { background: var(--del-tint);  color: var(--del);  border-color: color-mix(in srgb, var(--del) 22%, transparent); }
.method--lg { font-size: 14px; padding: 7px 13px; min-width: 68px; border-radius: 8px; }

/* ---- route line (signature) -------------------------------------------- */
.route {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink);
  word-break: break-all;
}
.route__slash, .route__path { color: var(--ink-soft); }
.route__salt {
  color: var(--brand-ink); background: var(--brand-tint);
  padding: 1px 5px; border-radius: 5px; font-weight: 500;
}

/* ---- status chip / readout --------------------------------------------- */
.status {
  font-family: var(--font-mono); font-weight: 600; font-size: 12.5px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted);
}
.status--ok     { color: var(--ok);     border-color: color-mix(in srgb, var(--ok) 30%, transparent);     background: var(--get-tint); }
.status--redir  { color: var(--redir);  border-color: color-mix(in srgb, var(--redir) 30%, transparent);  background: var(--post-tint); }
.status--client { color: var(--client); border-color: color-mix(in srgb, var(--client) 34%, transparent); background: var(--put-tint); }
.status--server { color: var(--server); border-color: color-mix(in srgb, var(--server) 30%, transparent); background: var(--del-tint); }

/* encrypted indicator */
.chip-enc {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  color: var(--brand-ink); background: var(--brand-tint);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  padding: 3px 9px; border-radius: 999px;
}

/* active indicator */
.dot { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted-2) 20%, transparent); }
.dot--live { color: var(--get); }
.dot--live::before { background: var(--get); box-shadow: 0 0 0 3px var(--get-tint); }

/* ---- endpoint list (index) --------------------------------------------- */
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.endpoint {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.endpoint:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.endpoint > .method { width: 74px; flex: none; }
.endpoint__main { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; }
.endpoint__main:hover { text-decoration: none; }
.endpoint__text { min-width: 0; }
.endpoint__name { font-weight: 600; font-size: 14px; color: var(--muted); margin-top: 2px; }
.endpoint__meta { display: flex; align-items: center; gap: 14px; }
.endpoint__actions { display: flex; align-items: center; gap: 6px; }
.endpoint__actions a { color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 9px; border-radius: 6px; }
.endpoint__actions a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }

/* ---- empty state ------------------------------------------------------- */
.empty {
  text-align: center; padding: 64px 24px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.empty h2 { font-size: 1.3rem; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 22px; }

/* ---- detail / contract ------------------------------------------------- */
.contract__id {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 22px; border-bottom: 1px solid var(--line);
}
.contract__title { flex-basis: 100%; }
.contract__title h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.urlbar {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.urlbar .route { flex: 1; }
.copy {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted);
  border-radius: 6px; padding: 5px 9px; cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--muted-2); }
.copy[data-copied="1"] { color: var(--get); border-color: var(--get); }

.contract__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
/* min-width:0 lets long code lines scroll inside the panel instead of
   stretching the grid track and overflowing the page. */
.panel { background: var(--surface); padding: 22px; min-width: 0; }
.panel--wide { grid-column: 1 / -1; }

.readout { display: flex; align-items: baseline; gap: 12px; margin-top: 12px; }
.readout__code { font-family: var(--font-mono); font-weight: 600; font-size: 52px; line-height: 1; letter-spacing: -0.02em; color: var(--muted); }
.readout__label { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.readout--ok     .readout__code { color: var(--ok); }
.readout--redir  .readout__code { color: var(--redir); }
.readout--client .readout__code { color: var(--client); }
.readout--server .readout__code { color: var(--server); }

.codeblock {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  background: var(--ink); color: #dce4f5;
  border-radius: var(--radius-sm); padding: 16px;
  margin-top: 12px; overflow-x: auto; white-space: pre; tab-size: 2; max-width: 100%;
}
.codeblock--empty { color: var(--muted-2); background: var(--surface-2); font-style: italic; white-space: normal; }

/* ---- change log timeline ----------------------------------------------- */
.log { margin-top: 40px; }
.log h2 { font-size: 1.15rem; margin-bottom: 16px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--brand);
}
.timeline time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.timeline .who { font-weight: 600; }
.timeline .note { color: var(--ink-soft); }
.timeline--empty { border: 0; padding: 0; color: var(--muted); }

/* ---- forms ------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 20px; padding: 24px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .field__label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}
.field__hint { font-size: 13px; color: var(--muted); }
.field__hint code { font-family: var(--font-mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--ink-soft); }

.input, .form input[type="text"], .form input[type="password"], .form input[type="number"],
.form select, .form textarea {
  width: 100%; font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted-2); }
.form textarea, .mono-field { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; resize: vertical; }
.form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364708a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

.form-row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: start; }
.form-actions { display: flex; align-items: center; gap: 12px; padding-top: 4px; }

/* url preview on the form */
.preview {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.preview .eyebrow { flex-basis: 100%; }

/* switch (active) */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s ease; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,38,.35); transition: transform .16s ease; }
.switch input:checked + .switch__track { background: var(--get); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.switch__text { font-size: 14px; font-weight: 500; }

/* validation errors */
.errors { background: var(--del-tint); border: 1px solid color-mix(in srgb, var(--del) 30%, transparent); border-radius: var(--radius-sm); padding: 14px 16px; }
.errors ul { margin: 0; padding-left: 18px; color: var(--del); }

/* ---- tables (admin) ---------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td .route { font-size: 13px; }
td.num { font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }

/* ---- sortable headers -------------------------------------------------- */
thead th.is-sorted { color: var(--brand); background: var(--brand-tint); }
a.sortlink { color: inherit; text-decoration: none; white-space: nowrap; }
a.sortlink:hover { color: var(--brand); }

/* ---- search toolbar ---------------------------------------------------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar__search {
  flex: 1; max-width: 460px; padding: 9px 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); font-family: var(--font-mono);
}
.toolbar__search:focus { outline: 2.5px solid var(--brand); outline-offset: 1px; }

/* ---- bulk action bar --------------------------------------------------- */
.bulkbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px 14px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2);
}
.bulkbar__count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-right: auto; }
.bulkbar__count span { color: var(--ink); font-weight: 600; }
.bulkbar select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 13px; }
.bulkbar__target[hidden] { display: none; }

/* ---- selectable table -------------------------------------------------- */
.col-check { width: 34px; text-align: center; padding-right: 0 !important; }
.col-check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* ---- dashboard: KPIs --------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px;
}
.kpi__num { font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; line-height: 1; letter-spacing: -0.02em; }
.kpi__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---- dashboard: chart cards -------------------------------------------- */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.chart-head { margin-bottom: 16px; }
.chart-head h2 { font-size: 1rem; font-family: var(--font-display); }
.chart-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.chart-empty { color: var(--muted); font-size: 14px; padding: 14px 0; }

/* part-to-whole bar */
.pw-bar { display: flex; width: 100%; height: 20px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface); }
.pw-seg { display: block; border-radius: 2px; }

/* legend (shared: part-to-whole + donut) */
.legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(16,24,38,.08); }
.legend__label { color: var(--ink-soft); font-weight: 500; }
.legend__val { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* donut */
.chart-flex { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.chart-flex .legend { margin-top: 0; flex: 1; min-width: 150px; }
.donut { flex: none; }
.donut__total { font-family: var(--font-display); font-weight: 600; font-size: 30px; fill: var(--ink); }
.donut__cap { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; fill: var(--muted); }

/* ranked bars */
.ranked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ranked__row { display: grid; grid-template-columns: minmax(120px, 1.1fr) 1.4fr auto; align-items: center; gap: 12px; }
.ranked__label { display: flex; align-items: center; gap: 9px; min-width: 0; color: inherit; }
.ranked__label:hover { text-decoration: none; }
.ranked__name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranked__track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ranked__fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; min-width: 3px; }
.ranked__fill--alt { background: #1baf7a; }
.ranked__val { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .kpis { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .ranked__row { grid-template-columns: minmax(90px, 1fr) 1fr auto; }
}

/* ---- description lists ------------------------------------------------- */
dl.spec { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
dl.spec dt { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
dl.spec dd { margin: 0; }

/* ---- flash ------------------------------------------------------------- */
.flashes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 500;
  border: 1px solid; box-shadow: var(--shadow);
}
.flash::before { font-family: var(--font-mono); font-weight: 600; }
.flash--notice { background: var(--get-tint); border-color: color-mix(in srgb, var(--get) 30%, transparent); color: #145c3d; }
.flash--notice::before { content: "OK"; color: var(--get); }
.flash--alert { background: var(--del-tint); border-color: color-mix(in srgb, var(--del) 30%, transparent); color: #8f2733; }
.flash--alert::before { content: "!"; color: var(--del); }

/* ---- auth (login) ------------------------------------------------------ */
.auth { min-height: 66vh; display: grid; place-items: center; }
.auth__card { width: 100%; max-width: 400px; padding: 32px; }
.auth__card h1 { font-size: 1.7rem; margin: 8px 0 4px; }
.auth__card .form { padding: 24px 0 0; }
.auth__aside { text-align: center; margin-top: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.auth__aside + .auth__aside { margin-top: 8px; }
.auth__aside a { color: var(--brand); }
.auth__aside a:hover { text-decoration: underline; }

/* ---- back link --------------------------------------------------------- */
.back { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.back::before { content: "←"; }

/* ---- utilities --------------------------------------------------------- */
.section-gap > * + * { margin-top: 40px; }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .chrome__inner { flex-wrap: wrap; gap: 12px; padding: 12px 18px; }
  .brand__tag { display: none; }
  .whoami { display: none; }
  .page { padding: 28px 18px 72px; }
  .endpoint { grid-template-columns: 1fr; align-items: stretch; }
  .endpoint__meta { justify-content: space-between; }
  .contract__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 8px; }
  .readout__code { font-size: 40px; }
}

/* ---- reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
