@charset "UTF-8";
/* ══════════════════════════════════════════════════════════════════════
   HQ Stylesheet — Deep Roots Marketing
   Shared across all Headquarters pages.
   Brand tokens imported from /brand.css (single source of truth).
   ══════════════════════════════════════════════════════════════════════ */

@import url("/assets/brand.css");

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ─────────────────────────────────────────────────────────── */
html {
  font-size: 18px;
  font-kerning: normal;
  scroll-padding-top: 5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--deeproot);
  color: var(--silver-fern);
  line-height: 1.45;
  min-height: 100vh;
}

a { color: var(--ore-dim); text-decoration: none; }
a:hover { color: var(--ore); }

/* ── Shell (max-width wrapper) ────────────────────────────────────── */
.shell { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.content-narrow { max-width: 820px; }

/* ── Site Header ──────────────────────────────────────────────────── */
.site-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--canopy);
  margin-bottom: 2rem;
}

.site-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header-left { display: flex; align-items: center; gap: 1.5rem; }
.site-header-left a { display: flex; align-items: center; }
.site-header-logo { height: 36px; width: auto; }

.site-header-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.83rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ore);
}

.site-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.site-header-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 15px;
  margin-right: 13px;
}

.site-header-meta {
  font-size: 0.72rem;
  color: var(--sage);
  line-height: 1;
}

/* ── Server Health Indicator ──────────────────────────────────────── */
.server-health-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  transition: background var(--transition);
}

.server-health-indicator:hover { background: rgba(255, 255, 255, 0.08); }

.health-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sage);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.health-dot--ok {
  background: var(--moss);
  box-shadow: 0 0 6px rgba(74, 124, 89, 0.4);
}

.health-dot--warn {
  background: var(--hearth);
  box-shadow: 0 0 6px rgba(212, 160, 23, 0.4);
  animation: health-pulse 2s ease infinite;
}

.health-dot--danger {
  background: var(--ember);
  box-shadow: 0 0 8px rgba(192, 57, 43, 0.5);
  animation: health-pulse 1s ease infinite;
}

.health-dot--unknown {
  background: var(--sage);
  opacity: 0.5;
}

@keyframes health-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Site Nav ─────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav-link {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  background: none;
  border: none;
  cursor: pointer;
}

.site-nav-link:hover { color: var(--chalk); background: rgba(255, 255, 255, 0.04); }

/* ── Hamburger trigger ────────────────────────────────────────────── */
.site-nav-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.55rem;
}

.site-nav-hamburger svg { display: block; }

/* Fleet staleness alert — hamburger turns ember red and gently pulses
   when computeFleetStaleness() reports any machine over the threshold. */
.site-nav-hamburger--alert {
  color: var(--ember);
  animation: hamburger-alert-pulse 1.8s ease-in-out infinite;
}
.site-nav-hamburger--alert:hover {
  color: var(--ember);
  background: rgba(192, 57, 43, 0.12);
}

@keyframes hamburger-alert-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ── Ops slide-out panel ──────────────────────────────────────────── */
.ops-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 400;
}

.ops-panel {
  position: fixed;
  inset-block-start: 0;
  inset-inline-end: 0;
  block-size: 100dvh;
  inline-size: clamp(320px, 28vw, 400px);
  background: var(--deeproot);
  border-inline-start: 1px solid var(--canopy);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 220ms ease;
  z-index: 401;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.ops-open { overflow: hidden; }
body.ops-open .ops-backdrop { opacity: 1; }
body.ops-open .ops-panel { transform: translateX(0); }

.ops-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--canopy);
  flex-shrink: 0;
}

.ops-panel-title {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-fern);
}

.ops-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  background: none;
  border: none;
  color: var(--sage);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.ops-panel-close:hover {
  color: var(--ore);
  background: rgba(255, 255, 255, 0.04);
}

.ops-panel-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ops-panel-items {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.ops-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  border-block-end: 1px solid color-mix(in oklch, var(--ore-dim) 35%, transparent);
  border-inline-start: 3px solid transparent;
  background: color-mix(in oklch, var(--canopy), var(--deeproot) calc(var(--i, 0) / max(1, var(--n, 1) - 1) * 100%));
  transition: border-inline-start-color var(--transition);
}

.ops-link:last-child { border-block-end: none; }

.ops-link:hover,
.ops-link:focus-visible {
  border-inline-start-color: var(--ore);
  background-image: linear-gradient(90deg, color-mix(in oklch, var(--ore) 18%, transparent), transparent 65%);
}

.ops-link:focus-visible {
  outline: 2px solid var(--ore);
  outline-offset: -2px;
}

.ops-link:hover .ops-link-title,
.ops-link:focus-visible .ops-link-title { color: var(--chalk); }

.ops-link:hover .ops-link-icon,
.ops-link:focus-visible .ops-link-icon { transform: scale(1.08); }

.ops-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ore);
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.ops-link-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.ops-link-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ops-link-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-fern);
}

.ops-link-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--silver-fern);
  opacity: 0.82;
}

/* Fleet staleness alert — the Fleet Ops row gently pulses ember red
   when a fleet machine has crossed the staleness threshold. */
.ops-link-item--alert {
  position: relative;
}
.ops-link-item--alert > .ops-link {
  animation: ops-link-alert-pulse 2.4s ease-in-out infinite;
  border-inline-start-color: var(--ember) !important;
}
.ops-link-item--alert > .ops-link .ops-link-icon,
.ops-link-item--alert > .ops-link .ops-link-title {
  color: var(--ember);
}

@keyframes ops-link-alert-pulse {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(192, 57, 43, 0.14); }
}

@media (prefers-reduced-motion: reduce) {
  .ops-panel, .ops-backdrop { transition: none; }
  .ops-link, .ops-link-icon { transition: none; }
  .site-nav-hamburger--alert,
  .ops-link-item--alert > .ops-link { animation: none; }
}

@media (width < 600px) {
  .site-header-top { flex-wrap: wrap; }
  .site-nav { width: 100%; margin-block-start: 0.75rem; }
  .ops-panel { inline-size: 88vw; }
}

/* ── Site Footer ──────────────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--canopy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--sage);
}

/* ── Panels ───────────────────────────────────────────────────────── */
.panel {
  background: var(--undergrowth);
  border: 1px solid var(--canopy);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.panel--full { grid-column: 1 / -1; }

.panel-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ore);
  margin-bottom: 1rem;
}

.panel-empty { color: var(--sage); font-size: 0.94rem; font-style: italic; }

/* ── Loading / Error ──────────────────────────────────────────────── */
.loading { color: var(--sage); font-size: 0.94rem; padding: 2rem; text-align: center; }

.error {
  color: var(--danger);
  font-size: 0.94rem;
  padding: 1rem;
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 6px;
}

.empty { text-align: center; padding: 64px 20px; color: var(--sage); font-size: 0.95rem; }

/* ── Badge / Label System ─────────────────────────────────────────── */
.badge {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.badge--gold { background: rgba(198, 169, 77, 0.12); color: var(--ore); border: 1px solid rgba(198, 169, 77, 0.25); }
.badge--muted { background: rgba(100, 119, 114, 0.15); color: var(--silver-fern); border: 1px solid rgba(100, 119, 114, 0.3); }
.badge--danger { background: rgba(180, 60, 60, 0.12); color: var(--danger-soft); border: 1px solid rgba(180, 60, 60, 0.25); }

/* ── Grid ─────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.stack-groups { display: flex; flex-direction: column; gap: 2rem; }

.stack-section-heading {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ore-dim);
  margin-bottom: 0.75rem;
}

.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 860px) { .stack-grid { grid-template-columns: 1fr; } }

/* ── Cards ────────────────────────────────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 0.75rem; }

.card {
  background: var(--deeproot);
  border: 1px solid var(--canopy);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

.card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.35rem; }

.card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--chalk);
}

.card-category { font-size: 0.83rem; color: var(--sage); margin-bottom: 0.5rem; }
.card-desc { font-size: 0.94rem; color: var(--silver-fern); line-height: 1.4; margin-bottom: 0.6rem; }

/* ── Capability Labels ────────────────────────────────────────────── */
.cap-labels { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.cap-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  white-space: nowrap;
}

.cap-label--active { border: 1px solid var(--ore-dim); background: rgba(198, 169, 77, 0.15); color: var(--ore); }
.cap-label--inactive { border: 1px solid var(--sage); background: rgba(100, 119, 114, 0.12); color: var(--sage); }
.cap-label--planned { border: 1px solid var(--sage); background: rgba(100, 119, 114, 0.08); color: var(--sage); opacity: 0.6; }

/* ── Status Badges ────────────────────────────────────────────────── */
.card-status {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  white-space: nowrap;
  margin-left: auto;
}

.card-status--active { background: rgba(198, 169, 77, 0.15); color: var(--ore); border: 1px solid var(--ore-dim); }
.card-status--planned { background: rgba(100, 119, 114, 0.2); color: var(--silver-fern); border: 1px solid var(--sage); }
.card-status--inactive { background: rgba(100, 119, 114, 0.12); color: var(--sage); border: 1px solid var(--sage); }
.card-status--pending { background: rgba(217, 119, 6, 0.15); color: var(--amber); border: 1px solid rgba(217, 119, 6, 0.4); }
.card-status--deprecated { background: rgba(100, 119, 114, 0.1); color: var(--sage); border: 1px solid rgba(100, 119, 114, 0.3); font-style: italic; }

/* Deprecated cards fade back so they read as historical record, not current tooling. */
.card--deprecated { opacity: 0.55; transition: opacity 0.2s ease; }
.card--deprecated:hover { opacity: 0.85; }

/* ── Pending Review ──────────────────────────────────────────────── */
.panel--pending { border: 1px solid rgba(217, 119, 6, 0.25); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; }
.panel--pending .panel-label { color: var(--amber); }
.panel--pending .panel-desc { color: var(--sage); font-size: 0.85rem; margin-bottom: 1rem; }
.card--pending { border-color: rgba(217, 119, 6, 0.2); }
.card-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem; flex-wrap: wrap; }
.card-actions select { background: var(--undergrowth); color: var(--silver-fern); border: 1px solid var(--canopy); border-radius: 4px; padding: 0.3rem 0.5rem; font-size: 0.8rem; font-family: inherit; }
.card-actions .btn { padding: 0.3rem 0.75rem; border: none; border-radius: 4px; font-size: 0.8rem; font-family: inherit; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.card-actions .btn--approve { background: var(--ore); color: var(--deeproot); }
.card-actions .btn--approve:hover { background: #d4b85a; }
.card-actions .btn--dismiss { background: transparent; color: var(--sage); border: 1px solid var(--canopy); }
.card-actions .btn--dismiss:hover { color: var(--silver-fern); border-color: var(--sage); }

/* ── Client Cards ─────────────────────────────────────────────────── */
.client-card {
  background: var(--deeproot);
  border: 1px solid var(--canopy);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.client-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--chalk); }
.client-domain { font-size: 0.89rem; color: var(--sage); }

/* ── Cron Jobs ────────────────────────────────────────────────────── */
.cron-schedule {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ore);
  margin-left: auto;
}

.cron-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

.cron-expression {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sage);
  background: var(--undergrowth);
  border: 1px solid var(--canopy);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
}

.cron-last-run {
  font-size: 0.78rem;
  color: var(--sage);
}

/* ── Priorities ───────────────────────────────────────────────────── */
.priority-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
@media (max-width: 860px) { .priority-grid { grid-template-columns: 1fr; } }

.priority-list { display: flex; flex-direction: column; gap: 0.5rem; }

.priority-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--deeproot);
  border: 1px solid var(--canopy);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--silver-fern);
  cursor: pointer;
  transition: border-color 0.15s;
}

.priority-item:hover { border-color: var(--ore-dim); }
.priority-item:hover .priority-check { border-color: var(--ore-dim); }
.priority-item--completing { opacity: 0; transform: scale(0.97); transition: opacity 3s ease, transform 3s ease; }
.priority-item--done { opacity: 0.45; text-decoration: line-through; text-decoration-color: var(--sage); }

.priority-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 2px solid var(--canopy);
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.priority-item--done .priority-check { border-color: var(--ore-dim); background: rgba(198, 169, 77, 0.15); }
.priority-check-mark { display: none; color: var(--ore); font-size: 0.72rem; font-weight: 700; }
.priority-item--done .priority-check-mark { display: block; }

/* ── Stats Bar (sticky frosted glass) ─────────────────────────────── */
.stats-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  margin: 0 -1.5rem 1.5rem;
  background: rgba(20, 20, 20, 0.7);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

a.stat { text-decoration: none; }
.stat { display: flex; flex-direction: column; gap: 0.1rem; }
.stat:hover .stat-number { color: var(--chalk); }
.stat:hover .stat-label { color: var(--silver-fern); }

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ore);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
}

/* ── Page Header (used by changelog, future subpages) ─────────────── */
.page-header { margin-bottom: 48px; }

.page-header-eyebrow {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ore-dim);
  margin-bottom: 8px;
}

.page-header-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--chalk);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.page-header-desc { font-size: 0.95rem; color: var(--sage); max-width: 55ch; line-height: 1.5; }

.page-header-stats { display: flex; gap: 32px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--canopy); }

.page-header-stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ore);
  line-height: 1.1;
}

.page-header-stat-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 3px;
}

/* ── Timeline (changelog) ─────────────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 0; width: 1px; background: var(--canopy); }

.entry { position: relative; margin-bottom: 32px; animation: fadeIn 0.35s ease both; }
.entry:nth-child(2) { animation-delay: 0.06s; }
.entry:nth-child(3) { animation-delay: 0.12s; }
.entry:nth-child(4) { animation-delay: 0.18s; }
.entry:nth-child(5) { animation-delay: 0.24s; }

.entry::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 8px;
  width: 9px;
  height: 9px;
  background: var(--ore);
  border-radius: 50%;
  border: 2px solid var(--deeproot);
  z-index: 1;
}

.entry-version { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ore); font-weight: 600; margin-bottom: 6px; letter-spacing: 0.02em; }
.entry-summary { font-size: 0.95rem; color: var(--chalk); line-height: 1.5; margin-bottom: 14px; max-width: 65ch; }

/* ── File List (changelog) ────────────────────────────────────────── */
.file-list { display: flex; flex-direction: column; gap: 6px; }

.file-item {
  background: var(--undergrowth);
  border: 1px solid var(--canopy);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.file-item:hover { border-color: var(--ore-dim); }

.file-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; user-select: none; }
.file-header:hover { background: rgba(255,255,255,0.02); }

.file-toggle {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--sage); font-size: 0.7rem;
  transition: transform var(--transition);
}

.file-item.open .file-toggle { transform: rotate(90deg); }

.file-path { font-family: var(--font-mono); font-size: 0.78rem; color: var(--silver-fern); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-path a { color: var(--silver-fern); text-decoration: none; transition: color var(--transition); display: inline-flex; align-items: center; gap: 5px; }
.file-path a:hover { color: var(--ore); }

.file-link-icon { display: inline-block; width: 11px; height: 11px; opacity: 0; flex-shrink: 0; transition: opacity var(--transition); position: relative; top: -1px; }
.file-link-icon svg { width: 100%; height: 100%; display: block; fill: var(--ore-dim); }
.file-path a:hover .file-link-icon { opacity: 1; }

.file-action {
  font-family: var(--font-ui); font-weight: 700; font-size: 0.58rem;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 100px; flex-shrink: 0;
}

.file-action.created { background: rgba(198, 169, 77, 0.12); color: var(--ore); border: 1px solid rgba(198, 169, 77, 0.25); }
.file-action.updated, .file-action.rewritten { background: rgba(100, 119, 114, 0.15); color: var(--silver-fern); border: 1px solid rgba(100, 119, 114, 0.3); }
.file-action.deleted, .file-action.removed { background: rgba(180, 60, 60, 0.12); color: var(--danger-soft); border: 1px solid rgba(180, 60, 60, 0.25); }

.file-lines { font-family: var(--font-mono); font-size: 0.65rem; color: var(--sage); flex-shrink: 0; margin-right: 4px; }

.file-path--deleted { text-decoration: line-through; opacity: 0.5; }

.file-detail { display: none; padding: 0 14px 12px 42px; font-size: 0.84rem; color: var(--sage); line-height: 1.5; max-width: 60ch; }
.file-item.open .file-detail { display: block; }

/* ── Markdown Preview ─────────────────────────────────────────────── */
.file-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--sage); margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--canopy); }

.md-body { max-width: 70ch; font-size: 1rem; line-height: 1.55; color: var(--silver-fern); }

.md-body h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; color: var(--chalk); margin: 2.5rem 0 1rem; letter-spacing: -0.01em; }
.md-body h1:first-child { margin-top: 0; }
.md-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--chalk); margin: 2rem 0 0.75rem; }
.md-body h3 { font-family: var(--font-ui); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ore); margin: 1.75rem 0 0.6rem; }
.md-body h4, .md-body h5, .md-body h6 { font-family: var(--font-ui); font-weight: 700; font-size: 0.95rem; color: var(--chalk); margin: 1.5rem 0 0.5rem; }

.md-body p { margin: 0 0 1rem; }
.md-body strong { color: var(--chalk); font-weight: 700; }
.md-body em { font-style: italic; }

.md-body a { color: var(--ore); text-decoration: underline; text-decoration-color: var(--ore-dim); text-underline-offset: 2px; }
.md-body a:hover { color: var(--chalk); }

.md-body ul, .md-body ol { margin: 0 0 1rem 1.5rem; }
.md-body li { margin-bottom: 0.35rem; }
.md-body li > ul, .md-body li > ol { margin-top: 0.35rem; margin-bottom: 0; }

.md-body code { font-family: var(--font-mono); font-size: 0.85em; background: var(--undergrowth); border: 1px solid var(--canopy); border-radius: var(--radius-sm); padding: 0.15em 0.4em; color: var(--chalk); }
.md-body pre { background: var(--undergrowth); border: 1px solid var(--canopy); border-radius: var(--radius-md); padding: 1rem 1.25rem; overflow-x: auto; margin: 0 0 1.25rem; line-height: 1.5; }
.md-body pre code { background: none; border: none; padding: 0; font-size: 0.82rem; color: var(--silver-fern); }

.md-body blockquote { border-left: 3px solid var(--ore-dim); padding: 0.5rem 0 0.5rem 1.25rem; margin: 0 0 1rem; color: var(--sage); }
.md-body blockquote p:last-child { margin-bottom: 0; }

.md-body hr { border: none; border-top: 1px solid var(--canopy); margin: 2rem 0; }

.md-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.9rem; }
.md-body th { font-family: var(--font-ui); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ore); text-align: left; padding: 0.6rem 0.75rem; border-bottom: 2px solid var(--canopy); }
.md-body td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--canopy); color: var(--silver-fern); }
.md-body tr:last-child td { border-bottom: none; }

.md-frontmatter { background: var(--undergrowth); border: 1px solid var(--canopy); border-radius: var(--radius-md); padding: 0.75rem 1rem; margin-bottom: 1.5rem; font-size: 0.85rem; color: var(--sage); line-height: 1.6; }
.md-frontmatter strong { color: var(--silver-fern); }

/* ── Login Page ───────────────────────────────────────────────────── */
.login-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: var(--undergrowth);
  border: 1px solid var(--canopy);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}

.login-logo { display: block; height: 32px; margin: 0 auto 1.5rem; }

.login-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ore);
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-error {
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.83rem;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
}

.field { margin-bottom: 1rem; }

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--deeproot);
  border: 1px solid var(--canopy);
  border-radius: var(--radius-sm);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 0.89rem;
  outline: none;
  transition: border-color var(--transition);
}

.field input:focus { border-color: var(--ore-dim); }
.field input::placeholder { color: var(--sage); opacity: 0.6; }

.btn {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.7rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deeproot);
  background: var(--ore);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.btn:hover { background: var(--ore-dim); }

/* ── Sync Operations ──────────────────────────────────────────────── */
.sync-section {
  background: var(--undergrowth);
  border: 1px solid var(--canopy);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.sync-section + .sync-section { margin-top: 2rem; }

.sync-machine-meta {
  font-size: 0.83rem;
  color: var(--sage);
  margin-bottom: 1rem;
}

.sync-summary {
  font-size: 0.95rem;
  color: var(--silver-fern);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 60ch;
}

.sync-summary code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--deeproot);
  border: 1px solid var(--canopy);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.4em;
  color: var(--chalk);
}

.sync-detail {
  background: rgba(139, 122, 58, 0.08);
  border: 1px solid rgba(139, 122, 58, 0.2);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

h3.sync-detail-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ore-dim);
  margin-bottom: 0.6rem;
}

.sync-pre {
  margin: 0;
  background: none;
  border: none;
  padding: 0;
  overflow-x: auto;
}

.sync-pre code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--silver-fern);
  white-space: pre;
}

/* ── Task Modal (shared by Tasks and Dashboard) ──────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 24, 22, 0.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--undergrowth);
  border: 1px solid var(--canopy);
  border-radius: 10px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  margin: 1rem;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--chalk);
  margin-bottom: 1.2rem;
}

.modal-field { margin-bottom: 1rem; }
.modal-field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.3rem;
}
.modal-field input,
.modal-field textarea,
.modal-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--canopy);
  border-radius: 6px;
  background: var(--deeproot);
  color: var(--chalk);
}
.modal-field textarea { resize: vertical; min-height: 60px; }
.modal-field input:focus,
.modal-field textarea:focus,
.modal-field select:focus { outline: none; border-color: var(--ore-dim); }

/* ── Custom Select (cross-platform styled dropdown) ──────────────── */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--canopy);
  border-radius: 6px;
  background: var(--deeproot);
  color: var(--chalk);
  cursor: pointer;
  transition: border-color var(--transition);
}

.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger { border-color: var(--ore-dim); }

.custom-select-arrow {
  font-size: 0.6rem;
  color: var(--sage);
  transition: transform 0.2s;
}

.custom-select.open .custom-select-arrow { transform: rotate(180deg); }

.custom-select-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--undergrowth);
  border: 1px solid var(--canopy);
  border-radius: 6px;
  padding: 0.3rem 0;
  z-index: 210;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.custom-select.open .custom-select-options { display: block; }

.custom-select-option {
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  color: var(--silver-fern);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.custom-select-option:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--chalk);
}

.custom-select-option--active {
  color: var(--ore);
}

.modal-buttons { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.5rem; }
.modal-btn {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5em 1.2em;
  border-radius: 6px;
  border: 1px solid var(--canopy);
  background: transparent;
  color: var(--silver-fern);
  cursor: pointer;
}
.modal-btn:hover { border-color: var(--ore-dim); }
.modal-btn--primary { background: var(--ore); color: var(--deeproot); border-color: var(--ore); }
.modal-btn--primary:hover { background: var(--ore-dim); }

/* ── Animation ────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Basecamp task badge */
.basecamp-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #f9d84a;
  text-decoration: none;
  transition: background var(--transition);
}

.basecamp-indicator:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f9d84a;
}

.basecamp-badge {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 8px;
  background: #f9d84a;
  color: #1a1a1a;
  min-width: 16px;
  text-align: center;
}

/* ── Keys page ───────────────────────────────────────────────────────── */

/* Breathing room between the three top-level sections */
.shell .panel + .panel { margin-top: 1.75rem; }

/* Section 1 — SSH paths lanes */
.keys-lanes {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.keys-lane {
  border: 1px solid rgba(100, 119, 114, 0.2);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  background: rgba(100, 119, 114, 0.05);
}
.keys-lane-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.keys-lane-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(198, 169, 77, 0.14);
  border: 1px solid var(--ore-dim);
  color: var(--ore);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.keys-lane-host {
  font-size: 0.8rem;
  color: var(--silver-fern);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.keys-lane-host code {
  background: rgba(198, 169, 77, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--ore);
  letter-spacing: 0;
}
.keys-lane-flow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.keys-lane-step {
  display: inline-flex;
  flex-direction: column;
  border: 1px solid rgba(100, 119, 114, 0.35);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  background: rgba(17, 25, 23, 0.3);
  min-width: 6rem;
  line-height: 1.25;
}
.keys-lane-step code {
  font-size: 0.85em;
  color: var(--silver-fern);
  letter-spacing: 0;
  background: none;
  padding: 0;
}
.keys-lane-stepsub {
  font-size: 0.7rem;
  color: var(--sage);
  margin-top: 2px;
}
.keys-lane-step--key {
  border-color: var(--ore-dim);
  background: rgba(198, 169, 77, 0.06);
}
.keys-lane-step--dest {
  border-color: rgba(100, 119, 114, 0.45);
}
.keys-lane-step--narrow {
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(217, 119, 6, 0.05);
}
.keys-lane-step--onepassword {
  border-color: rgba(0, 102, 204, 0.35);
  background: rgba(0, 102, 204, 0.06);
}
.keys-lane-arrow {
  color: var(--sage);
  font-size: 1.1rem;
  user-select: none;
}
.keys-lane-uses {
  font-size: 0.88rem;
  color: var(--silver-fern);
  opacity: 0.85;
}
.keys-lane-uses code {
  background: none;
  padding: 0;
  color: var(--ore);
}
.keys-lanes-note {
  font-size: 0.82rem;
  color: var(--sage);
  margin-top: 1rem;
  font-style: italic;
}
.keys-lanes-note code {
  font-style: normal;
  background: rgba(198, 169, 77, 0.08);
  padding: 0 4px;
  border-radius: 3px;
  color: var(--ore);
}

/* Section 2 — SSH key inventory grid */
.keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.keys-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.keys-card .card-header {
  align-items: center;
}
.keys-op-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  color: var(--silver-fern);
  opacity: 0.55;
  text-decoration: none;
  transition: opacity 0.15s ease, background 0.15s ease;
  margin-left: auto;
}
.keys-op-link:hover {
  opacity: 1;
  background: rgba(198, 169, 77, 0.12);
  color: var(--ore);
}
.keys-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.86rem;
  color: var(--silver-fern);
}
.keys-card-meta > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.keys-card-meta code {
  font-size: 0.92em;
  color: var(--ore);
  background: none;
  padding: 0;
}
.keys-meta-label {
  font-size: 0.7rem;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 0.3rem;
}
.keys-card-purpose {
  font-size: 0.88rem;
  color: var(--silver-fern);
  opacity: 0.85;
  line-height: 1.45;
}
.keys-card-authline {
  background: rgba(17, 25, 23, 0.4);
  border: 1px solid rgba(100, 119, 114, 0.25);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
}
.keys-card-authline code {
  display: block;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--silver-fern);
  word-break: break-all;
  background: none;
  padding: 0;
  margin-top: 3px;
}
.keys-card-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(100, 119, 114, 0.15);
  font-size: 0.78rem;
}
.keys-card-footer code {
  font-size: 0.85em;
  color: var(--silver-fern);
  background: rgba(17, 25, 23, 0.4);
  padding: 2px 6px;
  border-radius: 3px;
}
.keys-access {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}
.keys-access--full {
  background: rgba(198, 169, 77, 0.12);
  color: var(--ore);
  border-color: var(--ore-dim);
}
.keys-access--narrow {
  background: rgba(217, 119, 6, 0.12);
  color: var(--amber);
  border-color: rgba(217, 119, 6, 0.3);
}

/* Section 3 — 1Password inventory table */
.keys-op-group {
  margin-top: 1.25rem;
}
.keys-op-group:first-child { margin-top: 0.5rem; }
.keys-op-group-label {
  font-size: 0.88rem;
  color: var(--silver-fern);
  margin: 0 0 0.4rem 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}
.keys-op-group-count {
  color: var(--sage);
  font-weight: 400;
  font-size: 0.85em;
  margin-left: 0.4rem;
}
.keys-op-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.keys-op-table th {
  text-align: left;
  padding: 0.4rem 0.6rem;
  color: var(--sage);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(100, 119, 114, 0.25);
  font-weight: 600;
}
.keys-op-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(100, 119, 114, 0.1);
  color: var(--silver-fern);
}
.keys-op-row:hover td { background: rgba(198, 169, 77, 0.04); }
.keys-op-title a {
  color: var(--ore);
  text-decoration: none;
  font-weight: 500;
}
.keys-op-title a:hover { color: #d4b85a; text-decoration: underline; }
.keys-op-category {
  color: var(--sage);
  white-space: nowrap;
  font-size: 0.78rem;
}
.keys-op-id code {
  font-size: 0.72rem;
  color: var(--silver-fern);
  background: rgba(17, 25, 23, 0.4);
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0;
}
.keys-op-updated {
  color: var(--sage);
  font-size: 0.78rem;
  white-space: nowrap;
}
.keys-op-error {
  color: var(--amber);
  border: 1px dashed rgba(217, 119, 6, 0.3);
  background: rgba(217, 119, 6, 0.05);
}

@media (max-width: 720px) {
  .keys-card-meta { grid-template-columns: 1fr; }
  .keys-lane-flow { gap: 0.25rem; }
  .keys-op-table { font-size: 0.78rem; }
  .keys-op-updated { display: none; }
}

/* ── Fleet page ──────────────────────────────────────────────────────── */

/* Inventory table — one row per tool, one column per machine. Machine
   column headers adopt the ore-uppercase / sage-subtitle treatment that
   previously belonged to Section 1's column cards. Machine cells show
   only a status glyph; full label is revealed on hover via title=. */
.fleet-inventory-table { margin-top: 1rem; }

.fleet-drift-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.fleet-drift-table th {
  text-align: left;
  padding: 0.7rem 0.8rem;
  color: var(--sage);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(100, 119, 114, 0.25);
  font-weight: 600;
  white-space: nowrap;
  vertical-align: top;
}

/* Machine column headers — the keeper aesthetic from old Section 1. */
.fleet-machine-head {
  text-align: center !important;
  background: rgba(198, 169, 77, 0.06);
  border-bottom: 1px solid rgba(100, 119, 114, 0.25);
  padding: 0.7rem 0.6rem !important;
  min-width: 4.5rem;
}
.fleet-machine-head:not(:last-of-type) {
  border-right: 1px solid rgba(100, 119, 114, 0.15);
}
.fleet-machine-label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ore);
}
.fleet-machine-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--sage);
  margin-top: 2px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.fleet-machine-stale {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: none;
  cursor: default;
}
.fleet-machine-stale--ok {
  color: var(--moss);
  background: rgba(74, 124, 89, 0.12);
  border: 1px solid rgba(74, 124, 89, 0.3);
}
.fleet-machine-stale--bad {
  color: var(--ember);
  background: rgba(192, 57, 43, 0.14);
  border: 1px solid rgba(192, 57, 43, 0.35);
}

.fleet-drift-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(100, 119, 114, 0.1);
  color: var(--silver-fern);
  vertical-align: middle;
}
.fleet-drift-table tr:hover td { background: rgba(198, 169, 77, 0.04); }
.fleet-drift-name code {
  font-size: 0.92em;
  background: none;
  padding: 0;
  color: var(--silver-fern);
}
.fleet-drift-where {
  color: var(--sage);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.fleet-drift-auth {
  color: var(--sage);
  font-size: 0.76rem;
  white-space: nowrap;
}

/* Machine cells: glyph-only, centered, larger, with subtle background tint. */
.fleet-drift-cell {
  text-align: center !important;
  white-space: nowrap;
  cursor: default;
  transition: background 120ms ease;
}
.fleet-drift-cell:not(:last-of-type) {
  border-right: 1px solid rgba(100, 119, 114, 0.08);
}
.fleet-cell-glyph {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  min-width: 1.5rem;
  user-select: none;
}
.fleet-cell--ok .fleet-cell-glyph { color: var(--ore); }
.fleet-cell--missing {
  background: rgba(192, 57, 43, 0.08);
}
.fleet-cell--missing .fleet-cell-glyph { color: var(--ember); }
.fleet-drift-table tr:hover .fleet-cell--missing { background: rgba(192, 57, 43, 0.14); }
.fleet-cell--unexpected {
  background: rgba(217, 119, 6, 0.08);
}
.fleet-cell--unexpected .fleet-cell-glyph { color: var(--amber); }
.fleet-drift-table tr:hover .fleet-cell--unexpected { background: rgba(217, 119, 6, 0.14); }
.fleet-cell--absent .fleet-cell-glyph { color: var(--sage); opacity: 0.5; }

/* Inline legend pills in the section description */
.fleet-legend {
  display: inline-block;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 2px;
  white-space: nowrap;
}
.fleet-legend.fleet-cell--ok { color: var(--ore); background: rgba(198, 169, 77, 0.1); }
.fleet-legend.fleet-cell--missing { color: var(--ember); background: rgba(192, 57, 43, 0.1); }
.fleet-legend.fleet-cell--unexpected { color: var(--amber); background: rgba(217, 119, 6, 0.1); }
.fleet-legend.fleet-cell--absent { color: var(--sage); background: rgba(100, 119, 114, 0.12); opacity: 0.85; }

.fleet-arch-note {
  font-size: 0.78rem;
  color: var(--sage);
  margin-top: 1rem;
  font-style: italic;
}

/* Per-row column widths — tool name flexes, other cols stay compact */
.fleet-col-tool { width: auto; }
.fleet-col-where { width: 5rem; }
.fleet-col-auth { width: 8rem; }

/* ── Fleet staleness alert banner ─────────────────────────────────── */
.fleet-alert {
  margin-block: 1rem 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(192, 57, 43, 0.4);
  border-inline-start: 4px solid var(--ember);
  border-radius: var(--radius-sm);
  background: rgba(192, 57, 43, 0.08);
}
.fleet-alert-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember);
}
.fleet-alert-icon {
  font-size: 1rem;
  line-height: 1;
}
.fleet-alert-lede {
  margin: 0.45rem 0 0.8rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--silver-fern);
}
.fleet-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fleet-alert-item {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 3px;
  background: rgba(192, 57, 43, 0.05);
}
.fleet-alert-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}
.fleet-alert-item-name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--chalk);
}
.fleet-alert-item-age {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--ember);
  letter-spacing: 0.04em;
}
.fleet-alert-item-cause {
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--silver-fern);
}

/* Section 3 — MCP cards */
.fleet-mcp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.fleet-mcp-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.fleet-mcp-where {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver-fern);
  background: rgba(100, 119, 114, 0.18);
  border: 1px solid rgba(100, 119, 114, 0.35);
}
.fleet-mcp-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}
.fleet-mcp-meta code {
  font-size: 0.82rem;
  background: none;
  padding: 0;
  color: var(--ore);
}
.fleet-mcp-notes {
  font-size: 0.85rem;
  color: var(--silver-fern);
  opacity: 0.8;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .fleet-arch-row { grid-template-columns: 1fr; }
  .fleet-drift-table { font-size: 0.78rem; }
  .fleet-drift-auth, .fleet-drift-table th:nth-child(6), .fleet-drift-table td:nth-child(6) { display: none; }
}
