/* pyroclastic.cloud status tile. Load after fonts/fonts.css and tokens.css.
   From the pyroclastic-status.html design, generalised from one hard-coded
   Vesuvius card to one card per component. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; }
a { color: var(--color-link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-snug); margin: 0; letter-spacing: -0.015em; }
h2 { font-size: var(--fs-lg); margin: 0 0 var(--space-3); }
h3 { font-size: var(--fs-md); font-family: var(--font-body); font-weight: 600; }
p { margin: 0 0 var(--space-3); max-width: 64ch; }
.mono { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--color-text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 var(--space-5); }
@media (max-width: 600px) { .wrap { padding: 0 var(--space-4); } }

header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-5) 0; }
.lockup { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--color-text); font-family: var(--font-display); font-weight: 500; font-size: var(--fs-md); }
.lockup .mark { width: 30px; height: 30px; color: var(--color-text-2); }
.lockup .mark path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.lockup .mark circle { fill: var(--color-link); }
.lockup .tld { color: var(--color-text-2); }
.lockup .sep { color: var(--color-text-muted); }
header nav a { font-size: var(--fs-sm); color: var(--color-text-2); text-decoration: none; }
header nav a:hover { color: var(--color-text); }

/* ---- Per-volcano accent ------------------------------------------------
   tokens.css swaps --volcano-accent on :root, but a [data-volcano] element
   sets it again on itself; these rules re-apply the dark value there.
   Same rules as brand/examples/components.css. */
[data-volcano="vesuvius"] { --volcano-accent: var(--sky-primary); --volcano-accent-dark: var(--sky-primary-dark); }
[data-theme="dark"] [data-volcano]:not([data-theme="light"], [data-theme="light"] *),
[data-theme="dark"][data-volcano] { --volcano-accent: var(--volcano-accent-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-volcano]:not([data-theme="light"], [data-theme="light"] *) { --volcano-accent: var(--volcano-accent-dark); }
}

/* ---- Component cards --------------------------------------------------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-1); margin-top: var(--space-4); }
.server { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; }
.server b { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; display: block; line-height: 1.2; overflow-wrap: anywhere; }
.server small { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.card .note { margin: var(--space-4) 0 0; max-width: none; }
@media (max-width: 600px) {
  .server { grid-template-columns: 56px minmax(0, 1fr); }
  .server .vmark { width: 56px; height: 56px; }
  .server .badge { grid-column: 2; justify-self: start; }
}

/* ---- The status mark ---------------------------------------------------
   Contours are tiered by elevation: tier 1 is the highest level, tier 2 the
   next. Heat spreads outward (BRAND.md §5): degraded colours the vent and
   tier 1, erupting the vent and tiers 1–2 with tier 1 heavier. The weight
   change keeps erupting readable in monochrome. */
.vmark { width: 72px; height: 72px; color: var(--color-text-2); }
.vmark path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.vmark.ideal path { stroke-width: 2; }
.vmark circle, .vmark .vent { fill: var(--volcano-accent); }
.vmark[data-state="quiet"] :is(circle, .vent) { fill: none; stroke: var(--color-text-muted); stroke-width: 1.6; }
.vmark[data-state="degraded"] :is(circle, .vent) { fill: var(--color-warning); }
.vmark[data-state="degraded"] path[data-tier="1"] { stroke: var(--color-warning); }
.vmark[data-state="erupting"] :is(circle, .vent) { fill: var(--color-danger); }
.vmark[data-state="erupting"] path[data-tier="1"] { stroke: var(--color-danger); stroke-width: 2.4; }
.vmark[data-state="erupting"] path[data-tier="2"] { stroke: var(--color-danger); }
.vmark[data-state="maintenance"] :is(circle, .vent) { fill: var(--color-text-muted); }

/* ---- Badges: a dot plus a label, so state is never colour alone -------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-xs) var(--font-body); padding: 4px 10px 4px 8px; border-radius: var(--radius-full); border: 1px solid var(--color-border); background: var(--color-surface); white-space: nowrap; }
.badge i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--color-text-muted); }
.badge[data-state="quiet"] i { background: var(--color-success); }
.badge[data-state="degraded"] i { background: var(--color-warning); }
.badge[data-state="erupting"] i { background: var(--color-danger); }
/* An unrecognised state keeps a hollow dot rather than borrowing a colour. */
.badge:not([data-state]) i { background: none; border: 1px solid var(--color-text-muted); }

/* ---- Scheduled activity and incidents ---------------------------------- */
#updated-line { margin-top: var(--space-3); }
section { padding: var(--space-7) 0 0; }
.list { list-style: none; margin: 0; padding: 0; }
.item { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-3); border-left-width: 4px; }
.item[data-severity="minor"] { border-left-color: var(--color-warning); }
.item[data-severity="major"] { border-left-color: var(--color-danger); }
.item[data-severity="maintenance"] { border-left-color: var(--color-text-muted); }
.item[data-resolved="true"] { border-left-color: var(--color-border); }
.item h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.item h3 .mono { font-weight: 400; }
.item p { margin: var(--space-2) 0 0; }
.item .tag { font: 500 var(--fs-xs) var(--font-body); color: var(--color-text-2); border: 1px solid var(--color-border); border-radius: var(--radius-xs); padding: 0 6px; }
.updates { list-style: none; margin: var(--space-3) 0 0; padding: 0; font-size: var(--fs-sm); }
.updates li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--space-3); padding: 6px 0; border-top: 1px solid var(--color-border); }
.updates li b { font-weight: 500; }
@media (max-width: 600px) { .updates li { grid-template-columns: 1fr; gap: 2px; } }
.empty { color: var(--color-text-muted); font-size: var(--fs-sm); padding: var(--space-4); border: 1px dashed var(--color-border); border-radius: var(--radius-md); }

footer { margin-top: var(--space-8); padding: var(--space-6) 0 var(--space-8); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); justify-content: space-between; }
