/* Calico status page. No framework, no external requests: the page must load fast during an outage. */

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --card-2: #fafbfc;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e5e8ee;
  --line-2: #d6dbe4;
  --link: #1d5bd8;
  --brand: #1f5fbf;
  --brand-2: #2f74e0;
  --on-brand: #ffffff;
  --ok: #15803d;      --ok-bg: #ecfdf3;   --ok-dot: #22c55e;
  --deg: #a16207;     --deg-bg: #fefbe8;  --deg-dot: #eab308;
  --part: #c2410c;    --part-bg: #fff4ed; --part-dot: #f97316;
  --major: #b91c1c;   --major-bg: #fef2f2; --major-dot: #ef4444;
  --maint: #1d4ed8;   --maint-bg: #eff4ff; --maint-dot: #3b82f6;
  --info: #6d28d9;    --info-bg: #f5f3ff;  --info-dot: #8b5cf6;
  --nodata: #cbd2dc;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, .04), 0 8px 20px -6px rgba(15, 23, 42, .12);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand-2) 30%, transparent);
  --header-bg: rgba(255, 255, 255, .82);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d13; --card: #11151d; --card-2: #151a24; --text: #e8ecf3; --text-2: #c3cad6; --muted: #8b95a8; --faint: #5d6779;
    --line: #1f2632; --line-2: #2b3442; --link: #7aa7ff; --brand: #3b7cf0; --brand-2: #5b93f5; --on-brand: #ffffff;
    --ok: #4ade80; --ok-bg: #0d2318; --ok-dot: #22c55e;
    --deg: #facc15; --deg-bg: #2a220a; --deg-dot: #eab308;
    --part: #fb923c; --part-bg: #2c1709; --part-dot: #f97316;
    --major: #f87171; --major-bg: #2d1111; --major-dot: #ef4444;
    --maint: #93b4ff; --maint-bg: #111d3a; --maint-dot: #3b82f6;
    --info: #c4b5fd; --info-bg: #1c1533; --info-dot: #8b5cf6;
    --nodata: #2f3846;
    --shadow-xs: none; --shadow: 0 0 0 1px rgba(255, 255, 255, .02); --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .6);
    --header-bg: rgba(10, 13, 19, .78);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Inter", "InterVariable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { letter-spacing: -.015em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty { padding: 20px; color: var(--muted); margin: 0; text-align: center; }
.crumb { margin: 0 0 16px; font-size: .9rem; }
.crumb a { color: var(--muted); font-weight: 500; }
.crumb a:hover { color: var(--text); text-decoration: none; }

/* ---------- Header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.brand-sub { color: var(--muted); font-weight: 500; padding-left: 10px; border-left: 1px solid var(--line-2); line-height: 1.1; }
.header-links { display: flex; align-items: center; gap: 4px; font-size: .9rem; }
.header-links a { color: var(--text-2); font-weight: 500; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.header-links a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); text-decoration: none; color: var(--text); }
.header-links .btn-sub { background: var(--text); color: var(--card); margin-left: 6px; box-shadow: var(--shadow-xs); }
.header-links .btn-sub:hover { background: color-mix(in srgb, var(--text) 85%, var(--card)); color: var(--card); }
.client-bar { background: color-mix(in srgb, var(--maint-bg) 70%, var(--card)); color: var(--text-2); font-size: .85rem; padding: 7px 0; border-top: 1px solid var(--line); }
.client-bar .wrap { display: flex; align-items: center; gap: 8px; }
.client-bar .icon { color: var(--maint); }

main.wrap { padding-top: 32px; padding-bottom: 48px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 24px 0 36px; background: var(--card); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { border-radius: 4px; opacity: .9; }
.footer-row nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-row nav a { color: var(--muted); }
.footer-row nav a:hover { color: var(--text); }
.snapshot-note { background: var(--deg-bg); color: var(--deg); text-align: center; font-size: .85rem; font-weight: 500; padding: 8px 16px; border-bottom: 1px solid color-mix(in srgb, var(--deg) 25%, transparent); }

/* ---------- Status colors: every status also has an icon or word, never color alone ---------- */
.st-operational { --c: var(--ok); --cb: var(--ok-bg); --cd: var(--ok-dot); }
.st-degraded { --c: var(--deg); --cb: var(--deg-bg); --cd: var(--deg-dot); }
.st-partial_outage { --c: var(--part); --cb: var(--part-bg); --cd: var(--part-dot); }
.st-major_outage { --c: var(--major); --cb: var(--major-bg); --cd: var(--major-dot); }
.st-maintenance { --c: var(--maint); --cb: var(--maint-bg); --cd: var(--maint-dot); }
.st-nodata { --c: var(--faint); --cb: transparent; --cd: var(--nodata); }
.st-advisory { --c: var(--info); --cb: var(--info-bg); --cd: var(--info-dot); }

.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--cd, var(--c)); flex: none; }
:not(.st-operational) > .dot::after, .st-degraded .dot::after, .st-partial_outage .dot::after, .st-major_outage .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--cd); opacity: .35; animation: pulse 2s ease-out infinite;
}
.st-operational .dot::after, .legend .dot::after, .st-maintenance .dot::after { display: none; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .5; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dot::after, .live-dot::after { animation: none !important; } html { scroll-behavior: auto; } }

/* Soft status pill used across the page */
.pill, .svc-state, .down-state, .service-now {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; font-size: .8rem; line-height: 1;
  color: var(--c); background: color-mix(in srgb, var(--cd) 12%, transparent); padding: 5px 10px 5px 8px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cd) 22%, transparent);
}
.pill .icon { width: 14px; height: 14px; }
.pill > span { line-height: 1; }

/* ---------- Hero (all good) ---------- */
.hero, .banner {
  display: flex; align-items: center; gap: 18px; padding: 26px 28px; border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--cd) 16%, var(--card)) 0%, var(--card) 60%);
  border: 1px solid color-mix(in srgb, var(--cd) 28%, var(--line)); box-shadow: var(--shadow);
}
.hero-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; flex: none; color: #fff; background: var(--cd);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--cd) 16%, transparent), 0 6px 16px -4px color-mix(in srgb, var(--cd) 60%, transparent); }
.hero-icon .icon { width: 26px; height: 26px; }
.hero h1, .banner h1 { margin: 0; font-size: 1.6rem; line-height: 1.2; font-weight: 700; color: var(--text); }
.hero p, .banner p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.banner > .icon { width: 44px; height: 44px; padding: 9px; border-radius: 12px; background: var(--cd); color: #fff; }

/* ---------- What's down (top of home while anything is not operational) ---------- */
.down-panel { border-radius: var(--radius-lg); background: var(--card); border: 1px solid color-mix(in srgb, var(--cd) 40%, var(--line)); box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--cd) 8%, transparent); overflow: hidden; }
.down-head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: linear-gradient(180deg, color-mix(in srgb, var(--cd) 13%, var(--card)), color-mix(in srgb, var(--cd) 4%, var(--card))); border-bottom: 1px solid color-mix(in srgb, var(--cd) 20%, var(--line)); }
.down-head-text { flex: 1; min-width: 0; }
.down-head h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; font-weight: 700; color: var(--text); }
.down-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); background: var(--card); padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cd) 30%, var(--line)); align-self: flex-start; }
.live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--cd); }
.live-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: var(--cd); opacity: .4; animation: pulse 1.6s ease-out infinite; }
.ai-summary { position: relative; margin: 18px 24px 4px; padding: 16px 18px; border-radius: var(--radius); background: var(--card-2); border: 1px solid var(--line); }
.ai-summary::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, #8b5cf6 55%, transparent), color-mix(in srgb, var(--brand-2) 45%, transparent) 50%, transparent 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.ai-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #7c3aed; margin-bottom: 6px; }
@media (prefers-color-scheme: dark) { .ai-badge { color: #b79cff; } }
.ai-badge .icon { width: 14px; height: 14px; }
.ai-summary p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--text); }
.ai-summary .ai-note { margin-top: 10px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.down-list { list-style: none; margin: 0; padding: 10px 12px 12px; }
.down-item { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 14px; align-items: center; padding: 14px 12px; border-radius: 10px; color: var(--text); transition: background .12s; }
.down-item:hover, .down-item:focus-visible { background: color-mix(in srgb, var(--text) 4%, transparent); text-decoration: none; }
.down-list li + li { border-top: 1px solid var(--line); }
.down-name { font-size: 1.02rem; font-weight: 600; }
.down-group { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; margin-top: 1px; }
.down-state { font-size: .82rem; }
.chev { width: 16px; height: 16px; color: var(--faint); transition: transform .15s, color .15s; }
.down-item:hover .chev { transform: translateX(2px); color: var(--text); }
.down-item .svc-cause { grid-column: 1 / -1; }

/* ---------- Sections ---------- */
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 16px; }
.section-head .section-title { margin: 0; }
.section-title { font-size: .75rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.section-title.big { font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; text-transform: none; color: var(--text); margin: 0 0 16px; }
.small-title { font-size: .75rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.page-title { font-size: 1.75rem; font-weight: 700; margin: 0 0 20px; }
.more { font-size: .88rem; font-weight: 600; }
.hint { color: var(--faint); font-size: .82rem; margin: 6px 2px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .8rem; color: var(--muted); margin: 14px 2px 0; }
.legend-inline { margin: 0; }
.legend-item { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 500; }
.legend-item .icon { color: var(--c); width: 14px; height: 14px; }

/* ---------- Service grid (home) ---------- */
.svc-group { margin-bottom: 28px; }
.svc-group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 12px; padding: 0 2px; }
.svc-group-head h3 { margin: 0; font-size: .95rem; font-weight: 650; color: var(--text); }
.group-count { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.group-count[class*="st-"] { color: var(--c); background: color-mix(in srgb, var(--cd) 10%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cd) 25%, transparent); }
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svc-tile { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.svc-tile:hover, .svc-tile:focus-visible { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.svc-tile:not(.st-operational) { border-color: color-mix(in srgb, var(--cd) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--cd) 7%, var(--card)), var(--card) 70%); }
.svc-tile:not(.st-operational)::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cd); }
.svc-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.svc-name { font-size: .95rem; font-weight: 600; line-height: 1.35; }
.svc-tile.st-operational .svc-state { background: none; box-shadow: none; padding: 2px 0; color: var(--muted); font-weight: 500; }
.svc-desc { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.svc-cause { color: var(--part); font-size: .82rem; font-weight: 600; }
.svc-cause::before { content: "↳ "; opacity: .7; }

/* ---------- Incidents ---------- */
.impact-none { --impact: var(--faint); } .impact-minor { --impact: var(--deg-dot); } .impact-major { --impact: var(--part-dot); } .impact-critical { --impact: var(--major-dot); } .impact-maintenance { --impact: var(--maint-dot); }
.incident-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 22px; margin-bottom: 12px; box-shadow: var(--shadow), inset 3px 0 0 var(--impact, var(--deg-dot)); }
.incident-card header, .incident-detail header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.incident-card h3 { margin: 0; font-size: 1.02rem; font-weight: 650; line-height: 1.35; }
.incident-card h3 a { color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--impact, var(--faint)) 13%, transparent); color: color-mix(in srgb, var(--impact, var(--muted)) 75%, var(--text)); white-space: nowrap; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--impact, var(--faint)) 25%, transparent); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--impact, var(--faint)); }
.meta { color: var(--muted); font-size: .84rem; margin: 3px 0 0; display: block; }
.latest { margin-top: 12px; font-size: .93rem; color: var(--text-2); padding: 12px 14px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; }
.latest strong { color: var(--text); }
.latest time { color: var(--muted); }
.latest p { margin: 6px 0 0; }
.affected { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; }
.affected li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); font-weight: 500; flex-wrap: wrap; }
.affected .pill { font-size: .72rem; padding: 4px 8px 4px 6px; }
.affected .root-cause { flex-basis: 100%; padding-left: 6px; font-size: .78rem; }

.incident-detail { padding: 26px 28px; box-shadow: var(--shadow), inset 3px 0 0 var(--impact, var(--deg-dot)); }
.incident-detail h1 { margin: 0; font-size: 1.6rem; font-weight: 700; line-height: 1.25; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; margin: 20px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.facts > div { background: var(--card-2); padding: 12px 14px; }
.facts dt { color: var(--muted); font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 2px 0 0; font-weight: 500; font-size: .92rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 22px 6px; }
.timeline li:last-child { padding-bottom: 4px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--card); border: 2px solid var(--impact, var(--faint)); box-shadow: 0 0 0 3px var(--card); }
.timeline li:first-child::before { background: var(--impact, var(--faint)); }
.timeline p { margin: 6px 0 0; color: var(--text-2); }
.tl-head strong { font-weight: 650; }
.tl-head time { color: var(--muted); font-size: .84rem; margin-left: 8px; }
.rel { color: var(--faint); font-size: .8rem; }
.root-cause { font-size: .84rem; color: var(--part); font-weight: 600; }

/* ---------- Past incidents / history ---------- */
.past-list { list-style: none; margin: 0; padding: 4px 0; overflow: hidden; }
.past-list li { position: relative; padding: 14px 44px 14px 20px; border-top: 1px solid var(--line); transition: background .12s; }
.past-list li:first-child { border-top: 0; }
.past-list li:hover { background: var(--card-2); }
.past-list li::after { content: ""; position: absolute; right: 20px; top: 50%; width: 7px; height: 7px; border-right: 1.8px solid var(--faint); border-top: 1.8px solid var(--faint); transform: translateY(-50%) rotate(45deg); }
.past-list a { font-weight: 600; color: var(--text); }
.past-list a::before { content: ""; position: absolute; inset: 0; }
.past-list .pill { position: relative; z-index: 1; }
.history-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.months { padding: 10px; position: sticky; top: 84px; }
.months h2 { padding: 4px 8px; }
.months ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.months li { display: flex; justify-content: space-between; align-items: center; }
.months li a { flex: 1; display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 7px; color: var(--text-2); }
.months li a:hover { background: color-mix(in srgb, var(--text) 5%, transparent); text-decoration: none; }
.months a[aria-current] { font-weight: 650; color: var(--text); background: color-mix(in srgb, var(--brand-2) 10%, transparent); }
.count { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; margin-top: 16px; font-size: .9rem; color: var(--muted); }
@media (max-width: 700px) { .history-layout { grid-template-columns: 1fr; } .months { position: static; } }

/* ---------- Subscribe ---------- */
.subscribe { margin-top: 40px; padding: 26px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 32px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 7%, var(--card)), var(--card) 60%); }
.subscribe h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.sub-lead { margin: 6px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.subscribe > .notice { grid-column: 1 / -1; }
.subscribe .row { display: flex; gap: 8px; }
.subscribe input[type=email] { flex: 1; min-width: 0; }
input[type=email], input[type=text] { font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--card); color: var(--text); box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
input[type=email]:focus, input[type=text]:focus { outline: none; border-color: var(--brand-2); box-shadow: var(--ring); }
button { font: inherit; font-size: .92rem; font-weight: 600; padding: 10px 18px; border: 0; border-radius: 9px; background: var(--brand); color: var(--on-brand); cursor: pointer; box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .12); transition: background .12s; }
button:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.scope { border: 0; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--text-2); }
.scope label, .component-picks label { display: inline-flex; gap: 8px; align-items: center; }
input[type=radio], input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.component-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; padding: 8px 0 0 24px; font-size: .86rem; }
.component-picks[hidden] { display: none; }
.fine { color: var(--faint); font-size: .78rem; margin: 12px 0 0; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 10px 14px; border-radius: 9px; font-size: .9rem; font-weight: 500; margin: 0 0 12px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.bad { background: var(--major-bg); color: var(--major); }
.message { padding: 32px; max-width: 620px; margin: 0 auto; }
.message h1 { margin-top: 0; font-size: 1.5rem; }

/* ---------- Service page ---------- */
.service-head { padding: 26px 28px; background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--cd) 10%, var(--card)), var(--card) 55%); }
.service-head.st-operational { background: var(--card); }
.service-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.service-title h1 { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.service-group { margin: 0 0 6px; color: var(--muted); font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.service-desc { margin: 6px 0 0; color: var(--muted); }
.service-now { font-size: .88rem; padding: 7px 14px 7px 10px; }
.service-now .icon { width: 16px; height: 16px; }
.service-deps { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.service-head .root-cause { margin: 12px 0 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 18px 20px; display: flex; flex-direction: column-reverse; gap: 4px; }
.stat-num { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.explain { color: var(--muted); font-size: .86rem; margin: 12px 2px 0; max-width: 72ch; }
.cal-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .cal-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cal { padding: 14px 14px 16px; }
.cal h3 { margin: 0 0 10px; font-size: .86rem; font-weight: 650; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { font-size: .65rem; color: var(--faint); text-align: center; font-weight: 600; padding-bottom: 2px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 5px; font-size: .68rem; background: var(--cb); color: var(--c); font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-day.st-operational { background: color-mix(in srgb, var(--ok-dot) 16%, transparent); color: color-mix(in srgb, var(--ok) 80%, var(--muted)); }
.cal-day.st-nodata { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); font-weight: 400; }
.cal-day.out { background: transparent; color: color-mix(in srgb, var(--faint) 60%, transparent); font-weight: 400; }
.cal-day.blank { visibility: hidden; }
.cal-day:not(.st-operational):not(.st-nodata):not(.out) { background: var(--cd); color: #fff; }
a.cal-day:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--cd); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--text); }
.legend .swatch { display: inline-block; width: 12px; height: 12px; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 3px; }
.anchor { display: block; position: relative; top: -90px; visibility: hidden; }
.past-list li:target, .past-list li:has(.anchor:target) { background: var(--maint-bg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 20px; }
  .svc-grid { grid-template-columns: 1fr; gap: 8px; }
  .svc-tile { padding: 14px 16px; }
  .subscribe { grid-template-columns: 1fr; padding: 22px 20px; }
  .hide-sm { display: none; }
  .legend-inline { display: none; }
  .stat-row { gap: 8px; }
  .stat { padding: 12px; }
  .stat-num { font-size: 1.2rem; }
  .service-title { flex-direction: column; }
  .service-head, .incident-detail { padding: 20px; }
  .incident-detail header { flex-direction: column-reverse; gap: 10px; }
}
@media (max-width: 480px) {
  .header-row { min-height: 56px; gap: 8px; }
  .brand-name { display: none; }
  .brand-sub { border-left: 0; padding-left: 0; color: var(--text); font-weight: 650; }
  .header-links a { padding: 7px 8px; }
  .hero, .banner { padding: 20px; gap: 14px; }
  .hero h1, .banner h1 { font-size: 1.3rem; }
  .down-head { padding: 18px 16px; gap: 12px; }
  .down-head h1 { font-size: 1.25rem; }
  .hero-icon { width: 40px; height: 40px; border-radius: 12px; }
  .hero-icon .icon { width: 22px; height: 22px; }
  .live { display: none; }
  .ai-summary { margin: 14px 12px 4px; padding: 14px; }
  .down-list { padding: 6px 4px 8px; }
  .down-item { grid-template-columns: 1fr auto; }
  .down-item .chev { display: none; }
  .incident-card { padding: 16px; }
  .incident-card header { flex-direction: column-reverse; gap: 8px; }
  .subscribe .row { flex-direction: column; }
  .cal-row { gap: 8px; }
  .cal { padding: 10px; }
  .past-list li { padding: 12px 36px 12px 16px; }
}
.affected li:has(.root-cause) { border-radius: 14px; padding-bottom: 6px; }

/* Uploaded logo (Settings → Branding): wide logos keep their shape. */
.brand-logo { display: flex; align-items: center; }
.brand-logo img { display: block; height: 30px; width: auto; max-width: 220px; object-fit: contain; border-radius: 0; }
@media (max-width: 480px) {
  .brand-logo img { height: 24px; max-width: 140px; }
  .brand-logo ~ .brand-sub { display: none; }
}
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .stat { padding: 10px; } .stat-num { font-size: 1.15rem; } .service-title { flex-direction: column; } }

/* ---------- Advisories: informational, never a status ---------- */
.impact-advisory { --impact: var(--info-dot); }
.section-note { margin: 0; color: var(--muted); font-size: .86rem; }
.affected.for-services li { padding: 4px 12px; }
.applies { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; }
.applies .affected { margin: 0; }
.applies-label { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.svc-advisory { display: inline-flex; align-items: center; gap: 5px; color: var(--info); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.svc-advisory .icon { width: 1.05em; height: 1.05em; }
.kind-advisory { display: inline-flex; align-items: center; gap: 4px; color: var(--info); font-weight: 600; }
.kind-advisory .icon { width: 1em; height: 1em; vertical-align: -0.15em; }
.pill.st-advisory .icon { width: 1em; height: 1em; }
.advisory-note { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: .9rem; font-weight: 500; border: 1px solid color-mix(in srgb, var(--info-dot) 25%, transparent); }
.advisory-note .icon { margin-top: 2px; }


/* Admin preview of a client's private page */
.preview-bar { background: color-mix(in srgb, var(--deg-bg, #fef3c7) 80%, var(--card)); }
.preview-bar .wrap { flex-wrap: wrap; }
.preview-bar a { margin-left: auto; font-weight: 600; }
form[inert] { opacity: .55; }

/* Post-incident report on an incident's page */
.incident-report { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--line); }
.incident-report h3 { font-size: 1rem; margin: 18px 0 6px; }
.incident-report .report-date { margin: -6px 0 0; color: var(--muted); font-size: .85rem; }
