/* status.ttf.bot (ttf_api/status_site.py): the developer portal's "studio" palette (ttf_api/static/developers/shared/studio.css),
   standalone: no Hub stylesheet, no web font, no third-party asset. Mobile first; light / dark follows the system unless the
   reader picked one (<html data-theme>, theme.js). No inline styles (CSP style-src 'self'). */

:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e1e6ee;
  --line-strong: #c9d1dd;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #586579;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --pass: #047857;
  --pass-bar: #10b981;
  --pass-soft: #ebf8f2;
  --pass-line: #b5e3cf;
  --warn: #a14f05;
  --warn-bar: #f59e0b;
  --warn-soft: #fff6e6;
  --warn-line: #f4d29c;
  --fail: #b91c1c;
  --fail-bar: #ef4444;
  --fail-soft: #fdf0f0;
  --fail-line: #f3c1c1;
  --none-bar: #d5dbe5;
  --unk-soft: #f1f4f9;
  --shadow-1: 0 1px 2px rgb(15 23 42 / 5%), 0 1px 3px rgb(15 23 42 / 4%);
  --shadow-2: 0 1px 2px rgb(15 23 42 / 5%), 0 6px 16px -6px rgb(15 23 42 / 12%);
  --ring: 0 0 0 3px rgb(79 70 229 / 28%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --r-card: 12px;
  --r-ctl: 8px;
  --max: 920px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1120;
    --surface: #121a2c;
    --surface-2: #172036;
    --line: #243049;
    --line-strong: #34425f;
    --text: #e6ebf3;
    --text-2: #c3cddb;
    --muted: #97a3b8;
    --accent: #a5b4fc;
    --accent-hover: #c7d2fe;
    --pass: #6ee7b7;
    --pass-bar: #34d399;
    --pass-soft: #0f2a24;
    --pass-line: #1f5a48;
    --warn: #fcd34d;
    --warn-bar: #fbbf24;
    --warn-soft: #2d2410;
    --warn-line: #6b5318;
    --fail: #fca5a5;
    --fail-bar: #f87171;
    --fail-soft: #2f1518;
    --fail-line: #6e2a2e;
    --none-bar: #2b3650;
    --unk-soft: #172036;
    --shadow-1: 0 1px 0 rgb(255 255 255 / 3%) inset;
    --shadow-2: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 18px 40px -24px rgb(0 0 0 / 80%);
    --ring: 0 0 0 3px rgb(165 180 252 / 40%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #121a2c;
  --surface-2: #172036;
  --line: #243049;
  --line-strong: #34425f;
  --text: #e6ebf3;
  --text-2: #c3cddb;
  --muted: #97a3b8;
  --accent: #a5b4fc;
  --accent-hover: #c7d2fe;
  --pass: #6ee7b7;
  --pass-bar: #34d399;
  --pass-soft: #0f2a24;
  --pass-line: #1f5a48;
  --warn: #fcd34d;
  --warn-bar: #fbbf24;
  --warn-soft: #2d2410;
  --warn-line: #6b5318;
  --fail: #fca5a5;
  --fail-bar: #f87171;
  --fail-soft: #2f1518;
  --fail-line: #6e2a2e;
  --none-bar: #2b3650;
  --unk-soft: #172036;
  --shadow-1: 0 1px 0 rgb(255 255 255 / 3%) inset;
  --shadow-2: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 18px 40px -24px rgb(0 0 0 / 80%);
  --ring: 0 0 0 3px rgb(165 180 252 / 40%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: var(--r-ctl); }

/* top bar */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand img { border-radius: 7px; display: block; }
.brand b { font-weight: 700; }
.nav { display: flex; gap: 4px 14px; flex-wrap: wrap; margin-left: auto; font-size: 14px; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--accent); }
.theme {
  font: inherit; font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-ctl); padding: 5px 10px; cursor: pointer; min-height: 32px;
}
.theme:hover { border-color: var(--line-strong); color: var(--text); }
@media (max-width: 560px) {
  .nav { order: 3; width: 100%; margin-left: 0; }
  .theme { margin-left: auto; }
}

body { min-height: 100vh; display: flex; flex-direction: column; }
main.wrap { padding-top: 24px; padding-bottom: 48px; flex: 1 0 auto; }
@media (min-width: 720px) { main.wrap { padding-top: 32px; } }

/* overall banner */
.banner {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); margin-bottom: 28px;
}
.banner h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.banner p { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.banner .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.banner.s-operational { background: var(--pass-soft); border-color: var(--pass-line); }
.banner.s-operational .dot { background: var(--pass-bar); box-shadow: 0 0 0 5px rgb(16 185 129 / 18%); }
.banner.s-operational h1 { color: var(--pass); }
.banner.s-degraded { background: var(--warn-soft); border-color: var(--warn-line); }
.banner.s-degraded .dot { background: var(--warn-bar); box-shadow: 0 0 0 5px rgb(245 158 11 / 18%); }
.banner.s-degraded h1 { color: var(--warn); }
.banner.s-outage { background: var(--fail-soft); border-color: var(--fail-line); }
.banner.s-outage .dot { background: var(--fail-bar); box-shadow: 0 0 0 5px rgb(239 68 68 / 18%); }
.banner.s-outage h1 { color: var(--fail); }
.banner.s-unknown { background: var(--unk-soft); }
.banner.s-plain { box-shadow: var(--shadow-1); }
@media (min-width: 720px) { .banner h1 { font-size: 26px; } .banner { padding: 22px 24px; } }

/* sections */
.sec { margin-bottom: 32px; }
.sec > h2 { font-size: 17px; font-weight: 650; margin-bottom: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 9px; height: 14px; border-radius: 2px; }
.empty { color: var(--muted); font-size: 14px; }
.note { padding: 10px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); margin-bottom: 20px;
        font-size: 14px; }
.note.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--text); }
.more { margin-top: 14px; font-size: 14px; }

/* components */
.comps { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); }
.comp { padding: 14px 16px; border-top: 1px solid var(--line); }
.comps > .comp:first-child { border-top: 0; }
.comp.child { padding: 12px 0 12px 14px; border-top: 1px dashed var(--line); }
.comp.child:first-child { border-top: 0; }
.kids { margin: 4px 0 2px 2px; border-left: 2px solid var(--line); }
.grp > summary { list-style: none; cursor: pointer; display: block; }
.grp > summary::-webkit-details-marker { display: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.name { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.grp > summary .name::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px; flex: none;
}
.grp[open] > summary .name::before { transform: rotate(45deg); }
.count { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.child .name { font-weight: 500; font-size: 14px; }
.pill {
  flex: none; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); background: var(--surface-2); white-space: nowrap;
}
.pill.s-operational { color: var(--pass); background: var(--pass-soft); border-color: var(--pass-line); }
.pill.s-degraded { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.pill.s-outage { color: var(--fail); background: var(--fail-soft); border-color: var(--fail-line); }
.bars { display: flex; gap: 2px; margin-top: 10px; height: 30px; }
.bars i { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--none-bar); }
.child .bars { height: 22px; }
.d-operational { background: var(--pass-bar) !important; }
.d-degraded { background: var(--warn-bar) !important; }
.d-outage { background: var(--fail-bar) !important; }
.d-none { background: var(--none-bar) !important; }
.bars i:hover { opacity: .75; }
.axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.axis span:nth-child(2) { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }
.ago::before { content: "90 days ago"; }
.sub { margin-top: 4px; color: var(--muted); font-size: 12px; }
.speed { font-family: var(--mono); font-size: 11.5px; }
/* phones: the last 30 days, like every status page */
@media (max-width: 639px) {
  .bars i:nth-child(-n+60) { display: none; }
  .ago::before { content: "30 days ago"; }
}
@media (min-width: 640px) and (max-width: 819px) {
  .bars i:nth-child(-n+30) { display: none; }
  .ago::before { content: "60 days ago"; }
}

/* incidents */
.inc { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--r-card);
       padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-1); }
.inc.imp-degraded { border-left-color: var(--warn-bar); }
.inc.imp-outage { border-left-color: var(--fail-bar); }
.inc.imp-maintenance { border-left-color: var(--accent); }
.inc.st-resolved { border-left-color: var(--pass-bar); }
.inc-t { font-size: 16px; font-weight: 650; }
.day .inc-t { font-size: 15px; }
.inc-m { margin-top: 6px; font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tag { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px;
       background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.st-resolved .tag { color: var(--pass); background: var(--pass-soft); border-color: var(--pass-line); }
.inc-p { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.tl { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 0 0 12px; font-size: 13px; color: var(--muted); }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
                 background: var(--surface); border: 2px solid var(--line-strong); }
.tl li:first-child::before { border-color: var(--accent); }
.u-state { font-weight: 650; color: var(--text); margin-right: 6px; }
.msg { margin-top: 3px; color: var(--text); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.day { padding: 14px 0; border-top: 1px solid var(--line); }
.day:first-of-type { border-top: 0; padding-top: 0; }
.day > h3 { font-size: 14px; font-weight: 650; color: var(--text-2); margin-bottom: 8px; }
.day .inc { margin-bottom: 8px; }
.month > h2 { font-size: 17px; }

/* subscribe + how */
.links { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; background: var(--surface);
            border: 1px solid var(--line); border-radius: var(--r-ctl); }
.links a { font-weight: 600; font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }
.links span { color: var(--muted); font-size: 13px; }
@media (min-width: 720px) { .links { grid-template-columns: 1fr 1fr; } }
.sec > p { color: var(--text-2); font-size: 14px; }
.plain { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.plain li { margin-bottom: 8px; }
.plain b { color: var(--text); }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { padding-top: 18px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.foot nav a { color: var(--text-2); }

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