/* deepalive: one stylesheet for the landing page, the portal, the
   platform admin and the public status pages. Light and dark follow the
   OS unless <html data-theme> says otherwise (set by the theme button). */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --bg-2: #eceeeb;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --ink: #0e1a14;
  --ink-2: #33403a;
  --muted: #65716b;
  --line: #e2e6e3;
  --line-2: #cfd6d2;
  --accent: #0a7f56;
  --accent-hover: #086a48;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3ec;
  --ok: #0a7f56;
  --warn: #a8640a;
  --orange: #c4551a;
  --bad: #c43a2e;
  --info: #2c69ae;
  --shadow-sm: 0 1px 2px rgb(14 26 20 / .05);
  --shadow: 0 1px 2px rgb(14 26 20 / .04), 0 4px 16px -4px rgb(14 26 20 / .08);
  --shadow-lg: 0 2px 4px rgb(14 26 20 / .04), 0 24px 48px -16px rgb(14 26 20 / .18);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b100e; --bg-2: #0f1513; --surface: #131a17; --surface-2: #172019;
    --ink: #e6ece9; --ink-2: #bcc7c1; --muted: #8a9690; --line: #222c28; --line-2: #2f3b36;
    --accent: #3cc58e; --accent-hover: #5ad4a2; --accent-ink: #03150d; --accent-soft: #12291f;
    --ok: #3cc58e; --warn: #e4a948; --orange: #ef8a4c; --bad: #f2705f; --info: #6ea8ea;
    --shadow-sm: none; --shadow: 0 1px 0 rgb(255 255 255 / .02) inset, 0 8px 24px -12px rgb(0 0 0 / .6);
    --shadow-lg: 0 24px 64px -24px rgb(0 0 0 / .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b100e; --bg-2: #0f1513; --surface: #131a17; --surface-2: #172019;
  --ink: #e6ece9; --ink-2: #bcc7c1; --muted: #8a9690; --line: #222c28; --line-2: #2f3b36;
  --accent: #3cc58e; --accent-hover: #5ad4a2; --accent-ink: #03150d; --accent-soft: #12291f;
  --ok: #3cc58e; --warn: #e4a948; --orange: #ef8a4c; --bad: #f2705f; --info: #6ea8ea;
  --shadow-sm: none; --shadow: 0 1px 0 rgb(255 255 255 / .02) inset, 0 8px 24px -12px rgb(0 0 0 / .6);
  --shadow-lg: 0 24px 64px -24px rgb(0 0 0 / .8);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); font-feature-settings: "cv11", "ss01"; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 17px; font-weight: 650; margin: 32px 0 12px; }
h3 { font-size: 15px; font-weight: 650; margin: 0 0 6px; }
p { margin: 0 0 12px; }
small { font-size: 13px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.pre { white-space: pre-line; }
.nowrap, td.nowrap { white-space: nowrap; }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.logo { width: 28px; height: 28px; flex: none; }
.logo rect { fill: var(--accent); }
.logo path { fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; line-height: 1.4; cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--muted); background: var(--surface-2); }
.btn.ghost { background: none; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.wide { width: 100%; padding: 12px; font-size: 15px; }
.btn.big { padding: 13px 22px; font-size: 16px; border-radius: 10px; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 14px; padding: 0; }
button.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button.link.danger, .danger { color: var(--bad); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-sm); background: none; border: 1px solid transparent; color: var(--muted); cursor: pointer; padding: 0; }
.iconbtn:hover { background: var(--bg-2); color: var(--ink); }

/* Theme button: shows the icon of the current choice. */
.theme-toggle .t-light, .theme-toggle .t-dark { display: none; }
:root[data-theme="light"] .theme-toggle .t-system, :root[data-theme="dark"] .theme-toggle .t-system { display: none; }
:root[data-theme="light"] .theme-toggle .t-light { display: block; }
:root[data-theme="dark"] .theme-toggle .t-dark { display: block; }

/* Language switch (a form with buttons in the portal, links elsewhere). */
/* Language picker: a globe and the current code, opening a list of every
   language in its own name. Scales to any number of languages. */
.langpick { position: relative; }
.langpick summary { list-style: none; width: auto; gap: 4px; padding: 0 8px; }
.langpick summary::-webkit-details-marker { display: none; }
.langpick summary .code { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.langpick[open] summary { background: var(--bg-2); color: var(--ink); }
.langpick .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 170px; max-height: min(60vh, 420px); overflow-y: auto; margin: 0; padding: 6px; list-style: none; display: flex; flex-direction: column; gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); }
.langpick .menu a, .langpick .menu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.langpick .menu a:hover, .langpick .menu button:hover { background: var(--bg-2); text-decoration: none; }
.langpick .menu .on { font-weight: 600; color: var(--accent); }
.side-foot .langpick .menu { top: auto; bottom: calc(100% + 4px); left: 0; right: auto; }
.langchecks { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ---------- Forms ---------- */
label { display: block; margin: 14px 0; font-weight: 600; font-size: 14px; color: var(--ink); }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
input:not([type=checkbox]):not([type=radio]), select, textarea { display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 14px 0; padding: 4px 14px 8px; }
legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
form.inline { display: inline; margin: 0; }
form.inline select { width: auto; display: inline-block; margin: 0; padding: 4px 8px; font-size: 13px; }
form.alt { margin-top: 18px; }
/* Status page sign-up: only the chosen channel's fields show. Browsers
   without :has() show them all, which still works. */
.sub-kinds { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.sub-kinds legend { width: 100%; }
.sub-kinds label.check { margin: 8px 0; }
form.subscribe:has(input[name=kind]:checked) .sub-field { display: none; }
form.subscribe:has(input[name=kind][value=email]:checked) .sub-field.email,
form.subscribe:has(input[name=kind][value=sms]:checked) .sub-field.sms,
form.subscribe:has(input[name=kind][value=webhook]:checked) .sub-field.webhook { display: block; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.row form { margin: 0; }
.row-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin: 12px 0 24px; }
.row-form label { margin: 0; }
.review-form .row-form { grid-template-columns: 1fr 1fr 1fr; margin: 12px 0; }
.pill.warn { --lvl: var(--warn); }
.update-form { margin-top: 14px; display: grid; grid-template-columns: 1fr 200px auto; gap: 12px; align-items: end; }
.update-form label { margin: 0; }
code.copy, pre.copy { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-family: var(--mono); font-size: 13px; user-select: all; word-break: break-all; }
code.copy { display: inline-block; padding: 6px 10px; }
pre.copy { overflow-x: auto; white-space: pre-wrap; }

/* ---------- Messages ---------- */
.flash, .error, .banner { display: block; padding: 12px 16px; border-radius: 10px; border: 1px solid transparent; margin: 0 0 16px; font-size: 14px; }
.flash { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.error { background: color-mix(in srgb, var(--bad) 9%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 25%, transparent); color: var(--bad); }
.banner { font-weight: 600; }
.banner::before { content: ""; display: inline-block; vertical-align: 1px; margin-right: 10px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.banner.ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.banner.down { background: color-mix(in srgb, var(--bad) 9%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 25%, transparent); color: var(--bad); }
.banner.warn { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 28%, transparent); color: var(--ink); font-weight: 500; }
.banner.warn::before { background: var(--warn); }
.banner a { margin-left: 2px; font-weight: 600; }
.error-text { color: var(--bad); }
table.list small.cause, .cause { display: block; color: var(--bad); font-size: 13px; margin-top: 2px; }
.cause::before { content: "↳ "; }

/* ---------- Cards, tables, pills ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
/* Cards side by side are the same height, and a card that ends in a form
   keeps its button at the bottom, so the buttons in a row line up. */
.cols > .card:has(> form:last-child) { display: flex; flex-direction: column; }
.cols > .card > form:last-child { flex: 1; display: flex; flex-direction: column; }
.cols > .card > form:last-child > * { margin-bottom: 0; }
.cols > .card > form:last-child > :where(:first-child, input[type=hidden]:first-child + *) { margin-top: 0; }
.cols > .card > form:last-child > small { margin-top: 6px; }
.cols > .card > form:last-child > :is(button, .btn):last-child { margin-top: auto; align-self: flex-start; }
.cols > .card > form:last-child > :nth-last-child(2) { margin-bottom: 20px; }
/* The same for a card whose button works without a form (passkeys). */
.cols > .card:has(> .btn) { display: flex; flex-direction: column; }
.cols > .card > .btn { margin-top: auto; align-self: flex-start; }
.cols > .card > label:has(+ .btn) { margin-bottom: 20px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { margin-bottom: 4px; }
.head p { margin: 0; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
table.list th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
table.list tbody th { text-transform: none; letter-spacing: 0; font-size: 13px; width: 30%; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
table.list tr:last-child td, table.list tr:last-child th { border-bottom: 0; }
table.list tbody tr { transition: background .12s; }
table.list tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
table.list small { color: var(--muted); }
table.small td { font-size: 13px; padding: 8px 14px; }
.card table.list { box-shadow: none; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; margin-left: 12px; }
.pill, .level { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6; --lvl: var(--muted); color: var(--lvl); background: color-mix(in srgb, var(--lvl) 12%, transparent); }
.pill::before, .level::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok, .pill.up { --lvl: var(--ok); }
.pill.down { --lvl: var(--bad); }
.pill.pending, .pill.unknown { --lvl: var(--warn); }
.pill.paused { --lvl: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); font-size: 13px; box-shadow: var(--shadow-sm); }
.stats span { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.stats .bad span { color: var(--bad); }
.ticks { list-style: none; padding: 0; margin: 12px 0 16px; }
.ticks li { position: relative; padding-left: 26px; margin: 8px 0; font-size: 14px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 3px; height: 6px; border: solid var(--accent); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.empty { text-align: center; padding: 48px 24px; }
.empty h2 { margin-top: 0; }
details { margin: 18px 0; }
summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.qr img { display: block; margin: 12px auto; background: #fff; padding: 10px; border-radius: 12px; image-rendering: pixelated; max-width: 100%; height: auto; }
.codes { columns: 2; list-style: none; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 16px; user-select: all; }
.codes li { margin: 4px 0; }
small.push { display: block; }
.interval { display: inline-flex; margin: 0 0 16px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.interval a { color: var(--muted); padding: 6px 16px; text-decoration: none; font-size: 14px; font-weight: 600; border-radius: 7px; }
.interval a.on { background: var(--ink); color: var(--bg); }
.plan { display: flex; flex-direction: column; }
.plan h2 { margin: 0 0 4px; }
.plan .price { font-size: 15px; color: var(--muted); margin: 6px 0 2px; }
.plan .price strong { font-size: 34px; letter-spacing: -0.03em; color: var(--ink); }
.plan form, .plan > .btn { margin-top: auto; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }

/* ---------- Status levels ---------- */
.operational { --lvl: var(--ok); } .maintenance { --lvl: var(--info); } .degraded { --lvl: var(--warn); }
.partial_outage { --lvl: var(--orange); } .major_outage, .outage { --lvl: var(--bad); }
.minor { --lvl: var(--warn); } .major { --lvl: var(--orange); } .critical { --lvl: var(--bad); } .past { --lvl: var(--line-2); }
.overall { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--radius); margin: 0 0 20px; background: color-mix(in srgb, var(--lvl) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--lvl) 28%, transparent); color: var(--ink); }
.overall strong { font-size: 19px; display: block; letter-spacing: -0.01em; }
.overall small { display: block; }
.sdot { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--lvl); flex: none; box-shadow: 0 0 0 5px color-mix(in srgb, var(--lvl) 22%, transparent); }
.sdot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--lvl); opacity: 0; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .6; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sdot::after, .pulse::after { animation: none; } }
.intro { color: var(--ink-2); }
ul.components { list-style: none; margin: 0 0 28px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
ul.components li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
ul.components li:last-child { border-bottom: 0; }
ul.components small { display: block; }
article.incident { border: 1px solid var(--line); border-left: 4px solid var(--lvl); background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; box-shadow: var(--shadow-sm); }
article.incident h2, article.incident h3 { margin: 0 0 4px; font-size: 16px; }
article.incident .update { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
article.incident .update p { margin: 2px 0 0; white-space: pre-line; }
article.incident.card { padding: 18px 20px; }
.subscribe { margin: 4px 0 20px; }

/* ---------- Public pages (status, auth) ---------- */
.top { display: flex; align-items: center; gap: 16px; padding: 12px 24px; flex-wrap: wrap; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top .right form { margin: 0; }
body.public .top, body.auth .top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); }
body.public main { max-width: 780px; margin: 0 auto; padding: 36px 16px 48px; }
body.public footer, body.auth footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
body.public footer a { color: var(--muted); font-weight: 600; }
body.public footer a:hover { color: var(--ink); }
/* Sign-in pages: one card in the middle of the screen, both ways. */
body.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.auth main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 48px 16px 24px; display: flex; flex-direction: column; justify-content: center; }
body.auth main > .narrow { width: 100%; }
body.auth main > .narrow.card, body.auth main > .card.narrow { padding: 32px; box-shadow: var(--shadow); }
body.auth main > .auth-card { max-width: 440px; padding: 36px 36px 28px; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { margin: 14px 0 6px; font-size: 24px; }
.auth-head p { margin: 0; font-size: 14.5px; }
.auth-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.auth-icon svg.i { width: 24px; height: 24px; }
.auth-stack { display: flex; flex-direction: column; gap: 12px; }
.auth-stack .error { margin: 0; }
.pk-error strong { display: block; font-weight: 600; }
.pk-error span { display: block; margin-top: 4px; color: var(--ink-2); }
.or { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-more { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-more summary { font-size: 14px; }
.auth-more[open] summary { margin-bottom: 10px; }
.auth-card form .btn.wide { margin-top: 4px; }
.auth-card .ticks { margin: 0 0 20px; }
.auth-foot { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.auth-card .auth-more + .auth-foot { margin-top: 18px; }
.auth-below { text-align: center; margin: 18px 0 0; font-size: 14px; }
@media (max-width: 560px) {
  body.auth main { justify-content: flex-start; padding-top: 24px; }
  body.auth main > .auth-card, body.auth main > .narrow.card { padding: 26px 20px 22px; }
}
/* Legal documents: a list of them beside the text, above it on phones. */
.legal-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 980px; margin: 0 auto; }
.legal-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.legal-nav strong { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.legal-nav a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.legal-nav a:hover { background: var(--surface-2); }
.legal-nav a[aria-current] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
article.legal { padding: 32px 36px; line-height: 1.65; max-width: 760px; }
article.legal h2 { margin-top: 32px; font-size: 19px; }
article.legal h3 { margin-top: 22px; font-size: 16px; }
article.legal li { margin-bottom: 4px; }
article.legal .table-wrap { overflow-x: auto; margin: 12px 0 18px; }
article.legal table.list { margin: 0; }
article.legal table.list td { font-size: 13.5px; }
article.legal .note { border-left: 3px solid var(--line); padding-left: 12px; color: var(--ink-2); }
mark.missing { background: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--ink); padding: 0 4px; border-radius: 4px; }
@media (max-width: 800px) {
  .legal-wrap { grid-template-columns: 1fr; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .legal-nav strong { width: 100%; }
  article.legal { padding: 22px 18px; }
}

/* ---------- Portal shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--bg-2) 251px, var(--line) 251px 252px, var(--bg) 252px); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto; }
.mock-wrap { position: relative; padding-bottom: 64px; }
.side .brand { padding: 4px 8px 12px; }
.side-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 12px 10px 4px; margin: 0; }
.side-label.admin { color: var(--warn); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a, .side-foot a, .side-foot button.link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.side nav a:hover, .side-foot a:hover, .side-foot button.link:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); text-decoration: none; }
.side nav a.on { background: var(--surface-2); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line-2); }
.side nav a.on svg { color: var(--accent); }
.side svg.i { color: var(--muted); }
.switcher { margin: 0 0 4px; position: relative; }
.switcher summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-sm); }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary .avatar { width: 24px; height: 24px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.switcher summary .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: var(--shadow-lg); }
.switcher .menu a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); font-size: 14px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .menu a:hover { background: var(--bg-2); }
.switcher .menu a.on { font-weight: 600; color: var(--accent); }
.switcher .menu a.add { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; margin-top: 4px; padding-top: 9px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side-foot form { margin: 0; }
.side-foot button.link { width: 100%; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.side-foot .who { padding: 8px 10px 4px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .tools { display: flex; align-items: center; gap: 6px; padding: 6px 4px 0 8px; }
.content { min-width: 0; display: flex; flex-direction: column; }
.content main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px 32px 48px; flex: 1; }
.content footer { color: var(--muted); font-size: 12px; padding: 16px 32px 24px; text-align: right; }
.admin-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-radius: 99px; padding: 2px 10px; margin-bottom: 10px; }

@media (max-width: 900px) {
  .shell { display: block; background: none; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { padding: 0; }
  .side-label { display: none; }
  .switcher { order: 2; flex: 1 1 160px; margin: 0; }
  .side nav { order: 4; flex: 1 0 100%; flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
  .side nav a { white-space: nowrap; padding: 6px 10px; }
  .side-foot { order: 3; margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; align-items: center; }
  .side-foot .who, .side-foot .label { display: none; }
  .side-foot .tools { padding: 0; }
  .side-foot .langpick .menu { top: calc(100% + 4px); bottom: auto; left: auto; right: 0; }
  .content main { padding: 22px 16px 40px; }
  .content footer { text-align: center; padding: 16px; }
}
@media (max-width: 700px) {
  table.list thead { display: none; }
  table.list td { display: block; border: 0; padding: 4px 14px; }
  table.list tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.list tr:last-child { border-bottom: 0; }
  td.actions { text-align: left; }
  td.actions form:first-child { margin-left: 0; }
  .update-form, .row-form, .review-form .row-form { grid-template-columns: 1fr; }
  h1 { font-size: 23px; }
  .top { padding: 10px 16px; }
}

/* ---------- Landing page ---------- */
body.site { background: var(--bg); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.site-top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.site-top nav.links { display: flex; gap: 22px; }
.site-top nav.links a { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.site-top nav.links a:hover { color: var(--ink); text-decoration: none; }
.site-top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.site-top .login { color: var(--ink); font-size: 14px; font-weight: 600; padding: 0 6px; }
.hero2 { position: relative; overflow: hidden; padding: 72px 0 80px; }
.hero2::before { content: ""; position: absolute; inset: -40% -10% auto; height: 760px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); pointer-events: none; }
.hero2::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); opacity: .55; pointer-events: none; }
.hero2 .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 99px; padding: 4px 12px 4px 10px; margin-bottom: 20px; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping2 2s ease-out infinite; }
@keyframes ping2 { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
.hero2 h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 750; margin: 0 0 20px; }
.hero2 h1 em { font-style: normal; color: var(--accent); }
.hero2 .lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 540px; margin: 0 0 30px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fine { margin-top: 18px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.fine span { display: inline-flex; align-items: center; gap: 6px; }
.fine svg.i { width: 15px; height: 15px; color: var(--accent); }

/* The product picture in the hero is plain HTML. */
.mock { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; font-size: 13.5px; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.mock-body { padding: 18px 18px 104px; }
.mock-body .banner { margin-bottom: 14px; font-size: 13.5px; padding: 10px 14px; }
.mock-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.mock-row:last-of-type { border-bottom: 0; }
.mock-row strong { font-weight: 600; }
.mock-row small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.mock-row small.cause { color: var(--bad); }
.mock-regions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.mock-regions span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px 3px 8px; }
.mock-regions span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.mock-tag { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.float { position: absolute; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 13px; max-width: 250px; }
.float strong { display: block; font-size: 13.5px; }
.float.alert { left: -36px; bottom: 0; }
.float.alert strong { color: var(--ink); }
.float .when { color: var(--muted); font-size: 12px; }


section.band { padding: 88px 0; }
section.band.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 680px; margin: 0 0 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker, .sec-head .kicker { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; line-height: 1.12; margin: 0 0 14px; font-weight: 720; }
.sec-head p { font-size: 17px; color: var(--ink-2); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 26px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
section.band.alt .step { background: var(--bg); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--ink-2); margin: 0; font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.feature { background: var(--surface); padding: 28px; }
section.band.alt .feature { background: var(--bg); }
.feature .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.feature .ico svg.i { width: 20px; height: 20px; }
.feature h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: 14.5px; margin: 0; }

/* Supplier impact diagram */
.impact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.impact ul.ticks li { font-size: 16px; margin: 12px 0; }
.chain { display: grid; gap: 14px; }
.node { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
section.band.alt .node { background: var(--bg); }
.node .ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--bg-2); color: var(--ink-2); flex: none; }
.node div { flex: 1; min-width: 0; }
.node strong { display: block; font-size: 15px; }
.node small { color: var(--muted); }
.node.bad { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.node.bad .ico { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
.node.hit .ico { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.link-down { display: flex; align-items: center; gap: 10px; padding-left: 34px; color: var(--muted); font-size: 13px; }
.link-down::before { content: ""; width: 2px; height: 24px; background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px); }

/* Pricing */
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 20px; justify-content: center; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.price-card .badge { position: absolute; top: -12px; left: 30px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.price-card h3 { font-size: 20px; margin: 0 0 4px; }
.price-card .for { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.price-card .amount { font-size: 48px; font-weight: 750; letter-spacing: -0.04em; line-height: 1; }
.price-card .per { color: var(--muted); font-size: 14px; margin: 6px 0 2px; }
.price-card .ticks { margin: 22px 0 26px; flex: 1; }
.price-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 24px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { margin: 0; border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 20px 4px; color: var(--ink); font-size: 16.5px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 20px; margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 680px; }

.final { text-align: center; padding: 64px 32px; border-radius: 24px; background: var(--ink); color: var(--bg); position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: auto -20% -60%; height: 420px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 45%, transparent), transparent); }
.final > * { position: relative; }
.final h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; margin: 0 0 12px; }
.final p { color: color-mix(in srgb, var(--bg) 75%, transparent); font-size: 17px; margin: 0 0 28px; }
.final .btn.secondary { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.final .btn.secondary:hover { border-color: var(--bg); }
.site-foot { padding: 48px 0 56px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

@media (max-width: 980px) {
  .hero2 .wrap, .impact { grid-template-columns: 1fr; gap: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .float.alert { left: 12px; }
  .site-top nav.links { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero2 { padding: 44px 0 64px; }
  .hero2 .lead { font-size: 17px; }
  .features { grid-template-columns: 1fr; }
  .prices { grid-template-columns: 1fr; }
  section.band { padding: 64px 0; }
  .site-top .wrap { gap: 12px; }
  .site-top .login { display: none; }
  .float.alert { position: relative; left: auto; bottom: auto; margin: -20px 12px 0 auto; }
  .mock-body { padding-bottom: 18px; }
  .mock-wrap { padding-bottom: 0; }
  .final { padding: 48px 20px; border-radius: 18px; }
}
.final .cta-row { justify-content: center; }
form > button.btn, form > .btn { margin-top: 6px; }
/* Help text straight in a form is its own line, so a button after it never sits beside it. */
form > small { display: block; color: var(--muted); font-weight: 400; margin: -8px 0 14px; }
.card form + p, .card form + details, .card details + p { margin-top: 18px; }
.page-logo { height: 32px; width: auto; max-width: 160px; object-fit: contain; }

/* API docs */
.docs { max-width: 900px; margin-left: auto; margin-right: auto; }
.docs-toc { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.docs .endpoint { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.docs .endpoint h3 { font-size: 15px; margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.docs .endpoint code { font-family: var(--mono); font-size: 14px; word-break: break-all; }
.docs table.list td code { white-space: nowrap; }
.method { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 5px; color: #fff; background: var(--muted); }
.method.m-get { background: var(--ok); }
.method.m-post { background: #3b6cf6; }
.method.m-put { background: var(--warn); }
.method.m-delete { background: var(--bad); }
/* ---------- Graphs (inline SVG from internal/web/chart.go) ---------- */
.ranges { display: flex; gap: 4px; flex-wrap: wrap; }
.ranges .range { padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-2); background: var(--surface); }
.ranges a.range:hover { text-decoration: none; border-color: var(--line-2); }
.ranges .range.current { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ranges .range.off { color: var(--muted); opacity: .55; cursor: not-allowed; }
.graph-total { font-size: 15px; }
.graph-total strong { font-size: 22px; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart text { fill: var(--muted); font: 11px var(--font); }
svg.chart .ylab { text-anchor: end; }
svg.chart .xlab { text-anchor: middle; }
svg.chart .line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
svg.chart.small .line { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
svg.chart .s0, .legend .s0 { stroke: var(--accent); color: var(--accent); background: var(--accent); }
svg.chart .s1, .legend .s1 { stroke: var(--info); color: var(--info); background: var(--info); }
svg.chart .s2, .legend .s2 { stroke: var(--warn); color: var(--warn); background: var(--warn); }
svg.chart .s3, .legend .s3 { stroke: var(--orange); color: var(--orange); background: var(--orange); }
svg.chart .s4, .legend .s4 { stroke: #8a63d2; color: #8a63d2; background: #8a63d2; }
svg.chart .s5, .legend .s5 { stroke: var(--muted); color: var(--muted); background: var(--muted); }
svg.chart circle.dot { fill: transparent; stroke: none; }
svg.chart circle.dot:hover { fill: currentColor; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
ul.components li { flex-wrap: wrap; }
ul.components li > .uptime, ul.components li > .latency { flex: 1 0 100%; }
.components .latency svg.chart { height: 40px; margin-bottom: 2px; }
.graph .scroll { overflow-x: auto; }
@media (max-width: 700px) {
  table.list.stats thead { display: table-header-group; }
  table.list.stats tr { display: table-row; padding: 0; }
  table.list.stats td, table.list.stats th { display: table-cell; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .graph .scroll svg.chart { min-width: 560px; }
}

/* ---------- Row actions: one visible action and a menu for the rest ---------- */
td.actions { width: 1%; white-space: nowrap; text-align: right; }
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.row-actions .btn svg.i { width: 15px; height: 15px; }
.rowmenu { position: relative; margin: 0; }
.rowmenu summary { list-style: none; }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu[open] summary { background: var(--bg-2); color: var(--ink); }
.rowmenu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; white-space: normal; }
.rowmenu .menu form { margin: 0; }
.rowmenu .menu a, .rowmenu .menu button:not(.btn) { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.rowmenu .menu a:hover, .rowmenu .menu button:not(.btn):hover { background: var(--surface-2); text-decoration: none; }
.rowmenu .menu button.danger { color: var(--bad); }
.rowmenu .menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.rowmenu .menu form.mute { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; }
.rowmenu .menu form.mute span { width: 100%; font-size: 13px; color: var(--muted); }
.rowmenu .menu form.mute select { flex: 1; width: auto; min-width: 0; padding: 5px 8px; font-size: 13px; }
/* The checks table lets its row menus hang outside it. */
table.list.checks { overflow: visible; }
table.list.checks thead th:first-child { border-top-left-radius: var(--radius); }
table.list.checks thead th:last-child { border-top-right-radius: var(--radius); }
table.list.checks td.mono { max-width: 280px; word-break: normal; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  td.actions { width: auto; text-align: left; padding-top: 10px !important; }
  .rowmenu .menu { right: auto; left: 0; }
  table.list.checks td.mono { max-width: none; }
}
.content main .narrow { max-width: 680px; margin-left: 0; margin-right: 0; }
/* Known suppliers: one click tiles. */
ul.catalog { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
ul.catalog form { margin: 0; height: 100%; }
ul.catalog button { display: flex; align-items: center; gap: 10px; width: 100%; height: 100%; padding: 10px 12px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
ul.catalog button:hover { border-color: var(--accent); background: var(--surface-2); }
ul.catalog .plus { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: none; }
ul.catalog strong { display: block; font-size: 14px; }
ul.catalog small { display: block; color: var(--muted); font-size: 12px; }
.import-card label { margin-top: 0; }
input[type=file] { padding: 7px 9px; cursor: pointer; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
@media (max-width: 520px) {
  /* The sign-in card has its own links; keep the header on one line. */
  body.auth .top { flex-wrap: nowrap; padding: 12px 16px; }
  body.auth .top .right { gap: 4px; }
  body.auth .top .right .btn { display: none; }
}
form.key-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
form.key-form label { margin: 0; }
@media (max-width: 900px) { form.key-form { grid-template-columns: 1fr; } }
.docs pre.copy { white-space: pre; word-break: normal; }
/* Admin → Integrations */
.integration .row h2 { margin: 0; }
.integration small.source { display: block; margin: -6px 0 14px; }
.integration form .btn { margin-top: 4px; }
