/* Richard Harris Law Firm · System Status
   Design language: warm white, near-black text, system type, hairline rules. */

:root {
  --bg: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: #d2d2d7;
  --hairline-soft: rgba(0, 0, 0, 0.08);
  --row-hover: rgba(0, 0, 0, 0.025);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --green: #34c759;
  --amber: #ff9f0a;
  --red: #ff3b30;
  --grey: #98989d;
  --nodata: rgba(0, 0, 0, 0.10);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
          'Helvetica Neue', Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --hairline: #424245;
    --hairline-soft: rgba(255, 255, 255, 0.14);
    --row-hover: rgba(255, 255, 255, 0.045);
    --accent: #2997ff;
    --accent-hover: #47a8ff;
    --green: #30d158;
    --amber: #ffd60a;
    --red: #ff453a;
    --grey: #636366;
    --nodata: rgba(255, 255, 255, 0.14);
  }
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.col { max-width: 760px; margin: 0 auto; padding: 0 22px; width: 100%; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Header ---------- */

.top { padding: 22px 0 0; }
.top-inner { display: flex; align-items: center; justify-content: space-between; }

.wordmark {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.wordmark span { font-weight: 400; color: var(--text-2); }
.wordmark:hover { text-decoration: none; }

.sub-wrap { position: relative; }

.btn-quiet {
  font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 980px;
  border: 1px solid var(--hairline);
  background: transparent; color: var(--text);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.btn-quiet:hover { background: var(--row-hover); border-color: var(--text-3); }

.btn-primary {
  font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 980px; border: none;
  background: var(--accent); color: #fff;
  transition: background 0.18s ease;
}
.btn-primary:hover { background: var(--accent-hover); }

.sub-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30;
  width: 300px; padding: 18px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
}
@media (prefers-color-scheme: dark) {
  .sub-pop { box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6); }
}
.sub-pop-title { font-size: 14px; font-weight: 600; }
.sub-pop-sub { font-size: 12.5px; color: var(--text-2); margin: 3px 0 12px; }
.sub-pop form { display: flex; gap: 8px; }
.sub-pop input {
  flex: 1; min-width: 0; padding: 8px 12px;
  font: inherit; font-size: 13.5px;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: transparent; color: var(--text);
}
.sub-pop input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.sub-msg { font-size: 12.5px; margin-top: 9px; min-height: 17px; }
.sub-msg.ok { color: var(--green); }
.sub-msg.err { color: var(--red); }

/* ---------- Page title ---------- */

.page-title {
  font-size: 42px; font-weight: 700; letter-spacing: -0.028em;
  margin: 30px 0 0;
}

/* ---------- Stale note ---------- */

.stale-note {
  margin-top: 18px; padding: 10px 14px;
  font-size: 13.5px; color: var(--text-2);
  border: 1px solid var(--hairline); border-radius: 10px;
}
.stale-note strong { color: var(--text); font-weight: 600; }

/* ---------- Current status ---------- */

.current {
  margin-top: 26px;
  padding: 0 0 26px;
  border-bottom: 1px solid var(--hairline);
}

.current-row { display: flex; align-items: flex-start; gap: 12px; }

.status-ic { width: 21px; height: 21px; flex-shrink: 0; margin-top: 3px; }
.status-ic svg { display: block; width: 100%; height: 100%; }
.status-ic.ok { color: var(--green); }
.status-ic.warn { color: var(--amber); }
.status-ic.bad { color: var(--red); }
.status-ic.mute { color: var(--grey); }

.current-headline { font-size: 21px; font-weight: 600; letter-spacing: -0.016em; }
.current-sub { font-size: 14.5px; color: var(--text-2); margin-top: 3px; max-width: 560px; }
.current-sub .next-update { color: var(--text); font-weight: 500; }

.current-meta {
  margin-top: 12px; padding-left: 33px;
  font-size: 13px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.current-meta:empty { display: none; }

.demo-chip {
  display: inline-block; margin: 12px 0 0 33px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--amber); border: 1px solid var(--amber); border-radius: 6px;
  padding: 3px 8px;
}
.demo-chip[hidden] { display: none; }

/* ---------- Services ---------- */

.section-title {
  font-size: 15px; font-weight: 600; color: var(--text-2);
  margin: 34px 0 0; letter-spacing: -0.01em;
}

.service-list { list-style: none; }

.service {
  border-bottom: 1px solid var(--hairline-soft);
}
.service:first-child { border-top: 1px solid var(--hairline-soft); }

.service-head {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 15px 2px;
  background: none; border: none; text-align: left;
}
.service-head:hover { background: var(--row-hover); }
.service-head:hover .service-name { text-decoration: underline; text-underline-offset: 3px; }

.service-name { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; }

.service-state {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-2); white-space: nowrap;
}
.service-state .ic { width: 15px; height: 15px; flex-shrink: 0; }
.service-state .ic svg { display: block; width: 100%; height: 100%; }
.service-state.ok .ic { color: var(--green); }
.service-state.warn .ic { color: var(--amber); }
.service-state.bad .ic { color: var(--red); }
.service-state.mute .ic { color: var(--grey); }
.service-state .state-label { font-variant-numeric: tabular-nums; }
.service-state.ok .state-label { color: var(--text); }
.service-state.warn .state-label { color: var(--amber); }
.service-state.bad .state-label { color: var(--red); }
.service-state.mute .state-label { color: var(--text-3); }

.chevron {
  width: 10px; height: 10px; flex-shrink: 0; color: var(--text-3);
  transition: transform 0.22s ease;
}
.service-head[aria-expanded="true"] .chevron { transform: rotate(90deg); }

/* Expanded detail */
.service-detail { padding: 4px 2px 22px; }
.service-detail[hidden] { display: none; }

.avail-top {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.avail-uptime { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.avail-range { font-size: 12px; color: var(--text-3); }

.strip {
  display: flex; gap: 1.5px; height: 26px; align-items: stretch;
}
.day {
  flex: 1; min-width: 0; border: none; padding: 0;
  border-radius: 2px; background: var(--nodata);
  cursor: default;
  transition: transform 0.12s ease;
}
.day.operational { background: var(--green); }
.day.degraded { background: var(--amber); }
.day.outage { background: var(--red); }
.day:hover, .day:focus-visible { transform: scaleY(1.18); }
.day:focus-visible { outline-offset: 1px; }

.strip-axis {
  display: flex; justify-content: space-between;
  margin-top: 7px; font-size: 11.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.day-detail {
  margin-top: 10px; font-size: 13px; color: var(--text-2);
  font-variant-numeric: tabular-nums; min-height: 19px;
}
.day-detail:empty { display: none; }
.day-detail strong { color: var(--text); font-weight: 600; }

.service-facts {
  display: flex; flex-wrap: wrap; gap: 4px 22px;
  margin-top: 12px; font-size: 12.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.service-facts span strong { color: var(--text-2); font-weight: 500; }

/* ---------- Incident history ---------- */

.history { margin-bottom: 60px; }
.history-empty { padding: 22px 0; font-size: 14px; color: var(--text-3); }

.inc-date {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  margin: 24px 0 0; padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline-soft);
}

.incident { border-bottom: 1px solid var(--hairline-soft); }

.inc-summary {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 2px;
  background: none; border: none; text-align: left;
}
.inc-summary:hover { background: var(--row-hover); }

.inc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.inc-dot.active { background: var(--red); }
.inc-dot.resolved { background: var(--grey); }

.inc-title { font-size: 14.5px; font-weight: 500; }
.inc-meta { margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.inc-body { padding: 4px 2px 20px 20px; }
.inc-body[hidden] { display: none; }
.inc-desc { font-size: 14px; color: var(--text-2); margin-bottom: 14px; max-width: 560px; }

.timeline { list-style: none; }
.tl-item {
  position: relative; padding: 0 0 16px 26px;
  font-size: 13.5px;
}
.tl-item::before {
  content: ''; position: absolute; left: 5px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hairline);
  border: 2px solid var(--bg);
}
.tl-item::after {
  content: ''; position: absolute; left: 9px; top: 18px; bottom: 0;
  width: 1px; background: var(--hairline-soft);
}
.tl-item:last-child::after { display: none; }
.tl-item.is-latest::before { background: var(--accent); }
.tl-item.is-resolved::before { background: var(--green); }

.tl-label { font-weight: 600; margin-right: 8px; }
.tl-time { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tl-text { display: block; color: var(--text-2); margin-top: 2px; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline-soft);
  padding: 22px 0 30px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center;
  font-size: 12px; color: var(--text-3);
}
.footer-dot { opacity: 0.6; }
.site-footer a { color: var(--text-3); }
.site-footer a:hover { color: var(--text-2); }

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .page-title { font-size: 32px; margin-top: 24px; }
  .current-headline { font-size: 18.5px; }
  .sub-pop { position: fixed; left: 22px; right: 22px; top: 70px; width: auto; }
  .service-state .state-label { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
  .inc-meta { display: none; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
