:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --soft: #f8fafc;
  --green: #12b76a;
  --green-dark: #087443;
  --green-soft: #ecfdf3;
  --red: #f04438;
  --red-dark: #b42318;
  --red-soft: #fef3f2;
  --amber: #f79009;
  --amber-dark: #b54708;
  --amber-soft: #fffaeb;
  --purple: #7f56d9;
  --purple-dark: #6941c6;
  --purple-soft: #f4f3ff;
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
a { color: inherit; }
.status-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.status-header { display: flex; min-height: 68px; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.status-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 15px; font-weight: 750; text-decoration: none; }
.status-brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #111827; color: #fff; font-size: 15px; font-weight: 900; }
.status-nav { display: flex; align-items: center; }
.status-doc-link { border: 1px solid #d0d5dd; border-radius: 8px; padding: 6px 10px; color: #344054; font-size: 12px; font-weight: 700; text-decoration: none; transition: .15s ease; white-space: nowrap; }
.status-doc-link:hover { border-color: #98a2b3; background: var(--soft); color: var(--ink); }
.status-intro { padding: 28px 0 18px; }
.eyebrow { margin: 0 0 5px; color: var(--green-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.status-intro h1 { margin: 0 0 5px; font-size: clamp(27px, 4vw, 34px); line-height: 1.1; letter-spacing: -.04em; }
.status-intro > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.summary-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.summary-heading { display: flex; gap: 10px; align-items: center; min-height: 58px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: var(--soft); }
.summary-status-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.summary-heading strong { display: block; font-size: 14px; }
.summary-heading p { margin: 1px 0 0; color: var(--muted); font-size: 11px; }
.summary-panel.outage .summary-status-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.summary-panel.degraded .summary-status-dot, .summary-panel.pending .summary-status-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.summary-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.summary-metric { min-width: 0; padding: 12px 14px; background: #fff; }
.summary-metric span { display: block; overflow: hidden; margin-bottom: 2px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.summary-metric strong { display: block; font-size: 21px; line-height: 1.2; letter-spacing: -.035em; }
.summary-metric.operational strong { color: var(--green-dark); }
.summary-metric.outage strong { color: var(--red-dark); }
.summary-metric.blocked strong, .summary-metric.unknown strong { color: var(--amber-dark); }
.summary-metric.tracking-change strong { color: var(--amber-dark); }
.summary-metric.tracking-anomaly strong { color: var(--red-dark); }
.summary-metric.muted strong { color: #475467; }
.components-section { padding: 34px 0 40px; }
.section-header { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 17px; }
.section-header h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.025em; }
.section-header p { margin: 0; color: var(--muted); font-size: 13px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; }
.legend-dot.operational { background: var(--green); }
.legend-dot.outage { background: var(--red); }
.legend-dot.css-outage { background: var(--purple); }
.legend-dot.blocked { background: var(--amber); }
.component-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.component-row { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(380px, 2fr) 190px; gap: 18px; align-items: center; min-height: 52px; padding: 9px 18px; border-bottom: 1px solid var(--line); transition: background-color .12s ease; }
.component-row:last-child { border-bottom: 0; }
.component-row:hover { background: var(--soft); }
.component-identity { min-width: 0; }
.component-identity a { display: block; overflow: hidden; font-size: 14px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.component-identity a:hover { text-decoration: underline; }
.component-identity a.tracking-change { color: var(--amber-dark); }
.component-identity a.tracking-anomaly { color: var(--red-dark); }
.component-history { min-width: 0; }
.history-bars { display: grid; grid-template-columns: repeat(90, minmax(2px, 1fr)); gap: 1px; min-width: 480px; }
.history-segment { height: 22px; border-radius: 1.5px; background: #eaecf0; }
.history-segment.operational { background: var(--green); }
.history-segment.outage, .history-segment.site-outage { background: var(--red); }
.history-segment.css-outage { background: var(--purple); }
.history-segment.mixed-outage { background: linear-gradient(90deg, var(--red) 0 50%, var(--purple) 50%); }
.history-segment.blocked, .history-segment.unknown { background: var(--amber); }
.history-segment.empty { background: #eaecf0; }
.component-summary { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.component-summary > strong { font-size: 15px; letter-spacing: -.02em; }
.issue-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; }
.current-state { display: inline-flex; gap: 5px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.current-state i { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.current-state.operational { color: var(--green-dark); }
.current-state.operational i { background: var(--green); }
.current-state.outage { color: var(--red-dark); }
.current-state.outage i { background: var(--red); }
.current-state.site-fault { color: var(--red-dark); }
.current-state.site-fault i { background: var(--red); }
.current-state.css-fault { color: var(--purple-dark); }
.current-state.css-fault i { background: var(--purple); }
.current-state.blocked, .current-state.unknown, .current-state.checking, .current-state.pending { color: var(--amber-dark); }
.current-state.blocked i, .current-state.unknown i, .current-state.checking i, .current-state.pending i { background: var(--amber); }
.loading-card, .empty-card { padding: 30px 20px; color: var(--muted); text-align: center; }
.empty-card strong { display: block; color: var(--ink); }
.empty-card p { margin: 4px 0 0; }
.status-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 45px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status-footer a { text-decoration: none; }
.status-footer a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 820px) {
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-metric:last-child { grid-column: span 2; }
  .component-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 14px; padding: 10px 15px; }
  .component-history { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; padding-bottom: 3px; }
  .component-summary { grid-column: 2; grid-row: 1; }
}

@media (max-width: 600px) {
  .status-shell { width: min(100% - 24px, 1120px); }
  .status-header { min-height: 60px; }
  .status-brand { font-size: 13px; }
  .status-brand-mark { width: 30px; height: 30px; }
  .status-doc-link { padding: 5px 8px; font-size: 11px; }
  .status-intro { padding-top: 22px; }
  .summary-heading { align-items: flex-start; }
  .summary-heading p { line-height: 1.45; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .components-section { padding-top: 30px; }
  .section-header { align-items: flex-start; flex-direction: column; }
  .component-row { padding: 9px 12px; }
  .component-history { overflow: visible; }
  .history-bars { min-width: 0; width: 100%; gap: 1px; }
  .history-segment { height: 18px; }
  .component-summary { flex-direction: column; align-items: flex-end; gap: 1px; }
  .status-footer { align-items: flex-start; flex-direction: column; }
}
