/* status.leyr.stream: the public site's palette, type and layout (site.css),
   arranged like the changelog. New colours are defined once here. */
:root {
  /* Gold from the app palette (the LEYR+ mark), for "degraded". */
  --warn: #e2c78f;
  /* STYL --color-blue, for maintenance. */
  --maint: #89b4fa;
  --state-ok: var(--accent);
  --state-warn: var(--warn);
  --state-bad: var(--bad);
  --state-none: var(--line-2);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --warn: #a87a1c; --maint: #2f63c9; }
}
:root[data-theme="light"] { --warn: #a87a1c; --maint: #2f63c9; }

[data-state="operational"] { --state: var(--state-ok); }
[data-state="degraded"] { --state: var(--state-warn); }
[data-state="down"] { --state: var(--state-bad); }
[data-state="maintenance"] { --state: var(--maint); }
[data-state="no-data"] { --state: var(--fg-3); }

/* site.css spaces the home page's sections; this page sets its own rhythm. */
.status-page section { padding: 0; }
.status-page { max-width: 960px; margin: auto; padding: max(28px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.status-nav, .status-brand { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.status-nav a { text-decoration: none; font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.status-brand { justify-content: flex-start; gap: 10px; }
.status-brand .mark { width: 28px; height: 28px; }
.status-brand .word { height: 16px; width: auto; }
.status-nav .btn { min-height: 44px; }

/* The dotted LEYR and pulse (status.js), in the colour of the overall state. */
.status-intro .dots { display: block; width: min(414px, 100%); margin: 0 0 32px; }
.status-intro .dots circle { stroke: var(--state); }
.status-intro .dots circle.on { fill: var(--state); }

.status-intro { margin: 80px 0 48px; }
.status-intro .eyebrow { font: 12px var(--mono); letter-spacing: .14em; color: var(--accent-ink); }
.status-headline { display: flex; align-items: center; gap: 20px; margin: 22px 0 16px; }
.status-headline h1 { font-size: clamp(36px, 7vw, 64px); line-height: 1.08; letter-spacing: -.05em; margin: 0; }
.status-mark { width: clamp(48px, 9vw, 72px); height: auto; flex: none; border-radius: 50%; box-shadow: 0 0 0 0 var(--glow); transition: filter var(--tint-time) var(--ease); }
.status-mark[data-state="operational"] { animation: beat 2.4s var(--ease) infinite; }
.status-mark[data-state="degraded"] { filter: hue-rotate(-95deg) saturate(.7); }
.status-mark[data-state="down"] { filter: hue-rotate(-140deg) saturate(1.2); }
.status-mark[data-state="maintenance"] { filter: hue-rotate(76deg); }
.status-mark[data-state="no-data"] { filter: grayscale(1) opacity(.7); }
@keyframes beat { 0%, 70%, 100% { box-shadow: 0 0 0 0 var(--glow); } 35% { box-shadow: 0 0 0 14px transparent; } }
#updated { color: var(--fg-2); margin: 0; }
.network-note { margin: 20px 0 0; max-width: 680px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--fg-2); font-size: 14px; }

h2 { font-size: 22px; letter-spacing: -.02em; margin: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.ranges { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.ranges button { font: inherit; font-size: 13px; color: var(--fg-2); background: none; border: 0; border-radius: 8px; min-height: 44px; padding: 6px 14px; cursor: pointer; }
.ranges button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.service { padding: 26px 0; border-bottom: 1px solid var(--line); }
.service-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.service-name h3 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.service-name p { margin: 4px 0 0; font-size: 14px; color: var(--fg-2); }
.state { margin: 2px 0 0; font-size: 14px; white-space: nowrap; color: var(--fg); }
.state::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--state); }
.state[data-state="operational"] { color: var(--accent-ink); }
.state[data-state="operational"]::before { box-shadow: 0 0 0 4px var(--accent-soft); }

/* The whole strip is the target: a tap picks the nearest bar (status.js). */
.buckets { display: flex; gap: 3px; margin: 18px 0 8px; padding: 0; list-style: none; height: 34px; cursor: pointer; touch-action: manipulation; }
.buckets li { flex: 1; min-width: 0; display: flex; }
.bucket { flex: 1; min-width: 0; padding: 0; border: 0; border-radius: 3px; background: var(--state); cursor: pointer; transition: transform .15s var(--ease), opacity .15s; }
.bucket[data-state="no-data"] { background: transparent; box-shadow: inset 0 0 0 1px var(--state-none); }
.bucket:hover { transform: scaleY(1.12); }
.bucket[aria-pressed="true"] { outline: 2px solid var(--fg); outline-offset: 2px; }
.range-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--fg-2); }
.range-caption .uptime { font-family: var(--mono); color: var(--fg); }
.service-detail { margin: 10px 0 0; font: 12px var(--mono); color: var(--fg-2); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 72px; font-size: 12px; color: var(--fg-2); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--state); }
.legend [data-state="no-data"]::before { background: transparent; box-shadow: inset 0 0 0 1px var(--state-none); }

#maintenance { margin-bottom: 48px; }
#maintenance h2, #incidents-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.incident { padding: 22px 0; border-bottom: 1px solid var(--line); }
.incident.maintenance { padding-left: 16px; border-left: 3px solid var(--maint); background: linear-gradient(90deg, color-mix(in oklab, var(--maint) 10%, transparent), transparent 60%); }
.incident.maintenance h3 { color: var(--maint); }
.incident-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--fg-2); }
.incident-meta time { font-family: var(--mono); }
.kind { color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 6px; padding: 2px 9px; }
.incident h3 { margin: 10px 0 6px; font-size: 18px; }
.incident p { margin: 6px 0 0; font-size: 14px; color: var(--fg-2); }
.incident p.summary { color: var(--fg); }
.status-note { max-width: 640px; margin: 24px 0; color: var(--fg-2); font-size: 14px; }

.status-footer { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px 0; margin-top: 48px; border-top: 1px solid var(--line-2); font-size: 13px; }
.status-footer a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; }
.skip-link { position: absolute; top: -100px; left: 24px; z-index: 10; background: var(--surface); padding: 12px; }
.skip-link:focus { top: 8px; }
.status-page [hidden] { display: none !important; }

@media (max-width: 600px) {
  .status-brand .word { height: 13px; }
  .status-intro { margin: 48px 0 36px; }
  .status-headline { gap: 14px; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .ranges { width: 100%; }
  .ranges button { flex: 1; }
  .buckets { gap: 2px; height: 30px; }
  .service-head { flex-direction: column; gap: 8px; }
}
@media (pointer: coarse) { .buckets { height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  .status-mark[data-state="operational"] { animation: none; }
  .bucket { transition: none; }
}
