@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100..125,400..800&family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

/* Instrument palette — shared with the marketing surface (marketing.css).
   Governing rule: COLOUR IS RESERVED FOR SIGNAL. Chrome is ink, hairline and
   graticule; saturated colour appears only where it means a service state.
   This matters more here than on the landing page: indigo and cyan chrome used
   to compete with the green/amber/red that actually carries meaning, which is
   precisely what makes a dashboard hard to read at a glance. */
:root {
  --bg-dark: #07090c;
  --bg-card: #0b0e13;
  --bg-card-hover: #0e1219;
  --border-color: rgba(232, 236, 242, 0.13);
  --border-soft: rgba(232, 236, 242, 0.07);
  --border-focus: rgba(232, 236, 242, 0.55);
  --graticule: rgba(232, 236, 242, 0.04);

  --text-primary: #e8ecf2;
  --text-secondary: #8f98a6;
  --text-muted: #5b6472;

  /* Retained as variables because components reference them, but both now
     resolve to ink: chrome no longer competes with status colour. */
  --accent-primary: #e8ecf2;
  --accent-cyan: #8f98a6;

  --color-operational: #2ec27e;
  --color-operational-bg: rgba(46, 194, 126, 0.11);
  --color-degraded: #e5a13a;
  --color-degraded-bg: rgba(229, 161, 58, 0.11);
  --color-outage: #e5484d;
  --color-outage-bg: rgba(229, 72, 77, 0.11);
  --color-maintenance: #5b8cb0;
  --color-maintenance-bg: rgba(91, 140, 176, 0.11);

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-data: 'Fira Code', ui-monospace, monospace;

  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;

  /* Instruments do not glow. Kept as no-ops so component rules stay valid. */
  --shadow-glow-green: none;
  --shadow-glow-amber: none;
  --shadow-glow-red: none;
  --shadow-card: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  /* Graticule: measurement paper, drawn precisely, replacing the blurred
     indigo/cyan radial washes. */
  background-image:
    linear-gradient(to right, var(--graticule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--graticule) 1px, transparent 1px);
  background-size: 46px 46px;
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-title {
  font-family: var(--font-display);
  font-variation-settings: 'wdth' 108, 'wght' 700;
  letter-spacing: -0.022em;
}

/* Sentence case is kept for content — service names, incident titles, body
   copy. The marketing page is uppercase throughout, which suits a page read
   once but is tiring on a dashboard someone watches all day. Uppercase here is
   reserved for short labels. */
.stat-label,
.mono,
.timeline-labels {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

/* Layout Elements */
.app-header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(7, 9, 12, 0.92);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(232, 236, 242, 0.05);
}

.container {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Flash alerts */
.flash-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.flash-notice {
  background: var(--color-operational-bg);
  border: 1px solid rgba(46, 194, 126, 0.32);
  color: var(--color-operational);
}

.flash-alert {
  background: var(--color-outage-bg);
  border: 1px solid rgba(229, 72, 77, 0.32);
  color: var(--color-outage);
}

/* Hero Banner & Overall Status */
.hero-status-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.status-indicator-huge {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pulse-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-operational {
  background-color: var(--color-operational);
  box-shadow: var(--shadow-glow-green);
}
.pulse-operational::after { background-color: rgba(46, 194, 126, 0.4); }

.pulse-degraded {
  background-color: var(--color-degraded);
  box-shadow: var(--shadow-glow-amber);
}
.pulse-degraded::after { background-color: rgba(229, 161, 58, 0.4); }

.pulse-outage {
  background-color: var(--color-outage);
  box-shadow: var(--shadow-glow-red);
}
.pulse-outage::after { background-color: rgba(229, 72, 77, 0.4); }

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.status-title {
  font-size: 1.65rem;
  font-weight: 700;
}

.status-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.85rem;
  font-family: var(--font-display);
  font-variation-settings: 'wdth' 100, 'wght' 740;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

/* Services Grid & Cards */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.25 ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(232, 236, 242, 0.2);
}

.service-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.service-name:hover {
  color: var(--accent-cyan);
}

.http-method-badge {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
}

.service-countdown,
.service-url {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: 'Fira Code', monospace;
  margin-top: 0.25rem;
}

.service-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-operational { background: var(--color-operational-bg); color: var(--color-operational); border: 1px solid rgba(46, 194, 126, 0.32); }
.badge-degraded { background: var(--color-degraded-bg); color: var(--color-degraded); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-outage { background: var(--color-outage-bg); color: var(--color-outage); border: 1px solid rgba(229, 72, 77, 0.32); }
.badge-maintenance { background: var(--color-maintenance-bg); color: var(--color-maintenance); border: 1px solid rgba(59, 130, 246, 0.3); }

/* Timeline Bar Visualization */
.timeline-container {
  margin-top: 1rem;
}

.timeline-bars {
  display: flex;
  gap: 2px;
  height: 26px;
  align-items: flex-end;
}

/* Square-ish and tight: this is a measurement strip, not a bar chart. Rounded,
   widely-spaced blocks read as decoration and cost horizontal resolution. */
.timeline-bar {
  flex: 1;
  height: 22px;
  border-radius: 1px;
  transition: height 0.15s ease, filter 0.15s ease;
  position: relative;
}

.timeline-bar:hover {
  height: 26px;
  filter: brightness(1.25);
}

.bar-success { background-color: var(--color-operational); }
.bar-degraded { background-color: var(--color-degraded); }
.bar-failed { background-color: var(--color-outage); }
.bar-empty { background-color: rgba(232, 236, 242, 0.05); }

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Incidents Section */
.incident-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.incident-card.severity-major_outage { border-left-color: var(--color-outage); }
.incident-card.severity-partial_outage { border-left-color: var(--color-degraded); }

.incident-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.incident-title {
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-primary);
}

.incident-title:hover { color: var(--accent-primary); }

.incident-timeline {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}

.update-item {
  position: relative;
  padding-bottom: 1.25rem;
}

.update-item::before {
  content: '';
  position: absolute;
  left: -1.35rem;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.update-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.update-body {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Forms & UI Controls */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.form-control, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(232, 236, 242, 0.18);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-control-code {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-dark);
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(232, 236, 242, 0.2);
}

.btn-danger {
  background: var(--color-outage-bg);
  color: var(--color-outage);
  border: 1px solid rgba(229, 72, 77, 0.32);
}

.btn-danger:hover {
  background: rgba(229, 72, 77, 0.32);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

/* Public Status Page Specific */
.status-page-layout {
  max-width: 960px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Countdown to a service's next scheduled health check. tabular-nums keeps the
   digits from jittering as the seconds tick down. */
.service-countdown {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
  min-height: 1rem;
}

/* Suspended monitoring. Amber rather than red: paused is a deliberate operator
   action, not a failure, and must not read as an outage at a glance. */
.paused-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-degraded);
  background: var(--color-degraded-bg);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Dim a paused card so the eye skips it when scanning for live problems. */
.service-card:has(.paused-badge) .service-status-badge {
  opacity: 0.55;
}

/* Settings form helpers */
.form-hint a { color: var(--text-secondary); }

.slug-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(232, 236, 242, 0.03);
}

.slug-field__prefix {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
}

.slug-field .form-control {
  border: none;
  border-radius: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}

/* Checkboxes render in the browser's accent blue by default, which is the one
   colour on a settings page that means nothing. Ink instead. */
input[type="checkbox"] {
  accent-color: var(--text-primary);
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-right: 0.35rem;
}

/* Pager for the check history. Labels read "Newer"/"Older" rather than
   "Previous"/"Next": the list is reverse-chronological, and direction in time
   is what the reader is actually navigating. */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.pager__count,
.pager__position {
  font-family: var(--font-data);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pager__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pager__disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ==========================================================================
   Authentication surfaces: sign-in, two-factor challenge, enrolment.
   ========================================================================== */

.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 2rem 1.25rem; }

.auth { width: 100%; max-width: 30rem; }
.auth__brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--text-primary); margin-bottom: 1.75rem;
}
.auth__mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
}
.auth__word {
  font-family: var(--font-display); font-variation-settings: 'wdth' 110, 'wght' 720;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.02em;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.auth-card--wide { max-width: none; }

.auth-card__eyebrow {
  font-family: var(--font-data); font-size: 0.66rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.9rem;
}
.auth-card__title { font-size: 1.5rem; margin-bottom: 0.6rem; }
.auth-card__lede { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.65; margin-bottom: 1.75rem; }
.auth-card__submit { width: 100%; justify-content: center; margin-top: 1.25rem; }
.auth-card__foot { margin-top: 1.5rem; text-align: center; }
.auth-card__warn {
  font-size: 0.85rem; line-height: 1.6; color: var(--color-degraded);
  background: var(--color-degraded-bg);
  border: 1px solid rgba(229, 161, 58, 0.3);
  border-radius: var(--radius-md); padding: 0.85rem 1rem; margin: 1.25rem 0;
}
.auth-card__aside { margin-top: 1.75rem; border-top: 1px solid var(--border-soft); padding-top: 1.25rem; }
.auth-card__aside summary { cursor: pointer; font-size: 0.88rem; color: var(--text-secondary); }
.auth-card__aside summary:hover { color: var(--text-primary); }
.auth-card__aside p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin: 0.75rem 0; }

.linkish {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 0.85rem; color: var(--text-muted); text-decoration: underline;
}
.linkish:hover { color: var(--text-primary); }

/* ---- six-box one-time code ---- */

.otp { display: flex; gap: 0.5rem; justify-content: space-between; }

.otp__box {
  flex: 1; min-width: 0; aspect-ratio: 3 / 4; max-height: 4rem;
  text-align: center;
  font-family: var(--font-data);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  background: rgba(232, 236, 242, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.otp__box:focus {
  outline: none;
  border-color: var(--text-primary);
  background: rgba(232, 236, 242, 0.07);
}
/* A filled box reads as done without shouting. */
.otp__box:not(:placeholder-shown) { border-color: var(--border-focus); }

.otp[data-complete="true"] .otp__box { border-color: var(--color-operational); }

/* ---- enrolment ---- */

.enrol { list-style: none; display: grid; gap: 2rem; }
.enrol__step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.enrol__num {
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--border-color); border-radius: 50%;
  font-family: var(--font-data); font-size: 0.78rem; color: var(--text-secondary);
}
.enrol__title { font-size: 1rem; margin-bottom: 0.25rem; }
.enrol__hint { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

/* White plate for the QR: scanners expect dark modules on light, and the
   padding preserves the quiet zone the spec requires. */
.enrol__qr {
  width: 190px; padding: 0.75rem; background: #ffffff;
  border-radius: var(--radius-md);
}
.enrol__qr svg { display: block; width: 100%; height: auto; }

.enrol__manual { margin-top: 1rem; }
.enrol__manual summary { cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); }
.enrol__manual p { font-size: 0.82rem; color: var(--text-muted); margin: 0.6rem 0; }
.enrol__secret {
  display: inline-block; font-family: var(--font-data); font-size: 0.95rem;
  letter-spacing: 0.12em; color: var(--text-primary);
  background: rgba(232, 236, 242, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 0.5rem 0.75rem;
  user-select: all;
}

/* ---- recovery codes ---- */

.codes { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.codes__list {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr);
  font-family: var(--font-data); font-size: 0.95rem; letter-spacing: 0.06em;
}
.codes__code {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  user-select: all;
}
.codes__code:nth-child(odd) { border-right: 1px solid var(--border-soft); }
.codes__actions {
  display: flex; gap: 0.6rem; padding: 0.85rem 1rem;
  background: rgba(232, 236, 242, 0.02);
}
.codes__ack {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; color: var(--text-secondary); cursor: pointer;
}

@media (max-width: 560px) {
  .codes__list { grid-template-columns: 1fr; }
  .codes__code:nth-child(odd) { border-right: none; }
  .otp { gap: 0.35rem; }
}

.security-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ---- account dropdown ---- */

.account {
  position: relative;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
}

.account__trigger {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
}

.account__trigger:hover,
.account__trigger[aria-expanded="true"] {
  color: var(--text-primary);
  border-color: var(--border-color);
}

.account__trigger svg { transition: transform 0.15s ease; }
.account__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.account__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 14rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  z-index: 60;
  /* Hidden rather than merely transparent, so its contents stay out of the tab
     order while closed. */
  display: none;
}

.account__menu[data-open="true"] { display: block; }

.account__who {
  padding: 0.6rem 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 0.35rem;
}

.account__email {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
  word-break: break-all;
}

.account__role {
  display: block;
  font-family: var(--font-data);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.account__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.account__item:hover {
  background: rgba(232, 236, 242, 0.05);
  color: var(--text-primary);
}

/* button_to wraps its button in a form, which would otherwise break the
   vertical rhythm of the menu. */
.account__menu form { margin: 0; }

.report-clamped {
  font-family: var(--font-data);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--color-degraded);
  margin-top: 0.6rem;
}

/* ---- alert settings ---- */

.alert-recipients {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-top: 0.5rem;
}

.alert-recipients__label {
  display: block;
  font-family: var(--font-data);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.alert-recipients__list {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.alert-recipients__role {
  font-family: var(--font-data);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 0.3rem;
}

.webhook-headers {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.webhook-headers td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
  vertical-align: top;
}

.webhook-headers td:first-child { width: 42%; padding-right: 1rem; }
.webhook-headers code { font-family: var(--font-data); font-size: 0.95em; color: var(--text-primary); }

/* Certificate expiry. Amber, not red, until it has actually expired: a
   certificate with days left is a deadline, not an outage. */
.tls-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: var(--font-data);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--color-degraded);
  background: var(--color-degraded-bg);
  border: 1px solid rgba(229, 161, 58, 0.35);
  padding: 2px 7px;
  border-radius: 999px;
}

.tls-badge--expired {
  color: var(--color-outage);
  background: var(--color-outage-bg);
  border-color: rgba(229, 72, 77, 0.35);
}

.tls-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.88rem;
}

.tls-row:last-child { border-bottom: none; }
.tls-row__label { color: var(--text-muted); font-family: var(--font-data); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.tls-row__value { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

/* Public status-page wayfinding. These links intentionally stay restrained so
   tenant service health remains the primary content. */
.status-public-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.status-public-nav__brand,
.status-public-nav__links a,
.status-public-cta a,
.status-public-footer a {
  color: var(--text-primary);
  text-decoration: none;
}

.status-public-nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.status-public-nav__links { display: flex; align-items: center; gap: 1.2rem; font-size: 0.85rem; }
.status-public-nav__links a:last-child { color: var(--accent-cyan); }

.status-public-cta {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: center;
}

.status-public-cta p { color: var(--text-secondary); margin: 0.45rem 0 1rem; }
.status-public-cta a { display: inline-flex; color: var(--accent-cyan); font-weight: 700; }
.status-public-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.1rem; margin-top: 0.75rem; font-size: 0.78rem; }
.status-public-footer a { color: var(--text-muted); }

@media (max-width: 640px) {
  .status-public-nav { padding-inline: 1rem; }
  .status-public-nav__links a:first-child { display: none; }
}
