:root {
  color-scheme: light;
  --tblr-primary: #b074d1;
  --tblr-primary-rgb: 176, 116, 209;
  --tblr-body-bg: var(--page-bg);
  --tblr-body-color: var(--text);
  --tblr-body-font-family: "Inter Var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --tblr-link-color: var(--brand-ink);
  --tblr-link-hover-color: var(--brand-hover);
  --tblr-border-color: var(--border);
  --tblr-bg-forms: var(--panel-bg);
  --brand: #b074d1;
  --page-bg: #ffffff;
  --panel-bg: #ffffff;
  --header-bg: rgba(255,255,255,.96);
  --text: #27313b;
  --heading: #202a35;
  --secondary: #536071;
  --muted: #606b78;
  --subtle: #7b8490;
  --border: #dfe4e9;
  --border-soft: #e8ebef;
  --border-strong: #aab3be;
  --surface: #f3f5f7;
  --surface-subtle: #fafbfc;
  --brand-ink: #965bb5;
  --brand-hover: #77468f;
  --green: #25855a;
  --green-bar: #34966e;
  --green-light-bar: #92c8a8;
  --yellow: #aa7710;
  --yellow-bar: #d5a135;
  --red: #bb4654;
  --red-bar: #cf5b67;
  --purple: #9356b0;
  --purple-bar: #aa78c2;
  --success-text: #226a46;
  --success-bg: #e4f3ea;
  --success-border: #b8d9c6;
  --success-soft: #f7fbf8;
  --success-muted: #5c7669;
  --warning-text: #8a5b10;
  --warning-bg: #fff3d6;
  --warning-border: #e5cd97;
  --warning-soft: #fffbf3;
  --critical-text: #ab3141;
  --critical-bg: #fce8eb;
  --critical-border: #e7b4bd;
  --critical-soft: #fff7f7;
  --planned-text: #774393;
  --planned-bg: #f2e8f7;
  --planned-border: #d5b9e5;
  --planned-soft: #fdfbfe;
  --planned-hover: #fbf7fd;
  --neutral-bg: #eef1f4;
  --neutral-border: #cfd6de;
  --focus-ring: #b074d16b;
  --tooltip-shadow: 0 5px 22px rgba(24,36,51,.12);
}
:root[data-bs-theme="dark"] {
  color-scheme: dark;
  --page-bg: #11161e;
  --panel-bg: #19212c;
  --header-bg: rgba(21,27,36,.96);
  --text: #e3e9f1;
  --heading: #f1f4f8;
  --secondary: #b9c5d5;
  --muted: #a5b2c5;
  --subtle: #93a2b8;
  --border: #344154;
  --border-soft: #2c3849;
  --border-strong: #697a93;
  --surface: #253142;
  --surface-subtle: #202b3a;
  --brand-ink: #c69ade;
  --brand-hover: #e0b7f3;
  --green: #73d1a2;
  --green-bar: #49a880;
  --green-light-bar: #99c8ae;
  --yellow: #e8bd68;
  --yellow-bar: #cda550;
  --red: #f18b9a;
  --red-bar: #dd7486;
  --purple: #c495dc;
  --purple-bar: #ad85c5;
  --success-text: #8bddb1;
  --success-bg: #1c362b;
  --success-border: #365f4b;
  --success-soft: #152a22;
  --success-muted: #a0bdad;
  --warning-text: #f0c579;
  --warning-bg: #3a2e1d;
  --warning-border: #6b5230;
  --warning-soft: #2d251b;
  --critical-text: #ffabb6;
  --critical-bg: #3d252e;
  --critical-border: #6d3d4d;
  --critical-soft: #2e1e27;
  --planned-text: #d3adea;
  --planned-bg: #31253e;
  --planned-border: #5e4673;
  --planned-soft: #221e2d;
  --planned-hover: #2c2438;
  --neutral-bg: #283546;
  --neutral-border: #465871;
  --focus-ring: #c69ade99;
  --tooltip-shadow: 0 6px 24px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; min-width: 300px; background: var(--page-bg); color: var(--text); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; }
a { color: var(--brand-ink); text-decoration: none; text-underline-offset: 4px; }
a:hover { color: var(--brand-hover); }
button, a, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 2000; padding: 12px 20px; background: var(--panel-bg); }
.skip-link:focus { top: 10px; }
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--border); background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header-inner, .footer-inner { width: min(1108px, calc(100% - 48px)); margin: auto; display: flex; align-items: center; }
.header-inner { min-height: 66px; gap: 21px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { width: 110px; height: 50px; object-fit: contain; }
.brand-label { border-left: 1px solid var(--border); padding-left: 20px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-actions-content { display: flex; align-items: center; gap: 12px; }
.mobile-nav-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 9px; color: var(--text); background: transparent; }
.mobile-nav-toggle:hover { background: var(--surface); }
.mobile-nav-toggle .icon { width: 21px; height: 21px; }
.mobile-nav-toggle .menu-close-icon { display: none; }
.mobile-nav-toggle[aria-expanded="true"] .menu-open-icon { display: none; }
.mobile-nav-toggle[aria-expanded="true"] .menu-close-icon { display: block; }
.header-tools { display: flex; align-items: center; gap: 4px; padding-left: 12px; border-left: 1px solid var(--border); }
.refresh-control { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; margin: 0; padding: 0; border-radius: 9px; color: var(--brand-ink); cursor: pointer; }
.refresh-control:hover { background: var(--surface); }
.refresh-control:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.refresh-control > .icon { width: 18px; height: 18px; pointer-events: none; }
.refresh-icon-off { display: none; color: var(--muted); }
.refresh-control input:not(:checked) ~ .refresh-icon-on { display: none; }
.refresh-control input:not(:checked) ~ .refresh-icon-off { display: block; }
.content-shell { width: min(880px, calc(100% - 48px)); margin: auto; padding-bottom: 32px; min-height: calc(100vh - 137px); }
.content-shell:focus { outline: none; }
.header-select { position: relative; flex-shrink: 0; }
.timezone-control { display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; }
#timezone-display { white-space: nowrap; font-variant-numeric: tabular-nums; }
.timezone-control > .icon { width: 12px; height: 12px; pointer-events: none; transition: transform .15s ease; }
.timezone-control[aria-expanded="true"] > .icon { transform: rotate(180deg); }
.timezone-control:hover, .theme-toggle:hover { background: var(--surface); color: var(--text); }
.header-select-trigger:focus-visible, .header-select-trigger[aria-expanded="true"] { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); background: var(--panel-bg); color: var(--text); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-moon { display: none; }
[data-bs-theme="dark"] .theme-moon { display: block; }
[data-bs-theme="dark"] .theme-sun { display: none; }
.header-select-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: 230px; max-width: calc(100vw - 64px); max-height: min(352px, 65vh); padding: 6px; overflow-y: auto; overscroll-behavior: contain; color: var(--text); background: var(--panel-bg); border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 10px 28px rgba(15,23,42,.16), 0 2px 6px rgba(15,23,42,.08); }
.theme-control .header-select-menu { width: 168px; }
[data-bs-theme="dark"] .header-select-menu { box-shadow: 0 12px 32px rgba(0,0,0,.38), 0 2px 8px rgba(0,0,0,.24); }
.header-select-option { display: grid; grid-template-columns: minmax(0,1fr) 16px; gap: 16px; align-items: center; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 6px; color: inherit; background: transparent; font: inherit; font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer; }
.header-select-option:hover, .header-select-option:focus-visible { outline: 0; background: var(--surface); }
.header-select-option > .icon { width: 16px; height: 16px; visibility: hidden; }
.header-select-option[aria-selected="true"] > .icon { visibility: visible; }
.view-heading { text-align: center; padding-top: 36px; margin-bottom: 28px; }
h1 { font-size: 28px; line-height: 1.4; font-weight: 600; letter-spacing: -.3px; margin: 0; color: var(--text); }
.view-heading p { color: var(--muted); margin: 9px 0 0; font-size: 14px; }
.view-nav { margin: 0; display: inline-flex; flex-wrap: nowrap; background: transparent; border: 0; padding: 0; gap: 4px; }
.view-nav .nav-link { display: flex; align-items: center; justify-content: center; height: 36px; padding: 0 12px; color: var(--muted); font-size: 14px; font-weight: 500; border-radius: 6px; white-space: nowrap; }
.view-nav .nav-link > .icon { display: none; }
.view-nav .nav-link:hover { background: var(--surface); color: var(--text); }
.view-nav .nav-link.active { background: var(--surface); color: var(--brand-ink); box-shadow: none; }
.card { border: 1px solid var(--border); border-radius: 8px; box-shadow: none; background: var(--panel-bg); }
/* Overview focuses on the current service state. */
.health-banner { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; background: var(--success-soft); border-color: var(--success-border); }
.health-main { display: flex; align-items: center; gap: 15px; }
.health-main > div { min-width: 0; }
.health-symbol { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; color: var(--success-text); background: var(--success-bg); border-radius: 50%; }
.health-symbol .icon { width: 23px; height: 23px; stroke-width: 2; }
.health-main h2 { font-size: 20px; font-weight: 600; color: var(--success-text); margin: 0 0 5px; }
.health-main p { color: var(--success-muted); font-size: 13px; margin: 0; }
.refresh-summary { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; row-gap: 3px; font-variant-numeric: tabular-nums; }
.refresh-summary time, #refresh-countdown { white-space: nowrap; }
.health-banner.degraded { background: var(--warning-soft); border-color: var(--warning-border); }
.health-banner.outage { background: var(--critical-soft); border-color: var(--critical-border); }
.health-banner.maintenance { background: var(--planned-soft); border-color: var(--planned-border); }
.health-banner.degraded h2, .health-banner.degraded .health-symbol { color: var(--warning-text); }
.health-banner.outage h2, .health-banner.outage .health-symbol { color: var(--critical-text); }
.health-banner.maintenance h2, .health-banner.maintenance .health-symbol { color: var(--planned-text); }
.health-banner.degraded .health-symbol, .health-banner.outage .health-symbol, .health-banner.maintenance .health-symbol { background: var(--panel-bg); }
.maintenance-section, .active-section { margin-top: 31px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 13px; }
.section-heading h2 { font-size: 18px; font-weight: 600; margin: 0; line-height: 1.5; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-ink); font-size: 13px; white-space: nowrap; }
.text-link .icon { width: 16px; height: 16px; }
.heading-note { color: var(--muted); font-size: 12px; font-weight: 400; }
.article-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.meta-divider { width: 1px; height: 10px; background: var(--border-soft); }
.badge { font-size: 11px; font-weight: 500; line-height: 1.5; padding: 2px 7px; border-radius: 4px; letter-spacing: 0; border: 1px solid transparent; white-space: nowrap; }
.badge-resolved, .badge-completed { color: var(--success-text); background: var(--success-bg); border-color: var(--success-border); }
.badge-scheduled, .badge-maintenance, .badge-in_progress { color: var(--planned-text); background: var(--planned-bg); border-color: var(--planned-border); }
.badge-published { color: var(--muted); background: var(--neutral-bg); border-color: var(--neutral-border); }
.badge-investigating, .badge-identified, .badge-monitoring, .badge-degraded, .badge-outage { color: var(--warning-text); background: var(--warning-bg); border-color: var(--warning-border); }
.article-card { display: block; padding: 20px 22px; color: var(--text); }
.article-card-heading { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.article-card h3 { min-width: 0; color: var(--heading); font-size: 16px; font-weight: 600; margin: 0; line-height: 1.6; }
.article-card .badge { flex-shrink: 0; margin-top: 1px; font-size: 13px; }
.article-card p { color: var(--secondary); font-size: 14px; margin: 9px 0 12px; line-height: 1.8; }
.article-card-meta { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; line-height: 1.6; }
.article-card-region { min-width: 0; color: var(--text); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.article-card-footer { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.article-card-time { display: inline-flex; align-items: baseline; min-width: 0; }
.article-card-time > time { white-space: nowrap; }
.article-card-footer .icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--brand-ink); }
.article-card:is(:hover,:focus-within,:active) { background: var(--planned-hover); color: var(--text); text-decoration: none; border-color: var(--planned-border); box-shadow: 0 2px 12px rgba(176,116,209,.1); }
.article-card-footer time { font-variant-numeric: tabular-nums; }
.state-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11px; color: var(--subtle); }
.status-dot, .legend-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-dot.operational, .legend-dot.operational { background: var(--green); }
.status-dot.good, .legend-dot.good { background: var(--green-light-bar); }
.status-dot.degraded, .legend-dot.degraded { background: var(--yellow); }
.status-dot.outage, .legend-dot.outage { background: var(--red); }
.status-dot.maintenance, .legend-dot.maintenance { background: var(--purple); }
/* Cloudflare-inspired status filters and grouped service histories. */
.status-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.status-filter { --status-color: var(--green); display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 82px; padding: 12px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-bg); cursor: pointer; transition: border-color .15s, background .15s; }
.status-filter > span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.status-filter > strong { font-size: 25px; line-height: 1.2; font-weight: 600; color: var(--status-color); font-variant-numeric: tabular-nums; }
.status-filter.degraded { --status-color: var(--yellow); }
.status-filter.outage { --status-color: var(--red); }
.status-filter.maintenance { --status-color: var(--purple); }
.status-filter.is-empty:not([aria-pressed="true"]) > strong { color: var(--muted); font-weight: 500; }
.status-filter:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.status-filter[aria-pressed="true"] { border-color: var(--status-color); background: color-mix(in srgb,var(--status-color) 5%,var(--panel-bg)); box-shadow: 0 0 0 1px var(--status-color); }
.availability-toolbar { display: flex; align-items: center; gap: 12px; }
.availability-toolbar label { margin: 0; }
.service-search { display: flex; flex: 1; min-width: 0; position: relative; }
.service-search > .icon { position: absolute; left: 13px; top: 12px; width: 16px; height: 16px; color: var(--subtle); pointer-events: none; }
.service-search input { width: 100%; height: 40px; padding-left: 39px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; color: var(--text); box-shadow: none; background: var(--panel-bg); }
.service-search input::placeholder { color: var(--muted); }
.service-search input:focus { border-color: var(--brand-ink); box-shadow: 0 0 0 3px rgba(176,116,209,.1); }
.service-results-line { display: flex; align-items: center; justify-content: space-between; min-height: 38px; color: var(--muted); font-size: 12px; }
.service-results-line[hidden] + .service-table-scroll { margin-top: 16px; }
.service-results-line button, .service-empty button { border: 0; padding: 3px 0; background: transparent; color: var(--brand-ink); cursor: pointer; }
.service-table-scroll { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 2px; }
.service-table { --history-bar-width: 4px; --history-gap: 2px; --history-width: calc(30 * var(--history-bar-width) + 29 * var(--history-gap)); --service-columns: minmax(176px,1fr) var(--history-width) 90px 100px; --service-gap: 20px; --service-inset: 20px; min-width: 646px; }
.service-table:has(.service-empty) { min-width: 0; }
.service-row { display: grid; grid-template-columns: var(--service-columns); column-gap: var(--service-gap); align-items: center; padding-inline: var(--service-inset); }
.service-category { background: var(--page-bg); }
.service-category + .service-category { margin-top: 28px; }
.category-heading, .subcategory-heading { margin: 0; }
.category-toggle, .subcategory-toggle { display: flex; align-items: center; width: 100%; border: 0; text-align: left; font-family: inherit; cursor: pointer; }
.category-toggle { gap: 8px; min-height: 44px; padding: 8px 0; background: transparent; border-radius: 6px; }
.category-name { color: var(--text); font-size: 18px; line-height: 1.5; font-weight: 600; }
.category-state { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--green); }
.category-toggle[aria-expanded="true"] > .category-state.operational,
.subcategory-toggle[aria-expanded="true"] > .category-state.operational { display: none; }
.category-state.degraded, .item-state.degraded { color: var(--yellow); }
.category-state.outage, .item-state.outage { color: var(--red); }
.category-state.maintenance, .item-state.maintenance { color: var(--purple); }
.category-state.unknown { color: var(--muted); }
.status-dot.unknown { background: var(--subtle); }
.category-chevron { width: 14px; height: 14px; color: var(--subtle); flex-shrink: 0; transition: transform .15s ease; }
[aria-expanded="true"] > .category-chevron { transform: rotate(90deg); }
.category-toggle:hover { background: var(--surface-subtle); }
.category-toggle:focus-visible, .subcategory-toggle:focus-visible { outline-offset: -3px; }
.category-content { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; overflow: clip; background: var(--panel-bg); }
.service-subcategory { background: var(--panel-bg); }
.subcategory-toggle { gap: 8px; min-height: 48px; padding: 12px var(--service-inset); background: transparent; border-bottom: 1px solid var(--border-soft); }
.subcategory-toggle[aria-expanded="false"] { border-bottom: 0; }
.subcategory-toggle:hover { background: var(--surface-subtle); }
.subcategory-name { color: var(--text); font-size: 16px; line-height: 1.5; font-weight: 600; }
.subcategory-toggle .category-chevron { width: 14px; height: 14px; }
.service-subcategory + .service-subcategory { border-top: 1px solid var(--border); }
.service-row { min-height: 60px; padding-block: 16px; }
.service-row + .service-row { border-top: 1px solid var(--border-soft); }
.service-name { min-width: 0; margin: 0; padding-left: 44px; color: var(--text); font-size: 16px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.item-state { justify-self: end; font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--green); }
.uptime-value { text-align: right; color: var(--text); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.uptime-chart { display: grid; grid-template-columns: repeat(var(--days,30),var(--history-bar-width)); gap: var(--history-gap); width: var(--history-width); height: 28px; min-width: 0; border-radius: 2px; }
/* Keep every day's pointer target taller than its visible status bar. */
.uptime-day { display: block; height: 100%; min-width: 0; padding-block: 4px; background-color: var(--green-bar); background-clip: content-box; border-radius: 1.5px; transition: filter .12s ease; }
.uptime-day.good { background-color: var(--green-light-bar); }
.state-label.good { color: var(--green); }
.uptime-day.degraded { background-color: var(--yellow-bar); }
.uptime-day.outage { background-color: var(--red-bar); }
.uptime-day.maintenance { background-color: var(--purple-bar); }
.uptime-day:hover, .uptime-day.selected { filter: brightness(.7); }
.uptime-day[data-has-article] { cursor: pointer; }
.subcategory-empty { padding: 15px 16px; margin: 0; color: var(--muted); font-size: 13px; }
.service-empty { padding: 40px 20px; text-align: center; border: 1px solid var(--border); border-radius: 8px; }
.service-empty h2 { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.service-empty p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.availability-key { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 22px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12px; }
.chart-legend > span { display: flex; align-items: center; gap: 6px; }
.legend-dot { border-radius: 2px; width: 8px; height: 8px; }
.legend-dot.operational { background: var(--green-bar); }
.legend-dot.good { background: var(--green-light-bar); }
.legend-dot.degraded { background: var(--yellow-bar); }
.legend-dot.outage { background: var(--red-bar); }
.legend-dot.maintenance { background: var(--purple-bar); }
.tooltip-uptime { border-top: 1px solid var(--border-soft); padding-top: 8px; }
.tooltip-uptime b { float: right; color: var(--secondary); font-weight: 500; }
.history-section + .history-section { margin-top: 32px; }
.history-empty { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.history-end { text-align: center; font-size: 11px; color: var(--subtle); margin: 26px 0 0; }
.article-page { max-width: 800px; margin-inline: auto; padding-top: 32px; overflow-wrap: anywhere; }
.article-loading-message { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.article-updates { --update-accent: var(--heading); margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); min-width: 0; }
.article-updates.is-ended { --update-accent: var(--green); }
.article-updates.is-fault { --update-accent: var(--red); }
.article-updates.is-announced, .article-updates.is-in_progress { --update-accent: var(--brand-ink); }
.article-main { min-width: 0; }
.article-back { display: inline-flex; align-items: center; gap: 6px; color: var(--secondary); font-size: 14px; margin-bottom: 24px; }
.article-back .icon { width: 16px; height: 16px; }
.article-header { margin-bottom: 24px; }
.article-header.has-body { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-header h1 { color: var(--heading); margin: 0; font-size: 30px; line-height: 1.45; font-weight: 650; }
.article-statusline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 12px 0 0; color: var(--secondary); font-size: 13px; line-height: 1.6; }
.article-updated { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.article-kind, .article-state { display: inline-flex; padding: 2px 8px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 4px; background: transparent; font-weight: 500; }
.article-kind.kind-maintenance { color: var(--brand-ink); }
.article-kind.kind-major { color: var(--red); }
.article-kind.kind-minor { color: var(--yellow); }
.article-state.is-ended { color: var(--green); }
.article-state.is-fault { color: var(--red); }
.article-state.is-announced, .article-state.is-in_progress { color: var(--brand-ink); }
.article-facts { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; padding: 0; margin: 0; color: var(--text); font-size: 14px; line-height: 1.75; }
.article-intro + .article-facts, .article-body + .article-facts { margin-top: 24px; }
.article-fact { display: grid; grid-template-columns: 4em minmax(0,1fr); gap: 14px; align-items: baseline; max-width: 100%; min-width: 0; }
.article-fact dt { margin: 0; color: var(--muted); font-weight: 400; white-space: nowrap; }
.article-fact dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; margin: 0; }
.article-impact-time { color: var(--text); }
:is(.article-page,.article-card) .impact-major, :is(.article-page,.article-card) .event-status-fault { color: var(--critical-text); background: var(--critical-bg); border-color: var(--critical-border); }
:is(.article-page,.article-card) .impact-minor, :is(.article-page,.article-card) .event-status-in_progress { color: var(--warning-text); background: var(--warning-bg); border-color: var(--warning-border); }
:is(.article-page,.article-card) .impact-maintenance, :is(.article-page,.article-card) .event-status-announced { color: var(--planned-text); background: var(--planned-bg); border-color: var(--planned-border); }
:is(.article-page,.article-card) .event-status-ended { color: var(--success-text); background: var(--success-bg); border-color: var(--success-border); }
:is(.article-page,.article-card) .impact-none, :is(.article-page,.article-card) .impact-unknown, :is(.article-page,.article-card) .event-status-published, :is(.article-page,.article-card) .event-status-unknown { color: var(--secondary); background: var(--neutral-bg); border-color: var(--neutral-border); }
.impact-time-range { display: inline-flex; flex-wrap: wrap; gap: 0 5px; font-variant-numeric: tabular-nums; }
.impact-time-end { display: inline-block; white-space: nowrap; }
.impact-time-range time { white-space: nowrap; }
.time-zone { white-space: nowrap; }
.affected-service { color: var(--planned-text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--planned-border); }
.affected-service:hover { color: var(--brand-hover); text-decoration-color: currentColor; }
.article-intro { color: var(--text); font-size: 16px; line-height: 1.85; margin: 0; }
.article-main h2, .article-updates h2 { color: var(--heading); font-size: 18px; font-weight: 600; margin: 0 0 24px; }
.update-log { display: grid; gap: 28px; list-style: none; padding: 0; margin: 0; }
.update-entry { position: relative; min-width: 0; padding-left: 24px; }
.update-entry::before { content: ''; position: absolute; z-index: 1; left: 3px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 0 4px var(--page-bg); }
.update-entry:not(:last-child)::after { content: ''; position: absolute; left: 6px; top: 14px; bottom: -42px; width: 1px; background: var(--border); }
.update-entry.is-latest::before { background: var(--update-accent); }
.update-entry-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.update-entry h3 { min-width: 0; margin: 0; color: var(--heading); font-size: 17px; font-weight: 550; line-height: 1.6; }
.update-entry.is-latest h3 { color: var(--update-accent); font-weight: 650; }
.update-entry time { flex-shrink: 0; color: var(--muted); font-size: 13px; line-height: 1.75; font-variant-numeric: tabular-nums; white-space: nowrap; }
.update-entry p { margin: 0; color: var(--secondary); font-size: 16px; line-height: 1.85; }
.empty-state { text-align: center; padding: 26px; color: var(--subtle); font-size: 13px; }
.history-tooltip { position: fixed; z-index: 1100; width: 260px; max-width: calc(100vw - 20px); padding: 14px 16px; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--tooltip-shadow); color: var(--secondary); font-size: 12px; pointer-events: none; }
.history-tooltip strong { display: block; font-weight: 500; font-size: 12px; margin-bottom: 8px; }
.history-tooltip p { margin: 8px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.7; }
.history-tooltip .tooltip-range { margin: 0 0 9px; color: var(--secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { min-height: 70px; gap: 20px; color: var(--subtle); font-size: 12px; }
.footer-inner > a { margin-left: auto; color: var(--subtle); display: inline-flex; align-items: center; gap: 4px; }
.footer-inner .icon { width: 14px; height: 14px; }
.empty-state { margin: 0; padding: 25px; text-align: center; color: var(--subtle); border: 1px dashed var(--border); border-radius: 8px; background: var(--surface-subtle); }
.noscript-notice { position: fixed; bottom: 0; width: 100%; padding: 16px; background: var(--warning-bg); color: var(--warning-text); text-align: center; }
h1:focus, main:focus { outline: none; }
@media (min-width: 901px) {
  .header-actions.collapse, .header-actions.collapsing { display: flex !important; height: auto !important; overflow: visible; }
}
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 0 16px; padding-block: 8px; }
  .header-inner > .brand { min-height: 50px; align-items: center; }
  .mobile-nav-toggle { display: inline-flex; margin-left: auto; }
  .header-actions { flex-basis: 100%; width: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; }
  /* Keep spacing inside the measured content; the collapse shell must reach zero. */
  .header-actions-content { flex: 0 0 auto; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; }
  .header-actions.show, .header-actions.collapsing { display: flex; }
  .view-nav, .header-tools { padding: 12px 16px; border: 1px solid var(--border-soft); border-radius: 6px; background: var(--panel-bg); box-shadow: 0 2px 4px rgba(31,41,55,.04); }
  .header-tools { justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
  .view-nav { flex-direction: column; align-items: stretch; gap: 2px; }
  .view-nav .nav-link { justify-content: flex-start; gap: 10px; height: 40px; padding: 7px 10px; font-weight: 600; }
  .view-nav .nav-link > .icon { display: block; width: 18px; height: 18px; }
  .view-nav .nav-link:hover:not(.active) { background: transparent; color: var(--text); }
  .view-nav .nav-link.active, .view-nav .nav-link:active { background: var(--planned-bg); color: var(--brand-ink); }
  [data-bs-theme="dark"] .view-nav, [data-bs-theme="dark"] .header-tools { box-shadow: 0 2px 4px rgba(0,0,0,.16); }
}
@media (max-width: 700px) {
  .header-inner, .footer-inner, .content-shell { width: calc(100% - 36px); }
  .header-inner { column-gap: 13px; }
  .brand img { width: 94px; height: 43px; }
  .brand-label { padding-left: 13px; font-size: 12px; }
  .view-heading { padding-top: 28px; margin-bottom: 24px; }
  h1 { font-size: 27px; }
  .view-heading p { font-size: 13px; margin-top: 7px; margin-bottom: 0; }
  .health-banner { padding: 20px; flex-wrap: wrap; gap: 18px; }
  .health-main h2 { font-size: 18px; }
  .health-main p { font-size: 12px; }
  .section-heading h2 { font-size: 17px; }
  .text-link { font-size: 12px; }
  .article-card { padding: 18px; }
  .article-card p { font-size: 14px; }
  .article-card-heading { gap: 10px; }
  .article-card-footer { gap: 10px; }
  .status-filters { gap: 8px; margin-bottom: 16px; }
  .status-filter { min-height: 70px; padding: 10px 3px; }
  .status-filter > span { font-size: 12px; }
  .status-filter > strong { font-size: 23px; }
  .availability-toolbar { gap: 8px; }
  .service-search input { font-size: 13px; padding-left: 30px; }
  .service-search > .icon { left: 10px; width: 14px; }
  .service-table-scroll { overflow-x: visible; }
  .service-table { --service-inset: 15px; min-width: 0; }
  .category-toggle { gap: 8px; }
  .service-row { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "name state" "history uptime"; column-gap: 12px; row-gap: 8px; min-height: 0; padding: 14px var(--service-inset) 14px calc(var(--service-inset) + 44px); }
  .service-row > .service-identity { grid-area: name; }
  .service-name { padding-left: 0; font-size: 15px; }
  .service-row > .item-state { grid-area: state; align-self: start; padding-top: 1px; font-size: 13px; white-space: nowrap; }
  .service-row > .uptime-chart { grid-area: history; }
  .service-row > .uptime-value { grid-area: uptime; font-size: 13px; }
  .availability-key { flex-wrap: wrap; gap: 12px; margin-top: 20px; }
  .chart-legend { gap: 15px; }
  .article-header h1 { font-size: 24px; }
  .footer-inner { min-height: 72px; font-size: 11px; flex-wrap: wrap; gap: 4px 16px; padding-block: 16px; }
}
@media (max-width: 374px) {
  .service-table { --history-gap: 1px; }
  .service-row { column-gap: 10px; padding-left: calc(var(--service-inset) + 30px); }
}
/* Grow in whole pixels so the thirty daily bars stay equally crisp. */
@media (min-width: 390px) and (max-width: 700px) {
  .service-table { --history-bar-width: 5px; }
}
@media (min-width: 430px) and (max-width: 700px) {
  .service-table { --history-bar-width: 6px; }
}
@media (min-width: 540px) and (max-width: 700px) {
  .service-table { --history-bar-width: 8px; }
}
@media (max-width: 540px) {
  .brand-label { display: none; }
}
@media (max-width: 480px) {
  .article-facts { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
  .article-fact { grid-template-columns: 4em minmax(0,1fr); gap: 12px; }
}
@media (max-width: 420px) {
  .header-inner, .content-shell, .footer-inner { width: calc(100% - 32px); }
  .header-inner { column-gap: 10px; }
  .header-tools { padding-inline: 10px; gap: 2px; }
  .header-tools .theme-toggle, .header-tools .refresh-control { width: 32px; }
  .timezone-control { padding-inline: 4px; }
  .category-toggle[aria-expanded="false"] .category-state, .subcategory-toggle[aria-expanded="false"] .category-state { margin-left: auto; }
  .health-banner { padding: 18px 16px; }
  .health-main { gap: 12px; }
  .health-main h2 { font-size: 17px; }
  .badge { font-size: 10px; padding: 2px 5px; }
  .article-card { padding: 16px; }
  .heading-note { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Typecho live data and editorial content, using the established status palette. */
.health-banner.unknown { background:var(--surface-subtle); border-color:var(--border); }
.health-banner.unknown h2, .health-banner.unknown .health-symbol { color:var(--secondary); }
.health-banner.unknown .health-symbol { background:var(--surface); }
.api-notice { margin:0 0 20px; padding:12px 16px; border:1px solid var(--neutral-border); border-radius:8px; color:var(--secondary); background:var(--surface-subtle); line-height:1.8; }
.uptime-day.unknown, .legend-dot.unknown { background-color:var(--border-strong); }
.item-state.unknown { color:var(--muted); }
.service-identity { min-width:0; }
.service-events { display:flex; flex-direction:column; gap:3px; padding-left:44px; margin-top:5px; }
.service-identity .service-events { min-width:0; }
.service-event { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; line-height:1.6; }
.service-event.event-ongoing { color:var(--warning-text); }
.service-event.event-announced { color:var(--planned-text); }
.service-event:hover { text-decoration:underline; }
@media (max-width:700px) { .service-events { padding-left:0; } }
.service-highlight { background:var(--surface-subtle); box-shadow:inset 3px 0 var(--brand); }
.article-body { color:var(--text); font-size:16px; line-height:1.85; overflow-wrap:anywhere; margin:0; }
.article-body > :first-child { margin-top:0; }
.article-body > :last-child { margin-bottom:0; }
.article-body p, .article-body ul, .article-body ol, .article-body pre, .article-body table, .article-body figure { margin:0 0 18px; }
.article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 { color:var(--heading); font-weight:600; margin:28px 0 12px; line-height:1.6; }
.article-body h2 { font-size:21px; }
.article-body h3 { font-size:18px; }
.article-body img { max-width:100%; height:auto; border-radius:6px; }
.article-body a { text-decoration:underline; }
.article-body pre { padding:16px; border:1px solid var(--border-soft); border-radius:6px; background:var(--surface-subtle); overflow:auto; }
.article-body :not(pre) > code { color:var(--secondary); background:var(--surface); border-radius:3px; padding:2px 5px; }
.article-body blockquote { border-left:3px solid var(--border-strong); padding-left:18px; margin:20px 0; color:var(--muted); }
.article-body table { display:block; max-width:100%; overflow-x:auto; border-collapse:collapse; font-size:14px; }
.article-body th, .article-body td { padding:9px 12px; border:1px solid var(--border); }
.article-body th { background:var(--surface-subtle); color:var(--heading); }
.article-body figcaption { text-align:center; color:var(--muted); font-size:13px; margin-top:8px; }
.update-entry p { white-space:pre-wrap; overflow-wrap:anywhere; }
.history-tooltip.is-pinned { pointer-events:auto; max-height:calc(100vh - 32px); overflow-y:auto; }
.tooltip-articles { display:grid; gap:7px; padding-top:10px; margin-top:9px; border-top:1px solid var(--border-soft); }
.tooltip-articles a { font-size:12px; line-height:1.6; text-decoration:underline; overflow-wrap:anywhere; }

/* Staff-only editorial form. Its server-rendered content is kept outside article rendering. */
#updates { scroll-margin-top:28px; }
.article-update-panel { max-width:800px; margin:32px auto 0; border:1px solid var(--border); border-radius:8px; background:var(--panel-bg); color:var(--text); }
.article-update-panel > summary { display:flex; align-items:center; gap:10px; padding:16px 20px; color:var(--heading); font-size:15px; font-weight:600; line-height:1.6; list-style:none; cursor:pointer; border-radius:8px; }
.article-update-panel > summary::-webkit-details-marker { display:none; }
.article-update-panel > summary > .icon { width:18px; height:18px; color:var(--muted); }
.article-update-panel > summary > .icon:last-child { width:15px; height:15px; }
.article-update-panel[open] > summary > .icon:last-child { transform:rotate(180deg); }
.update-panel-note { margin-left:auto; color:var(--muted); font-size:12px; font-weight:400; }
.article-update-panel > summary:hover { background:var(--surface-subtle); }
.article-update-panel[open] > summary { border-bottom:1px solid var(--border-soft); border-radius:8px 8px 0 0; }
.article-update-panel form { padding:20px; }
.update-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 20px; }
.update-form-grid > label, .update-field { display:flex; flex-direction:column; gap:7px; min-width:0; margin:0; color:var(--heading); font-size:14px; font-weight:500; }
.update-field-wide { grid-column:1/-1; }
.update-field > span { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.article-update-panel .update-field > span > small { display:inline; }
.article-update-panel :is(input[type="text"],input[type="datetime-local"],select,textarea) { display:block; width:100%; min-width:0; min-height:40px; border:1px solid var(--border-strong); border-radius:6px; padding:9px 11px; color:var(--text); background:var(--panel-bg); font:inherit; font-size:14px; font-weight:400; line-height:1.5; box-shadow:none; }
.article-update-panel textarea { min-height:144px; resize:vertical; }
.article-update-panel :is(input,select,textarea):focus { outline:none; border-color:var(--brand-ink); box-shadow:0 0 0 3px var(--focus-ring); }
.article-update-panel :is(small,.description,.update-field-help) { display:block; color:var(--muted); font-size:12px; font-weight:400; line-height:1.7; }
.update-form-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 18px; margin-top:20px; padding-top:18px; border-top:1px solid var(--border-soft); }
.update-form-actions p { margin:0; color:var(--muted); font-size:12px; }
.article-update-panel :is(button[type="submit"],input[type="submit"]) { display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:8px 17px; margin-left:auto; border:1px solid var(--brand-ink); border-radius:6px; color:var(--panel-bg); background:var(--brand-ink); font:inherit; font-size:14px; font-weight:500; line-height:1.5; cursor:pointer; }
.article-update-panel :is(button[type="submit"],input[type="submit"]):hover { background:var(--brand-hover); border-color:var(--brand-hover); }
.article-update-panel :is(button[type="submit"],input[type="submit"]):disabled { opacity:.65; cursor:wait; }
@media (max-width:600px) {
  .article-update-panel > summary { padding:14px 16px; }
  .article-update-panel form { padding:16px; }
  .update-form-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
  .article-update-panel :is(input[type="text"],input[type="datetime-local"],select,textarea) { font-size:16px; }
  .update-form-actions { align-items:flex-start; }
}

/* Keep the full card clickable without nesting the area button inside a link. */
.article-card { position: relative; }
.article-card-link, .article-card-link:hover { color: inherit; text-decoration: none; }
.article-card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.region-toggle { position: relative; z-index: 2; padding: 0; border: 0; border-bottom: 1px dotted var(--subtle); background: none; color: inherit; font: inherit; font-weight: 600; line-height: inherit; cursor: pointer; }
.region-toggle:hover, .region-toggle[aria-expanded="true"] { color: var(--brand-ink); border-color: currentColor; }
.region-popover { position: fixed; z-index: 1200; display: block; width: max-content; min-width: 180px; max-width: min(320px,calc(100vw - 24px)); max-height: min(280px,calc(100vh - 32px)); overflow-y: auto; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-bg); color: var(--text); box-shadow: var(--tooltip-shadow); font-size: 14px; font-weight: 400; line-height: 1.7; text-align: left; overflow-wrap: anywhere; }
.region-popover[hidden] { display: none; }
.region-popover strong { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-bottom: 7px; }
.region-popover-list { display: grid; gap: 5px; }
