/* Voltping design system.
   Deliberately not another cold dashboard: warm paper ground, editorial serif
   headlines, real borders and hard offset shadows rather than soft blur.
   One charged accent - high-voltage yellow - carries the name; it is the only
   colour that is allowed to shout, so it marks the brand and the live signal
   and nothing else. No web fonts are loaded - the type stacks are all
   system-resident.

   Every colour in the sheet comes from a token below, so the dark theme is one
   re-declaration of the same names and nothing else has to know about it. */

:root {
  color-scheme: light dark;

  /* Surfaces */
  --paper:      #f6f2ec;
  --paper-sunk: #ece5db;
  --card:       #fffdf9;
  --card-alt:   #faf6f0;
  --field:      #fff;
  --hover:      var(--paper-sunk);

  /* Ink */
  --ink:       #1a1714;
  --ink-2:     #57504a;
  --ink-3:     #8a827a;
  --ink-hover: #322b25;
  --on-ink:    #fff;

  /* Lines */
  --line:        #e2d9cc;
  --line-strong: #1a1714;
  --nodata:      var(--paper-sunk);

  /* The hard offset slab under cards and buttons. Its own token because on a
     dark ground it has to lift off the page rather than sink into it. */
  --shadow:     #1a1714;
  --focus-ring: rgba(26,23,20,.1);

  /* Signals */
  --up:      #1c7a4d;
  --up-bg:   #e6f2ea;
  --down:    #c23b22;
  --down-bg: #fbe9e5;
  --warn:    #b57d05;
  --warn-bg: #fdf1d8;
  --info:    #2f6fb5;
  --info-bg: #e8f0f9;

  /* The destructive button is a filled surface, not a text colour, so it needs
     a ground dark enough to carry white type on its own. */
  --danger:       #c23b22;
  --danger-hover: #a8321d;
  --danger-edge:  #8e2a17;
  --danger-fg:    #fff;

  /* Charge - the brand accent, and the highlighter. */
  --volt:      #ffd60a;
  --volt-deep: #e0b000;
  --volt-bg:   #fff6cf;
  --mark:      var(--volt);

  --brand-ground: var(--ink);
  --brand-glyph:  var(--volt);

  --report-ground: #fff;

  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a1714' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");

  --radius:    10px;
  --radius-sm: 7px;

  --serif: "Iowan Old Style", "Charter", Charter, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Dark is the same design after dark, not a second one: still a warm ground
   (browned, never blue-grey), still real borders and hard offset slabs. It is
   scoped to `screen` on purpose - a report printed or saved to PDF from a dark
   machine must come out on white paper, and print keeps the light tokens. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --paper:      #15120e;
    --paper-sunk: #0e0c09;
    --card:       #1e1a15;
    --card-alt:   #272219;
    --field:      #171410;
    --hover:      #2f2921;

    --ink:       #f0eae0;
    --ink-2:     #b6ada0;
    --ink-3:     #8a8074;
    --ink-hover: #ffffff;
    --on-ink:    #15120e;

    --line:        #352f28;
    --line-strong: #6b6157;
    --nodata:      #332d26;

    --shadow:     #4a4139;
    --focus-ring: rgba(240,234,224,.14);

    --up:      #4fc98c;
    --up-bg:   #12301f;
    --down:    #ff8163;
    --down-bg: #3a1710;
    --warn:    #e8a92e;
    --warn-bg: #38280a;
    --info:    #74acea;
    --info-bg: #122539;

    --danger:       #a2331c;
    --danger-hover: #bb3d22;
    --danger-edge:  #6d2011;

    --volt-deep: #ffc21a;
    --volt-bg:   #3a2e05;
    /* Solid volt would swallow the light type it sits behind, so the
       highlighter thins to a wash and the ink stays the ink. */
    --mark: rgba(255,214,10,.38);

    /* Inverted, so the mark stays a bright chip instead of a near-black square
       lost against a near-black bar. */
    --brand-ground: var(--volt);
    --brand-glyph:  #15120e;

    --report-ground: var(--card);

    --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f0eae0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  /* On paper the chosen card is filled with volt and read as dark-on-yellow.
     That inverts badly here, so the fill stays dark and the volt moves to the
     edge, where it can be bright without fighting the type inside. */
  .picker input:checked + label {
    background: var(--volt-bg);
    border-color: var(--volt);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-family: var(--sans); letter-spacing: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--down); }

small { font-size: .8125rem; }
code, pre, .mono { font-family: var(--mono); font-size: .875em; }

hr { border: 0; border-top: 1.5px solid var(--line); margin: 2rem 0; }

::selection { background: var(--mark); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- layout ---------- */

.wrap  { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }
.wrap-prose  { width: 100%; max-width: 660px; margin: 0 auto; padding: 0 24px; }

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.stack-sm > * + * { margin-top: .5rem; }

.row { display: flex; align-items: center; gap: .75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.row-wrap { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1 1 auto; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 1.75rem; }
  .wrap, .wrap-narrow, .wrap-prose { padding: 0 18px; }
}

.section { padding: 4.5rem 0; }
.section-sunk { background: var(--paper-sunk); border-block: 1.5px solid var(--line); }

/* ---------- type helpers ---------- */

.lede { font-size: 1.175rem; line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.tiny { font-size: .78rem; }
.bold { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serif { font-family: var(--serif); }

/* Yellow marker highlight, the way you'd underline a printed page. */
.mark {
  background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 94%, transparent 94%);
  padding: 0 .08em;
}

.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .75rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  padding: .7rem 1.1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .06s ease, background .12s ease;
  box-shadow: 2px 2px 0 var(--shadow);
}
.btn:hover { background: var(--card-alt); color: var(--ink); transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow); }

.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-hover); color: var(--on-ink); }

.btn-danger { background: var(--danger); color: var(--danger-fg); border-color: var(--danger-edge); box-shadow: 2px 2px 0 var(--danger-edge); }
.btn-danger:hover { background: var(--danger-hover); color: var(--danger-fg); }

.btn-ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn-ghost:hover { background: var(--hover); transform: none; box-shadow: none; }

.btn-sm { padding: .4rem .7rem; font-size: .85rem; box-shadow: 1.5px 1.5px 0 var(--shadow); }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
/* A toggle that is currently on reads as pressed into the page. */
.btn[aria-pressed="true"] {
  background: var(--paper-sunk); color: var(--ink);
  transform: translate(1.5px, 1.5px); box-shadow: 0 0 0 var(--shadow);
}

.btn-link {
  background: none; border: none; box-shadow: none; padding: 0;
  font: inherit; color: var(--ink); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
.btn-link:hover { color: var(--down); background: none; transform: none; box-shadow: none; }

/* ---------- cards & panels ---------- */

.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-tight { padding: 1rem 1.25rem; }
.card-flush { padding: 0; overflow: hidden; }
.card-ink { border-color: var(--line-strong); box-shadow: 4px 4px 0 var(--shadow); }
.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1.5px solid var(--line);
  background: var(--card-alt);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 1.25rem; }
.card-foot { padding: .9rem 1.25rem; border-top: 1.5px solid var(--line); background: var(--card-alt); }

/* ---------- badges & pills ---------- */

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}
.badge-up      { color: var(--up);    background: var(--up-bg); }
.badge-down    { color: var(--down);  background: var(--down-bg); }
.badge-warn    { color: var(--warn);  background: var(--warn-bg); }
.badge-info    { color: var(--info);  background: var(--info-bg); }
.badge-muted   { color: var(--ink-3); background: var(--paper-sunk); }

.dot { width: .6rem; height: .6rem; border-radius: 50%; flex: none; display: inline-block; }
.dot-up { background: var(--up); }
.dot-down { background: var(--down); }
.dot-degraded { background: var(--warn); }
.dot-unknown, .dot-paused { background: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; padding: .15rem .5rem;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-2);
}
.swatch { width: .7rem; height: .7rem; border-radius: 3px; flex: none; }

/* ---------- forms ---------- */

.field { display: block; margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }
.field > label, .label {
  display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem;
}
.hint { display: block; font-size: .8125rem; color: var(--ink-3); margin-top: .35rem; }
.error-text { display: block; font-size: .8125rem; color: var(--down); font-weight: 600; margin-top: .35rem; }

.input, .select, .textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--down); }
.textarea { min-height: 6rem; resize: vertical; font-family: var(--mono); font-size: .85rem; }
.select {
  appearance: none;
  background-image: var(--caret);
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}
.input-sm { padding: .4rem .55rem; font-size: .85rem; }
/* .input-sm's shorthand padding wipes out the room .select reserves for the caret. */
.select.input-sm { padding-right: 1.85rem; background-position: right .55rem center; }

.check { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; cursor: pointer; }
.check input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ink); flex: none; }
.check span { font-size: .92rem; }
.check .hint { margin-top: .1rem; }

.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row > * { flex: 1 1 12rem; }

/* Progressive disclosure: everything advanced folds away by default. */
details.disclosure {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-alt);
  padding: 0;
  margin-top: 1.25rem;
}
details.disclosure > summary {
  cursor: pointer;
  padding: .8rem 1rem;
  font-weight: 600;
  font-size: .92rem;
  list-style: none;
  display: flex; align-items: center; gap: .5rem;
}
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before {
  content: "+"; font-family: var(--mono); font-weight: 700; color: var(--ink-3);
}
details.disclosure[open] > summary::before { content: "-"; }
details.disclosure[open] > summary { border-bottom: 1.5px solid var(--line); }
.disclosure-body { padding: 1.15rem 1rem; background: var(--card); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* Radio cards for picking a monitor type. */
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.picker input { position: absolute; opacity: 0; pointer-events: none; }
.picker label {
  display: block; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .8rem; background: var(--card);
  font-size: .9rem; font-weight: 600;
}
.picker label .hint { font-weight: 400; margin-top: .15rem; }
.picker input:checked + label { border-color: var(--line-strong); background: var(--mark); box-shadow: 2px 2px 0 var(--shadow); }
/* The dim hint colour is set against the card, not against the charged ground
   the selected card switches to. */
.picker input:checked + label .hint { color: var(--ink-2); }
.picker input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: left; font-size: .74rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
  padding: .7rem 1rem; border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--card-alt); }
.table .right, .table th.right { text-align: right; }
.table-fixed { table-layout: fixed; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- uptime bar (status pages & monitor detail) ---------- */

.uptime-bar { display: flex; gap: 2px; align-items: stretch; height: 34px; }
.uptime-bar .day {
  flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--up);
  transform-origin: bottom;
  transition: transform .16s ease, filter .16s ease;
}
.uptime-bar:hover .day { filter: saturate(.55) opacity(.65); }
.uptime-bar .day:hover { transform: scaleX(1.6); filter: none; }
.uptime-bar .day.partial { background: var(--warn); }
.uptime-bar .day.down    { background: var(--down); }
.uptime-bar .day.nodata  { background: var(--nodata); }
.uptime-legend {
  display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-3); margin-top: .4rem;
}

/* ---------- response-time chart ---------- */

/* The bars are what a browser without JavaScript keeps; chart.js replaces them
   with the live SVG in .rc-plot. Both live inside the same <figure>. */
.chart { display: flex; align-items: flex-end; gap: 2px; height: 90px; padding-top: .5rem; }
.chart .bar { flex: 1 1 0; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--up); opacity: .85; }
.chart .bar.degraded { background: var(--warn); }
.chart .bar.down { background: var(--down); }
.chart .bar:hover { opacity: 1; }

.rc { margin: 0; }
.rc-plot { position: relative; height: 260px; }
/* The overview cards carry the same chart at a glanceable size: the shape and
   the tooltip, without the axes there is no room for. */
.rc-compact .rc-plot { height: 128px; }
.rc-compact .chart { height: 64px; padding-top: 0; }
.rc-svg {
  display: block; width: 100%; height: 100%;
  overflow: visible; touch-action: pan-y;
  transition: opacity .18s ease;
}
.rc-svg:focus { outline: none; }
.rc-svg:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: var(--radius-sm); }
.rc.is-loading .rc-svg { opacity: .45; }

.rc-grid-line { stroke: var(--line); stroke-width: 1; }
.rc-grid-line.is-base { stroke: var(--line-strong); stroke-width: 1.5; opacity: .55; }
.rc-y-label, .rc-x-label {
  font-family: var(--mono); font-size: 10.5px; fill: var(--ink-3);
  letter-spacing: .02em;
}
.rc-threshold { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .7; }
.rc-threshold-label {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; fill: var(--warn);
}

.rc-gaps { pointer-events: none; }
.rc-gap-bg { fill: var(--card-alt); }
.rc-gap-stripe { stroke: var(--line-strong); stroke-width: 1; opacity: .35; }
.rc-gap { opacity: .75; }
.rc-gap-label {
  font-family: var(--sans); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; fill: var(--ink-3);
}

.rc-stop-top    { stop-color: var(--up); stop-opacity: .30; }
.rc-stop-bottom { stop-color: var(--up); stop-opacity: .02; }
.rc-peak { fill: var(--up); opacity: .10; }
.rc-line {
  fill: none; stroke: var(--up); stroke-width: 2.25;
  stroke-linecap: round; stroke-linejoin: round;
  paint-order: stroke;
}
.rc.is-pulsing .rc-line { animation: rc-pulse .9s ease-out; }
@keyframes rc-pulse {
  0%   { stroke-width: 2.25; }
  35%  { stroke-width: 3.4; }
  100% { stroke-width: 2.25; }
}

/* Opacity only: an SVG transform would scale about the user-space origin and
   fling the marker across the plot. */
.rc-fail { fill: var(--down); stroke: var(--card); stroke-width: 1.5; animation: rc-pop .3s ease both; }
@keyframes rc-pop { from { opacity: 0; } to { opacity: 1; } }

.rc-hit { fill: transparent; }
.rc-cursor { opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.rc-marks, .rc-series, .rc-grid { pointer-events: none; }
.rc-cursor.is-on { opacity: 1; }
.rc-cursor-line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .45; }
.rc-cursor-halo { fill: var(--up); opacity: .18; }
.rc-cursor-dot { fill: var(--up); stroke: var(--card); stroke-width: 2; }
.rc-cursor.is-bad .rc-cursor-halo { fill: var(--down); }
.rc-cursor.is-bad .rc-cursor-dot  { fill: var(--down); }
/* Nothing was measured, so there is no point on the curve to mark - the
   crosshair alone says where you are. */
.rc-cursor.is-blank .rc-cursor-halo,
.rc-cursor.is-blank .rc-cursor-dot { display: none; }

.rc-tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 9.5rem; padding: .55rem .7rem;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 var(--shadow);
  font-size: .8125rem; line-height: 1.35;
}
.rc-tip-when {
  font-weight: 700; font-size: .75rem; letter-spacing: .02em;
  padding-bottom: .35rem; margin-bottom: .35rem; border-bottom: 1px solid var(--line);
}
.rc-tip-row { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.rc-tip-row strong { margin-left: auto; font-family: var(--mono); font-size: .8125rem; }
.rc-key { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.rc-key-avg  { background: var(--up); }
.rc-key-peak { background: var(--up); opacity: .3; }
.rc-tip-meta { margin-top: .3rem; font-size: .7rem; color: var(--ink-3); white-space: nowrap; }

.rc-note {
  position: absolute; inset: 0; display: flex; pointer-events: none;
  align-items: center; justify-content: center; text-align: center;
  padding: 1rem; color: var(--ink-3); font-size: .9rem;
}
/* display:flex above would otherwise beat the user agent's [hidden] rule. */
.rc-note[hidden], .rc-tip[hidden] { display: none; }
.rc-say {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.rc-legend {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: .6rem; font-size: .75rem; color: var(--ink-3);
}
.rc-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.rc-legend .rc-key-fail { background: var(--down); border-radius: 50%; }
.rc-legend .rc-key-gap {
  background: var(--card-alt);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
.rc-legend .rc-key-degraded {
  width: 14px; height: 0; border-radius: 0;
  border-top: 1.5px dashed var(--warn);
}
.rc-hint { margin-left: auto; }

/* Segmented range switch. Same hard border and offset shadow as the buttons,
   but sharing one outline so it reads as a single control. */
.seg { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; box-shadow: 2px 2px 0 var(--shadow); }
.seg-btn {
  font: inherit; font-size: .82rem; font-weight: 600; line-height: 1.2;
  padding: .38rem .7rem; border: 0; border-left: 1.5px solid var(--line-strong);
  background: var(--card); color: var(--ink-2); cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.seg-btn:first-child { border-left: 0; }
.seg-btn:hover { background: var(--card-alt); color: var(--ink); }
.seg-btn.is-active { background: var(--ink); color: var(--on-ink); }

@media (max-width: 640px) {
  .rc-plot { height: 210px; }
  .rc-compact .rc-plot { height: 118px; }
  .rc-legend .rc-hint { display: none; }
  .rc-tip { min-width: 0; font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-svg, .rc-cursor { transition: none; }
  .rc.is-pulsing .rc-line, .rc-fail { animation: none; }
  .stat-link { transition: none; }
}

/* ---------- stats ---------- */

.stat { }
.stat .stat-label {
  font-size: .74rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3);
}
.stat .stat-value { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1.1; margin-top: .2rem; }
.stat .stat-note { font-size: .8125rem; color: var(--ink-2); margin-top: .15rem; }
.stat-value.is-down { color: var(--down); }
.stat-value.is-up   { color: var(--up); }

/* A whole stat card that is a link. An anchor would underline every line inside
   it and turn them all red on hover, so the card takes the hover instead: the
   ground shifts and the border firms up, the way the buttons do. */
.stat-link { display: block; text-decoration: none; color: var(--ink); transition: background .12s ease, border-color .12s ease; }
.stat-link:hover { background: var(--card-alt); border-color: var(--line-strong); color: var(--ink); }
.stat-link:hover .stat-label,
.stat-link:hover .stat-value,
.stat-link:hover .stat-note { text-decoration: none; }
.stat-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- flash messages ---------- */

.flashes { position: sticky; top: 0; z-index: 40; }
.flash {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .8rem 1rem; font-size: .92rem; font-weight: 500;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--card); margin-bottom: .75rem;
  box-shadow: 3px 3px 0 var(--shadow);
}
.flash-success { background: var(--up-bg); }
.flash-error   { background: var(--down-bg); }
.flash-info    { background: var(--info-bg); }

/* ---------- app chrome ---------- */

.topbar {
  background: var(--card);
  border-bottom: 1.5px solid var(--line-strong);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; height: 62px; }

.brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem;
  text-decoration: none; color: var(--ink); letter-spacing: -.02em;
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 1.5rem; height: 1.5rem; border-radius: 6px;
  background: var(--brand-ground); color: var(--brand-glyph);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.brand-mark svg { width: .95rem; height: .95rem; display: block; fill: currentColor; }

.nav { display: flex; gap: .25rem; align-items: center; }
.nav a {
  padding: .4rem .7rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .93rem;
}
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--on-ink); }

.page-head { padding: 2rem 0 1.25rem; }
.page-head h1 { margin-bottom: .25rem; }
main { padding-bottom: 4rem; }

/* Menus (workspace switcher, account) built from <details>, no JS needed. */
.menu { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .6rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9rem; color: var(--ink-2);
  border: 1.5px solid transparent;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--hover); color: var(--ink); }
.menu[open] > summary { background: var(--hover); border-color: var(--line); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + .4rem);
  min-width: 230px; z-index: 50;
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: .4rem;
}
.menu-panel a, .menu-panel button {
  display: block; width: 100%; text-align: left;
  padding: .45rem .6rem; border-radius: 5px;
  font-size: .9rem; font-weight: 500; color: var(--ink);
  text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--hover); }
.menu-sep { height: 1.5px; background: var(--line); margin: .35rem 0; }
.menu-label { padding: .35rem .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- empty states ---------- */

.empty { text-align: center; padding: 3.5rem 1.5rem; }
.empty h3 { font-size: 1.35rem; }
.empty p { color: var(--ink-2); max-width: 42ch; margin-inline: auto; }

/* ---------- marketing ---------- */

.hero { padding: 4.5rem 0 4rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); letter-spacing: -.03em; max-width: 16ch; }
.hero .lede { max-width: 52ch; font-size: 1.25rem; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 3.5rem; align-items: center; }
.hero-grid h1 { font-size: clamp(2.3rem, 4.4vw, 3.35rem); max-width: 15ch; }
.hero-grid .lede { max-width: 46ch; font-size: 1.175rem; }
/* The illustration is an <img>, which cannot see the page's custom properties,
   so it ships as two files and <picture> picks the one for the system theme. */
.hero-frame { display: block; min-width: 0; }
.hero-art { display: block; width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero-grid h1, .hero-grid .lede { max-width: none; }
  .hero-art { max-width: 540px; margin-inline: auto; }
}

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 262px)); justify-content: center; gap: 1.25rem; align-items: start; }
@media (max-width: 620px)  { .pricing-grid { grid-template-columns: minmax(0,1fr); } }

.plan { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; height: 100%; }
.plan.featured { border-color: var(--line-strong); box-shadow: 5px 5px 0 var(--shadow); }
.plan .price { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; line-height: 1; }
.plan .price span { font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--ink-3); }
.plan ul { list-style: none; padding: 0; margin: 1.25rem 0; }
.plan li { padding-left: 1.5rem; position: relative; margin-bottom: .5rem; font-size: .92rem; }
.plan li::before { content: "\2713"; position: absolute; left: 0; color: var(--up); font-weight: 700; }
.plan .plan-cta { margin-top: auto; padding-top: 1rem; }

.faq dt { font-weight: 700; margin-top: 1.5rem; }
.faq dd { margin: .4rem 0 0; color: var(--ink-2); }

.footer { border-top: 1.5px solid var(--line); padding: 3rem 0; font-size: .9rem; color: var(--ink-2); }
.footer a { color: var(--ink-2); }
.footer-cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.footer h4 { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .6rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .35rem; }

/* ---------- auth pages ---------- */

.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; }
.auth-card { width: 100%; max-width: 26rem; }
.auth-card .card { box-shadow: 5px 5px 0 var(--shadow); border-color: var(--line-strong); }

/* ---------- status page ---------- */

.status-head { padding: 3rem 0 2rem; text-align: center; }
.status-banner {
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; text-align: center; font-family: var(--serif);
  font-size: 1.45rem; font-weight: 700;
  box-shadow: 4px 4px 0 var(--shadow);
}
.status-banner.ok    { background: var(--up-bg); }
.status-banner.bad   { background: var(--down-bg); }
.status-banner.warn  { background: var(--warn-bg); }
.status-item { padding: 1.15rem 1.25rem; border-bottom: 1.5px solid var(--line); }
.status-item:last-child { border-bottom: 0; }

/* ---------- reports (print-first) ---------- */

.report { background: var(--report-ground); }
.report-page { max-width: 60rem; margin: 0 auto; padding: 2.5rem; }
@media print {
  /* The dark tokens are screen-only, so the sheet is already back on paper
     here; this stops the user agent darkening what it paints itself. */
  :root { color-scheme: light; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .report-page { padding: 0; max-width: none; }
  .card { break-inside: avoid; box-shadow: none; }
  a { text-decoration: none; color: #000; }
}

/* ---------- utilities ---------- */

.mt-0 { margin-top: 0; }  .mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }  .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.hide { display: none; }
@media (max-width: 760px) { .hide-sm { display: none !important; } }

.copyable { display: flex; gap: .5rem; align-items: center; }
.copyable code {
  flex: 1 1 auto; background: var(--paper-sunk); padding: .5rem .65rem;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  overflow-x: auto; white-space: nowrap;
}

.callout {
  border-left: 4px solid var(--ink); background: var(--card-alt);
  padding: 1rem 1.15rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.callout-info { border-left-color: var(--info); background: var(--info-bg); }
