/* Public status page styles (infra/brand/status) — layered on haiyz-tokens.css + haiyz-bar.css.
   2026-09-12: the state sentence beside a live ring, three platform figures, service tiles with
   their 60-beat strips, and a timeline of the last week.
   Phase F (2026-09-19): drawn on the kit — the kit's card (hairline, 6px radius, raised shadow),
   stat tile, status chip and semantic state colours from the generated tokens; no glows. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/IBMPlexSansArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
:root { --ok: var(--haiyz-ok); --warn: var(--haiyz-warn); --bad: var(--haiyz-bad); --maint: var(--haiyz-info); --state: var(--ok); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font: 14px/1.5 var(--haiyz-font); -webkit-font-smoothing: antialiased; }
main { max-width: 1080px; margin: 0 auto; padding: 40px 24px 72px; }
h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 10px; color: var(--haiyz-strong); text-wrap: balance; }
.sub { color: var(--haiyz-muted); margin: 0; max-width: 52ch; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 600 11px/1.2 var(--haiyz-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--haiyz-muted); }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--haiyz-border); border-radius: var(--haiyz-radius-sm); font-size: 10px; letter-spacing: 0.14em; color: var(--state); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--state); }
/* the hero: state colour drives the ring, the live pill and a soft wash behind the sentence */
.hero { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); grid-template-areas: "ring text" "ring stats"; gap: 18px 28px; align-items: center; padding: 28px; margin-bottom: 24px; border: 1px solid var(--haiyz-border); border-radius: var(--haiyz-radius-lg); background: var(--haiyz-card); box-shadow: var(--haiyz-shadow); }
.hero[data-state="degraded"] { --state: var(--warn); }
.hero[data-state="down"] { --state: var(--bad); }
.hero[data-state="maintenance"] { --state: var(--maint); }
.hero[data-state="loading"], .hero[data-state="unknown"] { --state: var(--haiyz-muted); }
.hero__ring { grid-area: ring; width: 132px; height: 132px; }
.hero__ring svg { width: 100%; height: 100%; display: block; }
.ring__track { fill: none; stroke: var(--haiyz-border); stroke-width: 6; }
.ring__arc { fill: none; stroke: var(--state); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke-dashoffset .6s ease; }
.ring__ico { fill: none; stroke: var(--state); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero__text { grid-area: text; min-width: 0; }
.hero__stats { grid-area: stats; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.hero__stats div { padding: 14px 16px; border: 1px solid var(--haiyz-border); border-radius: var(--haiyz-radius); background: var(--haiyz-card); box-shadow: var(--haiyz-shadow); }
.hero__stats dt { font-size: 12px; font-weight: 500; color: var(--haiyz-muted); }
.hero__stats dd { margin: 4px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--haiyz-strong); font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero__stats dd small { font-size: 13px; font-weight: 500; color: var(--haiyz-muted); margin-inline-start: 4px; }
/* incident / maintenance notices */
.notice { border: 1px solid var(--haiyz-border); border-inline-start: 3px solid var(--warn); background: var(--haiyz-warn-soft); border-radius: var(--haiyz-radius); padding: 14px 16px; margin-bottom: 18px; }
.notice.maint { background: var(--haiyz-info-soft); }
.notice.maint { border-inline-start-color: var(--maint); }
.notice h3 { margin: 0 0 4px; font-size: 15px; }
.notice p { margin: 0; color: var(--haiyz-muted); font-size: 14px; white-space: pre-line; }
.notice time { font-size: 12px; color: var(--haiyz-muted); }
/* component groups: a kicker with a rule, then tiles */
section.group { margin-bottom: 26px; }
.group h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; font: 600 11px/1.2 var(--haiyz-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--haiyz-muted); }
.group h2::after { content: ""; flex: 1; height: 1px; background: var(--haiyz-border); }
.group h2 .count { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--haiyz-muted); opacity: .8; }
.group .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.row { --state: var(--ok); --state-soft: var(--haiyz-ok-soft); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 16px; border: 1px solid var(--haiyz-border); border-radius: var(--haiyz-radius); background: var(--haiyz-card); box-shadow: var(--haiyz-shadow); }
.row[data-state="degraded"] { --state: var(--warn); --state-soft: var(--haiyz-warn-soft); }
.row[data-state="down"] { --state: var(--bad); --state-soft: var(--haiyz-bad-soft); }
.row[data-state="maintenance"] { --state: var(--maint); --state-soft: var(--haiyz-info-soft); }
.row[data-state="unknown"] { --state: var(--haiyz-muted); --state-soft: var(--haiyz-sunken); }
.row .name { font-weight: 600; color: var(--haiyz-strong); display: flex; align-items: center; gap: 10px; min-width: 0; }
.row .name .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--state); flex: none; }
/* the kit's status chip: the semantic colour on its soft fill, small radius */
.row .state { font-size: 12px; font-weight: 600; color: var(--state); white-space: nowrap; padding: 2px 8px; border-radius: var(--haiyz-radius-sm); background: var(--state-soft); }
.row .beats { grid-column: 1 / -1; display: flex; gap: 2px; height: 26px; align-items: flex-end; }
.row .beats i { flex: 1 1 0; height: 100%; border-radius: 2px; background: var(--ok); opacity: 0.85; min-width: 2px; }
.row .beats i.b0 { background: var(--bad); opacity: 1; } .row .beats i.b2 { background: var(--warn); opacity: 1; } .row .beats i.b3 { background: var(--maint); } .row .beats i.empty { background: var(--haiyz-border); opacity: 0.6; }
.row .meta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--haiyz-muted); font-variant-numeric: tabular-nums; }
.row .meta b { font-size: 15px; font-weight: 700; color: var(--haiyz-strong); margin-inline-end: 4px; }
/* the last week as a timeline */
.days h2 { display: flex; align-items: center; gap: 14px; font: 600 11px/1.2 var(--haiyz-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--haiyz-muted); margin: 34px 0 14px; }
.days h2::after { content: ""; flex: 1; height: 1px; background: var(--haiyz-border); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--haiyz-border); }
.day { position: relative; padding: 6px 0 14px 28px; }
[dir="rtl"] .day { padding: 6px 28px 14px 0; }
.day::before { content: ""; position: absolute; inset-inline-start: 2px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--haiyz-card); border: 2px solid var(--ok); }
.day.has::before { border-color: var(--bad); background: var(--bad); }
.day h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--haiyz-strong); }
.day h3 .date { font-weight: 400; color: var(--haiyz-muted); }
.day p { margin: 0; color: var(--haiyz-muted); font-size: 13px; }
.day ul { margin: 6px 0 0; padding: 0; list-style: none; color: var(--haiyz-ink); font-size: 14px; }
.day li { padding: 8px 12px; border: 1px solid var(--haiyz-border); border-inline-start: 3px solid var(--bad); border-radius: var(--haiyz-radius); background: var(--haiyz-card); margin-top: 6px; }
.day li time { color: var(--haiyz-muted); font-variant-numeric: tabular-nums; margin-inline-end: 8px; }
footer { margin-top: 36px; color: var(--haiyz-muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--haiyz-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--haiyz-muted); margin: 0 0 18px; }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; background: var(--ok); }
.legend span.w::before { background: var(--warn); } .legend span.d::before { background: var(--bad); } .legend span.m::before { background: var(--maint); }
/* Arabic letters join: no tracking and no monospace on Arabic kickers */
html[lang="ar"] .eyebrow, html[lang="ar"] .group h2, html[lang="ar"] .days h2, html[lang="ar"] .live { font-family: var(--haiyz-font); letter-spacing: 0; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; grid-template-areas: "ring" "text" "stats"; padding: 22px; } .hero__ring { width: 96px; height: 96px; } .hero__stats { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .hero, section.group, .days { animation: rise .35s ease both; } @keyframes rise { from { opacity: 0; transform: translateY(4px); } }
  .live i { animation: pulse 1.8s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
}
