/* The public page's BIGGSAI style (status-page/public/index.html), wider,
   for a working screen. No green: OK is neutral, degraded amber, outage red,
   always with the word. Fonts from this bucket. Light only. */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-400-700.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --surface: #fffdf8;
  --plane:   #f5f1e8;
  --ink:     #1c1b18;
  --ink-2:   #4b4740;
  --muted:   #767061;
  --line:    #e3ddcd;
  --line-2:  #ccc5b2;

  --critical: #c8352f;
  --warning:  #a8801a;
  --crit-ink: #9c2721;
  --warn-ink: #75590f;
  --crit-wash:#fdf0ef;
  --crit-line:#f2cfcd;
  --warn-wash:#fbf5e4;
  --warn-line:#eadfbc;

  --settled:      #6f6a5f;
  --settled-ink:  #5a5549;
  --settled-wash: #f1efe8;
  --settled-line: #ddd8cb;

  --accent: #7a5e1c;

  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--plane);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 16px max(56px, env(safe-area-inset-bottom));
}

header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin-bottom: 22px;
}
.brandstack { display: flex; flex-direction: column; gap: 1px; }
.wordmark {
  font-family: var(--display);
  font-size: 27px; font-weight: 700;
  letter-spacing: .085em; line-height: 1.05;
  color: var(--accent);
}
.brandorg { font-size: 12px; color: var(--muted); }
.who { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn {
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 11px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
}
.btn:hover { border-color: var(--settled); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.statusbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; margin-bottom: 26px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  box-shadow: inset 3px 0 0 var(--line-2);
}
.statusbar[data-state="ok"]       { box-shadow: inset 3px 0 0 var(--settled); }
.statusbar[data-state="degraded"] { box-shadow: inset 3px 0 0 var(--warning); }
.statusbar[data-state="outage"] {
  box-shadow: inset 3px 0 0 var(--critical);
  background: var(--crit-wash); border-color: var(--crit-line);
}
.statusbar .w { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.statusbar[data-state="outage"] .w { color: var(--crit-ink); }
.statusbar .s { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.updated { font-size: 12px; color: var(--muted); text-align: right; flex: none; }

section { margin-bottom: 30px; }
.sec-h {
  font-family: var(--display);
  font-size: 21px; font-weight: 600; line-height: 1.15;
  margin: 0 0 10px;
}
.grp-h { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 6px; }
.grp-h:first-child { margin-top: 0; }

.list { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 15px; }
.row + .row { border-top: 1px solid var(--line); }
.row .name { font-weight: 500; min-width: 0; }
.row .sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.row .main { min-width: 0; flex: 1; }
.row time { flex: none; width: 118px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .tag { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.statuschip {
  margin-left: auto; flex: none;
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--settled-line); color: var(--settled-ink); background: var(--settled-wash);
  white-space: nowrap;
}
.statuschip[data-state="outage"]   { background: var(--crit-wash); border-color: var(--crit-line); color: var(--crit-ink); }
.statuschip[data-state="degraded"] { background: var(--warn-wash); border-color: var(--warn-line); color: var(--warn-ink); }

.empty { padding: 22px 15px; text-align: center; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.card { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 12px 14px 10px; min-width: 0; }
.card .k { font-size: 12px; color: var(--muted); }
.card .v { font-size: 20px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.card .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.card .m { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card svg { display: block; width: 100%; height: 34px; margin-top: 6px; color: var(--accent); }
.card svg polyline { fill: none; stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 15px; white-space: nowrap; }
th { font-size: 11.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
td { border-top: 1px solid var(--line); }
tbody tr:first-child td { border-top: 0; }
th.n, td.n { text-align: right; }
td.bad { color: var(--crit-ink); font-weight: 600; }
td .statuschip { margin-left: 0; }

footer { margin-top: 10px; font-size: 12px; color: var(--muted); }

@media (max-width: 560px) {
  header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .statusbar { flex-direction: column; align-items: flex-start; }
  .updated { text-align: left; }
  .row { flex-wrap: wrap; row-gap: 4px; }
  .row time { width: 100%; }
}
