/* THX-01 status page — HAL-X brand on black. */
:root {
  --bg: #000; --panel: #0d0d0f; --line: #1f1f23; --line-2: #2a2a2f;
  --text: #f4f4f5; --muted: #a1a1aa; --faint: #71717a;
  --ruby: #E21766;
  --ok: #22a34a; --warn: #f5c518; --down: #ef4444; --maint: #3b82f6; --none: #1c1c20;
  --font: "Just Sans", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 12px; background: #fff; color: #000; padding: 6px 10px; border-radius: 6px; z-index: 50; }
.in { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* header */
.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(0, 0, 0, .86); backdrop-filter: blur(10px); z-index: 20; }
.top .in { display: flex; align-items: center; height: 72px; }
.brand img { height: 54px; display: block; margin-left: -6px; }
.top nav { margin-left: auto; display: flex; gap: 30px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a.on { color: var(--text); }

/* hero */
.hero .in { padding-top: 96px; padding-bottom: 72px; }
.label { font-size: 12.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(36px, 6.2vw, 68px); line-height: 1.05; letter-spacing: -.025em; font-weight: 800; margin: 14px 0 16px; display: flex; align-items: center; gap: 22px; }
.dot { width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--none); box-shadow: 0 0 0 6px rgba(255, 255, 255, .04); }
.dot.s-operational { background: var(--ok); box-shadow: 0 0 0 6px rgba(34, 163, 74, .16); }
.dot.s-degraded { background: var(--warn); box-shadow: 0 0 0 6px rgba(245, 197, 24, .16); }
.dot.s-down { background: var(--down); box-shadow: 0 0 0 6px rgba(239, 68, 68, .18); animation: pulse 1.6s infinite; }
.dot.s-maintenance { background: var(--maint); box-shadow: 0 0 0 6px rgba(59, 130, 246, .18); }
@keyframes pulse { 50% { box-shadow: 0 0 0 11px rgba(239, 68, 68, .05); } }
.sub { font-size: 20px; color: #c9c9cf; margin: 0 0 12px; max-width: 760px; }
.meta { font-size: 14px; color: var(--faint); margin: 0; }

/* blocks */
.block { padding-top: 26px; padding-bottom: 46px; }
.head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.015em; margin: 0; font-weight: 800; }
.block > h2 { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.hint { color: var(--faint); font-size: 14px; }
.legend { margin-left: auto; display: flex; gap: 16px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 14px; border-radius: 2px; display: inline-block; }
.s-operational { background: var(--ok); } .s-degraded { background: var(--warn); } .s-down { background: var(--down); }
.s-maintenance { background: var(--maint); } .s-nodata { background: var(--none); border: 1px solid var(--line-2); }
.seg { display: inline-flex; background: #111114; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; }
.seg button { font: inherit; font-size: 14.5px; color: var(--muted); background: transparent; border: 0; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: #f4f4f5; color: #000; }
.seg button:focus-visible { outline: 2px solid var(--ruby); outline-offset: 2px; }

/* component row */
.row { padding: 26px 0 22px; border-bottom: 1px solid var(--line); }
.row.skeleton { height: 150px; }
.row .top-line { display: grid; grid-template-columns: minmax(200px, 1.4fr) 1fr repeat(3, minmax(110px, .8fr)); gap: 16px; align-items: start; }
.name { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 800; }
.name small { font-weight: 500; font-size: 14px; color: var(--faint); }
.name .dot { width: 11px; height: 11px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .05); }
.state { color: #d4d4d8; padding-top: 4px; }
.stat b { display: block; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.bars { display: grid; gap: 3px; margin-top: 20px; height: 34px; }
.bars i { display: block; border-radius: 3px; cursor: default; transition: filter .12s, transform .12s; }
.bars i:hover, .bars i:focus-visible { filter: brightness(1.25); transform: scaleY(1.08); outline: none; }
.axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--faint); margin-top: 10px; }

/* incidents */
.inc { padding: 24px 0; border-bottom: 1px solid var(--line); }
.inc:last-child { border-bottom: 0; }
.inc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inc-head h3 { font-size: 19px; margin: 0; font-weight: 700; }
.badge { font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 2px 11px; border: 1.5px solid; }
.badge.minor { color: var(--warn); border-color: var(--warn); }
.badge.major { color: #fb923c; border-color: #fb923c; }
.badge.critical { color: var(--down); border-color: var(--down); }
.badge.maintenance { color: #60a5fa; border-color: #60a5fa; }
.badge.none { color: var(--muted); border-color: var(--line-2); }
.badge.resolved { color: var(--ok); border-color: rgba(34, 163, 74, .6); }
.inc .when { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.updates { border-left: 1px solid var(--line-2); margin-left: 2px; }
.upd { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 6px 0 12px 16px; position: relative; }
.upd::before { content: ""; position: absolute; left: -4px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.upd:first-child::before { background: var(--ruby); }
.upd time { color: var(--faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.upd .st { font-weight: 700; color: var(--text); margin-right: 6px; }
.upd p { margin: 0; color: #d4d4d8; white-space: pre-wrap; }
.card { border: 1px solid var(--line-2); border-radius: 12px; padding: 4px 22px; margin-top: 18px; background: var(--panel); }
.card.active-critical { border-color: rgba(239, 68, 68, .55); } .card.active-major { border-color: rgba(251, 146, 60, .55); }
.card.active-minor { border-color: rgba(245, 197, 24, .45); } .card.active-maintenance { border-color: rgba(96, 165, 250, .5); }
.empty { color: var(--muted); padding: 26px 0 6px; }

/* tooltip */
.tip { position: fixed; z-index: 60; pointer-events: none; background: #151518; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: 280px; }
.tip b { display: block; margin-bottom: 2px; } .tip span { color: var(--muted); display: block; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 30px; }
.foot .in { display: flex; align-items: center; padding-top: 30px; padding-bottom: 40px; }
.foot img { height: 42px; display: block; opacity: .9; margin-left: -5px; }
.foot nav { margin-left: auto; display: flex; gap: 26px; font-size: 14.5px; }
.foot nav a { color: var(--muted); text-decoration: none; } .foot nav a:hover { color: var(--text); }

@media (max-width: 860px) {
  .row .top-line { grid-template-columns: 1fr 1fr; }
  .legend { margin-left: 0; order: 3; width: 100%; }
  .upd { grid-template-columns: 1fr; gap: 2px; }
  .bars { gap: 2px; }
}
@media (max-width: 520px) {
  .in { padding: 0 16px; }
  .top nav { gap: 18px; }
  .hero .in { padding-top: 56px; padding-bottom: 40px; }
  .sub { font-size: 17px; }
  .seg button { padding: 7px 12px; font-size: 13.5px; }
}
