/* StatusNerd. One screen: a big count, the totals, a square for every service, and the problems in plain words. Dark, bold, system type. */
:root {
  color-scheme: dark;
  --bg: #090b10; --card: #11141b; --card-2: #181c26; --ink: #f5f7fb; --ink-2: #c5cbd8; --muted: #8791a4; --line: #232937;
  --link: #8ab4ff; --focus: #8ab4ff;
  --ok: #2fd573; --ok-cell: #1f9d55;
  --warn: #ffb224; --warn-bg: #2b2109;
  --bad: #ff5257; --bad-bg: #2e1216;
  --maint: #5b9bff; --maint-bg: #13233f;
  --unk: #4a5366; --on-bad: #ffffff; --on-warn: #1d1502;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --wrap: 1560px; --pad: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
a { color: var(--link); text-underline-offset: 0.18em; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; overflow-wrap: break-word; }
h2 { font-size: 0.95rem; font-weight: 650; color: var(--muted); margin-bottom: 10px; }
h3 { font-size: 0.95rem; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
input { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.narrow { max-width: 860px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
.quiet { color: var(--muted); font-size: 0.85rem; }
main { display: grid; gap: 28px; padding-block: 20px 56px; }

/* ---- Top ---- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 20px; min-height: 52px; padding-block: 7px; }
.mark { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.back { font-size: 0.95rem; }
.find { flex: 1 1 auto; max-width: 440px; }
.find input { width: 100%; min-height: 38px; padding: 0 18px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.find input::placeholder { color: var(--muted); }
.find input:hover { border-color: var(--muted); }
.find input:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.live { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.live__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); animation: pulse 2.4s ease-in-out infinite; }
.live.is-stale .live__dot { background: var(--unk); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.78); } }

/* ---- The board: everything on one screen ---- */
.board { grid-template-columns: minmax(0, 1fr); }
.glance { display: grid; gap: 12px; }
.glance h1 { font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--ok); }
.glance--outage h1 { color: var(--bad); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: baseline; gap: 7px; text-decoration: none; transition: transform 150ms ease, filter 150ms ease; }
.pill:hover { transform: translateY(-2px); filter: brightness(1.08); }
.pill:active { transform: translateY(0); }
.pill__for { font-weight: 600; opacity: 0.75; font-size: 0.7em; }
.pill--outage { padding: 7px 14px; background: var(--bad); color: var(--on-bad); border-radius: 10px; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; animation: throb 2s ease-in-out infinite; }
.pill--degraded { padding: 4px 10px; background: var(--warn); color: var(--on-warn); border-radius: 8px; font-size: 0.9rem; font-weight: 700; }
.rough { display: grid; gap: 8px; }
.rough h2 { margin: 0; color: var(--warn); font-size: 0.95rem; font-weight: 700; }
.calm { color: var(--ok); font-weight: 650; font-size: 0.93rem; }
.brief { font-size: 1rem; line-height: 1.45; color: var(--ink-2); max-width: 80ch; }

/* ---- A square for every service ---- */
.wall { display: grid; gap: 2px; align-content: start; }
.lane { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr) auto; align-items: center; gap: 14px; padding-block: 7px; }
.lane h3 { color: var(--muted); font-weight: 500; }
.lane--bad h3 { color: var(--ink); font-weight: 650; }
.lane__n { min-width: 4.2rem; text-align: right; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lane--bad .lane__n { color: var(--warn); font-weight: 650; }
.cells { display: flex; flex-wrap: wrap; gap: 5px; }
.cell { position: relative; display: block; width: 20px; height: 20px; border-radius: 6px; background: var(--ok-cell); transition: transform 150ms ease, opacity 200ms ease, background-color 400ms ease; }
.cell::before { content: ""; position: absolute; inset: -4px; }
.cell--degraded { background: var(--warn); }
.cell--outage { background: var(--bad); animation: throb 1.6s ease-in-out infinite; }
.cell--maint { background: var(--maint); }
.cell--unknown { background: var(--unk); }
.cell:hover, .cell:focus-visible { transform: scale(1.35); z-index: 5; }
.cell:active { transform: scale(1.15); }
.cell::after { content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 4px 9px; background: var(--ink); color: var(--bg); border-radius: 7px; font-size: 0.72rem; font-weight: 650; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 120ms ease; }
.cell:hover::after, .cell:focus-visible::after { opacity: 1; }
.cell.is-dim { opacity: 0.12; }
.cell.is-hit { transform: scale(1.3); box-shadow: 0 0 0 2px var(--ink); z-index: 4; }
@keyframes throb { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.cell--named { width: auto; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 0.78rem; font-weight: 700; line-height: 20px; white-space: nowrap; text-decoration: none; color: var(--on-warn); }
.cell--named.cell--outage { color: var(--on-bad); }
.cell--named::after { content: none; }
.cell--named:hover, .cell--named:focus-visible { transform: translateY(-1px); }
.wall__hint { margin-top: 12px; }
.results { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 0.95rem; text-decoration: none; }
.chip:hover { border-color: var(--muted); }
.chip:active { background: var(--card-2); }
.chip__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--ok-cell); flex: none; }
.chip--degraded .chip__dot { background: var(--warn); }
.chip--outage .chip__dot { background: var(--bad); }
.chip--maint .chip__dot { background: var(--maint); }
.chip--unknown .chip__dot { background: var(--unk); }

/* ---- Problems right now ---- */
.issues { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.issue + .issue { border-top: 1px solid var(--line); }
.issue { animation: rise 380ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.issue__link { display: grid; grid-template-columns: 10px minmax(7rem, 10.5rem) minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 7px 14px; color: inherit; text-decoration: none; transition: background-color 150ms ease; }
.issue__link:hover { background: var(--card-2); }
.issue__link:active { background: var(--line); }
.issue__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--warn); transform: translateY(1px); }
.issue--outage .issue__dot { background: var(--bad); }
.issue--outage .issue__link { background: var(--bad-bg); }
.issue--outage .issue__link:hover { background: color-mix(in srgb, var(--bad-bg) 80%, var(--bad)); }
.issue__name { font-weight: 700; }
.issue__line { color: var(--ink-2); font-size: 0.92rem; }
.issue__for { color: var(--muted); font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Recent changes ---- */
.feed { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.feed__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 0.96rem; }
.feed__item:first-child { border-top: 0; }
.feed__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--ok-cell); }
.feed__dot--degraded { background: var(--warn); }
.feed__dot--outage { background: var(--bad); }
.feed__dot--maint { background: var(--maint); }
.feed__when { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

/* ---- One service ---- */
.hero { display: grid; gap: 14px; }
.hero h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
.hero--degraded h1 { color: var(--warn); }
.hero--outage h1 { color: var(--bad); }
.hero--ok h1 { color: var(--ok); }
.tag { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 12px; margin-right: 6px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tag--degraded { background: var(--warn-bg); color: var(--warn); }
.tag--outage { background: var(--bad-bg); color: var(--bad); }
.tag--maint { background: var(--maint-bg); color: var(--maint); }
.tag--unknown { background: var(--line); color: var(--muted); }
.card { padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.notice { display: grid; gap: 8px; margin-bottom: 12px; color: var(--ink-2); }
.notice h3 { font-size: 1.1rem; color: var(--ink); }
.days { display: grid; grid-template-columns: repeat(45, minmax(0, 1fr)); gap: 4px; margin-bottom: 14px; }
.day { aspect-ratio: 1; border-radius: 4px; background: var(--ok-cell); }
.day--maint { background: var(--maint); }
.day--degraded { background: var(--warn); }
.day--outage { background: var(--bad); }
.day--none { background: var(--line); }
.key { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 0.88rem; margin-bottom: 8px; }
.key__i { display: inline-flex; align-items: center; gap: 7px; }
.key__i::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--ok-cell); }
.key__i--degraded::before { background: var(--warn); }
.key__i--outage::before { background: var(--bad); }
.key__i--maint::before { background: var(--maint); }
.key__i--none::before { background: var(--line); }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--muted); font-size: 0.9rem; }
.foot .wrap { display: grid; gap: 10px; }
.foot__links { display: flex; gap: 18px; }

/* Wide screens: the overview on the left, the problems beside it, nothing below the fold that matters. */
@media (min-width: 1100px) {
  .board { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "glance problems" "wall problems" "recent recent"; gap: 18px 40px; align-items: start; }
  .glance { grid-area: glance; }
  .wall { grid-area: wall; }
  .problems { grid-area: problems; }
  .recent { grid-area: recent; margin-top: 20px; }
  .lane { grid-template-columns: 10rem minmax(0, 1fr) auto; padding-block: 3px; }
  .cells { gap: 4px; }
  .cell:not(.cell--named) { width: 15px; height: 15px; border-radius: 4px; }
  .cells { align-items: center; }
  .issue__link { grid-template-columns: 10px minmax(6rem, 9.5rem) minmax(0, 1fr) auto; padding: 6px 14px; }
}
@media (max-width: 720px) {
  :root { --pad: 16px; }
  body { font-size: 16px; }
  main { gap: 26px; padding-block: 16px 48px; }
  .find input { min-height: 44px; }
  .pill--degraded { padding: 6px 11px; }
  .top__in { flex-wrap: wrap; gap: 10px 14px; }
  .find { order: 3; flex-basis: 100%; max-width: none; }
  .lane { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding-block: 9px; }
  .lane h3 { grid-column: 1; }
  .lane__n { grid-column: 2; grid-row: 1; }
  .cells { grid-column: 1 / -1; }
  .cell:not(.cell--named) { width: 22px; height: 22px; }
  .issue__link { grid-template-columns: 12px minmax(0, 1fr) auto; padding: 13px 14px; }
  .issue__line { grid-column: 2 / -1; }
  .issue__for { grid-column: 3; grid-row: 1; }
  .days { grid-template-columns: repeat(30, minmax(0, 1fr)); }
  .feed__item { grid-template-columns: auto minmax(0, 1fr); }
  .feed__when { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Polish pass on the tile design the owner picked: a real typeface, medium sizes, calmer tones, no squares ---- */
:root { --bg: #0a0b0e; --card: #121419; --card-2: #191c23; --line: #242833; --ink: #f6f7f9; --ink-2: #c9ced8; --muted: #8f97a6; --bad: #e5484d; --warn: #ffc53d; --ok: #3dd68c; --maint: #70a5ff; --on-bad: #ffffff; --on-warn: #1f1600; --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --wrap: 1640px; }
body { font-size: 16px; letter-spacing: -0.005em; }
.top__in { min-height: 56px; }
.mark { font-size: 1.1rem; font-weight: 700; }
main { gap: 30px; padding-block: 26px 56px; }
h2 { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; }
.glance { gap: 16px; }
.glance h1 { font-size: clamp(2.2rem, 1.3rem + 2.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.pills { gap: 8px; }
.pill { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22); }
.pill--outage { padding: 10px 18px; border-radius: 12px; font-size: 1.5rem; font-weight: 700; }
.pill--degraded { padding: 6px 12px; border-radius: 9px; font-size: 1rem; font-weight: 600; }
.rough { gap: 10px; }
.rough h2 { font-size: 1.05rem; font-weight: 600; }
.calm { font-size: 1.02rem; font-weight: 600; }
.brief { font-size: 1.08rem; line-height: 1.5; max-width: 70ch; }
.wall { gap: 0; }
.lane { grid-template-columns: 10.5rem minmax(0, 1fr); gap: 14px; padding-block: 6px; border-top: 1px solid var(--line); }
.lane h3 { font-size: 0.95rem; }
.cells { gap: 6px; align-items: center; }
.cell--named { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 0.86rem; font-weight: 600; line-height: 28px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2); }
.cell--named.cell--maint { background: transparent; color: var(--maint); box-shadow: inset 0 0 0 1px var(--maint); }
.cell--named.cell--unknown { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.okchip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); font-size: 0.86rem; font-weight: 600; white-space: nowrap; }
.issues { border-radius: 14px; }
.issue__link { padding: 10px 16px; gap: 3px 14px; }
.issue__name { font-weight: 600; }
.issue__line { font-size: 0.95rem; }
.issue__for { font-size: 0.84rem; }
@media (min-width: 1100px) {
  .board { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px 44px; }
  .cell.cell--named { width: auto; height: 28px; border-radius: 8px; }
  .lane { grid-template-columns: 10.5rem minmax(0, 1fr); padding-block: 6px; }
  .issue__link { grid-template-columns: 10px minmax(6rem, 10rem) minmax(0, 1fr) auto; padding: 9px 16px; }
}
@media (max-width: 720px) {
  .lane { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 10px; }
  .cell.cell--named { height: 30px; line-height: 30px; }
  .okchip { height: 30px; }
}

/* ---- Instruments: console strip, key figures, history bars ---- */
:root { --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; --ok-dim: #1f7a4d; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
h2 { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.rough h2 { text-transform: none; letter-spacing: 0; }
.ops { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.ops__i { display: grid; gap: 1px; font-size: 0.8rem; line-height: 1.15; color: var(--ink); white-space: nowrap; }
.ops__k { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.ops .live { margin-left: 0; font-size: 0.8rem; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kpi { display: grid; gap: 4px; padding: 11px 14px; background: var(--card); }
.kpi dt { font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); white-space: nowrap; }
.kpi dd { margin: 0; font-size: 1.55rem; font-weight: 700; line-height: 1; color: var(--ink); }
.kpi--outage dd { color: var(--bad); }
.kpi--degraded dd { color: var(--warn); }
.kpi--maint dd { color: var(--maint); }
.kpi--ok dd, .kpi--up dd { color: var(--ok); }
.hist { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 3px; gap: 1px; align-items: end; height: 16px; flex: none; }
.hist i { display: block; height: 100%; border-radius: 1px; background: var(--ok-dim); }
.hist .h1 { background: var(--maint); }
.hist .h2 { background: var(--warn); }
.hist .h3 { background: var(--bad); }
.hist .hn { background: var(--line); height: 45%; }
.sev { justify-self: start; padding: 2px 7px; border-radius: 5px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; background: var(--warn); color: var(--on-warn); }
.sev--outage { background: var(--bad); color: var(--on-bad); }
.issue__link { grid-template-columns: 5.4rem minmax(6rem, 9.5rem) minmax(0, 1fr) auto auto 2.6rem; align-items: center; }
.issue__at { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.issue__for { font-size: 0.8rem; color: var(--ink-2); text-align: right; }
.lane { grid-template-columns: 10.5rem minmax(0, 1fr) auto 4.2rem; align-items: center; }
.lane__up { font-size: 0.8rem; color: var(--ink-2); text-align: right; }
.svc-up { color: var(--ink-2); }
.svc-up .mono { font-size: 1.3rem; font-weight: 700; color: var(--ok); margin-right: 6px; }
@media (min-width: 1100px) {
  .issue__link { grid-template-columns: 5.4rem minmax(6rem, 9.5rem) minmax(0, 1fr) auto auto 2.6rem; }
  .lane { grid-template-columns: 10.5rem minmax(0, 1fr) auto 4.2rem; }
}
@media (max-width: 1099px) { .ops__i { display: none; } }
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi--ok { display: none; }
  .kpi--up { grid-column: span 2; }
  .issue__link { grid-template-columns: auto minmax(0, 1fr) auto; }
  .issue__name { grid-column: 2; grid-row: 1; }
  .issue__for { grid-column: 3; grid-row: 1; }
  .issue__line { grid-column: 1 / -1; grid-row: 2; }
  .issue__link .hist { grid-column: 1 / 3; grid-row: 3; }
  .issue__at { grid-column: 3; grid-row: 3; text-align: right; }
  .lane { grid-template-columns: minmax(0, 1fr) auto; }
  .lane h3 { grid-column: 1; grid-row: 1; }
  .lane__up { grid-column: 2; grid-row: 1; }
  .lane .cells { grid-column: 1 / -1; grid-row: 2; }
  .lane .hist { grid-column: 1 / -1; grid-row: 3; }
}

/* ---- Use the width: summary beside categories, incidents across the full width ---- */
@media (min-width: 1100px) {
  .board { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: auto; grid-template-areas: "glance wall" "problems problems" "recent recent"; gap: 30px 48px; }
  .issue__link { grid-template-columns: 5.6rem minmax(8rem, 13rem) minmax(0, 1fr) auto 9.5rem 2.8rem; gap: 3px 18px; }
  .issue__line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lane { grid-template-columns: 10.5rem minmax(0, 1fr) auto 4.4rem; }
}
.issue__at { text-align: right; }
.results__hint { flex-basis: 100%; }

/* ---- "N normal" opens the healthy services ---- */
.okli:has(.okd[open]) { flex-basis: 100%; }
.okd summary { cursor: pointer; list-style: none; user-select: none; transition: transform 150ms ease, filter 150ms ease; }
.okd summary::-webkit-details-marker { display: none; }
.okd summary::after { content: ""; width: 6px; height: 6px; margin-left: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.okd[open] summary::after { transform: translateY(1px) rotate(225deg); }
.okd summary:hover { filter: brightness(1.2); }
.okd summary:active { transform: scale(0.97); }
.oks { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 0 3px; }
.oks a { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: 0.84rem; text-decoration: none; transition: transform 150ms ease, opacity 150ms ease; }
.oks a::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--ok); }
.oks a:hover { transform: translateY(-1px); color: var(--ink); }
.oks a:active { transform: translateY(0); opacity: 0.8; }
.okd[open] .oks li { animation: pop 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.86); } to { opacity: 1; transform: none; } }
.okd[open] .oks li:nth-child(2) { animation-delay: 16ms; }
.okd[open] .oks li:nth-child(3) { animation-delay: 32ms; }
.okd[open] .oks li:nth-child(4) { animation-delay: 48ms; }
.okd[open] .oks li:nth-child(5) { animation-delay: 64ms; }
.okd[open] .oks li:nth-child(6) { animation-delay: 80ms; }
.okd[open] .oks li:nth-child(7) { animation-delay: 96ms; }
.okd[open] .oks li:nth-child(8) { animation-delay: 112ms; }
.okd[open] .oks li:nth-child(9) { animation-delay: 128ms; }
.okd[open] .oks li:nth-child(10) { animation-delay: 144ms; }
.okd[open] .oks li:nth-child(11) { animation-delay: 160ms; }
.okd[open] .oks li:nth-child(12) { animation-delay: 176ms; }
.okd[open] .oks li:nth-child(13) { animation-delay: 192ms; }
.okd[open] .oks li:nth-child(14) { animation-delay: 208ms; }
.okd[open] .oks li:nth-child(15) { animation-delay: 224ms; }
.okd[open] .oks li:nth-child(16) { animation-delay: 240ms; }
.okd[open] .oks li:nth-child(17) { animation-delay: 256ms; }
.okd[open] .oks li:nth-child(18) { animation-delay: 272ms; }
.okd[open] .oks li:nth-child(19) { animation-delay: 288ms; }
.okd[open] .oks li:nth-child(20) { animation-delay: 304ms; }
.okd[open] .oks li:nth-child(21) { animation-delay: 320ms; }
.okd[open] .oks li:nth-child(22) { animation-delay: 336ms; }
.okd[open] .oks li:nth-child(23) { animation-delay: 352ms; }
.okd[open] .oks li:nth-child(24) { animation-delay: 368ms; }
.okd[open] .oks li:nth-child(25) { animation-delay: 384ms; }
.okd[open] .oks li:nth-child(26) { animation-delay: 400ms; }
.okd[open] .oks li:nth-child(27) { animation-delay: 416ms; }
.okd[open] .oks li:nth-child(28) { animation-delay: 432ms; }
.okd[open] .oks li:nth-child(29) { animation-delay: 448ms; }
.okd[open] .oks li:nth-child(30) { animation-delay: 464ms; }
.okd[open] .oks li:nth-child(31) { animation-delay: 480ms; }
.okd[open] .oks li:nth-child(32) { animation-delay: 496ms; }
.okd[open] .oks li:nth-child(33) { animation-delay: 512ms; }
.okd[open] .oks li:nth-child(34) { animation-delay: 528ms; }
.okd[open] .oks li:nth-child(35) { animation-delay: 544ms; }
.okd[open] .oks li:nth-child(36) { animation-delay: 560ms; }
.okd[open] .oks li:nth-child(37) { animation-delay: 576ms; }
.okd[open] .oks li:nth-child(38) { animation-delay: 592ms; }
.okd[open] .oks li:nth-child(39) { animation-delay: 608ms; }
.okd[open] .oks li:nth-child(40) { animation-delay: 624ms; }
.okd[open] .oks li:nth-child(41) { animation-delay: 640ms; }
.okd[open] .oks li:nth-child(42) { animation-delay: 656ms; }
.okd[open] .oks li:nth-child(43) { animation-delay: 672ms; }
.okd[open] .oks li:nth-child(44) { animation-delay: 688ms; }
.okd[open] .oks li:nth-child(45) { animation-delay: 704ms; }

/* ---- Category history: height = how much of the category was affected that day ---- */
.hist--share .h0 { height: 20%; }
.hist--share .s1 { height: 40%; }
.hist--share .s2 { height: 60%; }
.hist--share .s3 { height: 80%; }
.hist--share .s4 { height: 100%; }

/* ---- Navigation and the Insights page ---- */
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 11px; border-radius: 8px; font-size: 0.88rem; font-weight: 600; color: var(--muted); text-decoration: none; transition: opacity 150ms ease; }
.nav a:hover { color: var(--ink); background: var(--card); }
.nav a:active { opacity: 0.7; }
.insights { grid-template-columns: minmax(0, 1fr); gap: 22px; }
.insights > .glance, .insights > .panel--wide, .insights > p { grid-column: 1 / -1; }
.panel { display: grid; gap: 12px; align-content: start; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.panel h2 { margin: 0; }
.kpis--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.chart { width: 100%; height: 150px; }
.chart .c-o { fill: var(--bad); }
.chart .c-g { fill: var(--warn); }
.chart g:hover rect { opacity: 0.7; }
.chart__axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); }
.heat { display: grid; gap: 3px; }
.heat--7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.heat--24 { grid-template-columns: repeat(24, minmax(0, 1fr)); }
.heat__c { display: grid; place-items: end center; height: 44px; padding-bottom: 4px; border-radius: 5px; background: var(--card-2); }
.heat__c--1 { background: color-mix(in srgb, var(--warn) 22%, var(--card-2)); }
.heat__c--2 { background: color-mix(in srgb, var(--warn) 45%, var(--card-2)); }
.heat__c--3 { background: color-mix(in srgb, var(--warn) 70%, var(--card-2)); }
.heat__c--4 { background: var(--warn); }
.heat__l { font-size: 0.62rem; color: var(--ink-2); }
.heat__c--3 .heat__l, .heat__c--4 .heat__l { color: var(--on-warn); font-weight: 700; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tbl th, .tbl td { padding: 7px 10px 7px 0; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl thead th { border-top: 0; font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.tbl tbody th { font-weight: 600; }
.tbl .num { text-align: right; padding-right: 0; padding-left: 10px; }
.scroll { overflow-x: auto; }
.bars { display: grid; gap: 7px; }
.bars li { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 0.9rem; }
.bars__k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bars__k a { color: inherit; text-decoration: none; }
.bars__k a:hover { text-decoration: underline; }
.bars__bar { width: 100%; height: 8px; border-radius: 4px; background: var(--card-2); }
.bars__fill { fill: var(--warn); }
.bars--bad .bars__fill { fill: var(--bad); }
.bars__v { font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }
.insights .rows { display: grid; }
.insights .rows li + li { border-top: 1px solid var(--line); }
.insights .rows a { display: grid; grid-template-columns: 5.4rem minmax(6rem, 10rem) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; color: inherit; text-decoration: none; font-size: 0.9rem; }
.insights .rows a:hover b { text-decoration: underline; }
.rows__t { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows__v { font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }
@media (min-width: 1100px) { .insights { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 720px) {
  .kpis--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat--24 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .insights .rows a { grid-template-columns: auto minmax(0, 1fr) auto; }
  .insights .rows .rows__t { grid-column: 1 / -1; white-space: normal; }
  .nav a { padding: 6px 8px; }
}

.insights > .glance { grid-area: auto; grid-column: 1 / -1; }
.insights > .glance h1 { color: var(--ink); }

/* ---- The long tail on the board, and the directory ---- */
.more { display: grid; gap: 12px; }
.more__lead { color: var(--ink-2); max-width: 90ch; }
.more__bad { color: var(--bad); }
.cell--soft { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
@media (min-width: 1100px) { .board { grid-template-areas: "glance wall" "problems problems" "more more" "recent recent"; } .more { grid-area: more; } }
.dir { grid-template-columns: minmax(0, 1fr); gap: 26px; }
.dir .glance { grid-area: auto; }
.dir__h { color: var(--ink); }
.dir__g h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dir__l { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 2px 18px; }
.d { display: flex; align-items: center; gap: 9px; min-height: 28px; font-size: 0.88rem; color: var(--ink-2); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.d::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dim); }
.d:hover { color: var(--ink); }
.d--outage { color: var(--bad); font-weight: 700; }
.d--outage::before { background: var(--bad); }
.d--degraded { color: var(--warn); font-weight: 600; }
.d--degraded::before { background: var(--warn); }
.d--maint::before { background: var(--maint); }
.d--unknown { color: var(--muted); }
.d--unknown::before { background: var(--line); }

/* ---- Share row ---- */
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: var(--bg); font: inherit; font-size: 0.88rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 150ms ease, opacity 150ms ease; }
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.97); }
.btn--quiet { background: transparent; color: var(--ink-2); border-color: var(--line); font-weight: 600; }
.btn--quiet:hover { color: var(--ink); border-color: var(--muted); opacity: 1; }

/* ---- Two readings side by side: the vendor's word and our own check ---- */
.pair { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pair .sev { flex: 0 0 5.4rem; text-align: center; }
.chk { font-size: 0.8rem; font-weight: 600; white-space: nowrap; color: var(--ok); font-variant-numeric: tabular-nums; }
.chk--down { color: var(--bad); }
.chk--none { color: var(--muted); font-weight: 400; }
.issues__head { display: flex; gap: 8px; margin: 0 0 6px; padding: 0 16px; font-size: 0.78rem; color: var(--muted); }
.issues__head span:first-child { flex: 0 0 5.4rem; }
.issue__link { grid-template-columns: 14.5rem minmax(6rem, 9.5rem) minmax(0, 1fr) auto auto 2.6rem; }
@media (min-width: 1100px) { .issue__link { grid-template-columns: 14.5rem minmax(8rem, 13rem) minmax(0, 1fr) auto 9.5rem 2.8rem; } }
@media (max-width: 720px) {
  .issue__link { grid-template-columns: minmax(0, 1fr) auto; }
  .pair { grid-column: 1 / -1; grid-row: 1; }
  .issue__name { grid-column: 1; grid-row: 2; }
  .issue__for { grid-column: 2; grid-row: 2; }
  .issue__line { grid-column: 1 / -1; grid-row: 3; }
  .issue__link .hist { grid-column: 1; grid-row: 4; }
  .issue__at { grid-column: 2; grid-row: 4; }
  .issues__head { display: none; }
}
.mismatch { margin: 0; padding: 10px 14px; border: 1px solid var(--warn); border-radius: 10px; color: var(--ink); font-size: 0.95rem; }
.mismatch a { color: var(--warn); font-weight: 600; }
.plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.plate { padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.plate h3 { margin: 0 0 8px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
.plate__big { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: break-word; }
.plate--ok .plate__big { color: var(--ok); }
.plate--degraded .plate__big { color: var(--warn); }
.plate--outage .plate__big { color: var(--bad); }
.plate--maint .plate__big { color: var(--maint); }
.plate--none .plate__big, .plate--unknown .plate__big { color: var(--muted); }
@media (max-width: 560px) { .plates { grid-template-columns: minmax(0, 1fr); } }

/* ---- Insights: more ways to look ---- */
.scope { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 6px 28px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 0.95rem; }
.facts b { color: var(--ink); }
.wg { display: grid; grid-template-columns: 2.4rem repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.wg .heat__c { height: 22px; padding: 0; border-radius: 4px; }
.wg__k { font-size: 0.78rem; color: var(--ink-2); }
.wg__h { font-size: 0.62rem; color: var(--muted); }
.bars__bar .c-o { fill: var(--bad); }
.bars__bar .c-g { fill: var(--warn); }
.spark { display: block; width: 100%; min-width: 6rem; height: 18px; }
.spark polyline { fill: none; stroke: var(--ink-2); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.insights .rows--2 a { grid-template-columns: minmax(0, 1fr) auto; }
.rows--day li { display: grid; gap: 2px; padding: 8px 0; font-size: 0.9rem; }
.rows--day li > span:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.rows--day .rows__t { white-space: normal; }
.rows--day a, .calm a { color: inherit; }
.calm { margin: 0; color: var(--ink-2); line-height: 1.9; font-size: 0.92rem; }
@media (max-width: 720px) { .wg { grid-template-columns: 2.1rem repeat(24, minmax(0, 1fr)); gap: 2px; } .wg .heat__c { height: 16px; border-radius: 2px; } }
.insights .rows--day a { display: inline; padding: 0; text-decoration: underline; text-decoration-color: var(--line); }
.tbl .trend { padding-left: 22px; padding-right: 0; width: 9rem; }

/* ---- Phone: what is wrong first, shorter pages, no empty tiles ---- */
.dir__more { margin-top: 10px; }
.dir__more > .dir__l { margin-top: 10px; }
@media (max-width: 720px) {
  .board > .glance { order: 1; } .board > .problems { order: 2; } .board > .wall { order: 3; } .board > .more { order: 4; } .board > .recent { order: 5; }
  .kpis, .kpis--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi--up { grid-column: auto; }
  .kpis--6 .kpi--ok { display: block; }
  .pill--outage { padding: 7px 13px; font-size: 1.15rem; }
  .pill--degraded { padding: 4px 9px; font-size: 0.86rem; }
  .pills { gap: 6px; }
  .lane { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 10px; padding-block: 9px; }
  .lane h3 { grid-column: 1; grid-row: 1; }
  .lane .hist { grid-column: 2; grid-row: 1; }
  .lane__up { grid-column: 3; grid-row: 1; }
  .lane .cells { grid-column: 1 / -1; grid-row: 2; }
  #more-cells { max-height: 13.5rem; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .bars li { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; }
  .bars__k { grid-column: 1; grid-row: 1; }
  .bars__v { grid-column: 2; grid-row: 1; }
  .bars__bar { grid-column: 1 / -1; grid-row: 2; }
  .tbl th:nth-child(2), .tbl td:nth-child(2), .tbl th:nth-child(5), .tbl td:nth-child(5), .tbl th:nth-child(6), .tbl td:nth-child(6), .tbl th:nth-child(7), .tbl td:nth-child(7) { display: none; }
  .tbl tbody th { white-space: normal; }
  .tbl .trend { width: 4.6rem; padding-left: 12px; }
  .spark { min-width: 4rem; }
  .dir__l { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .dir__l li { min-width: 0; }
  .tbl thead th { white-space: normal; vertical-align: bottom; }
  .tbl .trend { width: 4rem; }
  .panel { padding: 16px; }
}

/* A deeper amber that keeps white text readable, for phones that force dark mode. */
:root { --warn-deep: #a85600; }
/* ---- Review fixes: search results sit under the search box, calmer check wording, phone forced-dark safety ---- */
.board > .results { grid-column: 1 / -1; order: 0; margin: 0; }
.glance__scope { margin: -4px 0 0; }
.chk { color: var(--ink-2); font-weight: 500; }
.chk--down { color: var(--bad); font-weight: 700; }
.lane { align-items: start; }
.lane h3, .lane__up { padding-top: 5px; }
.hero--maint h1 { color: var(--maint); }
.dir .glance .dir__h { color: var(--ink); }
@media (max-width: 720px) {
  .lane h3, .lane__up { padding-top: 0; }
  .pair .sev::before { content: "Vendor: "; font-weight: 600; opacity: 0.8; }
  .pair .sev { flex: none; padding-inline: 8px; }
  .chk::before { content: "Our check: "; color: var(--muted); font-weight: 400; }
  /* Some phone browsers force their own dark mode and turn dark text on a bright fill white. Light text on a deep fill survives that. */
  .pill--degraded, .cell--degraded.cell--named, .sev:not(.sev--outage) { background: var(--warn-deep); color: var(--on-bad); box-shadow: none; }
  .cell--degraded.cell--soft { background: transparent; color: var(--warn); border: 1px solid var(--warn-deep); }
  .btn:not(.btn--quiet) { background: var(--card-2); color: var(--ink); border-color: var(--ink); }
  .heat__c--3 .heat__l, .heat__c--4 .heat__l { color: var(--ink); }
}

/* ---- My services, older notices folded ---- */
.board > .mine { grid-column: 1 / -1; order: 0; display: grid; gap: 10px; }
.mine .cell--ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); box-shadow: none; }
.mine__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.okchip--warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.older { margin-top: 8px; }
.older[open] > .pills { margin-top: 8px; }
.btn[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
.pre { display: grid; gap: 16px; }
.pre:has(> :not([hidden])) { padding-top: 20px; }
.pre .results { margin: 0; }
.pre .mine { display: grid; gap: 10px; }
