/* Surcharges Pico.css + gabarit responsive (charte : doc/ecrans.md). */

:root[data-theme="light"] {
  --wpm-bg: #f6f5f2;
  --wpm-surface: #ffffff;
  --wpm-border: #e3e1db;
  --wpm-text: #1c1b19;
  --wpm-muted: #5b5953;
  --wpm-accent: #2f4fa8;
  --wpm-sidebar: #1c1b19;
  --wpm-radius: 10px;
  --pico-font-family-sans-serif: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pico-font-family-monospace: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pico-background-color: var(--wpm-bg);
  --pico-color: var(--wpm-text);
  --pico-muted-color: var(--wpm-muted);
  --pico-primary: var(--wpm-accent);
  --pico-primary-background: var(--wpm-accent);
  --pico-primary-border: var(--wpm-accent);
  --pico-primary-hover: #24408c;
  --pico-primary-hover-background: #24408c;
  --pico-primary-hover-border: #24408c;
  --pico-primary-focus: rgba(47, 79, 168, 0.35);
  --pico-border-radius: var(--wpm-radius);
  --pico-font-size: 100%;
  --pico-spacing: 1rem;
  --pico-form-element-spacing-vertical: 0.6rem;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--wpm-bg); }

.mono, code, pre { font-family: var(--pico-font-family-monospace); }
.mono { font-size: 0.92em; word-break: break-all; }
.small { font-size: 0.8em; }
.muted { color: var(--wpm-muted); }
.visually-hidden, .nav-toggle {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: #fff; padding: 0.75rem 1rem; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible { outline: 3px solid var(--wpm-accent); outline-offset: 2px; }

/* Boutons et zones tactiles ≥ 44 px */
button, [role="button"], input[type="submit"], select, input:not([type="checkbox"], [type="radio"]) {
  min-height: 44px;
}
input[type="checkbox"], input[type="radio"] { width: 1.35rem; height: 1.35rem; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { min-height: 44px; display: flex; align-items: center; gap: 0.5rem; }

/* --- Gabarit ------------------------------------------------------------------ */

.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.topbar { display: none; }
.nav-backdrop { display: none; }

.sidebar {
  background: var(--wpm-sidebar); color: #e8e6e1; padding: 1rem 0.75rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem;
}
.sidebar a { color: #e8e6e1; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; padding: 0.25rem 0.5rem; color: #fff; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.4rem 0.6rem;
  border-radius: 8px; color: #e8e6e1;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.08); }
.nav-link.active { background: var(--wpm-accent); color: #fff; }
.nav-soon { opacity: 0.45; cursor: default; }
.nav-soon small { font-size: 0.7em; margin-left: 0.3rem; }
.nav-icon { width: 1.5rem; text-align: center; flex: none; }
.nav-section { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #a19e97; margin: 0 0.6rem 0.3rem; }

/* Liens rapides : dock façon macOS flottant, centré en bas de la fenêtre, hors barre latérale.
   Une seule ligne d'icônes (jamais de retour à la ligne) : si elle déborde, défilement
   horizontal natif + flèches ❮ ❯ superposées aux extrémités (affichées par dock.js).
   Sous le tiroir mobile (voile 25, tiroir 30). Le contenu réserve --wpm-dock-space en bas.
   Sélecteurs à deux classes pour passer devant « nav ul:first-of-type » et « nav li » de Pico. */
:root {
  --wpm-dock-space: 6.75rem; --wpm-dock-zoom-room: 1.5rem; --wpm-dock-caption-h: 1.2rem;
  --wpm-dock-offset: 0.75rem; --wpm-dock-peek: 6px; --wpm-dock-reveal: 40px; --wpm-dock-peek-bg: rgba(120, 118, 112, 0.85);
  --wpm-dock-slide: 0.22s ease;
}
.quick-links.dock {
  display: block; position: fixed; z-index: 22; left: 0; right: 0; bottom: max(var(--wpm-dock-offset), env(safe-area-inset-bottom));
  width: fit-content; min-width: min(19rem, 100vw - 1.5rem); max-width: calc(100vw - 1.5rem); margin: 0 auto;
  padding: 0.3rem 0.35rem; border-radius: 16px;
  background: linear-gradient(rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05)), rgba(28, 27, 25, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 28px rgba(0, 0, 0, 0.35);
}
.layout:has(.dock) .content { padding-bottom: var(--wpm-dock-space); }
/* Zone de défilement : marge haute transparente pour que le grossissement ne soit pas rogné
   (un conteneur en overflow-x: auto rogne aussi verticalement), marges latérales pour la
   tuile agrandie aux extrémités et le contour de focus. */
.dock .dock-list {
  display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-end; gap: 0.35rem;
  list-style: none; margin: calc(-1 * var(--wpm-dock-zoom-room)) -0.35rem -0.3rem;
  padding: var(--wpm-dock-zoom-room) 0.5rem 0.3rem;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
}
.dock .dock-list::-webkit-scrollbar { display: none; }
.dock .dock-item { display: block; flex: none; position: relative; list-style: none; margin: 0; padding: 0; }
/* Icônes centrées quand le dock est plus large qu'elles (largeur mini pour la légende) ;
   marges auto ramenées à 0 en cas de débordement, sans rogner le début de la liste. */
.dock .dock-item:first-child { margin-left: auto; }
.dock .dock-item:last-child { margin-right: auto; }
.dock .dock-item:hover, .dock .dock-item:focus-within { z-index: 1; }
.dock .dock-link {
  display: block; margin: 0; padding: 0; border-radius: 12px; color: #e8e6e1; text-decoration: none;
}
.dock-tile {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(#fbfaf7, #d9d7d0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 8px rgba(0, 0, 0, 0.4);
  transform-origin: bottom center;
}
/* Teinte d'après le favicon (dock-tint.js) : seulement si la classe est posée, sinon fond par défaut. */
.dock .dock-item.dock-tinted .dock-tile {
  background: var(--tile-bg);
  box-shadow: inset 0 0 0 1px var(--tile-edge), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 8px rgba(0, 0, 0, 0.4);
}
.dock-favicon { width: 26px; height: 26px; object-fit: contain; }
.dock-fallback { color: var(--wpm-sidebar); font-size: 1.2rem; line-height: 1; }
/* Icônes seules, comme le dock macOS : nom porté par title (infobulle) et aria-label. */
.dock .dock-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dock .dock-link:focus-visible { outline: 3px solid #9fb3ea; outline-offset: 2px; }
/* Légende : libellé du lien survolé/focalisé (dock.js), sur toute la largeur du dock, centré.
   Hauteur réservée même vide pour que le dock ne saute pas ; largeur intrinsèque nulle
   (width 0 + min-width 100 %) pour ne pas élargir le dock ; points de suspension en dernier recours. */
.dock .dock-caption {
  box-sizing: border-box; width: 0; min-width: 100%; height: var(--wpm-dock-caption-h); padding: 0 0.5rem;
  font-size: 0.75rem; line-height: var(--wpm-dock-caption-h); color: #fff; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Flèches de défilement : cachées tant que tout tient ; flèche d'une extrémité atteinte
   (désactivée) masquée. Zone tactile 44 px, fondu vers le fond du dock. */
.dock button.dock-scroll {
  display: none; position: absolute; z-index: 2; top: 0; bottom: var(--wpm-dock-caption-h); width: 44px; min-height: 44px;
  margin: 0; padding: 0; border: 0; box-shadow: none; color: #fff; font-size: 1.15rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.dock.has-overflow button.dock-scroll { display: grid; place-items: center; }
.dock button.dock-scroll-prev {
  left: 0; border-radius: 16px 0 0 16px;
  background: linear-gradient(to right, rgba(28, 27, 25, 0.95) 55%, rgba(28, 27, 25, 0));
}
.dock button.dock-scroll-next {
  right: 0; border-radius: 0 16px 16px 0;
  background: linear-gradient(to left, rgba(28, 27, 25, 0.95) 55%, rgba(28, 27, 25, 0));
}
.dock button.dock-scroll:disabled { visibility: hidden; }
.dock button.dock-scroll:focus-visible { outline: 3px solid #9fb3ea; outline-offset: -3px; }
/* Grossissement façon macOS : tuile survolée agrandie, voisines légèrement. Désactivé si
   l'utilisateur réduit les animations ; survol limité aux pointeurs qui le permettent. */
@media (prefers-reduced-motion: no-preference) {
  .dock .dock-list { scroll-behavior: smooth; }
  .dock-tile { transition: transform 0.18s cubic-bezier(0.3, 0.7, 0.4, 1.4); }
  .dock .dock-link:focus-visible .dock-tile { transform: translateY(-6px) scale(1.3); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .dock .dock-item:hover .dock-tile { transform: translateY(-8px) scale(1.35); }
  .dock .dock-item:hover + .dock-item .dock-tile,
  .dock .dock-item:has(+ .dock-item:hover) .dock-tile { transform: translateY(-3px) scale(1.14); }
}
/* Dock escamotable (souris/stylet, ≥ 640 px) : glissé sous le bord de la fenêtre, seule une
   bande grise --wpm-dock-peek dépasse ; ressort au survol ou au focus clavier. La zone ::after
   prolonge le survol jusqu'au bord pour que le dock ne se referme pas en descendant ; dock
   replié, elle monte à --wpm-dock-reveal au-dessus de la bande pour l'ouvrir dès l'approche. */
@media (min-width: 640px) and (hover: hover) and (pointer: fine) {
  .quick-links.dock:not(:hover, :has(:focus-visible)) {
    transform: translateY(calc(100% + var(--wpm-dock-offset) - var(--wpm-dock-peek)));
  }
  .quick-links.dock:not(:hover, :has(:focus-visible)) > * { pointer-events: none; }
  .quick-links.dock::before {
    content: ""; position: absolute; z-index: 3; top: 0; left: 0; right: 0;
    height: var(--wpm-dock-peek); border-radius: 16px 16px 0 0;
    background: var(--wpm-dock-peek-bg); pointer-events: none;
  }
  .quick-links.dock:is(:hover, :has(:focus-visible))::before { opacity: 0; }
  .quick-links.dock::after {
    content: ""; position: absolute; top: 100%; left: 0; right: 0; height: var(--wpm-dock-offset);
  }
  .quick-links.dock:not(:hover, :has(:focus-visible))::after {
    top: calc(-1 * var(--wpm-dock-reveal)); bottom: calc(-1 * var(--wpm-dock-offset)); height: auto;
  }
}
@media (min-width: 640px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .quick-links.dock { transition: transform var(--wpm-dock-slide); }
  .quick-links.dock::before { transition: opacity var(--wpm-dock-slide); }
}
.user-box { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem; border-top: 1px solid #3a3935; }
.user-box .nav-label { display: flex; flex-direction: column; font-size: 0.85rem; }
.user-box small { color: #a19e97; }
.user-box a { text-decoration: underline; }
.user-box form { margin: 0; width: 100%; }
.logout { width: 100%; margin: 0; color: #e8e6e1; border-color: #5b5953; }

.content { padding: 1.5rem 2rem 3rem; min-width: 0; }

.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.page-header h1 { margin: 0; font-size: 1.6rem; }
.overline { margin: 0 0 0.25rem; font-size: 0.85rem; color: var(--wpm-muted); }
.page-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.page-actions form, .inline-actions form { margin: 0; }
.page-actions button, .page-actions [role="button"], .inline-actions button { margin: 0; width: auto; }

.panel {
  background: var(--wpm-surface); border: 1px solid var(--wpm-border); border-radius: var(--wpm-radius);
  padding: 1.25rem; margin-bottom: 1.25rem;
}
.panel h2 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.panel-highlight { border-color: var(--wpm-accent); }
.two-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--wpm-surface); border: 1px solid var(--wpm-border); border-radius: var(--wpm-radius); padding: 1rem; margin: 0; box-shadow: none; }
.stat p { margin: 0; }
.stat-label { color: var(--wpm-muted); font-size: 0.85rem; }
.stat-value { font-size: 1.8rem; font-weight: 600; }
.stat-note { font-size: 0.8rem; color: var(--wpm-muted); }

/* Notifications */
.notifications:empty { display: none; }
.notice { padding: 0.75rem 1rem; border-radius: 8px; margin: 0 0 1rem; border: 1px solid transparent; }
.notice-ok { background: #e3f2ea; color: #17603c; }
.notice-info { background: #e6ecfa; color: #27428f; }
.notice-error { background: #fbe7e5; color: #9b1c12; }

/* Pastilles de statut (libellé toujours présent) */
.badge {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.8rem;
  font-weight: 500; line-height: 1.5; white-space: nowrap; border: 1px solid transparent;
}
.badge-ok { background: #e3f2ea; color: #17603c; }
.badge-running { background: #e6ecfa; color: #27428f; }
.badge-warn { background: #fbeedd; color: #8a4608; }
.badge-fail { background: #fbe7e5; color: #9b1c12; }
.badge-neutral { background: #eeece7; color: #4a4843; }
.badge-planned { background: #fff; color: #4a4843; border: 1px dashed #8e8a81; }

/* Bandeau nouvelle installation */
.banner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem;
  background: #e6ecfa; color: #1c2c5c; border: 1px solid #c6d2f0; border-radius: var(--wpm-radius);
  padding: 0.75rem 1rem; margin-bottom: 0.75rem;
}
.banner p { margin: 0; }
.banner form { margin: 0; }

.callout {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #c6d2f0;
  border-radius: var(--wpm-radius);
  background: #f3f6fd;
}
.callout h3 { margin-top: 0; font-size: 1rem; }
.callout ol { margin-bottom: 0.5rem; }
.callout > :last-child { margin-bottom: 0; }
.compact-table { margin: 0.75rem 0; }
.compact-table th, .compact-table td { padding: 0.45rem 0.65rem; }

.scan-status { margin: 0 0 1rem; }
/* Journal du scan : bloc dépliable sous le résumé du dernier scan (page Sites). */
.scan-log { margin: -0.5rem 0 1rem; }
.scan-log summary { min-height: 44px; padding: 0.6rem 0; }
.scan-log ul { max-height: 20rem; overflow: auto; padding-left: 0; list-style: none; font-size: 0.85rem; }
.scan-log li { list-style: none; margin: 0 0 0.25rem; }
.scan-log code { white-space: pre-wrap; word-break: break-word; }

/* Filtres */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.filter {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--wpm-border); background: var(--wpm-surface); text-decoration: none; color: var(--wpm-text);
}
.filter.active { background: var(--wpm-accent); border-color: var(--wpm-accent); color: #fff; }
.form-end { display: flex; align-items: flex-end; }

/* Tableaux */
table { background: var(--wpm-surface); border-radius: var(--wpm-radius); overflow: hidden; }
th { font-size: 0.85rem; color: var(--wpm-muted); }
tr.untracked td { color: var(--wpm-muted); background: #faf9f7; }
tr.anomaly td:first-child { box-shadow: inset 4px 0 0 #9b1c12; }

/* Chronologie */
.timeline { list-style: none; padding: 0; margin: 1rem 0 0; }
.timeline-item { list-style: none; border-left: 3px solid var(--wpm-border); padding: 0 0 1rem 1rem; margin: 0; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.85rem; color: var(--wpm-muted); }
.timeline-body { margin: 0.35rem 0 0; white-space: pre-line; }
.action-form summary { display: inline-flex; align-items: center; }
.action-form form { margin-top: 1rem; }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1rem; margin: 0; }
.facts dt { color: var(--wpm-muted); font-weight: 400; }
.facts dd { margin: 0; }

/* Réglages */
.settings-layout { display: grid; grid-template-columns: 13rem minmax(0, 60rem); gap: 1.5rem; align-items: start; }
/* Neutralise le « nav, nav ul { display: flex } » de Pico : liste verticale dans sa colonne. */
.subnav { display: block; position: sticky; top: 1.5rem; }
.subnav ul { display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem; list-style: none; padding: 0; margin: 0; }
.subnav li { display: block; list-style: none; margin: 0; padding: 0; }
.subnav a {
  display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0.5rem 0.75rem; border-radius: 8px;
  text-decoration: none; color: var(--wpm-text); line-height: 1.3; text-align: left;
}
.subnav a:hover { background: #eeece7; }
.subnav a.active { background: var(--wpm-accent); color: #fff; font-weight: 500; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
.inline-form input { flex: 1 1 8rem; min-width: 0; margin: 0; }
.inline-form button { flex: none; margin: 0; width: auto; }
.secrets-table { table-layout: fixed; width: 100%; }
.secrets-table th { white-space: nowrap; }
.secrets-table .col-value { width: 8rem; }
.secrets-table .col-date { width: 8.5rem; white-space: nowrap; }
.secrets-table .col-replace { width: 21rem; }
.link-row { display: grid; grid-template-columns: 1fr 2fr 6rem; gap: 0 0.75rem; border-bottom: 1px solid var(--wpm-border); padding-bottom: 0.75rem; margin-bottom: 0.75rem; }
.link-row > label, .link-row > .inline-actions { grid-column: 1 / -1; }
.log { max-height: 20rem; overflow: auto; font-size: 0.8rem; white-space: pre-wrap; }
.pagination { display: flex; justify-content: space-between; gap: 1rem; }
.qr img { background: #fff; padding: 0.5rem; border: 1px solid var(--wpm-border); border-radius: 8px; }

/* Pages publiques (connexion) */
.public-main { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.public-card { width: min(440px, 100%); margin: 0; }
.public-card h1 { font-size: 1.5rem; margin: 0; }

/* --- Tablette : menu réduit aux icônes -------------------------------------------- */
@media (max-width: 1023px) {
  .layout { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { padding: 1rem 0.5rem; align-items: center; }
  .sidebar .nav-label, .nav-section { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-link { justify-content: center; padding: 0.4rem; width: 48px; }
  .user-box { justify-content: center; padding: 0.4rem 0; }
  .logout { padding: 0.4rem; }
  .content { padding: 1.25rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-columns { grid-template-columns: minmax(0, 1fr); }
  .col-secondary { display: none; }
}

/* --- Réglages : onglets horizontaux dès que la place manque pour deux colonnes ----- */
@media (max-width: 1199px) {
  .settings-layout { grid-template-columns: minmax(0, 60rem); gap: 1rem; }
  .subnav { position: static; border-bottom: 1px solid var(--wpm-border); padding-bottom: 0.5rem; }
  .subnav ul { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .subnav a { white-space: nowrap; }
  .secrets-table .col-replace { width: 18.5rem; }
}

/* --- Mobile : menu en tiroir, tableaux en cartes, boutons pleine largeur ----------- */
@media (max-width: 639px) {
  .layout { display: block; }
  .topbar {
    display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 20;
    background: var(--wpm-sidebar); color: #fff; padding: 0 0.75rem; min-height: 56px;
  }
  .topbar-title { font-weight: 600; }
  .nav-button { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 0.75rem; border: 1px solid #5b5953; border-radius: 8px; cursor: pointer; margin: 0; color: #fff; }
  .nav-toggle:focus-visible ~ .topbar .nav-button { outline: 3px solid #9fb3ea; outline-offset: 2px; }
  .sidebar {
    position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: min(300px, 85vw); height: 100vh;
    transform: translateX(-100%); transition: transform 0.2s ease; align-items: stretch; padding: 1rem 0.75rem;
  }
  .sidebar .nav-label, .nav-section { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .nav-link { justify-content: flex-start; width: auto; padding: 0.4rem 0.6rem; }
  /* Dock : même ligne unique, défilement tactile natif, un peu plus proche des bords. */
  .quick-links.dock { bottom: max(0.5rem, env(safe-area-inset-bottom)); min-width: 0; max-width: calc(100vw - 1rem); }
  :root { --wpm-dock-space: 5.5rem; --wpm-dock-caption-h: 0rem; }
  .dock .dock-caption { display: none; }
  .nav-toggle:checked ~ .layout .sidebar { transform: translateX(0); }
  .nav-toggle:checked ~ .layout .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.45); }
  .content { padding: 1rem; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .page-header { align-items: stretch; flex-direction: column; }
  .page-actions, .inline-actions, .page-actions form, .inline-actions form { width: 100%; }
  button, [role="button"], .page-actions button, .page-actions [role="button"], .inline-actions button { width: 100%; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input { flex: none; width: 100%; }
  .inline-form button { width: 100%; }
  .link-row { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dd { margin-bottom: 0.5rem; }

  table.table-cards, .table-cards thead, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards { background: transparent; }
  .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-cards tr { background: var(--wpm-surface); border: 1px solid var(--wpm-border); border-radius: var(--wpm-radius); margin-bottom: 0.75rem; padding: 0.5rem 0.75rem; }
  .table-cards td { background: transparent; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.5rem; align-items: center; border: 0; padding: 0.35rem 0; }
  .table-cards td::before { content: attr(data-label); font-size: 0.8rem; color: var(--wpm-muted); }
  .table-cards .col-secondary { display: grid; }
  .secrets-table { table-layout: auto; }
  .secrets-table td.col-replace { grid-template-columns: minmax(0, 1fr); }
  .secrets-table .col-value, .secrets-table .col-date, .secrets-table .col-replace { width: 100%; }
  tr.anomaly td:first-child { box-shadow: none; }
  tr.anomaly { border-left: 4px solid #9b1c12; }
}
