/* The JustMonitorIt marketing site (crates/webv2/src/site): the brand's loud
   colour bands around mock-ups of the app. Loaded only on the marketing host;
   the app has its own stylesheets (app.css, webv2.css).

   Brand (fixed in both themes)
   pink   #e91e63  blocks; text on it is large/bold only (ink 4.17:1)
   pink-d #c2185b  pink behind white text (5.87:1)
   blue   #03a9f4  blocks; ink text on it (6.9:1), never white
   ink    #1c0f2e  text on brand blocks, outlines and hard shadows in light theme

   Rules
   - Outside a mock-up: thick outlines, hard offset shadows, stickers.
   - Inside a mock-up: the app as it really draws itself. Hairlines, small badges, no stickers.
   - Radius encodes kind: 0 for bands, 14px for cards and frames, 4px for app badges, 999px for chips.
   - Pink and blue bands keep ink outlines and shadows in dark theme. Elsewhere, dark theme
     swaps ink outlines for light ones and ink shadows for pink. */

:root {
  --pink: #e91e63;
  --pink-d: #c2185b;
  --blue: #03a9f4;
  --blue-d: #0277bd;
  --ink: #1c0f2e;
  --paper: #ffffff;
  --go: #00c853;
  --stop: #d32f2f;
  --amber: #ffb300;

  /* theme */
  --bg: #ffffff;
  --text: var(--ink);
  --muted: #574a69;
  --surface: #ffffff;
  --surface-2: #f7f3fa;
  --pink-t: #ffe0ec;
  --blue-t: #e1f5fe;
  --edge: var(--ink);
  --shadow-c: var(--ink);
  --ink-band: #1c0f2e;
  --code-bg: #1c0f2e;

  /* the app's own palette, used inside mock-ups */
  --hair: #e6dfec;
  --hair-strong: #cfc4d9;
  --accent: #0277bd;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2fb;
  --spark: #0288d1;
  --app-up: #1b7f3b;
  --app-down: #c62828;
  --app-amber: #f2a900;
  --amber-ink: #8a4b00;
  --paused: #4a4f57;
  --held: #6b4fa0;
  --up-text: #1b7f3b;
  --down-text: #c62828;

  --line: 3px solid var(--edge);
  --r-card: 14px;
  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --band-pad: clamp(4rem, 9vw, 7.5rem);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #160b24;
  --text: #f5effc;
  --muted: #c7b9d8;
  --surface: #221433;
  --surface-2: #2b1b40;
  --pink-t: #2a0f2b;
  --blue-t: #0b2235;
  --edge: #f5effc;
  --line: 3px solid #f5effc;
  --shadow-c: var(--pink);
  --ink-band: #0e0618;
  --code-bg: #0e0618;

  --hair: #3b2a52;
  --hair-strong: #56446f;
  --accent: #4fc3f7;
  --accent-ink: #0d2230;
  --accent-soft: #1c2f45;
  --spark: #4fc3f7;
  --app-up: #1f7a3a;
  --app-down: #c62828;
  --app-amber: #f2b31a;
  --amber-ink: #f6c453;
  --paused: #5b6470;
  --held: #b79cf0;
  --up-text: #6fcf86;
  --down-text: #ff8a8a;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  font-stretch: 100%; font-variation-settings: "wdth" 100;
  color: var(--text);
  background: var(--bg);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-stretch: 125%; font-variation-settings: "wdth" 125; line-height: .95; letter-spacing: -0.015em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }
p code, .answer code {
  font-size: .88em; padding: .05em .35em; border-radius: 5px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

:focus-visible {
  outline: 4px solid var(--edge);
  outline-offset: 3px;
  border-radius: 4px;
}
.band--ink :focus-visible,
.site-foot :focus-visible,
.hero-strip :focus-visible { outline-color: var(--blue); }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: 8px; z-index: 10;
  font-weight: 700;
}
.skip:focus { top: 1rem; }

.vh {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- type scale ---------- */
.display {
  font-size: clamp(3.4rem, 12vw, 9.5rem);
  font-weight: 900;
  line-height: .86;
  letter-spacing: -0.03em;
}
.h2 {
  font-size: clamp(2.3rem, 5.4vw, 4.5rem);
  font-weight: 900;
}
.h2--sub { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 850;
  font-stretch: 112%; font-variation-settings: "wdth" 112;
  line-height: 1.1;
  letter-spacing: 0;
}
.lead {
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  max-width: 34em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit;
  font-weight: 800;
  font-stretch: 112%; font-variation-settings: "wdth" 112;
  font-size: 1.1rem;
  line-height: 1.1;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border: var(--line);
  border-radius: 12px;
  box-shadow: 5px 5px 0 var(--shadow-c);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow-c); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--shadow-c); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--paper { background: var(--surface); color: var(--text); }
.btn--sm { padding: .6rem 1rem; font-size: 1rem; box-shadow: 4px 4px 0 var(--shadow-c); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- stickers ---------- */
.sticker {
  display: inline-block;
  font-weight: 900;
  font-stretch: 115%; font-variation-settings: "wdth" 115;
  font-size: 1.05rem;
  line-height: 1.1;
  padding: .65rem .95rem;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--edge);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--edge);
}
.sticker--blue { background: var(--blue); }
/* pink stickers stay at 1.2rem+ bold so ink on pink counts as large text */
.sticker--pink { background: var(--pink); font-size: 1.2rem; }

/* ---------- header ---------- */
.site-head {
  background: var(--bg);
  border-bottom: var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 76px;
}
.brand { flex: none; }
.brand img { width: 168px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(.6rem, 1.6vw, 1.4rem); }
.nav a:not(.btn) { font-weight: 700; text-decoration: none; font-size: 1rem; }
.nav a:not(.btn):hover,
.nav a[aria-current="page"] { text-decoration: underline; }
.nav .btn--sm { white-space: nowrap; }

.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px;
  border: var(--line); border-radius: 12px;
  background: var(--blue); color: var(--ink);
  box-shadow: 4px 4px 0 var(--shadow-c);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.theme-toggle:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow-c); }
.theme-toggle:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-c); }
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle { background: var(--ink); color: var(--paper); }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

@media (max-width: 1080px) { .nav .nav-opt { display: none; } }
@media (max-width: 560px) {
  .nav .nav-login, .nav .nav-mid { display: none; }
  .brand img { width: 132px; }
}
@media (max-width: 400px) {
  .brand img { width: 112px; }
  .nav { gap: .55rem; }
  .nav .btn--sm { padding: .55rem .7rem; font-size: .95rem; }
  .theme-toggle { width: 40px; height: 40px; }
}

/* ---------- bands ---------- */
.band {
  padding-block: var(--band-pad);
  border-bottom: var(--line);
  overflow-x: clip;
  background: var(--bg);
}
.band--pink, .band--blue {
  --edge: var(--ink);
  --shadow-c: var(--ink);
  --line: 3px solid var(--ink);
  color: var(--ink);
}
.band--pink { background: var(--pink); }
.band--blue { background: var(--blue); }
.band--pinkt { background: var(--pink-t); }
.band--bluet { background: var(--blue-t); }
.band--ink {
  --edge: #f5effc;
  --shadow-c: var(--pink);
  --line: 3px solid #f5effc;
  background: var(--ink-band);
  color: #f5effc;
}
.band--ink .lead, .band--ink .copy-p { color: #e6dcf2; }
.band-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.split {
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
.split > * { min-width: 0; }
@media (min-width: 980px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split > .copy { position: sticky; top: 2rem; }
}
.copy > * + * { margin-top: 1.4rem; }
.split .h2 { font-size: clamp(2.3rem, 4.4vw, 3.75rem); }
.copy-p { max-width: 34em; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem) 0; }
.hero-top {
  display: grid; gap: 2rem;
  align-items: end;
}
@media (min-width: 980px) {
  .hero-top { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
}
.hero-side { position: relative; }
.hero-sub {
  font-size: clamp(1.3rem, 2.1vw, 1.55rem);
  font-weight: 700;
  line-height: 1.3;
  max-width: 24em;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.hero-free {
  position: absolute; top: -4.2rem; right: 0;
  transform: rotate(6deg);
}
@media (max-width: 979px) {
  .hero-free { position: static; margin-top: 1.75rem; transform: rotate(-3deg); }
}

.ecg { margin-block: clamp(1.5rem, 3vw, 2.25rem) clamp(1.75rem, 3.5vw, 2.75rem); }
.ecg svg { width: 100%; height: clamp(48px, 6vw, 80px); overflow: visible; }
.ecg path { stroke-linecap: round; stroke-linejoin: round; }
.ecg-base { stroke: var(--paper); stroke-width: 4; }
.ecg-run { stroke: var(--paper); stroke-width: 5; display: none; }

.frame--hero { margin-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.hero-sticker {
  position: absolute; top: -1.9rem; right: -1rem;
  transform: rotate(3deg);
  z-index: 2;
}

.hero-strip {
  background: var(--ink-band); color: #f5effc;
  border-top: 3px solid var(--ink);
  padding-block: 1rem;
}
.hero-strip ul {
  list-style: none; margin-block: 0; padding-block: 0;
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; align-items: center;
  font-weight: 700; font-size: 1rem;
}
.hero-strip li { display: flex; align-items: center; gap: .6rem; }
.hero-strip li + li::before {
  content: ""; width: .55rem; height: .55rem; background: var(--pink);
  transform: rotate(45deg); margin-right: .9rem;
}
.hero-strip .beta {
  background: var(--pink-d); color: var(--paper);
  padding: .15rem .55rem; border-radius: 6px; font-stretch: 115%; font-variation-settings: "wdth" 115; font-weight: 900;
}

/* ---------- mock-up frames ---------- */
.frame { position: relative; }
.app {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  border: 4px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: 12px 12px 0 var(--shadow-c);
  overflow: hidden;
  font-size: .9375rem;
  line-height: 1.45;
}
@media (max-width: 600px) {
  .app { box-shadow: 7px 7px 0 var(--shadow-c); border-width: 3px; }
}
.app-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 18px; height: 48px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--hair);
  font-size: .875rem; color: var(--muted);
}
.app-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 650; }
.app-brand img { width: 20px; height: auto; }
.app-bar nav { display: flex; gap: 16px; }
.app-bar nav span[aria-current] { color: var(--text); font-weight: 600; }
.app-bar .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--app-up); display: inline-block; }
.app-body { padding: 22px; }
.app-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.app-title .h { font-size: 1.5rem; font-weight: 750; font-stretch: 100%; font-variation-settings: "wdth" 100; letter-spacing: -.01em; }
.app-title .meta { color: var(--muted); font-size: .85rem; }
.app-title .spacer { margin-left: auto; }
.fake-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px; font-size: .875rem; font-weight: 650;
  background: var(--app-up); color: #fff;
}
.fake-btn.blue { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 720px) {
  .app-bar nav { display: none; }
  .app-body { padding: 16px; }
}

/* Status badges, as the app draws them */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px 2px 5px; border-radius: 4px;
  font-size: .72rem; font-weight: 750; letter-spacing: .02em; line-height: 1.5;
  color: #fff; white-space: nowrap;
}
.badge::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; opacity: .95;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .18);
}
.badge.up { background: var(--app-up); }
.badge.down { background: var(--app-down); }
.badge.degraded { background: var(--app-amber); color: #2a1d00; }
.badge.paused { background: var(--paused); }
.badge.big { font-size: .875rem; padding: 3px 10px 3px 8px; }
.badge.big::before { width: 11px; height: 11px; }

/* Monitor table */
.mon-table { width: 100%; border-collapse: collapse; }
.mon-table th {
  text-align: left; font-size: .8125rem; font-weight: 600; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--hair); white-space: nowrap;
}
.mon-table td { padding: 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.mon-table tr:last-child td { border-bottom: 0; }
.mon-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mon-name { font-weight: 650; color: var(--accent); }
.mon-url { display: block; font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.since { display: block; font-size: .75rem; color: var(--muted); margin-top: 3px; }
.mon-table .kind { white-space: nowrap; }
.locs { display: grid; gap: 3px; }
.loc {
  display: grid; grid-template-columns: 36px 84px 56px; align-items: center; gap: 6px;
  font-size: .75rem;
}
.loc code { font-size: .75rem; font-weight: 500; }
.loc .ms { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.loc .ms.bad { color: var(--down-text); font-weight: 650; }
.loc .ms.slow { color: var(--amber-ink); font-weight: 650; }
.hb-note { font-size: .8125rem; color: var(--muted); }

.spark { width: 84px; height: 20px; overflow: visible; }
.spark polyline { fill: none; stroke: var(--spark); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: var(--spark); opacity: .1; stroke: none; }
.spark .fail { stroke: var(--app-down); stroke-width: 2; }
.spark .end { fill: var(--app-down); }
.spark--deg polyline { stroke: var(--app-amber); }
.spark--deg .area { fill: var(--app-amber); }
.spark--paused polyline { stroke: var(--hair-strong); stroke-dasharray: 2 3; }

@media (max-width: 860px) {
  .mon-table .col-interval, .mon-table .col-uptime, .mon-table .col-kind { display: none; }
}
@media (max-width: 560px) {
  .mon-table thead { display: none; }
  .mon-table, .mon-table tbody, .mon-table tr, .mon-table td { display: block; width: 100%; }
  .mon-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px;
    padding: 14px 0; border-bottom: 1px solid var(--hair);
  }
  .mon-table tr:last-child { border-bottom: 0; }
  .mon-table td { padding: 0; border: 0; min-width: 0; }
  .mon-table .col-status { text-align: right; }
  .mon-table .col-locs { grid-column: 1 / -1; }
  .mon-table .mon-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .loc { grid-template-columns: 36px 1fr 56px; }
  .spark { width: 100%; }
  .mw-rows tr { grid-template-columns: minmax(0, 1fr) auto; }
  .mw-rows td:last-child { grid-column: 1 / -1; }
}

/* ---------- confirmation ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.seg {
  display: inline-flex; gap: 0;
  border: var(--line); border-radius: 12px; overflow: hidden;
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow-c);
}
.seg button {
  border: 0; background: transparent; cursor: pointer;
  padding: .6rem 1rem; min-height: 44px;
  font-weight: 800; font-stretch: 110%; font-variation-settings: "wdth" 110; font-size: 1rem; color: var(--text);
}
.seg button + button { border-left: var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.frame--hero .live, .frame--incident .live { visibility: hidden; }
.stamp {
  position: absolute; top: -1.6rem; right: -.9rem; z-index: 2;
  font-size: 1.2rem; text-align: center; white-space: pre-line;
  background: var(--stop); color: var(--paper);
  transform: rotate(-6deg);
}
.stamp.ok { background: var(--go); color: var(--ink); }
.stamp.is-hidden { visibility: hidden; }
@media (max-width: 600px) {
  .stamp { right: .25rem; font-size: 1.05rem; }
}

.inc-locs { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: .875rem; }
.inc-locs th, .inc-locs td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--hair); }
.inc-locs th { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.inc-locs td:first-child { white-space: nowrap; }
.inc-locs td:first-child code { font-weight: 600; margin-right: 6px; }
.inc-locs .where { color: var(--muted); }
.res { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.res::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--app-up); flex: none; }
.res.fail { color: var(--down-text); font-weight: 650; }
.res.fail::before { background: var(--app-down); }
.res.check { color: var(--accent); font-weight: 650; }
.res.check::before { background: transparent; border: 2px solid var(--accent); border-right-color: transparent; }
.inc-status-note { color: var(--muted); font-size: .85rem; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 61px; top: 8px; bottom: 8px; width: 2px; background: var(--hair);
}
.timeline li {
  display: grid; grid-template-columns: 52px 20px minmax(0, 1fr); gap: 0 10px;
  padding: 7px 0; position: relative;
}
.timeline time { font-family: var(--mono); font-size: .75rem; color: var(--muted); padding-top: 3px; text-align: right; }
.timeline .node {
  width: 14px; height: 14px; border-radius: 50%; margin: 4px 0 0 3px;
  background: var(--surface); border: 3px solid var(--hair-strong); position: relative; z-index: 1;
}
.timeline .t-fail .node { border-color: var(--app-down); }
.timeline .t-check .node { border-color: var(--accent); }
.timeline .t-down .node { border-color: var(--app-down); background: var(--app-down); }
.timeline .t-alert .node { border-color: var(--accent); background: var(--accent); }
.timeline .t-ack .node { border-color: var(--held); background: var(--held); }
.timeline .t-up .node { border-color: var(--app-up); background: var(--app-up); }
.timeline .t-quiet .node { border-color: var(--app-up); }
.timeline strong { display: block; font-weight: 650; }
.timeline span.d { display: block; color: var(--muted); font-size: .875rem; }
.timeline li.is-hidden { visibility: hidden; }

.slack {
  margin-top: 16px; border: 1px solid var(--hair); border-left: 4px solid var(--app-down);
  border-radius: 8px; padding: 12px 14px; background: var(--surface-2); font-size: .875rem;
  overflow-wrap: anywhere;
}
.slack.is-hidden { visibility: hidden; }
.slack[hidden] { display: none; }
.slack.quiet { border-left-color: var(--app-up); }
.slack .who { font-weight: 750; }
.slack .who small { font-weight: 400; color: var(--muted); margin-left: 6px; }

.places { margin-top: clamp(4.5rem, 9vw, 7rem); }
.places .lead { margin-top: 1rem; }
.places-grid {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.city {
  background: var(--surface); color: var(--text);
  border: var(--line); border-radius: var(--r-card);
  box-shadow: 7px 7px 0 var(--shadow-c); padding: 1.25rem 1.4rem 1.4rem;
}
.city-cc { font-size: clamp(3.5rem, 7vw, 5rem); font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; line-height: .9; color: var(--pink-d); }
[data-theme="dark"] .city-cc { color: #ff6f9c; }
.city-name { font-weight: 850; font-stretch: 112%; font-variation-settings: "wdth" 112; font-size: 1.35rem; margin-top: .6rem; }
.city-meta { font-size: .95rem; margin-top: .25rem; }
.city-meta { display: flex; align-items: center; gap: .5rem; }
.city--next { background: transparent; color: var(--ink); border-style: dashed; box-shadow: none; display: grid; align-content: center; }
.city--next .city-name { margin-top: 0; }

/* ---------- monitor kinds ---------- */
.kinds {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair); border-left: 1px solid var(--hair);
}
.kinds > div {
  padding: 18px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; align-content: start;
}
.kinds > div.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.kinds svg { width: 24px; height: 24px; color: var(--accent); grid-row: span 2; margin-top: 2px; }
.kinds h3 { font-size: 1rem; font-stretch: 100%; font-variation-settings: "wdth" 100; letter-spacing: 0; line-height: 1.25; font-weight: 700; }
.kinds p { font-size: .875rem; color: var(--muted); }
@media (max-width: 860px) { .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kinds { grid-template-columns: 1fr; } }

.intervals { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.intervals .label { font-size: .875rem; font-weight: 650; }
.iseg {
  display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--hair); border-radius: 9px;
}
.iseg span {
  padding: 6px 11px; border-radius: 6px; font-size: .85rem; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.iseg span.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }

.frame--kinds { margin-bottom: clamp(3.5rem, 6vw, 4.5rem); }
.kinds-sticker {
  position: absolute; bottom: -1.5rem; right: clamp(.5rem, 3vw, 2.5rem);
  transform: rotate(-3deg);
}

.heartbeat {
  display: grid; gap: 1.5rem; align-items: center;
  background: var(--pink-t);
  border: var(--line); border-radius: var(--r-card);
  box-shadow: 7px 7px 0 var(--shadow-c);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.heartbeat > * { min-width: 0; }
.heartbeat-text { display: grid; gap: .75rem; }
@media (min-width: 860px) { .heartbeat { grid-template-columns: 1fr 1fr; } }

.code {
  margin: 0;
  background: var(--code-bg); color: #f5effc;
  border: var(--line); border-radius: 10px;
  padding: 1rem 1.1rem;
  font-size: .9rem; line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.code .s { color: #ff80ab; }
.code .k { color: #4fc3f7; }
.code .c { color: #c7b8d6; }

/* ---------- alerts ---------- */
.ack {
  background: var(--ink); color: var(--paper);
  border: var(--line); border-radius: var(--r-card);
  box-shadow: 7px 7px 0 var(--pink);
  padding: 1.5rem;
}
.ack h3 { margin-bottom: .6rem; }
[data-theme="dark"] .ack { box-shadow: 7px 7px 0 var(--blue); }

.contacts { list-style: none; margin: 0; padding: 0; }
.contacts li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--hair);
}
.contacts li:last-child { border-bottom: 0; }
.chan {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.chan svg { width: 18px; height: 18px; }
.contacts .name { font-weight: 650; }
.contacts .sub { display: block; font-size: .8125rem; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
.cpill {
  font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--hair-strong); color: var(--muted); white-space: nowrap;
}
.cpill.ok { color: var(--up-text); border-color: color-mix(in srgb, var(--up-text) 45%, transparent); }
.txt-proof {
  margin-top: 16px; padding: 12px 14px; border-radius: 8px;
  background: var(--surface-2); border: 1px dashed var(--hair-strong);
  font-family: var(--mono); font-size: .75rem; overflow-x: auto; white-space: pre;
}
.contacts-sticker {
  position: absolute; top: -1.9rem; right: -1rem;
  transform: rotate(4deg);
}

/* ---------- maintenance ---------- */
.mw-banner {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 20px 16px 14px; border-radius: 10px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--held) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--held) 40%, transparent);
  overflow: hidden;
}
.mw-banner::before {
  /* hazard tape: the one loud thing the app itself draws */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, var(--ink) 10px 20px);
}
.mw-banner .icon { width: 22px; height: 22px; color: var(--held); flex: none; }
.mw-banner .msg { flex: 1 1 240px; min-width: 0; }
.mw-banner .msg strong { display: block; }
.mw-banner .msg > span { display: block; color: var(--muted); font-size: .875rem; }
.mw-banner .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.mw-banner.ended {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.mw-banner.ended::before { background: var(--accent); }
.mw-banner.ended .icon { color: var(--accent); }
.abtn {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
  border-radius: 7px; border: 1px solid var(--hair-strong); background: var(--surface);
  font-weight: 650; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.abtn:hover { border-color: var(--text); }
.abtn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.abtn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--text)); }
.mw-note { font-size: .8125rem; color: var(--muted); }
.mw-note.sent { color: var(--down-text); font-weight: 650; }

/* ---------- developers ---------- */
.dev-points { list-style: none; padding: 0; display: grid; gap: 1.1rem; }
.dev-points li { border-left: 5px solid var(--pink); padding-left: 1rem; }
.dev-points li:nth-child(even) { border-left-color: var(--blue); }
.dev-points h3 { font-size: 1.15rem; font-stretch: 112%; font-variation-settings: "wdth" 112; line-height: 1.2; letter-spacing: 0; font-weight: 850; margin-bottom: .2rem; }
.dev-points p { font-size: 1.02rem; }
.roles { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.tag {
  font-family: var(--mono); font-size: .85rem; font-weight: 700;
  border: 2px solid var(--edge); border-radius: 6px;
  padding: .05rem .45rem;
  background: var(--blue-t);
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hair); padding: 0 12px; background: var(--surface-2); overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; cursor: pointer;
  padding: 13px 12px 11px; font-weight: 650; font-size: .9rem; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--pink); }
.app--code { background: var(--code-bg); }
.code--panel { border: 0; border-radius: 0; padding: 20px 22px; font-size: .84rem; line-height: 1.65; min-height: 26rem; }
@media (max-width: 600px) { .code--panel { min-height: 0; padding: 16px; font-size: .8rem; } }

/* ---------- import ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: .9rem; counter-reset: s; }
.steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; align-items: start;
  background: var(--surface); color: var(--text);
  border: var(--line); border-radius: var(--r-card);
  padding: 1rem 1.1rem;
  box-shadow: 4px 4px 0 var(--shadow-c);
  font-size: 1.05rem;
}
.steps li::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; font-size: 1.2rem;
}
[data-theme="dark"] .steps li::before { background: var(--pink); color: var(--ink); }
.steps strong { display: block; font-stretch: 110%; font-variation-settings: "wdth" 110; font-size: 1.12rem; }

.source-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.source {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--hair-strong);
  font-size: .875rem; font-weight: 600; color: var(--muted);
}
.source.on { border-color: var(--accent); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.review { width: 100%; border-collapse: collapse; font-size: .875rem; }
.review td, .review th { padding: 9px 8px; border-bottom: 1px solid var(--hair); text-align: left; }
.review th { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.review .box {
  width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--accent);
  display: inline-grid; place-items: center; vertical-align: middle;
}
.review .box.on { background: var(--accent); }
.review .box.on::after { content: ""; width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.review .skip-reason { color: var(--muted); font-size: .8125rem; }
.review-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 16px; }
.review-foot p { font-size: .8125rem; color: var(--muted); max-width: 42ch; }
.import-sticker {
  position: absolute; top: -2rem; right: -1rem;
  transform: rotate(-4deg);
}

/* ---------- plans ---------- */
.plans { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.plan {
  border: var(--line); border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 7px 7px 0 var(--shadow-c);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.plan--trial { background: var(--pink-d); color: var(--paper); }
.plan--trial dl div { border-top-color: var(--paper); }
.plan-name { font-size: 1.6rem; font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; line-height: 1; }
.plan-price { font-size: 2.4rem; font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; line-height: 1; }
.plan-price small { display: block; font-size: 1rem; font-weight: 700; font-stretch: 100%; font-variation-settings: "wdth" 100; margin-top: .4rem; line-height: 1.3; }
.plan dl { margin: 0; display: grid; gap: .45rem; }
.plan dl div { display: flex; justify-content: space-between; gap: 1rem; border-top: 2px solid var(--edge); padding-top: .45rem; }
.plan dt { font-weight: 600; }
.plan dd { margin: 0; font-weight: 900; font-stretch: 112%; font-variation-settings: "wdth" 112; text-align: right; }
.plan .btn { margin-top: auto; }
.plans-foot { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.extras { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.extras li { border: 2px solid var(--edge); border-radius: 999px; padding: .25rem .8rem; font-weight: 700; font-size: 1rem; background: var(--surface); }

/* ---------- faq ---------- */
.faq { display: grid; gap: 1rem; max-width: 52rem; }
.faq details {
  border: var(--line); border-radius: var(--r-card);
  background: var(--surface); box-shadow: 4px 4px 0 var(--shadow-c);
}
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 850; font-stretch: 110%; font-variation-settings: "wdth" 110; font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 2.5px solid var(--edge); background: var(--blue); color: var(--ink);
  font-size: 1.5rem; font-weight: 900; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; background: var(--pink); }
.faq details[open] { box-shadow: 7px 7px 0 var(--pink); }
[data-theme="dark"] .faq details[open] { box-shadow: 7px 7px 0 var(--blue); }
.faq .answer { padding: 0 1.25rem 1.25rem; max-width: 40em; }
.faq a { color: var(--blue-d); font-weight: 700; }
[data-theme="dark"] .faq a { color: #4fc3f7; }

/* ---------- final CTA + footer ---------- */
.end .display { font-size: clamp(3rem, 11vw, 8rem); }
.end-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; margin-top: 2rem; }
.end-row p { font-weight: 700; font-size: 1.4rem; max-width: 22em; line-height: 1.3; }

.site-foot { background: var(--ink-band); color: #f5effc; padding-block: 3rem; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.foot-brand img { width: 200px; height: auto; }
.foot-brand p { margin-top: 1rem; color: #e6dcf2; font-size: 1rem; max-width: 30em; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: .6rem 2.5rem; }
.foot-links a { font-weight: 700; }

/* ---------- pricing page ---------- */
.price-hero { padding-block: clamp(3rem, 7vw, 6rem); }
.price-hero .hero-sub { margin-top: 1.75rem; }
.price-hero .sticker { margin-top: 2rem; transform: rotate(-2deg); font-size: 1.15rem; }
.table-wrap {
  border: var(--line); border-radius: var(--r-card);
  box-shadow: 7px 7px 0 var(--shadow-c);
  overflow-x: auto; background: var(--surface);
}
.compare { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 1.05rem; }
.compare th, .compare td { padding: .85rem 1.1rem; text-align: right; border-bottom: 2px solid var(--edge); }
.compare thead th { font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; font-size: 1.15rem; background: var(--blue); color: var(--ink); }
.compare thead th:nth-child(2) { background: var(--pink); }
.compare tbody th { text-align: left; font-weight: 700; }
.compare td { font-weight: 800; font-stretch: 110%; font-variation-settings: "wdth" 110; }
.compare tr:last-child > * { border-bottom: 0; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare tbody tr:nth-child(even) { background: var(--blue-t); }
.compare th[scope="row"], .compare thead th:first-child { position: sticky; left: 0; z-index: 1; }
.compare th[scope="row"] { background: var(--surface); border-right: 2px solid var(--edge); }
.compare tbody tr:nth-child(even) th[scope="row"] { background: var(--blue-t); }
.compare thead th:first-child { border-right: 2px solid var(--edge); }

.every { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.every li {
  display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .7rem; align-items: start;
  font-weight: 600; font-size: 1.05rem;
}
.every li::before {
  content: ""; width: 1rem; height: 1rem; margin-top: .25rem;
  background: var(--pink); border: 2.5px solid var(--edge); border-radius: 4px;
  transform: rotate(8deg);
}
.every li:nth-child(even)::before { background: var(--blue); transform: rotate(-8deg); }

/* ---------- motion (only when allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ecg-base { stroke: var(--ink); opacity: .3; }
  .ecg-run {
    display: inline;
    stroke-dasharray: 90 1200;
    animation: ecg 4.2s linear infinite;
  }
  @keyframes ecg {
    from { stroke-dashoffset: 90; }
    to { stroke-dashoffset: -1110; }
  }

  .res.check::before { animation: spin .8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  .timeline li.is-new { animation: arrive .45s ease-out; }
  @keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  .stamp.is-new { animation: stamp .42s cubic-bezier(.2, .9, .3, 1.3) both; }
  @keyframes stamp {
    from { opacity: 0; transform: rotate(-14deg) scale(1.9); }
    to { opacity: 1; transform: rotate(-6deg) scale(1); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .theme-toggle { transition: none; }
  .btn:hover, .theme-toggle:hover { transform: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 600px) {
  .hero-sticker { font-size: .95rem; padding: .5rem .75rem; }
  .sticker--pink { font-size: 1.2rem; }
  .btn { padding: .9rem 1.2rem; }
  .hero-cta .btn { flex: 1 1 auto; }
}

@media (max-width: 700px) {
  .contacts-sticker, .import-sticker, .hero-sticker { right: .25rem; }
}

/* ---------- additions for the served site ---------- */
/* The icon sprite takes no space. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* site-theme.js adds .js: controls that need JavaScript show only then, and
   what stands in for them only without it (every code sample, labelled). */
html:not(.js) .js-only { display: none !important; }
html.js .no-js-only { display: none !important; }
.code-label {
  margin: 0; padding: 10px 22px 0; color: #c7b9d8;
  font-family: var(--mono); font-size: .8rem; font-weight: 700;
}
.code-label + .code--panel { min-height: 0; padding-top: 8px; }

.band-more { margin-top: 2.5rem; }

.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.feature-card {
  background: var(--surface); color: var(--text);
  border: var(--line); border-radius: var(--r-card);
  box-shadow: 5px 5px 0 var(--shadow-c);
  padding: 1.25rem 1.3rem 1.4rem;
}
.feature-card svg { width: 30px; height: 30px; color: var(--pink-d); margin-bottom: .7rem; }
[data-theme="dark"] .feature-card svg { color: var(--blue); }
.feature-card h3 {
  font-size: 1.3rem; font-weight: 900; line-height: 1.1;
  font-stretch: 115%; font-variation-settings: "wdth" 115; margin-bottom: .45rem;
}
.feature-card p { font-size: 1.02rem; }

.dev-points--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem 2rem; }

.foot-small { margin-top: 2rem; font-size: .9rem; color: #e6dcf2; }
.foot-small a { font-weight: 700; }

.price-hero .sticker a { text-decoration: none; }
.compare caption:not(.vh) { caption-side: top; text-align: left; font-weight: 800; padding-bottom: .6rem; }
.compare--small { min-width: 0; }
