/* Dienststatus LK IT-Systeme
   Gestaltung nach Apples Human Interface Guidelines: Systemschrift, Systemfarben,
   gruppierte Listen, Tiefe durch Transluzenz. Farbe trägt ausschließlich Statusbedeutung. */

:root {
  color-scheme: light dark;

  /* Markenfarben LK IT-Systeme */
  --brand-ink: #34424d;
  --brand-accent: #43b9ff;

  --canvas: #f4f6f8;
  --surface: #ffffff;
  --fill: #eef1f4;
  --fill-strong: #e3e8ec;
  --label: #2a3540;
  --label-2: #66717c;
  --label-3: #7d8893;
  --separator: rgba(52, 66, 77, 0.14);
  --link: #0072b5;
  --focus: rgba(67, 185, 255, 0.75);
  --bar: rgba(244, 246, 248, 0.74);
  --scrim: rgba(0, 0, 0, 0.32);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.05);
  --sheet-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);

  /* Systemfarben: Fläche (Symbol) und Text (kontraststark) */
  --green: #34c759;  --green-text: #248a3d;
  --blue: #007aff;   --blue-text: #0066cc;
  --orange: #ff9500; --orange-text: #c93400;
  --red: #ff3b30;    --red-text: #d70015;
  --gray: #8e8e93;   --gray-text: #6e6e73;
  --none: #e1e6ea;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue",
          "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --r-card: 22px;
  --r-row: 14px;
  --r-tile: 12px;
  --gutter: clamp(20px, 5vw, 40px);
  --max: 1000px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-ink: #f2f5f7;
    --brand-accent: #43b9ff;

    --canvas: #0d1115;
    --surface: #182027;
    --fill: #232c34;
    --fill-strong: #2c363f;
    --label: #f2f5f7;
    --label-2: #a3adb6;
    --label-3: #87929c;
    --separator: rgba(140, 155, 170, 0.22);
    --link: #43b9ff;
    --focus: rgba(67, 185, 255, 0.75);
    --bar: rgba(13, 17, 21, 0.74);
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: none;
    --sheet-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);

    --green: #30d158;  --green-text: #30d158;
    --blue: #0a84ff;   --blue-text: #409cff;
    --orange: #ff9f0a; --orange-text: #ff9f0a;
    --red: #ff453a;    --red-text: #ff6961;
    --gray: #8e8e93;   --gray-text: #a1a1a6;
    --none: #232c34;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--label);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern";
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; color: inherit; letter-spacing: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); padding: 10px 14px; border-radius: 10px;
  box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Leiste ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.bar.is-scrolled { border-bottom-color: var(--separator); }

.bar-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--label);
  font-size: 17px; letter-spacing: -0.02em;
  min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 28px; width: auto; flex: none; }
.lk-ink { fill: var(--brand-ink); }
.lk-accent { fill: var(--brand-accent); }
.brand-page {
  color: var(--label-2); white-space: nowrap;
  padding-left: 12px;
  border-left: 1px solid var(--separator);
  line-height: 20px;
}

.bar-status { display: flex; align-items: center; gap: 6px; min-width: 0; }
.updated {
  font-size: 13px; color: var(--label-2); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.refresh {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; flex: none;
  color: var(--link);
  transition: background-color 0.15s;
}
.refresh:hover { background: var(--fill); }
.refresh svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.refresh.is-busy svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */

main { display: block; }

.hero {
  max-width: calc(760px + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) var(--gutter) clamp(40px, 6vw, 64px);
  text-align: center;
}

.hero-glyph {
  width: 72px; height: 72px; margin: 0 auto 22px;
}
.hero-glyph svg { width: 100%; height: 100%; display: block; }
.hero-glyph.is-entering svg { animation: glyph-in 0.7s var(--ease) both; }
.hero-glyph.is-entering .glyph-mark {
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: draw 0.5s 0.25s var(--ease) forwards;
}
@keyframes glyph-in { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-title {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.hero-sub {
  margin: 16px auto 0;
  max-width: 34em;
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.38;
  color: var(--label-2);
  letter-spacing: -0.016em;
  text-wrap: pretty;
}

/* Anbieter-Leiste: Navigation und Schnellüberblick zugleich */
.overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 640px;
  margin: clamp(36px, 6vw, 52px) auto 0;
}
.overview a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 6px 10px;
  border-radius: 16px;
  color: var(--label);
  transition: background-color 0.15s;
}
.overview a:hover { background: var(--surface); text-decoration: none; }
.overview .tile { width: 52px; height: 52px; }
.overview .name {
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.overview .state { font-size: 13px; line-height: 1.2; margin-top: -4px; }

/* Statussymbole: Fläche in Statusfarbe, Zeichen weiß */
.glyph-bg { fill: var(--tint); }
.glyph-mark { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.glyph-tool { stroke-width: 4.2; }
.glyph-dot { fill: #fff; }
.glyph.is-hero .glyph-mark { stroke-width: 2; }
.overview .state { color: var(--tint-text); }

/* Symbol-Kachel mit Statusplakette */
.tile {
  position: relative; flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--fill);
  color: var(--label);
  display: grid; place-items: center;
}
.overview .tile { border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.tile > svg {
  width: 56%; height: 56%; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.tile .badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  box-shadow: 0 0 0 2.5px var(--canvas);
}
.tile .badge svg { width: 100%; height: 100%; display: block; }

/* ---------- Abschnitte ---------- */

.section {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 7vw, 72px);
}
.section-head { margin-bottom: 18px; }
.section h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.125;
  font-weight: 700;
  letter-spacing: -0.024em;
}
.section-note {
  margin: 6px 0 0;
  color: var(--label-2);
  font-size: 15px; line-height: 1.4; letter-spacing: -0.01em;
}

.banner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: -16px auto 40px;
  padding: 0 var(--gutter);
}
.banner p {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--r-row);
  background: var(--surface);
  color: var(--label-2);
  font-size: 15px; line-height: 1.4;
  box-shadow: var(--shadow);
}

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

/* Gruppierte Liste */
.list {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.list > li { position: relative; }
.list > li + li::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 20px);
  border-top: 1px solid var(--separator);
}

/* ---------- Meldungen ---------- */

.incident-list { --inset: 68px; }
.incident {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 22px 18px 20px;
}
.incident .sym { width: 32px; height: 32px; margin-top: 1px; }
.incident .sym svg { width: 100%; height: 100%; display: block; }
.incident h3 {
  margin: 0;
  font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.022em;
}
.meta {
  margin: 3px 0 0;
  font-size: 14px; line-height: 1.4; color: var(--label-2); letter-spacing: -0.01em;
}
.meta .who { color: var(--label); font-weight: 500; }
.body-text {
  margin: 10px 0 0;
  font-size: 15px; line-height: 1.47; color: var(--label);
  white-space: pre-line;
  letter-spacing: -0.01em;
  max-width: 68ch;
}
.body-text.is-clamped {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.actions { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.text-button {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--link); font-size: 15px; letter-spacing: -0.01em;
}
.text-button:hover { text-decoration: underline; }
.actions a { font-size: 15px; letter-spacing: -0.01em; }

/* ---------- Anbieterkarten ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.provider {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.provider-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px; align-items: center;
  padding: 20px 20px 16px;
}
.provider-head h3 {
  margin: 0; font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.024em;
}
.provider-head p {
  margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--label-2); letter-spacing: -0.005em;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap;
  background: var(--tint-bg);
  color: var(--tint-text);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tint); }

.is-operational { --tint: var(--green); --tint-text: var(--green-text); --tint-bg: color-mix(in srgb, var(--green) 13%, transparent); }
.is-maintenance { --tint: var(--blue); --tint-text: var(--blue-text); --tint-bg: color-mix(in srgb, var(--blue) 12%, transparent); }
.is-degraded    { --tint: var(--orange); --tint-text: var(--orange-text); --tint-bg: color-mix(in srgb, var(--orange) 15%, transparent); }
.is-outage      { --tint: var(--red); --tint-text: var(--red-text); --tint-bg: color-mix(in srgb, var(--red) 12%, transparent); }
.is-unknown     { --tint: var(--gray); --tint-text: var(--gray-text); --tint-bg: var(--fill); }

.rows { list-style: none; margin: 0; padding: 0 0 0 20px; flex: 1; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px; align-items: center;
  min-height: 48px;
  padding: 10px 20px 10px 0;
  border-top: 1px solid var(--separator);
}
.row .label { min-width: 0; }
.row .name { display: block; font-size: 15px; line-height: 1.3; letter-spacing: -0.012em; }
.row .note {
  display: block; margin-top: 2px;
  font-size: 13px; line-height: 1.35; color: var(--label-2); letter-spacing: -0.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row .group-title { display: block; }
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; letter-spacing: -0.01em; color: var(--tint-text);
  white-space: nowrap;
}
.status svg { width: 20px; height: 20px; flex: none; display: block; }
.status.is-operational .word { color: var(--label-3); }

.provider-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 8px 0 20px;
  border-top: 1px solid var(--separator);
  min-height: 52px;
}
.provider-foot .checked { font-size: 13px; color: var(--label-3); letter-spacing: -0.005em; }
.disclose {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 10px;
  color: var(--link); font-size: 15px; letter-spacing: -0.012em;
}
.disclose:hover { background: var(--fill); }
.disclose svg { width: 8px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.row .disclose { margin-right: -12px; }

.provider-error {
  margin: 0 20px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 13px; line-height: 1.4;
}

/* ---------- Wartungen ---------- */

.maint-list { --inset: 84px; }
.maint {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px; align-items: start;
  padding: 16px 22px 16px 20px;
}
.cal {
  width: 48px; height: 50px; border-radius: 11px;
  background: var(--fill);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1;
}
.cal .wd { font-size: 11px; font-weight: 600; color: var(--red-text); letter-spacing: 0; }
.cal .d { font-size: 23px; font-weight: 400; letter-spacing: -0.03em; margin-top: 3px; }
.maint h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.maint .when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--blue-text);
}
.live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.list-more { padding: 6px 12px; }

/* ---------- Verlauf ---------- */

.history-card { padding: 6px 22px 10px; }
.hist-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 128px;
  gap: 20px; align-items: center;
  padding: 16px 0;
}
.hist-row + .hist-row { border-top: 1px solid var(--separator); }
.hist-name { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.hist-sum { font-size: 13px; color: var(--label-2); text-align: right; letter-spacing: -0.005em; }
.bars {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 3px;
  height: 34px;
  margin: 0; padding: 0; list-style: none;
}
.bars li { display: contents; }
.bar-day {
  display: block; width: 100%; height: 100%;
  border: 0; padding: 0; border-radius: 3px;
  background: var(--tint, var(--none));
  cursor: default;
  transition: transform 0.15s var(--ease);
}
.bar-day.is-operational { background: color-mix(in srgb, var(--green) 78%, transparent); }
.bar-day.is-none { background: var(--none); }
.bar-day:hover, .bar-day:focus-visible { transform: scaleY(1.12); }
.bars-scale {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--label-3); margin-top: 6px; letter-spacing: 0;
}

.legend {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  list-style: none; margin: 14px 0 0; padding: 0 4px;
  font-size: 13px; color: var(--label-2);
}
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 11px; height: 11px; border-radius: 3px; background: var(--tint); }
.swatch.is-operational { background: color-mix(in srgb, var(--green) 78%, transparent); }
.swatch.is-none { background: var(--none); }

.tip {
  position: fixed; z-index: 40; pointer-events: none;
  max-width: 240px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--label);
  color: var(--canvas);
  font-size: 13px; line-height: 1.35; letter-spacing: -0.005em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transform: translate(-50%, calc(-100% - 10px));
}
.tip strong { font-weight: 600; }

/* ---------- Detail-Sheet ---------- */

.sheet {
  width: min(680px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--canvas);
  color: var(--label);
  box-shadow: var(--sheet-shadow);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 0.42s var(--ease); }
.sheet::backdrop {
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade 0.3s ease;
}
@keyframes sheet-in { from { transform: translateY(24px) scale(0.98); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.sheet-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 56px; padding: 0 8px;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
  flex: none;
}
.sheet-nav h2 {
  margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.022em; text-align: center;
  transition: opacity 0.2s;
}
.sheet-nav h2.is-tucked { opacity: 0; }
.sheet-done {
  justify-self: end;
  border: 0; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 10px;
  color: var(--link); font-size: 17px; font-weight: 600; letter-spacing: -0.022em;
}
.sheet-done:hover { background: var(--fill); }
.sheet-body { position: relative; overflow-y: auto; padding: 24px 20px 28px; overscroll-behavior: contain; }
.sheet-summary { display: flex; align-items: center; gap: 14px; margin: 0 4px 28px; }
.sheet-summary .tile { width: 48px; height: 48px; border-radius: 13px; background: var(--surface); }
.sheet-summary h3 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -0.026em; }
.sheet-summary p { margin: 4px 0 0; }

.group { margin-bottom: 28px; }
.group-label {
  margin: 0 20px 7px;
  line-height: 1.3;
  font-size: 13px; font-weight: 400; color: var(--label-2); letter-spacing: -0.005em;
}
.group .list { border-radius: 14px; box-shadow: none; }
.group .rows { padding-left: 16px; }
.group .row { padding-right: 16px; }
.group .rows > .row:first-child { border-top: 0; }
.group .incident { padding: 14px 16px; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.group .incident .sym { width: 26px; height: 26px; }
.group .incident h3 { font-size: 16px; }
.group .incident-list { --inset: 54px; }
.group .maint-list { --inset: 80px; }
.group .maint { padding: 14px 16px; }
.sheet-foot { margin: 0 20px; font-size: 13px; line-height: 1.5; color: var(--label-2); }
.empty { padding: 14px 16px; color: var(--label-2); font-size: 15px; }

/* ---------- Fußzeile ---------- */

.footer { border-top: 1px solid var(--separator); }
.footer-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  font-size: 12px; line-height: 1.5; color: var(--label-2); letter-spacing: -0.005em;
}
.footer p { margin: 0 0 8px; max-width: 72ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; }
.footer-links a, .footer-links span { color: var(--label-2); }
.footer-links a:hover { color: var(--label); }

.noscript { text-align: center; padding: 24px; }

/* ---------- Anpassungen ---------- */

@media (max-width: 760px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hist-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; }
  .hist-row .bars-wrap { grid-column: 1 / -1; grid-row: 2; }
  .bars { height: 30px; gap: 2px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-page { display: none; }
  .bar-inner { height: 52px; }
  .brand-logo { height: 22px; }
  .overview { gap: 2px; }
  .overview a { padding: 10px 2px 8px; }
  .overview .tile { width: 46px; height: 46px; border-radius: 13px; }
  .overview .name { font-size: 12px; }
  .overview .state { font-size: 12px; }
  .provider-head { grid-template-columns: 36px minmax(0, 1fr); padding: 18px 16px 14px; }
  .provider-head .tile { width: 36px; height: 36px; border-radius: 10px; }
  .provider-head .pill { grid-column: 1 / -1; justify-self: start; }
  .rows { padding-left: 16px; }
  .row { padding-right: 16px; }
  .provider-foot { padding-left: 16px; padding-right: 4px; }
  .incident { padding: 16px; gap: 12px; grid-template-columns: 28px minmax(0, 1fr); }
  .incident .sym { width: 28px; height: 28px; }
  .incident-list { --inset: 56px; }
  .maint { padding: 14px 16px; }
  .maint-list { --inset: 80px; }
  .history-card { padding: 4px 16px 8px; }
  .sheet {
    width: 100vw; max-width: none;
    max-height: 92vh; margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  .sheet[open] { animation: sheet-up 0.45s var(--ease); }
  .sheet-body { padding: 20px 14px calc(28px + env(safe-area-inset-bottom)); }
}
@keyframes sheet-up { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .pill, .status, .bar-day, .swatch { forced-color-adjust: none; }
}
