/* status.palacesphere.com — one small stylesheet. Palette and type follow
   packages/design/tokens.css (paper, ink, muted, line, green, red, gold);
   nothing else is borrowed. Works at 320px and with script off. */
:root {
  --paper: #f5f3e9; --ink: #20392f; --muted: #58685e; --line: #d0d7c9; --white: #fffef9;
  --green: #306b53; --lime: #e3ebdd; --red: #b12e48; --gold: #b78d2b; --gold-paper: #fff2c9;
  --rose: #f6e3e6; --font: Arial, Helvetica, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17231d; --ink: #eef0e8; --muted: #a6b2a8; --line: #33463c; --white: #1f2d26;
    --green: #6fbf98; --lime: #223a2f; --red: #ea7a8f; --gold: #d9b056; --gold-paper: #3a3118; --rose: #45252c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.45 var(--font); min-height: 100vh;
}
a { color: inherit; }
main, .top, .foot { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; align-items: baseline; gap: 10px; padding-top: 22px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 20px; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand-sub { color: var(--muted); font-size: 20px; letter-spacing: -.02em; }
.brand-sub::before { content: "/ "; color: var(--line); }
h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
h3 { font-size: 17px; margin: 0; line-height: 1.3; }
section { margin: 22px 0; }

/* Overall line */
.overall { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.overall h1::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin: 0 10px 1px 0; background: var(--green); vertical-align: -1px; }
.overall-trouble h1::before, .overall-upstream h1::before { background: var(--gold); }
.overall-outage h1::before { background: var(--red); }
.overall-maintenance h1::before { background: var(--muted); }
.updated { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* Incidents */
.incident { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 10px 0; }
.incident-active { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.incident-upstream.incident-active { border-color: var(--gold); }
.incident-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.incident-head .meta { color: var(--muted); font-size: 14px; }
.components-list { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.updates { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.updates li { padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 2px 14px; }
.updates li:last-child { border-bottom: 0; }
.updates time { color: var(--muted); font-size: 14px; white-space: nowrap; padding-top: 1px; }
.updates .status { font-weight: 700; }
.status-investigating { color: var(--gold); }
.status-identified { color: var(--gold); }
.status-monitoring { color: var(--green); }
.status-resolved { color: var(--green); }
.updates p { margin: 0; }
@media (max-width: 420px) { .updates li { grid-template-columns: 1fr; } }

/* Maintenance */
.maintenance .incident { border-style: dashed; }

/* Components */
.component-list { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.component { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.component:last-child { border-bottom: 0; }
.component-row { display: flex; align-items: center; gap: 10px; }
.component-name { font-weight: 700; flex: 1 1 auto; min-width: 0; }
.component-state { font-size: 14px; color: var(--muted); white-space: nowrap; }
.component-uptime { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--green); }
.dot-down { background: var(--red); }
.dot-maintenance { background: var(--muted); }
.dot-checking { background: var(--gold); }
.dot-unknown { background: transparent; border: 2px solid var(--line); }
.state-down .component-state { color: var(--red); font-weight: 700; }
.state-checking .component-state { color: var(--gold); }

/* 90-day bar: 90 cells, oldest left */
.bar { display: grid; grid-template-columns: repeat(90, 1fr); gap: 1px; margin: 9px 0 0; padding: 0; list-style: none; height: 12px; }
.cell { display: block; border-radius: 1px; background: var(--line); min-width: 0; }
.cell-ok { background: var(--green); }
.cell-some { background: var(--gold); }
.cell-bad { background: var(--red); }
.cell-none { background: var(--line); opacity: .6; }
.bar-labels { display: flex; justify-content: space-between; margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.legend { font-size: 12px; color: var(--muted); margin: 10px 2px 0; }
.legend .cell { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 10px; vertical-align: -1px; }
.legend .cell:first-child { margin-left: 0; }

/* Past incidents */
.past details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.past summary { cursor: pointer; padding: 14px 0; font-weight: 700; }
.past .incident { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0; margin: 0; }
.past .empty { margin: 0 0 14px; color: var(--muted); }
.none { color: var(--muted); margin: 0; }

.help { margin: 28px 0 10px; padding: 14px 18px; background: var(--lime); border-radius: 12px; }
.banner { background: var(--gold-paper); border: 1px solid var(--gold); border-radius: 12px; padding: 10px 16px; margin: 14px 0; font-size: 14px; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 30px; }
.foot p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
