/* Brand V1 tokens, generated from brand/StoneReason-Brand-V1/web/brand-tokens.css. Locked: edit neither. */
/* StoneReason Brand Tokens v1.0.0 — brand layer only (colour, type, logo geometry). Product-level semantic tokens build on these. */
:root {
  /* Neutral palette */
  --sr-color-basalt: #0E0F11;
  --sr-color-basalt-900: #15171A;
  --sr-color-graphite: #2A2D33;
  --sr-color-slate: #5E646E;
  --sr-color-ash: #A9AEB6;
  --sr-color-mist: #DCDEE3;
  --sr-color-chalk: #F2F3F5;
  --sr-color-white: #FFFFFF;
  /* Accent — one hue, two tints */
  --sr-color-cobalt: #2A4FE0;
  --sr-color-cobalt-700: #1F3FC4;
  --sr-color-cobalt-300: #6B8AFF;
  --sr-color-cobalt-200: #8FA6FF;

  /* Semantic — light mode (default) */
  --sr-bg-primary: var(--sr-color-white);
  --sr-bg-secondary: var(--sr-color-chalk);
  --sr-surface: var(--sr-color-white);
  --sr-surface-elevated: var(--sr-color-white);
  --sr-text-primary: var(--sr-color-basalt);
  --sr-text-secondary: var(--sr-color-slate);
  --sr-text-inverse: var(--sr-color-chalk);
  --sr-border: var(--sr-color-mist);
  --sr-border-strong: var(--sr-color-graphite);
  --sr-disabled: var(--sr-color-ash);
  --sr-link: var(--sr-color-cobalt);
  --sr-focus: var(--sr-color-cobalt);
  --sr-accent: var(--sr-color-cobalt);
  --sr-accent-hover: var(--sr-color-cobalt-700);
  --sr-accent-on: var(--sr-color-white);
  --sr-logo-ink: var(--sr-color-basalt);
  --sr-seam-lit: var(--sr-color-cobalt);

  /* Typography */
  --sr-font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sr-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sr-weight-regular: 400;
  --sr-weight-medium: 500;
  --sr-weight-semibold: 600;
  --sr-text-display: 56px; --sr-lh-display: 1.05; --sr-ls-display: -0.03em;
  --sr-text-h1: 40px; --sr-lh-h1: 1.1;  --sr-ls-h1: -0.025em;
  --sr-text-h2: 28px; --sr-lh-h2: 1.2;  --sr-ls-h2: -0.02em;
  --sr-text-h3: 20px; --sr-lh-h3: 1.3;  --sr-ls-h3: -0.015em;
  --sr-text-h4: 16px; --sr-lh-h4: 1.4;  --sr-ls-h4: -0.01em;
  --sr-text-body-lg: 18px; --sr-lh-body-lg: 1.55;
  --sr-text-body: 15px; --sr-lh-body: 1.6;
  --sr-text-small: 13px; --sr-lh-small: 1.5;
  --sr-text-caption: 12px; --sr-lh-caption: 1.4; --sr-ls-caption: 0.005em;
  --sr-text-label: 11px; --sr-lh-label: 1.2; --sr-ls-label: 0.08em;
  --sr-text-button: 14px; --sr-lh-button: 1;
  --sr-text-nav: 14px; --sr-lh-nav: 1;
  --sr-text-code: 13px; --sr-lh-code: 1.6;
  --sr-wordmark-tracking: -0.025em;

  /* Shape */
  --sr-radius-sm: 4px;
  --sr-radius-md: 6px;
  --sr-radius-lg: 10px;
  --sr-radius-app-icon: 22.37%;

  /* Logo geometry (relative to symbol height S) */
  --sr-logo-clear-space: 0.5;      /* X = 0.5 × S on every side */
  --sr-logo-symbol-min: 16px;
  --sr-logo-horizontal-min-height: 24px;   /* symbol height in the horizontal lockup */
  --sr-logo-compact-min-height: 20px;
  --sr-logo-stacked-min-width: 96px;
  --sr-seam-ratio: 0.09375;        /* 3 / 32 */
}

[data-theme="dark"], .sr-dark {
  --sr-bg-primary: var(--sr-color-basalt);
  --sr-bg-secondary: var(--sr-color-basalt-900);
  --sr-surface: var(--sr-color-basalt-900);
  --sr-surface-elevated: #1C1F24;
  --sr-text-primary: var(--sr-color-chalk);
  --sr-text-secondary: var(--sr-color-ash);
  --sr-text-inverse: var(--sr-color-basalt);
  --sr-border: var(--sr-color-graphite);
  --sr-border-strong: var(--sr-color-ash);
  --sr-disabled: var(--sr-color-slate);
  --sr-link: var(--sr-color-cobalt-300);
  --sr-focus: var(--sr-color-cobalt-300);
  --sr-accent: var(--sr-color-cobalt-300);
  --sr-accent-hover: var(--sr-color-cobalt-200);
  --sr-accent-on: var(--sr-color-basalt);
  --sr-logo-ink: var(--sr-color-chalk);
  --sr-seam-lit: var(--sr-color-cobalt-300);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sr-bg-primary: var(--sr-color-basalt);
    --sr-bg-secondary: var(--sr-color-basalt-900);
    --sr-surface: var(--sr-color-basalt-900);
    --sr-surface-elevated: #1C1F24;
    --sr-text-primary: var(--sr-color-chalk);
    --sr-text-secondary: var(--sr-color-ash);
    --sr-text-inverse: var(--sr-color-basalt);
    --sr-border: var(--sr-color-graphite);
    --sr-border-strong: var(--sr-color-ash);
    --sr-disabled: var(--sr-color-slate);
    --sr-link: var(--sr-color-cobalt-300);
    --sr-focus: var(--sr-color-cobalt-300);
    --sr-accent: var(--sr-color-cobalt-300);
    --sr-accent-hover: var(--sr-color-cobalt-200);
    --sr-accent-on: var(--sr-color-basalt);
    --sr-logo-ink: var(--sr-color-chalk);
    --sr-seam-lit: var(--sr-color-cobalt-300);
  }
}

/* Inline monochrome logos (logos/monochrome/*-mono.svg) inherit this */
.sr-logo { color: var(--sr-logo-ink); }
:focus-visible { outline: 2px solid var(--sr-focus); outline-offset: 2px; }




/* StoneReason dashboard — the site layer.
 *
 * Brand V1 tokens are prepended at serve time; nothing here restates a colour
 * or a type size. This is layout and the handful of components the dashboard
 * needs, in the same restrained idiom as stonereason.com.
 */

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

body {
  margin: 0;
  /* A dashboard page with three rows in it is shorter than the window, and the
   * footer used to stop wherever the content did, leaving a band of page
   * background beneath it that reads as a broken render. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sr-bg-secondary);
  color: var(--sr-text-primary);
  font-family: var(--sr-font-sans);
  font-size: var(--sr-text-body);
  line-height: var(--sr-lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: var(--sr-weight-medium); text-wrap: balance; }
h1 { font-size: var(--sr-text-h2); line-height: var(--sr-lh-h2); letter-spacing: var(--sr-ls-h2); }
h2 { font-size: var(--sr-text-h3); line-height: var(--sr-lh-h3); font-weight: var(--sr-weight-semibold); }
h3 { font-size: var(--sr-text-h4); font-weight: var(--sr-weight-semibold); }
p { margin: 0; }
a { color: var(--sr-link); text-underline-offset: 2px; }
a:hover { color: var(--sr-accent-hover); }
img { max-width: 100%; }
code, pre { font-family: var(--sr-font-mono); font-size: var(--sr-text-code); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100; padding: 12px 20px;
  background: var(--sr-text-primary); color: var(--sr-bg-primary);
  font-weight: var(--sr-weight-semibold);
}
.skip:focus { left: 0; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }

/* ---------- masthead ---------- */
.masthead { background: var(--sr-bg-primary); border-bottom: 1px solid var(--sr-border); }
.masthead__top {
  display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap;
}
.masthead__who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.masthead__bar { border-top: 1px solid var(--sr-border); }
/* The tabs sit on their own rule, so the active underline lands on a line that
 * belongs to them rather than floating above the page. */
.masthead__bar .nav { gap: 20px; flex-wrap: wrap; }
.masthead__bar .nav a { padding: 11px 0 9px; margin-bottom: -1px; }
/* Kept so the plain header -- the one with no session behind it -- still has
 * the class it names. */
.masthead__inner { display: flex; align-items: center; gap: 20px; min-height: 56px; }
.masthead__logo img { height: 24px; width: auto; display: block; }
.orgname, .orgpick { font-size: var(--sr-text-small); color: var(--sr-text-secondary); }
.orgpick select {
  font: inherit; font-size: var(--sr-text-small); padding: 6px 8px;
  border: 1px solid var(--sr-border-strong); border-radius: var(--sr-radius-sm);
  background: var(--sr-surface); color: var(--sr-text-primary); max-width: 220px;
}
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav--end { margin-left: auto; gap: 14px; }
.btn--sm { min-height: 32px; padding: 6px 14px; font-size: var(--sr-text-small); }
.nav a {
  font-size: var(--sr-text-nav); font-weight: var(--sr-weight-medium);
  color: var(--sr-text-primary); text-decoration: none; padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--sr-accent); }
.nav a[aria-current="page"] { color: var(--sr-accent); border-bottom-color: var(--sr-accent); }
.who { font-size: var(--sr-text-small); color: var(--sr-text-secondary); }
.inline { display: inline; }

/* ---------- page ---------- */
main { padding-block: 40px 72px; flex: 1 0 auto; }
/* 2.4.1: <main> is focusable so the skip link has somewhere to land. This
 * stops the browser drawing a ring round the entire page when it does, and
 * touches no real focus ring. */
main:focus { outline: none; }
.page-head { margin-bottom: 28px; }
.page-head p { color: var(--sr-text-secondary); margin-top: 6px; max-width: 70ch; }
.stack > * + * { margin-top: 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.muted { color: var(--sr-text-secondary); }
.small { font-size: var(--sr-text-small); }
.mono { font-family: var(--sr-font-mono); }

/* ---------- panel ---------- */
.panel {
  background: var(--sr-surface); border: 1px solid var(--sr-border);
  border-radius: var(--sr-radius-md); overflow: hidden;
}
.panel + .panel { margin-top: 20px; }
.panel__head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--sr-border);
  background: var(--sr-bg-secondary); flex-wrap: wrap;
}
.panel__head h2 { font-size: var(--sr-text-h4); }
.panel__body { padding: 20px; }
.panel__body > * + * { margin-top: 16px; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 20px; }
.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)); }

.stat { background: var(--sr-surface); border: 1px solid var(--sr-border); border-radius: var(--sr-radius-md); padding: 18px 20px; }
.stat__n { font-size: 28px; line-height: 1.1; font-weight: var(--sr-weight-medium); font-variant-numeric: tabular-nums; }
.stat__l { margin-top: 4px; font-size: var(--sr-text-small); font-weight: var(--sr-weight-medium); }
.stat__d { margin-top: 4px; font-size: var(--sr-text-caption); color: var(--sr-text-secondary); }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--sr-text-small); }
th, td { text-align: left; padding: 11px 20px; border-bottom: 1px solid var(--sr-border); vertical-align: top; }
thead th {
  font-size: var(--sr-text-label); letter-spacing: var(--sr-ls-label); text-transform: uppercase;
  color: var(--sr-text-secondary); font-weight: var(--sr-weight-semibold); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
.empty { padding: 28px 20px; text-align: center; color: var(--sr-text-secondary); }

/* ---------- forms ---------- */
.field + .field { margin-top: 16px; }
label.lbl { display: block; font-size: var(--sr-text-small); font-weight: var(--sr-weight-semibold); margin-bottom: 6px; }
.hint { display: block; font-size: var(--sr-text-caption); color: var(--sr-text-secondary); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], select {
  width: 100%; min-height: 44px; padding: 11px 12px; font: inherit; font-size: var(--sr-text-body);
  color: var(--sr-text-primary); background: var(--sr-surface);
  border: 1px solid var(--sr-border-strong); border-radius: var(--sr-radius-sm);
}
input:focus-visible, select:focus-visible { border-color: var(--sr-accent); }
fieldset { border: 1px solid var(--sr-border); border-radius: var(--sr-radius-md); padding: 16px; margin: 0; }
legend { font-size: var(--sr-text-small); font-weight: var(--sr-weight-semibold); padding-inline: 6px; }
/* 2.5.8 Target Size (Minimum). The target here is the whole label -- clicking
 * anywhere on it toggles the box -- and it was 199x21 in a grid with a 10px
 * gap, which is 21px tall and 31px apart: short on both counts. The gap and
 * the min-height together give every row its own 24px circle. */
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 10px; }
.check { display: flex; align-items: flex-start; gap: 9px; min-height: 24px; padding-block: 2px; font-size: var(--sr-text-small); }
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--sr-accent); flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 10px 18px; font-size: var(--sr-text-button);
  line-height: var(--sr-lh-button); font-weight: var(--sr-weight-semibold); font-family: inherit;
  border-radius: var(--sr-radius-sm); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; flex: 0 0 auto; white-space: nowrap;
}
.btn--primary { background: var(--sr-accent); color: var(--sr-accent-on); }
.btn--primary:hover { background: var(--sr-accent-hover); color: var(--sr-accent-on); }
.btn--secondary { border-color: var(--sr-border-strong); color: var(--sr-text-primary); background: transparent; }
.btn--secondary:hover { border-color: var(--sr-accent); color: var(--sr-accent); }
.btn--danger { border-color: var(--sr-border-strong); color: var(--sr-text-primary); background: transparent; }
.btn--danger:hover { border-color: #A11; color: #A11; }
.btn--sm { min-height: 32px; padding: 6px 12px; font-size: var(--sr-text-caption); }

/* ---------- notes ---------- */
.note {
  border-left: 2px solid var(--sr-border-strong); padding: 12px 0 12px 16px;
  font-size: var(--sr-text-small); color: var(--sr-text-secondary);
}
.note strong { color: var(--sr-text-primary); }
.note--accent { border-left-color: var(--sr-accent); }
.note--good { border-left-color: var(--sr-accent); }
.note--bad { border-left-color: #A11; }

/* ---------- the one-time secret ---------- */
.reveal { border: 2px solid var(--sr-accent); border-radius: var(--sr-radius-md); background: var(--sr-surface); }
.reveal__head {
  padding: 12px 20px; border-bottom: 1px solid var(--sr-border);
  font-family: var(--sr-font-mono); font-size: var(--sr-text-label);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--sr-text-secondary);
}
.reveal__body { padding: 20px; }
pre {
  margin: 0; padding: 16px; overflow-x: auto; background: var(--sr-bg-secondary);
  border: 1px solid var(--sr-border); border-radius: var(--sr-radius-sm);
  font-size: var(--sr-text-code); line-height: var(--sr-lh-code);
}

/* ---------- auth pages ---------- */
.auth { max-width: 420px; margin: 64px auto; }
.auth .panel__body > * + * { margin-top: 18px; }
.auth h1 { font-size: var(--sr-text-h3); }
.authlinks { font-size: var(--sr-text-small); display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- badges ---------- */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: var(--sr-text-caption); font-weight: var(--sr-weight-semibold);
  border: 1px solid var(--sr-border-strong); color: var(--sr-text-secondary);
  white-space: nowrap;
}
.badge--on { border-color: var(--sr-accent); color: var(--sr-accent); }
.badge--off { text-decoration: line-through; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--sr-border); background: var(--sr-bg-primary);
  padding-block: 24px; font-size: var(--sr-text-caption); color: var(--sr-text-secondary);
}
.foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; }
/* 2.5.8 Target Size (Minimum): these two sit side by side in a row, close
 * enough that the spacing exception does not apply to either. */
.foot a { color: var(--sr-text-secondary);
  display: inline-flex; align-items: center; min-height: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { padding-inline: 16px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .masthead__inner { gap: 12px; padding-block: 10px; }
  .nav { gap: 14px; width: 100%; overflow-x: auto; }
  .nav--end { margin-left: 0; width: 100%; justify-content: space-between; }
  th, td { padding: 10px 14px; }
  .panel__head, .panel__body, .reveal__body { padding-inline: 14px; }
  .auth { margin: 28px auto; }
}

/* ---------- public pages: status, support ----------------------------------
 *
 * The status page and the public support page are rendered by this process but
 * written in the site's vocabulary -- sections, a lede, coloured pills, a dark
 * band -- and none of those classes existed here. So the one page a customer
 * opens when something is going wrong was the only page on the deployment with
 * no styling: plain text where the state pills should be, no rhythm between
 * sections, and the "what this page cannot tell you" band rendered as ordinary
 * paragraphs.
 *
 *     MARKUP_CORRECT != PAGE_STYLED
 *
 * Defined here rather than by linking the site stylesheet, because that file's
 * name carries a content hash this process does not know, and a stale link
 * would be the same defect with an extra failure mode.
 */
.section { padding-block: 40px; }
.section + .section { padding-top: 0; }
.eyebrow {
  font-size: var(--sr-text-caption); letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: var(--sr-weight-semibold); color: var(--sr-text-secondary); margin: 0 0 8px;
}
.lede { font-size: var(--sr-text-lede, 17px); line-height: 1.55; color: var(--sr-text-secondary); }
.lede strong { color: var(--sr-text-primary); }
.prose { max-width: 72ch; }
.stack-tight > * + * { margin-top: 12px; }
.stack-tight p { margin: 0; }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: var(--sr-text-caption); font-weight: var(--sr-weight-semibold);
  letter-spacing: 0.02em; border: 1px solid currentColor;
}
/* Never colour alone: every pill carries its own word, so a reader who cannot
 * tell green from amber reads the same thing everybody else does. */
.pill--ok   { color: #1a7f4b; background: #eaf7f0; }
.pill--warn { color: #8a5a00; background: #fdf4e3; }
.pill--bad  { color: #a61b1b; background: #fdecec; }
.pill--flat { color: var(--sr-text-secondary); background: var(--sr-bg-secondary); }

/* The inverted band the site uses to separate what a page asserts from what it
 * declines to. */
/* `.section + .section { padding-top: 0 }` is (0,2,0) and beat a bare `.band`
 * at (0,1,0), so the band's own padding never applied and its heading sat hard
 * against the top edge. Matched at the same weight instead of reached for with
 * an !important. */
.section + .section.band,
.band {
  background: var(--sr-color-basalt); color: var(--sr-color-chalk);
  --sr-text-primary: var(--sr-color-chalk);
  --sr-text-secondary: var(--sr-color-ash);
  --sr-border: var(--sr-color-graphite);
  margin-top: 40px; padding-block: 48px;
}
.band h2 { color: var(--sr-color-chalk); }
.band a { color: var(--sr-color-cobalt-300); }

.incident { border: 1px solid var(--sr-border); border-radius: var(--sr-radius-md, 8px);
  padding: 20px; background: var(--sr-surface); }
.incident + .incident { margin-top: 16px; }
.incident h3 { margin: 0 0 6px; }
.updates { list-style: none; margin: 16px 0 0; padding: 0; border-left: 2px solid var(--sr-border); }
.updates li { padding: 0 0 14px 16px; }
.updates li:last-child { padding-bottom: 0; }
.updates p { margin: 4px 0 0; }

@media (prefers-color-scheme: dark) {
  .pill--ok   { color: #6fd6a0; background: rgba(26, 127, 75, 0.16); }
  .pill--warn { color: #e8bd6b; background: rgba(138, 90, 0, 0.20); }
  .pill--bad  { color: #f08a8a; background: rgba(166, 27, 27, 0.20); }
}
