/* ══════════════════════════════════════════════════════════════════════════════
   FLEET PANEL (2026-10-06). The in-app view of the andy-monitor board.
   Lifted from the design mockup's `styles/fleet.css` block
   (shared/alon/Fleet_Monitor_InApp_Mockup.html, spec
   Fleet_Monitor_InApp_Design_Spec_2026-10-06.md), scoped under `.fleet`.

   Two colour rules carry the whole design, and both are easy to break:
   - The status ladder (crit / warn / notice / ok / unknown) deliberately has NO
     amber in it. Amber is --md-sys-color-human, and it marks ONLY something a
     person has to act on ("Needs you"). It never marks a status.
   - Green is a mark, never a surface and never text (the health.css contract).
     The hero takes its surface from the server's header_colour, its mark from
     the verdict.
   Solid shape = we have a reading, outline = we do not (see glyphs.js
   fleetMark). Colour is never the only carrier: every mark is also a shape and
   sits next to a word.

   The panel's geometry (width cap, gutter) is panel-layout.css's, via
   PANEL_LAYOUT.fleet = 'wide'. Nothing here sizes #panel-content.
   ══════════════════════════════════════════════════════════════════════════════ */

/* The accent serif. Latin subset of InstrumentSerif-Italic.ttf (15 KB), used by
   exactly one element: the all-clear verdict. Declared here, so the browser
   fetches it only when that element renders (an unused @font-face downloads
   nothing). */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-italic.woff2') format('woff2');
  unicode-range: U+0020-007E, U+2019, U+2014, U+2026;
}

.fleet {
  /* status ladder, dark */
  --fl-crit: #F87171;      --fl-crit-solid: #EF4444; --fl-crit-bg: rgba(239, 68, 68, .09);  --fl-crit-line: rgba(248, 113, 113, .42);
  --fl-warn: #FF8A3D;      --fl-warn-solid: #FF8A3D; --fl-warn-bg: rgba(255, 138, 61, .09); --fl-warn-line: rgba(255, 138, 61, .42);
  --fl-notice: var(--md-sys-color-primary); --fl-notice-solid: #2693D1;
  --fl-ok: var(--md-sys-color-success-fg);
  --fl-unknown: #94A3B8;   --fl-unknown-bg: rgba(148, 163, 184, .07); --fl-unknown-line: rgba(148, 163, 184, .38);
  --fl-on-solid: #0A0A0A;
  --fl-card: var(--md-sys-color-surface-container);
  --fl-line: var(--a-card-line);
  --fl-hatch: repeating-linear-gradient(135deg, rgba(148, 163, 184, .07) 0 6px, transparent 6px 12px);
  --fl-label: 12px;
  font-family: var(--md-sys-typescale-font-family);
  color: var(--md-sys-color-on-surface);
  -webkit-font-smoothing: antialiased;
}
.fleet *, .fleet *::before, .fleet *::after { box-sizing: border-box; }
/* Light: the explicit choice, and "system" following an OS in light mode (the
   same two selectors styles.css uses for its own light tokens). */
html[data-theme="light"] .fleet {
  --fl-crit: #B91C1C;  --fl-crit-solid: #DC2626; --fl-crit-bg: #FEF2F2; --fl-crit-line: #FCA5A5;
  --fl-warn: #C2410C;  --fl-warn-solid: #EA580C; --fl-warn-bg: #FFF4ED; --fl-warn-line: #FDBA8C;
  --fl-notice-solid: #1E6FA8;
  --fl-unknown: #475569; --fl-unknown-bg: #F1F5F9; --fl-unknown-line: #CBD5E1;
  --fl-on-solid: #FFFFFF;
  --fl-card: #FFFFFF;
  --fl-hatch: repeating-linear-gradient(135deg, rgba(71, 85, 105, .07) 0 6px, transparent 6px 12px);
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] .fleet,
  html:not([data-theme]) .fleet {
    --fl-crit: #B91C1C;  --fl-crit-solid: #DC2626; --fl-crit-bg: #FEF2F2; --fl-crit-line: #FCA5A5;
    --fl-warn: #C2410C;  --fl-warn-solid: #EA580C; --fl-warn-bg: #FFF4ED; --fl-warn-line: #FDBA8C;
    --fl-notice-solid: #1E6FA8;
    --fl-unknown: #475569; --fl-unknown-bg: #F1F5F9; --fl-unknown-line: #CBD5E1;
    --fl-on-solid: #FFFFFF;
    --fl-card: #FFFFFF;
    --fl-hatch: repeating-linear-gradient(135deg, rgba(71, 85, 105, .07) 0 6px, transparent 6px 12px);
  }
}

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

/* ---- marks: solid = we know, outline = we do not ---- */
.fl-mark { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; }
.fl-mark--lg { width: 44px; height: 44px; }
.fl-mark--md { width: 20px; height: 20px; }
.fl-c-ok { color: var(--fl-ok); } .fl-c-crit { color: var(--fl-crit-solid); } .fl-c-warn { color: var(--fl-warn-solid); }
.fl-c-notice { color: var(--fl-notice-solid); } .fl-c-unknown { color: var(--fl-unknown); } .fl-c-dim { color: var(--text-dim); }
.fl-mark .on { fill: none; stroke: var(--fl-on-solid); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Entering a red state: the existing sonarPing, twice, then still. */
.fl-mark.fl-ping { border-radius: 50%; animation: sonarPing .6s ease-out 2; }

/* ---- hero ---- */
.fl-hero {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px 24px;
  padding: 24px 28px; border-radius: var(--md-sys-shape-corner-lg);
  background: var(--fl-card); border: 1px solid var(--md-sys-color-outline);
  transition: background-color var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized-decel),
              border-color var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized-decel);
}
.fl-hero--red { background: var(--fl-crit-bg); border-color: var(--fl-crit-line); }
.fl-hero--amber { background: var(--fl-warn-bg); border-color: var(--fl-warn-line); }
.fl-hero--grey { background: var(--fl-hatch), var(--fl-unknown-bg); border-color: var(--fl-unknown-line); }
.fl-hero__verdict { margin: 0; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.005em; }
.fl-hero--red .fl-hero__verdict { color: var(--fl-crit); }
.fl-hero--amber .fl-hero__verdict { color: var(--fl-warn); }
.fl-hero__verdict--calm { font-family: var(--font-accent-serif); font-style: italic; font-weight: 400; font-size: 40px; line-height: 44px; letter-spacing: -.01em; }
.fl-hero__sub { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fl-sep { color: var(--text-dim); }
.fl-fresh { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: var(--md-sys-shape-corner-xs); }
.fl-fresh:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
.fl-ring { width: 14px; height: 14px; transform: rotate(-90deg); flex: none; }
.fl-ring circle { fill: none; stroke-width: 2.5; }
.fl-ring .trk { stroke: var(--md-sys-color-outline); }
/* The ring drains over the 20s poll interval and restarts on every read. */
.fl-ring .val { stroke: var(--md-sys-color-on-surface-variant); stroke-dasharray: 31.4; stroke-dashoffset: 0; stroke-linecap: round; }
.fl-ring.is-running .val { animation: flRing 20s linear forwards; }
@keyframes flRing { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 31.4; } }
.fl-counts { display: flex; align-items: stretch; gap: 0; }
.fl-count { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 92px; padding: 4px 18px; border-left: 1px solid var(--md-sys-color-outline); text-decoration: none; color: inherit; }
.fl-count:first-child { border-left: 0; }
.fl-count:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; border-radius: var(--md-sys-shape-corner-xs); }
.fl-count__n { font-size: 28px; line-height: 34px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.fl-count__l { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); }
.fl-count--P1 .fl-count__n { color: var(--fl-crit); } .fl-count--P2 .fl-count__n { color: var(--fl-warn); } .fl-count--P3 .fl-count__n { color: var(--fl-notice); }
.fl-count--zero.fl-count .fl-count__n { color: var(--text-dim); font-weight: 500; }
.fl-hero__aside { display: flex; align-items: center; gap: 16px; }
.fl-fade { animation: flFade var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard); }
@keyframes flFade { from { opacity: .2; } to { opacity: 1; } }

/* human pill: the ONLY amber on the surface */
.fl-human { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 8px; border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-human); color: var(--md-sys-color-on-human); font-size: 13px; line-height: 16px; font-weight: 600; white-space: nowrap; border: 0; font-family: inherit; }
.fl-human svg { width: 16px; height: 16px; }
button.fl-human { height: 40px; padding: 0 16px 0 12px; font-size: 14px; cursor: pointer; position: relative; }
button.fl-human::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; transition: opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard); }
@media (hover: hover) { button.fl-human:hover::after { opacity: var(--md-sys-state-hover-opacity, .08); } }
button.fl-human:active::after { opacity: var(--md-sys-state-pressed-opacity, .12); }
button.fl-human:focus-visible { outline: 2px solid var(--md-sys-color-human-line); outline-offset: 3px; }
button.fl-human[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--md-sys-color-on-human); }

/* ---- banners (lane, conflict) ---- */
.fl-banners:empty { display: none; }
.fl-banner { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin-top: 12px; padding: 14px 18px; border-radius: var(--md-sys-shape-corner-md); border: 1px solid; }
.fl-banner--red { background: var(--fl-crit-bg); border-color: var(--fl-crit-line); }
.fl-banner--amber { background: var(--fl-warn-bg); border-color: var(--fl-warn-line); }
.fl-banner__t { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.fl-banner--red .fl-banner__t { color: var(--fl-crit); } .fl-banner--amber .fl-banner__t { color: var(--fl-warn); }
.fl-banner__d { grid-column: 2; margin: 0; font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); }

/* ---- sections ---- */
.fl-section { margin-top: 32px; }
.fl-section__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; }
.fl-section__title { margin: 0; font-size: var(--fl-label); line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); display: flex; align-items: center; gap: 8px; }
.fl-section__n { font-variant-numeric: tabular-nums; color: var(--text-dim); font-weight: 500; }
.fl-section__aside { margin-left: auto; font-size: 13px; line-height: 16px; color: var(--text-dim); }
.fl-asof { display: none; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--md-sys-shape-corner-full); border: 1px solid var(--fl-unknown-line); color: var(--fl-unknown); font-size: 12px; font-weight: 600; }
.is-stale .fl-asof { display: inline-flex; }

/* ---- machine cards ---- */
.fl-machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; }
.fl-box { position: relative; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; min-height: 148px; padding: 16px;
  background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: var(--md-sys-shape-corner-md); color: inherit; font: inherit; cursor: pointer;
  transition: border-color var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard); }
.fl-box::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; transition: opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard); }
@media (hover: hover) { .fl-box:hover::after { opacity: .04; } .fl-box:hover { border-color: var(--md-sys-color-outline); } }
.fl-box:active::after { opacity: var(--md-sys-state-pressed-opacity, .12); }
.fl-box:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
.fl-box--red { background: var(--fl-crit-bg); border-color: var(--fl-crit-line); }
.fl-box--amber { background: var(--fl-warn-bg); border-color: var(--fl-warn-line); }
.fl-box--hollow { border-style: dashed; border-color: var(--md-sys-color-outline); }
.fl-box__top { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: start; }
.fl-box__name { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.fl-box__host { grid-column: 1; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-box__age { display: none; }
.fl-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.fl-box__top .fl-state { grid-row: 1; grid-column: 2; margin-top: 3px; }
.fl-state--red { color: var(--fl-crit); } .fl-state--amber { color: var(--fl-warn); } .fl-state--grey, .fl-state--hollow { color: var(--fl-unknown); }
.fl-state--green { color: var(--md-sys-color-on-surface-variant); }
.fl-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; line-height: 18px; color: var(--md-sys-color-on-surface-variant); margin: 0; padding: 0; list-style: none; }
.fl-facts b { font-weight: 500; color: var(--md-sys-color-on-surface); }
.fl-facts .mono { font-family: var(--font-mono); font-size: 12px; }
.fl-mounts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fl-mount { display: grid; grid-template-columns: 56px 1fr 36px; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--text-dim); }
.fl-mount > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-mount__bar { height: 4px; border-radius: 2px; background: var(--md-sys-color-surface-container-highest); overflow: hidden; }
/* Neutral by design: disk is a check, and if it fires the tag and the Open row
   say so. A bar that recoloured itself would be a second threshold table. */
.fl-mount__bar i { display: block; height: 100%; background: var(--md-sys-color-on-surface-variant); border-radius: 2px; }
.fl-mount__v { text-align: right; font-variant-numeric: tabular-nums; color: var(--md-sys-color-on-surface-variant); }
.fl-box__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; line-height: 16px; color: var(--text-dim); }
.fl-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--md-sys-shape-corner-sm); background: var(--md-sys-state-lift); font-size: 13px; font-weight: 500; color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.fl-tag .fl-mark { width: 14px; height: 14px; vertical-align: 0; }
.fl-tag--P1 { color: var(--fl-crit); } .fl-tag--P2 { color: var(--fl-warn); } .fl-tag--P3 { color: var(--fl-notice); }
.fl-human--sm { height: 24px; padding: 0 8px 0 6px; font-size: 12px; }
.fl-human--sm svg { width: 14px; height: 14px; }

/* ---- body columns ---- */
.fl-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
@media (min-width: 1024px) { .fl-body { grid-template-columns: minmax(0, 1fr) 360px; } }

/* ---- open list ---- */
.fl-filters { display: flex; gap: 8px; }
.fl-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--md-sys-shape-corner-sm); border: 1px solid var(--md-sys-color-outline); background: transparent; color: var(--md-sys-color-on-surface-variant); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fl-chip[aria-pressed="true"] { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface); border-color: transparent; }
.fl-chip .n { font-variant-numeric: tabular-nums; color: var(--text-dim); font-weight: 500; }
.fl-chip:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
@media (pointer: coarse) { .fl-chip { height: 44px; } }
.fl-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--fl-line); border-radius: var(--md-sys-shape-corner-md); background: var(--fl-card); overflow: hidden; }
.fl-alert { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 14px; padding: 16px 16px 16px 18px; border-top: 1px solid var(--fl-line); }
.fl-alert:first-child { border-top: 0; }
.fl-alert--P1 { background: var(--fl-crit-bg); }
.fl-alert > .fl-mark { grid-row: 1 / span 4; margin-top: 2px; width: 20px; height: 20px; }
.fl-alert__h { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.fl-alert__meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; line-height: 18px; color: var(--md-sys-color-on-surface-variant); }
.fl-alert__meta .who { color: var(--md-sys-color-on-surface); font-weight: 500; }
.fl-alert__desc { grid-column: 2; margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--text-dim); overflow-wrap: anywhere; }
.fl-alert__code { grid-column: 2; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-dim); overflow-wrap: anywhere; }
.fl-alert__act { grid-column: 3; grid-row: 1 / span 2; display: flex; align-items: flex-start; gap: 8px; }
.fl-owner-andy { font-size: 13px; line-height: 32px; color: var(--text-dim); white-space: nowrap; }
.fl-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--md-sys-shape-corner-sm); border: 1px solid var(--md-sys-color-outline); background: transparent; color: var(--md-sys-color-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.fl-btn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; transition: opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard); }
@media (hover: hover) { .fl-btn:hover::after { opacity: var(--md-sys-state-hover-opacity, .08); } }
.fl-btn:active::after { opacity: var(--md-sys-state-pressed-opacity, .12); }
.fl-btn svg { width: 16px; height: 16px; }
.fl-btn:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
@media (pointer: coarse) { .fl-btn { height: 44px; min-width: 44px; } }
.fl-quiet { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); }
.fl-quiet svg { width: 14px; height: 14px; }
.fl-clear { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid var(--fl-line); border-radius: var(--md-sys-shape-corner-md); background: var(--fl-card); font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); }
.fl-leave { opacity: 0; transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard); }

/* ---- rail ---- */
.fl-card { border: 1px solid var(--fl-line); border-radius: var(--md-sys-shape-corner-md); background: var(--fl-card); padding: 4px 16px; }
.fl-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--fl-line); align-items: start; }
.fl-kv:first-child { border-top: 0; }
.fl-kv > .fl-mark { grid-row: 1 / span 2; margin-top: 2px; }
.fl-kv__k { font-size: 14px; line-height: 20px; font-weight: 600; }
.fl-kv__v { grid-column: 2; font-size: 13px; line-height: 18px; color: var(--md-sys-color-on-surface-variant); }
.fl-cov { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 8px 0; }
.fl-cov div { padding: 8px 0; }
.fl-cov b { display: block; font-size: 20px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fl-cov span { font-size: 12px; line-height: 16px; color: var(--text-dim); }
.fl-legend { list-style: none; margin: 0; padding: 8px 0; display: grid; gap: 8px; }
.fl-legend li { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 18px; color: var(--md-sys-color-on-surface-variant); }
.fl-legend b { font-weight: 500; color: var(--md-sys-color-on-surface); }
details.fl-card summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 14px; font-weight: 600; border-radius: var(--md-sys-shape-corner-xs); }
details.fl-card summary:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
details.fl-card summary::-webkit-details-marker { display: none; }
details.fl-card summary svg { width: 18px; height: 18px; color: var(--text-dim); transition: transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard); }
details[open].fl-card summary svg { transform: rotate(180deg); }

/* ---- footer ---- */
.fl-foot { display: flex; align-items: flex-start; gap: 12px; margin-top: 40px; padding: 20px 0 8px; border-top: 1px solid var(--fl-line); font-size: 13px; line-height: 18px; color: var(--text-dim); }
.fl-foot p { margin: 0; }
.fl-foot a { color: var(--md-sys-color-primary); font-weight: 600; text-decoration: none; }
.fl-foot a:hover { text-decoration: underline; }
.fl-foot a:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; border-radius: var(--md-sys-shape-corner-xs); }
/* The &Y mark is a background, not an <img>: the panel creates no image
   elements at all, so "no <img> in the panel" is a property a test can hold. */
.fl-logo { flex: none; display: inline-block; width: 22px; height: 22px; opacity: .9; background: url('/favicon-mark.svg') center / contain no-repeat; }
.fl-logo--lg { width: 32px; height: 32px; opacity: .5; }

/* ---- stale / unreachable: last-known data stays, visibly not current ---- */
.is-stale .fl-machines, .is-stale .fl-list, .is-stale .fl-clear, .is-stale .fl-rail .fl-card { filter: grayscale(1); opacity: .62; }

/* ---- machine sheet ----
   Mounted on <body> inside a `.fleet.fl-layer` wrapper (display: contents) so it
   inherits the scoped tokens without being caught by any transformed ancestor. */
.fl-layer { display: contents; }
.fl-scrim { position: fixed; inset: 0; background: var(--md-sys-color-scrim); z-index: 1100; animation: flScrimIn var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard) both; }
@keyframes flScrimIn { from { opacity: 0; } to { opacity: 1; } }
.fl-sheet { position: fixed; z-index: 1101; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--md-sys-color-surface-container-low); border-left: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--md-sys-elevation-3); display: flex; flex-direction: column; border-radius: var(--md-sys-shape-corner-lg) 0 0 var(--md-sys-shape-corner-lg); overflow: hidden;
  font-family: var(--md-sys-typescale-font-family); color: var(--md-sys-color-on-surface);
  animation: flSheetIn var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized-decel) both; }
@keyframes flSheetIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.fl-sheet__grab { display: none; }
.fl-sheet__head { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--fl-line); }
.fl-sheet__name { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
.fl-sheet__sub { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-width: 0; }
.fl-x { width: 44px; height: 44px; border-radius: var(--md-sys-shape-corner-full); border: 0; background: transparent; color: var(--md-sys-color-on-surface-variant); display: grid; place-items: center; cursor: pointer; grid-row: 1 / span 2; grid-column: 2; }
.fl-x:hover { background: var(--md-sys-state-lift); }
.fl-x:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
.fl-sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 32px; flex: 1; }
.fl-sheet__body .fl-facts { margin-top: 16px; }
.fl-sheet__body .fl-mounts { margin-top: 12px; max-width: 320px; }
.fl-sheet__cov { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); }
.fl-sheet__why { margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--text-dim); }
.fl-group { margin-top: 24px; }
.fl-group__t { position: sticky; top: 0; z-index: 1; margin: 0 -20px; padding: 8px 20px; background: var(--md-sys-color-surface-container-low); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); display: flex; gap: 8px; }
.fl-group__t .n { color: var(--text-dim); font-weight: 500; }
.fl-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border: 1px solid var(--fl-line); border-radius: var(--md-sys-shape-corner-md); background: var(--fl-card); overflow: hidden; }
.fl-check { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 14px; border-top: 1px solid var(--fl-line); align-items: start; }
.fl-check:first-child { border-top: 0; }
.fl-check > .fl-mark { margin-top: 2px; }
.fl-check__l { font-size: 14px; line-height: 20px; font-weight: 500; overflow-wrap: anywhere; }
.fl-check__v { font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.fl-check__m { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12px; line-height: 16px; color: var(--text-dim); }
.fl-check__m .mono { font-family: var(--font-mono); }
.fl-check__note { grid-column: 2 / span 2; margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--md-sys-color-on-surface-variant); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fl-check__note.is-open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.fl-more { grid-column: 2 / span 2; justify-self: start; margin-top: 2px; padding: 0; min-height: 24px; border: 0; background: none; color: var(--md-sys-color-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: var(--md-sys-shape-corner-xs); }
.fl-more:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
@media (pointer: coarse) {
  .fl-more { min-height: 44px; }
  /* 44px touch targets without changing the line they sit on. */
  .fl-fresh { min-height: 44px; margin-block: -12px; }
  .fl-foot a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* Fine checks: a compact two-column grid in the wide sheet, one column on a phone. */
.fl-checks--fine { grid-template-columns: 1fr 1fr; }
.fl-checks--fine .fl-check { grid-template-columns: 16px minmax(0, 1fr) auto; padding: 10px 12px; border-top: 0; border-bottom: 1px solid var(--fl-line); }
.fl-checks--fine .fl-check:nth-child(odd) { border-right: 1px solid var(--fl-line); }
.fl-checks--fine .fl-check__l { font-size: 13px; line-height: 18px; font-weight: 400; color: var(--md-sys-color-on-surface-variant); }
.fl-checks--fine .fl-check__v { font-size: 12px; line-height: 18px; color: var(--text-dim); }

/* ---- skeleton (first paint only) ---- */
.fl-sk { background: var(--md-sys-color-surface-container-high); border-radius: 6px; position: relative; overflow: hidden; }
.fl-sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--md-sys-state-lift), transparent); animation: flShimmer 1.4s var(--md-sys-motion-easing-standard) infinite; }
@keyframes flShimmer { to { transform: translateX(100%); } }
.fl-box--sk { cursor: default; }

/* ---- motion ---- */
.fl-enter { animation: flEnter var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized-decel) both; }
@keyframes flEnter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fleet *, .fleet *::after, .fl-sheet, .fl-scrim { animation: none !important; transition: none !important; }
  .fl-sk::after { display: none; }
}

/* ---- phone ---- */
@media (max-width: 767px) {
  .fl-hero { grid-template-columns: auto 1fr; padding: 18px 16px; gap: 14px 12px; border-radius: var(--md-sys-shape-corner-md); }
  .fl-hero .fl-mark--lg { width: 32px; height: 32px; align-self: start; margin-top: 2px; }
  .fl-hero__verdict { font-size: 22px; line-height: 28px; }
  .fl-hero__verdict--calm { font-size: 32px; line-height: 36px; }
  .fl-hero__sub { font-size: 13px; line-height: 18px; gap: 2px 12px; }
  /* On a phone the zone label can push "Checked ..." onto a second line, and a
     separator left dangling at the end of the first line reads as a typo. The
     ring glyph and the gap separate the two items on one line on their own. */
  .fl-hero__sub .fl-sep { display: none; }
  .fl-hero__aside { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 12px; }
  .fl-counts { border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-md); background: var(--md-sys-state-lift-weak); }
  .fl-count { flex: 1; min-width: 0; padding: 10px 12px; min-height: 64px; }
  .fl-count__n { font-size: 24px; line-height: 30px; }
  .fl-count__l { font-size: 11px; letter-spacing: .05em; }
  button.fl-human { align-self: flex-start; height: 44px; }
  .fl-section { margin-top: 28px; }
  .fl-machines { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--fl-line); border-radius: var(--md-sys-shape-corner-md); overflow: hidden; background: var(--fl-card); }
  .fl-box { min-height: 64px; padding: 12px 14px; gap: 8px; border: 0; border-top: 1px solid var(--fl-line); border-radius: 0; }
  .fl-box:first-child { border-top: 0; }
  .fl-box--red, .fl-box--amber, .fl-box--hollow { border: 0; border-top: 1px solid var(--fl-line); }
  .fl-box:first-child { border-top: 0; }
  /* disk + release live in the sheet on a phone */
  .fl-box .fl-mounts, .fl-box .fl-facts { display: none; }
  .fl-box__age { display: inline; }
  .fl-box__cov { display: none; }
  .fl-box__foot:not(:has(.fl-tag, .fl-human, .fl-quiet)) { display: none; }
  .fl-alert { grid-template-columns: 20px minmax(0, 1fr); padding: 14px; }
  .fl-alert__act { grid-column: 2; grid-row: 5; margin-top: 8px; align-items: center; flex-wrap: wrap; }
  .fl-owner-andy { line-height: 20px; }
  .fl-alert__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .fl-sheet { width: 100vw; top: auto; height: calc(100% - 24px); border-radius: var(--md-sys-shape-corner-lg) var(--md-sys-shape-corner-lg) 0 0; border-left: 0; border-top: 1px solid var(--md-sys-color-outline); animation-name: flSheetUp; animation-duration: var(--md-sys-motion-duration-medium2); }
  .fl-sheet__grab { display: block; flex: none; width: 36px; height: 4px; border-radius: 2px; background: var(--md-sys-color-outline); margin: 8px auto 0; }
  .fl-checks--fine { grid-template-columns: 1fr; }
  .fl-checks--fine .fl-check:nth-child(odd) { border-right: 0; }
  .fl-foot { flex-direction: row; align-items: flex-start; }
}
@keyframes flSheetUp { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
