/* The Thomas Studios — Obsidian Gold design tokens. No gradients, no shadows. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Merriweather'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/merriweather-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #0b0b0d;
  --bg-2: #121214;
  --surface: #171719;
  --border: #29292d;
  --gold: #c9a45c;
  --text: #f3f0e9;
  --text-2: #b6b4b0;

  /* Status colours: each is paired with a distinct icon so colour is never the only signal. */
  --s-operational: #5db386;
  --s-degraded: #e4b84d;
  --s-partial: #ec8a45;
  --s-major: #ea5b52;
  --s-maintenance: #6ea4ec;
  --s-unknown: #9b9ba2;

  --radius: 6px;
  --radius-sm: 3px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --max: 780px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--text); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--radius-sm); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }

/* status colour helpers */
.st-operational { --c: var(--s-operational); }
.st-degraded { --c: var(--s-degraded); }
.st-partial_outage { --c: var(--s-partial); }
.st-major_outage { --c: var(--s-major); }
.st-maintenance { --c: var(--s-maintenance); }
.st-unknown, .st-unverified { --c: var(--s-unknown); }
.ico { width: 16px; height: 16px; flex: none; color: var(--c, var(--text-2)); }
.ico-lg { width: 28px; height: 28px; }
.component-icon { width: 19px; height: 19px; flex: none; color: var(--text-2); }
.component-name { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--c, var(--text-2)); white-space: nowrap; }

/* Shown on staging builds only (scripts/build-web.mjs with STAGING=1). */
.env-banner { background: var(--s-degraded); color: #0b0b0d; text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .04em; padding: 6px 12px; }

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

/* Public status site. Flat surfaces, 1px borders, compact radii. */
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #0b0b0d; padding: 8px 12px; border-radius: var(--radius); z-index: 10; }
.skip:focus { left: 8px; }

.site-head { position: static; max-width: var(--max); margin: 24px auto 28px; padding: 0 16px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--text); text-decoration: none; }
.brand-name { font: 700 17px/1.2 var(--font-serif); letter-spacing: .01em; }
.brand-sub { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--text-2); text-decoration: none; padding: 6px 10px; border-radius: var(--radius); font-weight: 500; font-size: 14px; border: 1px solid transparent; }
.nav a:hover { color: var(--text); border-color: var(--border); }
.nav a[aria-current='page'] { color: var(--text); border-color: var(--border); background: var(--surface); }

.site-main { padding-top: 0; padding-bottom: 0; }
h1 { font: 700 24px/1.25 var(--font-serif); }
.section-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 32px 0 10px; }

.banner { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--c, var(--border)); border-radius: var(--radius); padding: 18px 18px; }
.banner h1 { font-size: 22px; }
.notice { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); font-size: 14px; }
.notice-warn { border-color: var(--s-degraded); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 10px; }
.group-title { font-size: inherit; font-weight: inherit; }
.group-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; border-radius: var(--radius); }
.group-head:hover { background: var(--bg-2); }
.group-name { font-weight: 600; font-size: 16px; flex: 1; }
.chev { color: var(--text-2); font-size: 20px; line-height: 1; transition: transform .15s ease; }
.group-head[aria-expanded='true'] .chev { transform: rotate(90deg); }
.group-body { border-top: 1px solid var(--border); }
.row { padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-name { font-weight: 500; }
.tag { margin-left: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1px 6px; color: var(--text-2); }
.row-meta { margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.row-detail { margin-top: 10px; }
.link-btn { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; margin-left: 8px; }
.link-btn:hover { color: var(--text); }

/* Thirty-day display; older monitoring records stay in storage. */
.ubar-wrap { position: relative; margin-top: 10px; }
.ubar { display: flex; gap: 3px; height: 24px; border-radius: var(--radius-sm); }
.ub { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--s-operational); transition: transform .12s ease; }
.ub-nodata { background: var(--border); }
.ub-unknown { background: transparent; outline: 1px solid var(--s-unknown); outline-offset: -1px; }
.ub-degraded { background: var(--s-degraded); }
.ub-partial { background: var(--s-partial); }
.ub-major { background: var(--s-major); }
.ub-maint { background: var(--s-maintenance); }
.ub-active { transform: scaleY(1.12); outline: 1px solid var(--text); outline-offset: 1px; }
.ubar:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.utip { position: absolute; bottom: calc(100% + 8px); left: var(--x, 50%); transform: translateX(-50%); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; font-size: 12.5px; line-height: 1.45; min-width: 190px; max-width: min(300px, calc(100vw - 32px)); z-index: 5; pointer-events: none; }
.utip strong { display: block; margin-bottom: 2px; }
.ubar-axis { display: flex; justify-content: space-between; margin-top: 4px; }

/* sparkline */
.spark { margin: 0; }
.spark-svg { width: 100%; height: auto; display: block; }
.spark-line { stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark-axis, .spark-grid { stroke: var(--border); stroke-width: 1; }
.spark-label { fill: var(--text-2); font-size: 11px; font-family: var(--font); }
.spark-fail { fill: var(--s-major); }

/* incidents */
.incident { padding: 14px 16px; border-left: 3px solid var(--c, var(--border)); }
.inc-head { display: flex; gap: 10px; align-items: center; }
.inc-head h3 { font-size: 16px; font-weight: 600; }
.inc-head a { color: var(--text); text-decoration: none; }
.inc-head a:hover { color: var(--gold); text-decoration: underline; }
.inc-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.inc-latest { margin-top: 8px; color: var(--text); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1px 7px; color: var(--text); background: var(--bg-2); }
.badge-resolved { color: var(--s-operational); }
.badge-monitoring { color: var(--s-maintenance); }
.badge-identified { color: var(--s-degraded); }
.badge-investigating { color: var(--s-partial); }
.badge-maint { color: var(--s-maintenance); }
.crumbs { margin-bottom: 14px; color: var(--text-2); }
.inc-page { border-left: 3px solid var(--c); padding-left: 14px; }
.inc-page .inc-meta { margin: 10px 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0 0; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); margin-left: 6px; }
.tl-item { position: relative; padding: 2px 0 20px 18px; }
.tl-item::before { content: ''; position: absolute; left: -5px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.tl-head { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.tl-item p { white-space: pre-wrap; overflow-wrap: anywhere; }
.mupdates { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); }

/* feedback */
.msg { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-top: 12px; display: grid; gap: 8px; justify-items: start; }
.msg-error { border-color: var(--s-major); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); border-radius: var(--radius); padding: 8px 14px; min-height: 36px; font-weight: 500; text-decoration: none; }
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn-small { padding: 5px 10px; font-size: 12px; min-height: 30px; }
.btn-quiet { background: transparent; }
.skeleton { display: grid; gap: 10px; }
.sk { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); animation: pulse 1.4s ease-in-out infinite; }
.sk-banner { height: 78px; }
.sk-card { height: 120px; }
@keyframes pulse { 50% { opacity: .55; } }

.foot-links { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.site-foot { position: static; max-width: var(--max); margin: 32px auto 24px; padding: 0 16px; color: var(--text-2); font-size: 12px; }
.site-foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.site-foot a:hover { color: var(--text); }

@media (max-width: 560px) {
  .site-head { margin-top: 16px; margin-bottom: 20px; }
  .site-head .wrap { gap: 12px; }
  .site-head .nav { width: 100%; }
  .site-head .nav a { flex: 1; text-align: center; }
  .banner { padding: 14px; }
  .banner h1 { font-size: 19px; }
  .group-head, .row, .incident { padding-left: 12px; padding-right: 12px; }
  .ubar { height: 22px; gap: 2px; }
  .brand-sub { display: none; }
  .nav a { padding: 6px 8px; }
}
