:root {
  --brand: #346c2d;
  --brand-light: #599d39;
  --accent: #2f8f46;
  --paper: #fffdf7;
  --surface: #ffffff;
  --line: #d8d6cc;
  --line-soft: #ecebe5;
  --ink: #1c1f1a;
  --muted: #5e6366;
  --subtle: #8a8a8a;
  --amber: #c97a2c;
  --amber-bg: #fbf3e6;
  --danger: #b42318;
  --shadow: 0 10px 24px rgba(28, 31, 26, 0.08), 0 1px 3px rgba(28, 31, 26, 0.05);

  /* Perfetto Verdict-First (P0) — semantic traffic-light tones */
  --mt-good: #16a34a;
  --mt-good-bg: rgba(22, 163, 74, 0.12);
  --mt-warn: #c97a2c;
  --mt-warn-bg: rgba(201, 122, 44, 0.12);
  --mt-bad: #dc2626;
  --mt-bad-bg: rgba(220, 38, 38, 0.10);

  /* Sidebar design tokens */
  --sb-bg-1: #1f4f25;
  --sb-bg-2: #163d1c;
  --sb-bg-3: #102d14;
  --sb-glow: rgba(120, 200, 110, 0.45);
  --sb-text: #f3f7ec;
  --sb-text-muted: rgba(243, 247, 236, 0.62);
  --sb-text-faint: rgba(243, 247, 236, 0.38);
  --sb-line: rgba(255, 255, 255, 0.08);
  --sb-line-strong: rgba(255, 255, 255, 0.14);
  --sb-pill: rgba(255, 255, 255, 0.06);
  --sb-pill-hover: rgba(255, 255, 255, 0.10);
  --sb-paper: #fbf7eb;
  --sb-paper-2: #f4eed9;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 1180px;
  background:
    linear-gradient(135deg, rgba(52, 108, 45, 0.055), transparent 30%),
    #f4f3ee;
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

button,
select {
  font: inherit;
}

.loading-spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  opacity: 0.82;
  animation: spin 800ms linear infinite;
}

.hosted-mode-notice {
  display: grid;
  gap: 8px;
  max-width: 760px;
  padding: 16px 18px;
  color: var(--ink);
  background: #fff8e8;
  border: 1px solid #e2c879;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(28, 31, 26, 0.08);
}

.hosted-mode-notice strong {
  font-size: 18px;
  font-weight: 700;
}

.hosted-mode-notice p {
  margin: 0;
  color: #34382f;
  font-size: 16px;
  line-height: 1.5;
}

.inline-icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -2px;
  fill: currentColor;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 10px;
  width: calc(100vw - 20px);
  max-width: none;
  min-height: calc(100vh - 20px);
  margin: 10px auto;
  transition: grid-template-columns 220ms var(--ease);
}

.shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.left-sidebar {
  position: sticky;
  top: 10px;
  display: grid;
  gap: 14px;
  align-content: start;
  height: calc(100vh - 20px);
  min-width: 0;
  padding: 16px 12px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--sb-text);
  background:
    radial-gradient(90% 50% at 50% -10%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(120% 70% at -10% 110%, rgba(89, 157, 57, 0.18), transparent 60%),
    linear-gradient(180deg, var(--sb-bg-1) 0%, var(--sb-bg-2) 55%, var(--sb-bg-3) 100%);
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 14px;
  box-shadow:
    0 22px 44px -24px rgba(11, 31, 18, 0.55),
    0 6px 16px -10px rgba(11, 31, 18, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.left-sidebar::-webkit-scrollbar {
  width: 8px;
}

.left-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.left-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
  background-clip: padding-box;
}

.sidebar-brand {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--sb-line);
}

.sidebar-brand::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sb-line-strong), transparent);
  pointer-events: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  box-shadow:
    0 10px 22px -10px rgba(11, 31, 18, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
}

.sidebar-brand:hover .brand-logo {
  transform: translateY(-1px) rotate(-1.5deg);
  box-shadow:
    0 14px 28px -10px rgba(11, 31, 18, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 28px -12px var(--sb-glow);
}

.sidebar-brand .eyebrow {
  margin: 0 0 3px;
  color: rgba(180, 230, 170, 0.85);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.sidebar-brand h1 {
  margin: 0;
  color: white;
  font-size: 19px;
  line-height: 1.08;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition:
    color 200ms var(--ease),
    background 200ms var(--ease),
    border-color 200ms var(--ease),
    transform 200ms var(--ease);
}

.sidebar-toggle:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(180, 230, 170, 0.30);
  transform: translateY(-1px);
}

.sidebar-toggle:focus-visible {
  outline: 2px solid rgba(180, 230, 170, 0.7);
  outline-offset: 2px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.nav-home {
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav button.nav-home-button {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  min-height: 44px;
  padding-left: 10px;
}

.nav-home-button .nav-item-label {
  font-size: 13.5px;
  font-weight: 700;
}

.nav-home-icon {
  color: rgba(255, 255, 255, 0.9);
}

.nav-home-icon svg {
  display: block;
}

.nav-home-button[aria-pressed="true"] .nav-group-icon {
  color: white;
  border-color: rgba(120, 200, 110, 0.45);
  background: linear-gradient(180deg, rgba(89, 157, 57, 0.55), rgba(47, 143, 70, 0.25));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 0 0 1px rgba(89, 157, 57, 0.18);
}

.sidebar-collapse > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.sidebar-collapse > summary::-webkit-details-marker {
  display: none;
}

.sidebar-collapse > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-135deg);
  opacity: 0.55;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}

.sidebar-collapse:not([open]) > summary::after {
  transform: rotate(45deg);
}

.sidebar-collapse > summary:hover::after {
  opacity: 0.95;
}

.nav-group {
  min-width: 0;
  padding: 2px 0;
}

.nav-group + .nav-group {
  margin-top: 4px;
}

.nav-group > summary {
  min-height: 28px;
  padding: 0 8px 0 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 8px;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}

.nav-group > summary:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
}

.nav-group[open] > summary {
  color: rgba(255, 255, 255, 0.82);
}

.nav-group[data-has-active] > summary {
  color: rgba(220, 245, 200, 0.95);
}

.sidebar-nav-items {
  display: grid;
  gap: 2px;
  padding: 6px 0 2px;
  animation: navOpen 280ms var(--ease);
}

@keyframes navOpen {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.nav-group-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 18px;
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition:
    color 220ms var(--ease),
    background 220ms var(--ease),
    border-color 220ms var(--ease);
}

.nav-group[data-has-active] .nav-group-icon {
  color: white;
  border-color: rgba(120, 200, 110, 0.45);
  background: linear-gradient(180deg, rgba(89, 157, 57, 0.55), rgba(47, 143, 70, 0.25));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 0 0 1px rgba(89, 157, 57, 0.18);
}

.nav-group[data-has-active]:not([open]) .nav-group-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8fde74;
  box-shadow:
    0 0 0 2px var(--sb-bg-2),
    0 0 10px var(--sb-glow);
  animation: navDotPulse 1.8s ease-in-out infinite;
}

@keyframes navDotPulse {
  0%, 100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.nav-group-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px 7px 16px;
  color: rgba(255, 255, 255, 0.80);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 220ms var(--ease),
    color 220ms var(--ease),
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease);
}

.sidebar-nav button::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 6px;
  width: 3px;
  background: transparent;
  border-radius: 3px;
  transform: scaleY(0.35);
  transform-origin: center;
  opacity: 0;
  transition:
    transform 260ms var(--ease),
    background 260ms var(--ease),
    opacity 260ms var(--ease),
    box-shadow 260ms var(--ease);
}

.sidebar-nav button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav button:hover::before {
  background: rgba(140, 220, 130, 0.55);
  opacity: 1;
  transform: scaleY(0.65);
}

.sidebar-nav button[aria-pressed="true"] {
  color: white;
  background:
    linear-gradient(90deg, rgba(89, 157, 57, 0.32) 0%, rgba(89, 157, 57, 0.10) 70%, transparent 100%),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(120, 200, 110, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(89, 157, 57, 0.14),
    0 10px 24px -16px rgba(89, 157, 57, 0.55);
}

.sidebar-nav button[aria-pressed="true"]::before {
  background: linear-gradient(180deg, #9fe089 0%, #3aa84e 100%);
  opacity: 1;
  transform: scaleY(1);
  box-shadow: 0 0 14px -2px rgba(127, 209, 106, 0.75);
}

.sidebar-nav button:focus-visible {
  outline: 2px solid rgba(180, 230, 170, 0.7);
  outline-offset: 1px;
}

.nav-item-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.nav-item-label {
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: letter-spacing 220ms var(--ease);
}

.sidebar-nav button[aria-pressed="true"] .nav-item-label {
  font-weight: 700;
  letter-spacing: -0.1px;
}

.nav-item-main small {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 220ms var(--ease);
}

.nav-item-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  transition:
    color 220ms var(--ease),
    background 220ms var(--ease),
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease),
    transform 220ms var(--ease);
}

.sidebar-nav button:hover .nav-item-main small {
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav button:hover .nav-item-count {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav button[aria-pressed="true"] .nav-item-main small {
  color: rgba(220, 245, 200, 0.82);
}

.sidebar-nav button[aria-pressed="true"] .nav-item-count {
  color: white;
  background: linear-gradient(180deg, #5cc472 0%, #2f8f46 100%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 6px 14px -8px rgba(47, 143, 70, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.left-sidebar.is-collapsed {
  gap: 10px;
  padding: 14px 9px;
  overflow-x: visible;
}

.left-sidebar.is-collapsed .sidebar-brand {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  padding: 2px 0 12px;
}

.left-sidebar.is-collapsed .sidebar-brand > div {
  display: none;
}

.left-sidebar.is-collapsed .brand-logo {
  width: 46px;
  height: 46px;
}

.left-sidebar.is-collapsed .sidebar-toggle {
  width: 40px;
  height: 26px;
}

.left-sidebar.is-collapsed .sidebar-nav {
  justify-items: center;
}

.left-sidebar.is-collapsed .nav-group {
  width: 100%;
  padding: 0;
}

.left-sidebar.is-collapsed .nav-group > summary {
  justify-content: center;
  min-height: 42px;
  padding: 0;
}

.left-sidebar.is-collapsed .nav-group > summary::after,
.left-sidebar.is-collapsed .nav-group-label,
.left-sidebar.is-collapsed .sidebar-nav-items,
.left-sidebar.is-collapsed .panel {
  display: none;
}

.left-sidebar.is-collapsed .nav-group-icon {
  min-width: 44px;
  height: 30px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 10px;
}

.left-sidebar.is-collapsed .nav-home {
  width: 100%;
  padding-bottom: 0;
  margin-bottom: 6px;
  border-bottom: 0;
}

.left-sidebar.is-collapsed .nav-home-button {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.left-sidebar.is-collapsed .nav-home-button .nav-item-main {
  display: none;
}

.left-sidebar.is-collapsed .nav-home-button::before {
  display: none;
}

.left-sidebar.is-collapsed .nav-home-icon svg {
  width: 17px;
  height: 17px;
}

.content-frame {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar.is-minimized {
  min-height: 34px;
  padding: 5px 10px;
  gap: 10px;
  border-radius: 7px;
  box-shadow: none;
}

.topbar.is-minimized .topbar-title {
  min-width: 0;
}

.topbar.is-minimized .topbar-logo,
.topbar.is-minimized .topbar-title h2,
.topbar.is-minimized .health-grid,
.topbar.is-minimized .health-updated {
  display: none;
}

.topbar.is-minimized .topbar-title .eyebrow {
  margin: 0;
  font-size: 9px;
}

.topbar.is-minimized .topbar-tools,
.topbar.is-minimized .health-head {
  gap: 6px;
}

.topbar.is-minimized .health-strip {
  padding: 0;
  border: 0;
  background: transparent;
}

.topbar.is-minimized .mini-button {
  height: 22px;
  padding: 0 7px;
}

.topbar.is-minimized .server-status {
  min-width: 0;
  padding: 4px 8px;
  font-size: 10px;
}

.topbar.is-minimized .pdf-archive-status {
  min-height: 22px;
  max-width: 210px;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
}

.topbar.is-minimized .pdf-archive-status > span {
  font-size: 8px;
}

.topbar.is-minimized .pdf-archive-status strong {
  max-width: 120px;
  font-size: 10px;
}

.topbar h2,
.terminal-head h2,
.section-title h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h2 {
  font-size: 17px;
  line-height: 1.05;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 160px;
}

.topbar-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(28, 31, 26, 0.12);
}

.topbar-immersive-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.topbar.is-immersive .topbar-immersive-toggle {
  display: inline-flex;
}

.topbar-immersive-toggle:hover {
  background: var(--paper);
}

.topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.health-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.health-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.health-head span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pdf-archive-status {
  min-height: 40px;
  max-width: 260px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  color: var(--ink);
  text-align: left;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  cursor: pointer;
}

.pdf-archive-status:hover {
  border-color: var(--line);
  background: var(--paper);
}

.pdf-archive-status:disabled {
  cursor: wait;
  opacity: 0.82;
}

.pdf-archive-status > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
  text-transform: uppercase;
}

.pdf-archive-status strong {
  max-width: 220px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-archive-status[data-kind="ok"] {
  border-color: rgba(28, 94, 72, 0.28);
  background: rgba(28, 94, 72, 0.08);
}

.pdf-archive-status[data-kind="warn"] {
  border-color: rgba(164, 101, 22, 0.34);
  background: rgba(164, 101, 22, 0.1);
}

.pdf-archive-status[data-kind="error"] {
  border-color: rgba(158, 42, 43, 0.34);
  background: rgba(158, 42, 43, 0.1);
}

.pdf-archive-status[data-kind="error"] strong {
  color: var(--danger);
}

.pdf-archive-status[data-kind="loading"] {
  border-color: rgba(38, 78, 112, 0.28);
  background: rgba(38, 78, 112, 0.08);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.mini-button .loading-spinner {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.health-grid {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.health-card {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-template-areas:
    "dot name"
    "dot detail";
  column-gap: 7px;
  align-items: center;
  width: 150px;
  min-height: 34px;
  padding: 5px 7px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.health-card .dot {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--subtle);
}

.health-card.ok .dot {
  background: #2f8f46;
  box-shadow: 0 0 0 3px rgba(47, 143, 70, 0.14);
}

.health-card.down .dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.13);
}

.health-card.warn .dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(201, 122, 44, 0.14);
}

.health-card.unknown .dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(201, 122, 44, 0.14);
}

.health-card strong {
  grid-area: name;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-card strong .loading-spinner {
  width: 12px;
  height: 12px;
  color: var(--amber);
}

.health-card small {
  display: none;
  grid-area: desc;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-card em {
  grid-area: detail;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.health-updated .loading-spinner {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.server-status {
  min-width: 92px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4ec;
  color: var(--brand);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.server-status[data-status="warn"] {
  color: #8a4d12;
  background: #fff6e8;
  border-color: #e8c999;
}

.server-status[data-status="error"] {
  color: var(--danger);
  background: #fff0ee;
  border-color: #efc8c2;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 10px minmax(420px, var(--terminal-width, 34vw));
  gap: 8px;
  align-items: start;
  margin-top: 10px;
}

.app-layout.terminal-hidden {
  grid-template-columns: 1fr;
}

.app-layout.terminal-resizing {
  cursor: col-resize;
  user-select: none;
}

.terminal-panel[hidden] {
  display: none;
}

.app-layout.terminal-hidden .terminal-resizer,
.app-layout.terminal-collapsed .terminal-resizer {
  display: none;
}

.terminal-resizer {
  position: sticky;
  top: 10px;
  width: 10px;
  height: var(--terminal-panel-height, calc(100vh - 20px));
  min-height: 180px;
  padding: 0;
  cursor: col-resize;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.terminal-resizer::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 4px;
  width: 2px;
  border-radius: 999px;
  background: rgba(59, 75, 53, 0.18);
  transition: background 120ms ease, box-shadow 120ms ease;
}

.terminal-resizer:hover::before,
.terminal-resizer:focus-visible::before,
.app-layout.terminal-resizing .terminal-resizer::before {
  background: rgba(226, 188, 86, 0.74);
  box-shadow: 0 0 0 4px rgba(226, 188, 86, 0.13);
}

.terminal-resizer:focus-visible {
  outline: 2px solid rgba(226, 188, 86, 0.55);
  outline-offset: 2px;
}

.main-grid {
  min-width: 0;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.panel,
.task-section,
.terminal-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.left-sidebar .panel {
  color: var(--ink);
  padding: 10px 11px;
  background: linear-gradient(180deg, var(--sb-paper) 0%, var(--sb-paper-2) 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 6px 16px -12px rgba(11, 31, 18, 0.35);
}

.left-sidebar .panel > summary.section-title {
  color: var(--ink);
}

.left-sidebar .panel > summary.section-title h2 {
  font-size: 12.5px;
}

.left-sidebar .panel .icon {
  width: 22px;
  height: 22px;
  color: var(--brand);
  background: #e7f0e2;
  box-shadow: inset 0 0 0 1px rgba(52, 108, 45, 0.10);
}

.left-sidebar .panel .segmented {
  gap: 7px;
}

.left-sidebar .panel .segment {
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.92);
  transition:
    background 220ms var(--ease),
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease),
    transform 220ms var(--ease);
}

.left-sidebar .panel .segment:hover {
  border-color: rgba(52, 108, 45, 0.35);
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -8px rgba(52, 108, 45, 0.45);
}

.left-sidebar .panel .segment[aria-pressed="true"] {
  border-color: rgba(52, 108, 45, 0.5);
  background: linear-gradient(180deg, #f1f8ee 0%, #e4efe0 100%);
  box-shadow:
    inset 3px 0 0 var(--accent),
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px -10px rgba(52, 108, 45, 0.45);
}

.left-sidebar .panel .segment[aria-pressed="true"] small {
  color: var(--brand);
}

.left-sidebar .panel .facts {
  margin-top: 12px;
  padding-top: 10px;
  border-top-color: rgba(0, 0, 0, 0.07);
}

.left-sidebar .panel .facts dt {
  color: #6b7058;
  font-size: 9.5px;
  letter-spacing: 0.5px;
}

.left-sidebar .panel .facts dd {
  color: #2b2f25;
  font-size: 10.5px;
}

.map-icons-main {
  display: grid;
  gap: 10px;
}

.map-icons-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.map-icons-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}

.map-icons-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-icons-chip-row span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  color: #253321;
  background: #edf5e9;
  border: 1px solid rgba(52, 108, 45, 0.18);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 750;
}

.map-icons-chip-row strong {
  color: #173f19;
  font-size: 13px;
  font-weight: 850;
}

.map-icons-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: #374233;
  font-size: 12px;
  font-weight: 750;
}

.map-icons-status.is-error {
  color: var(--danger);
}

.map-icons-refresh {
  flex: 0 0 auto;
  min-width: 128px;
  min-height: 38px;
}

.map-icons-table-wrap {
  max-width: 100%;
  max-height: calc(100vh - 215px);
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.map-icons-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
  color: #20251d;
  font-size: 13px;
}

.map-icons-table th,
.map-icons-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.map-icons-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #24301f;
  background: #eef4e9;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.map-icons-table thead th:nth-child(1) {
  width: 20%;
}

.map-icons-table thead th:nth-child(2) {
  width: 14%;
}

.map-icons-table thead th:nth-child(3) {
  width: 24%;
}

.map-icons-table thead th:nth-child(4) {
  width: 20%;
}

.map-icons-table thead th:nth-child(5) {
  width: 22%;
}

.map-icons-table tbody tr:last-child th,
.map-icons-table tbody tr:last-child td {
  border-bottom: 0;
}

.map-icons-table tbody tr:hover {
  background: #fbfdf8;
}

.map-icons-table th strong,
.map-icons-table th small {
  display: block;
}

.map-icons-table th strong {
  color: #1f2a1a;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.map-icons-table th small {
  margin-top: 3px;
  color: #65705f;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

.map-icon-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 98px;
  padding: 4px 9px;
  color: #23301f;
  background: #f3eee5;
  border: 1px solid rgba(95, 72, 36, 0.14);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.map-icon-status-pill[data-status*="GREEN"] {
  color: #183f1d;
  background: #e8f4e4;
  border-color: rgba(52, 108, 45, 0.22);
}

.map-icon-status-pill[data-status*="DARKGREEN"] {
  color: #102d14;
  background: #dcebd6;
}

.map-icon-status-pill[data-status*="DEFECT"]::after {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.map-icon-file {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.map-icon-preview {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.map-icon-preview.is-missing {
  display: inline-grid;
  place-items: center;
  color: #5e241f;
  background: #f7dfdc;
  border: 1px solid #e6b9b2;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.map-icon-file code {
  display: block;
  min-width: 0;
  color: #465044;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.25;
}

.map-icon-variant {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 28px;
  margin: 2px;
  padding: 4px 7px;
  color: #263421;
  background: #f7faf3;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  white-space: nowrap;
}

.map-icon-variant strong {
  color: #183f1d;
  font-size: 11px;
  font-weight: 900;
}

.map-icon-variant em {
  display: inline;
  color: #52624d;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.map-icon-variant.is-missing {
  color: #6b261f;
  background: #fbebe8;
  border-color: #e7bab3;
}

.map-icon-variant.is-missing strong,
.map-icon-variant.is-missing em {
  color: #6b261f;
}

.map-icons-empty {
  color: #374233;
  font-weight: 800;
}

.map-icons-empty .loading-spinner {
  margin-right: 6px;
  vertical-align: -2px;
}

.map-icons-empty.is-error {
  color: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  .left-sidebar *,
  .left-sidebar *::before,
  .left-sidebar *::after {
    transition: none !important;
    animation: none !important;
  }
}

.panel,
.task-section {
  padding: 10px;
}

.task-section {
  scroll-margin-top: 10px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.sidebar-collapse > summary.section-title {
  margin-bottom: 0;
}

.panel.sidebar-collapse[open] > summary.section-title {
  margin-bottom: 8px;
}

.panel.sidebar-collapse > summary.section-title {
  color: var(--ink);
}

.panel.sidebar-collapse > summary.section-title:hover h2 {
  color: var(--brand);
}

.section-title h2 {
  font-size: 13px;
}

.collapsible-content {
  min-width: 0;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--brand);
  border-radius: 6px;
  background: #eef4ec;
  font-size: 12px;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.segment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.segment[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.segment small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.facts {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.facts div {
  display: grid;
  gap: 3px;
}

.facts dt {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.2;
}

.path-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.path-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fffefb;
}

.path-item strong {
  color: #26311f;
  font-size: 12px;
  font-weight: 850;
}

.path-item code {
  color: var(--muted);
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.25;
}

.workspace-paths-panel {
  margin-bottom: 10px;
}

/* Buchhaltung (invoicing) panels */
.bk-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 1100px) {
  .bk-form-layout {
    grid-template-columns: 1fr;
  }
}

.bk-form-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.bk-invoice-number {
  font-weight: 800;
  font-size: 12px;
  color: var(--ink);
}

.bk-status {
  font-size: 11px;
  color: var(--muted);
}

.bk-status[data-kind="ok"] { color: var(--accent); }
.bk-status[data-kind="error"] { color: var(--danger); }

.bk-fieldset {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 10px;
}

.bk-fieldset legend {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 0 4px;
}

.bk-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}

.bk-field > span {
  font-size: 11px;
  color: var(--muted);
}

.bk-field input,
.bk-field textarea,
.bk-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  background: var(--surface);
  color: var(--ink);
}

.bk-field textarea { resize: vertical; }

.bk-field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bk-field-row .bk-field { margin-bottom: 0; }

.bk-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 8px;
}

.bk-items th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--subtle);
  padding: 4px 6px;
  border-bottom: 1px solid var(--line-soft);
}

.bk-items td {
  padding: 3px 4px;
  vertical-align: middle;
}

.bk-items input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}

.bk-items .bk-num { text-align: right; }
.bk-items td:nth-child(2),
.bk-items td:nth-child(4) { width: 70px; }
.bk-items td:nth-child(3) { width: 110px; }
.bk-items td:last-child { width: 28px; }

.bk-row-remove {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  line-height: 1;
}

.bk-row-remove:disabled { opacity: 0.4; cursor: not-allowed; }

.bk-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mini-button.bk-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.bk-preview {
  position: sticky;
  top: 8px;
}

.bk-preview-head {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 6px;
}

.bk-preview-frame {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

/* HWN-Gutschriften (Lizenzgebühr) */
.bk-prov-force {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--subtle);
  padding-bottom: 6px;
}

/* List + tables */
.bk-list-head,
.bk-import-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.bk-search {
  flex: 1;
  min-width: 180px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}

.bk-archive-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.bk-archive-status[data-kind="ok"] {
  border-color: rgba(28, 94, 72, 0.28);
  background: rgba(28, 94, 72, 0.08);
}

.bk-archive-status[data-kind="warn"] {
  border-color: rgba(164, 101, 22, 0.34);
  background: rgba(164, 101, 22, 0.1);
}

.bk-archive-status[data-kind="error"] {
  border-color: rgba(158, 42, 43, 0.34);
  background: rgba(158, 42, 43, 0.1);
  color: var(--danger);
}

.bk-list-preview-layout {
  display: grid;
  grid-template-columns:
    minmax(600px, var(--bk-list-table-width, 46%))
    12px
    minmax(520px, 1fr);
  gap: 0;
  align-items: start;
}

#section-buchhaltung-rechnungen .bk-list-preview-layout {
  min-height: calc(100vh - 145px);
}

.bk-list-table-wrap {
  min-width: 0;
  overflow: auto;
}

.bk-list-preview-resizer {
  align-self: stretch;
  min-height: calc(100vh - 150px);
  cursor: col-resize;
  position: relative;
  border-radius: 7px;
  touch-action: none;
}

.bk-list-preview-resizer::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 5px;
  width: 2px;
  background: rgba(59, 75, 53, 0.18);
  border-radius: 999px;
  content: "";
  transition: background 120ms ease, box-shadow 120ms ease;
}

.bk-list-preview-resizer:hover::before,
.bk-list-preview-resizer:focus-visible::before,
body.is-resizing-bk-list-preview .bk-list-preview-resizer::before {
  background: rgba(226, 188, 86, 0.74);
  box-shadow: 0 0 0 4px rgba(226, 188, 86, 0.13);
}

.bk-list-preview-resizer:focus-visible {
  outline: 2px solid rgba(226, 188, 86, 0.55);
  outline-offset: 2px;
}

body.is-resizing-bk-list-preview {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-bk-list-preview .bk-list-preview .bk-preview-frame {
  pointer-events: none;
}

.bk-list-preview {
  position: sticky;
  top: 8px;
  min-width: 0;
}

.bk-list-preview .bk-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.bk-list-preview .bk-preview-head strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.bk-list-preview-empty {
  display: grid;
  min-height: 70vh;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

#section-buchhaltung-rechnungen .bk-list-preview .bk-preview-frame,
#section-buchhaltung-rechnungen .bk-list-preview-empty {
  height: calc(100vh - 150px);
  min-height: 760px;
}

@media (min-width: 1800px) {
  #section-buchhaltung-rechnungen .bk-list-preview-layout {
    grid-template-columns:
      minmax(720px, var(--bk-list-table-width, 46%))
      12px
      minmax(690px, 1fr);
  }
}

.bk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.bk-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--subtle);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.bk-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.bk-table tbody tr[data-bk-preview-invoice],
.bk-table tbody tr[data-bk-prov-row] {
  cursor: pointer;
}

.bk-table tbody tr[data-bk-preview-invoice]:hover,
.bk-table tbody tr[data-bk-prov-row]:hover {
  background: rgba(28, 94, 72, 0.06);
}

.bk-table tbody tr.is-selected {
  background: rgba(28, 94, 72, 0.1);
  box-shadow: inset 3px 0 0 var(--accent);
}

.bk-table tbody tr:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.bk-table .bk-right { text-align: right; }
.bk-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 190px;
}

.bk-totals {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.bk-total-card {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bk-total-card span { font-size: 11px; color: var(--muted); }
.bk-total-card strong { font-size: 18px; color: var(--ink); }

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

@media (max-width: 1100px) {
  .bk-summary-grid { grid-template-columns: 1fr; }
  .bk-field-row { grid-template-columns: 1fr; }
}

.bk-block-title {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 6px;
}

.bk-import .bk-field { margin-bottom: 0; }
.bk-import-row .bk-field { width: auto; }
.bk-import-row .bk-num { width: 90px; }

.bk-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 20px 16px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.bk-dropzone:hover,
.bk-dropzone:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.bk-dropzone.is-drag {
  border-color: var(--accent);
  background: var(--amber-bg);
}

.bk-dropzone strong { color: var(--ink); font-size: 13px; }
.bk-dropzone span { font-size: 11px; }
.bk-dropzone code {
  font-size: 11px;
  background: var(--line-soft);
  padding: 1px 4px;
  border-radius: 4px;
}

.datev-reconcile-panel {
  display: grid;
  gap: 12px;
  font-size: 16px;
}

.datev-reconcile-panel .bk-block-title {
  margin-bottom: 4px;
  color: #3f4644;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.datev-reconcile-upload {
  display: grid;
  gap: 12px;
}

.datev-reconcile-head,
.datev-reconcile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.datev-reconcile-head strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

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

.datev-reconcile-dropzone {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 14px;
  color: #303633;
  background: #fffef9;
  border: 2px dashed #bbb8ad;
  border-radius: 8px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.datev-reconcile-dropzone:hover,
.datev-reconcile-dropzone:focus-visible,
.datev-reconcile-dropzone.is-drag {
  background: #f7fbf2;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 70, 0.12);
  outline: none;
}

.datev-reconcile-drop-icon {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 64px;
  color: #1f522e;
  background: #e9f4e4;
  border: 1px solid #c7ddbf;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.datev-reconcile-dropzone strong,
.datev-reconcile-dropzone span,
.datev-reconcile-dropzone small {
  display: block;
  color: #303633;
  font-size: 16px;
  line-height: 1.45;
}

.datev-reconcile-dropzone strong {
  color: var(--ink);
  font-weight: 800;
}

.datev-reconcile-file-ok {
  color: #1f6b37;
  font-weight: 800;
}

.datev-reconcile-message {
  margin: 0;
  color: #3f4644;
  font-size: 16px;
  line-height: 1.5;
}

.datev-reconcile-message[data-kind="error"] {
  color: var(--danger);
  font-weight: 700;
}

.datev-reconcile-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  color: #3f4644;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fffef9;
}

.datev-reconcile-empty strong {
  color: var(--ink);
  font-size: 20px;
}

.datev-reconcile-empty span {
  line-height: 1.5;
}

.datev-reconcile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.datev-reconcile-metric {
  display: grid;
  gap: 2px;
  min-height: 92px;
  padding: 12px 14px;
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.datev-reconcile-metric span,
.datev-reconcile-metric small {
  color: #3f4644;
  font-size: 16px;
  line-height: 1.35;
}

.datev-reconcile-metric strong {
  color: var(--ink);
  font-size: 25px;
  font-weight: 850;
  line-height: 1.05;
}

.datev-reconcile-table-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.datev-reconcile-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.datev-reconcile-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  color: #303633;
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.datev-reconcile-filter[aria-pressed="true"] {
  color: #103d1d;
  background: #e9f4e4;
  border-color: #9fc290;
  box-shadow: inset 0 -2px 0 #2f8f46;
}

.datev-reconcile-filter span,
.datev-reconcile-filter strong {
  font-size: 16px;
}

.datev-reconcile-filter strong {
  font-weight: 850;
}

.datev-reconcile-table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.datev-reconcile-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: collapse;
  font-size: 16px;
}

.datev-reconcile-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  color: #303633;
  background: #f0efe8;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.datev-reconcile-table td {
  padding: 11px 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.datev-reconcile-table tbody tr:last-child td {
  border-bottom: 0;
}

.datev-reconcile-table tbody tr[data-status="missing"] {
  background: #fff8f1;
}

.datev-reconcile-table tbody tr[data-status="review"] {
  background: #fffdf3;
}

.datev-reconcile-table tbody tr[data-status="exempt"] {
  background: #f5faf6;
}

.datev-reconcile-table tbody tr:hover {
  background: #f7fbf2;
}

.datev-reconcile-table strong,
.datev-reconcile-table small,
.datev-reconcile-table span {
  display: block;
  color: inherit;
  font-size: 16px;
  line-height: 1.42;
}

.datev-reconcile-table small {
  color: #3f4644;
}

.datev-reconcile-usd-estimate {
  color: #1f5f8f;
  font-weight: 800;
}

.datev-reconcile-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 850;
  text-align: center;
}

.datev-reconcile-status[data-status="found"] {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.datev-reconcile-status[data-status="review"] {
  color: #74440b;
  background: #fef3c7;
  border: 1px solid #f7d97c;
}

.datev-reconcile-status[data-status="missing"] {
  color: #8a2118;
  background: #fee2df;
  border: 1px solid #f1a39b;
}

.datev-reconcile-status[data-status="exempt"] {
  color: #24543a;
  background: #e2f4e8;
  border: 1px solid #9acdad;
}

.datev-reconcile-purpose {
  max-width: 360px;
}

.datev-reconcile-manual-cell {
  min-width: 190px;
}

.datev-reconcile-manual-input {
  width: 100%;
  min-width: 170px;
  min-height: 48px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fffef9;
  border: 1px solid #b9b6aa;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
}

.datev-reconcile-manual-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 143, 70, 0.14);
  outline: none;
}

.datev-reconcile-manual-input:disabled {
  color: #3f4644;
  background: #f0efe8;
}

.datev-reconcile-none {
  padding: 20px;
  color: #3f4644;
  text-align: center;
}

@media (max-width: 1320px) {
  .datev-reconcile-dropgrid,
  .datev-reconcile-summary {
    grid-template-columns: 1fr;
  }
}

.bk-import-manual {
  margin-top: 10px;
}

.bk-import-manual > summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.bk-migrate { margin-top: 12px; }
.bk-migrate .bk-import-row { align-items: center; }

.bk-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--subtle);
  font-style: italic;
}

.bk-loading,
.bk-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 8px 2px;
}

.bk-empty.is-error { color: var(--danger); }

@media (max-width: 1180px) {
  .bk-list-preview-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .bk-list-preview-resizer {
    display: none;
  }

  .bk-list-preview {
    position: static;
  }
}

@media (max-width: 1380px) {
  .path-list {
    grid-template-columns: 1fr;
  }
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

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

.task-block {
  min-width: 0;
}

.task-block-title {
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 12px;
  letter-spacing: 0;
}

.prompt-composer {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

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

.prompt-tabs button {
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding: 8px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.prompt-tabs button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.prompt-tabs strong {
  font-size: 12px;
  line-height: 1.1;
}

.prompt-tabs span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-target {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #f3f1e7;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.prompt-target button {
  display: grid;
  gap: 2px;
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.prompt-target button:hover {
  color: var(--ink);
}

.prompt-target button[aria-pressed="true"] {
  color: var(--ink);
  background: white;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(28, 31, 26, 0.06);
}

.prompt-target strong {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.prompt-target small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.prompt-composer label {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.prompt-composer textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  line-height: 1.35;
}

.prompt-composer textarea:focus {
  outline: 2px solid rgba(47, 143, 70, 0.22);
  border-color: var(--accent);
}

.prompt-reminder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  color: #30402f;
  background: #f0f6ec;
  border: 1px solid #d7e5ce;
  border-radius: 7px;
}

.prompt-reminder strong {
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.prompt-reminder span {
  min-width: 0;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.prompt-presets {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 7px;
  align-items: stretch;
}

.prompt-presets > span {
  display: flex;
  align-items: center;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.prompt-preset-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 7px;
  min-width: 0;
}

.prompt-preset-button {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 7px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.prompt-preset-button:hover {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.prompt-preset-button strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-preset-button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-copy-button {
  grid-area: auto;
}

.prompt-copy-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.prompt-composer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.ipa-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 7px;
  margin-bottom: 10px;
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.ipa-summary > div:not(.ipa-summary-actions) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ipa-summary span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ipa-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ipa-summary .ipa-summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ipa-summary-actions span {
  white-space: nowrap;
}

.ipa-summary-actions .mini-button {
  height: 28px;
}

.omc-builder {
  display: grid;
  gap: 9px;
  padding-top: 2px;
}

.omc-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.omc-mode-card {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.omc-mode-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.omc-mode-card strong {
  font-size: 12px;
  line-height: 1.1;
}

.omc-mode-card span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.omc-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
}

.omc-check,
.omc-select {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.omc-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.omc-select {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.omc-select select {
  width: 100%;
}

.omc-preview {
  min-height: 70px;
  margin: 0;
  padding: 9px 10px;
  overflow: auto;
  color: #f2f5ed;
  background: #182018;
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.38;
  white-space: pre-wrap;
}

.prompt-preview-details {
  margin: 0;
}

.prompt-preview-details > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 3px 8px 3px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  border-radius: 5px;
}

.prompt-preview-details > summary::-webkit-details-marker {
  display: none;
}

.prompt-preview-details > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}

.prompt-preview-details[open] > summary::before {
  transform: rotate(45deg);
}

.prompt-preview-details > summary:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.prompt-preview-details > .omc-preview {
  margin-top: 6px;
}

.omc-copy {
  justify-self: start;
}

.omc-team-builder {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(520px, 1.3fr);
  gap: 12px;
  align-items: start;
}

.omc-team-builder code {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94em;
}

.omc-team-intro,
.omc-team-command-block,
.omc-team-block {
  min-width: 0;
  padding: 13px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(28, 31, 26, 0.045);
}

.omc-team-intro,
.omc-team-command-block {
  grid-column: 1 / -1;
}

.omc-team-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  color: #f4f1e8;
  background:
    radial-gradient(70% 70% at 14% 0%, rgba(89, 157, 57, 0.42), transparent 58%),
    radial-gradient(55% 75% at 100% 20%, rgba(201, 122, 44, 0.34), transparent 62%),
    linear-gradient(135deg, #162214 0%, #201c13 100%);
  border-color: rgba(255, 255, 255, 0.10);
}

.omc-team-kicker {
  display: inline-flex;
  margin-bottom: 5px;
  color: #f0b14d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.omc-team-intro h3,
.omc-team-block h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
}

.omc-team-intro p,
.omc-team-block-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.omc-team-intro p {
  max-width: 780px;
  color: rgba(244, 241, 232, 0.74);
}

.omc-team-docfacts {
  display: flex;
  gap: 7px;
  align-items: center;
}

.omc-team-docfacts span {
  display: grid;
  min-width: 74px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  color: rgba(244, 241, 232, 0.72);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.omc-team-docfacts strong {
  color: #fff9ec;
  font-size: 18px;
  line-height: 1;
}

.omc-team-command-block {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 10px;
}

.omc-command-style {
  display: grid;
  gap: 7px;
}

.omc-command-style button,
.omc-template-chip,
.omc-model-chip,
.omc-role-chip,
.omc-worker-mini-chips button {
  color: var(--ink);
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.omc-command-style button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px 10px;
  text-align: left;
}

.omc-command-style button[aria-pressed="true"],
.omc-template-chip[aria-pressed="true"],
.omc-model-chip[aria-pressed="true"],
.omc-worker-mini-chips button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.omc-command-style strong,
.omc-template-chip strong,
.omc-model-chip strong {
  font-size: 12px;
  line-height: 1.12;
}

.omc-command-style span,
.omc-template-chip span,
.omc-model-chip span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.18;
}

.omc-team-task {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.omc-team-task span,
.omc-worker-chip-line > span,
.omc-worker-count span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.omc-team-task textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
}

.omc-team-preview-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.omc-team-preview,
.omc-routing-preview {
  min-height: 76px;
  margin: 0;
  padding: 10px 11px;
  overflow: auto;
  color: #f6f2e8;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(89, 157, 57, 0.25), transparent 60%),
    #171b14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.omc-team-block {
  display: grid;
  gap: 10px;
}

.omc-template-block,
.omc-roster-block {
  grid-column: 1 / -1;
}

.omc-team-block-head {
  display: grid;
  gap: 1px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
}

.omc-template-list,
.omc-model-filter-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
}

.omc-template-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.omc-template-chip,
.omc-model-chip {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px 9px;
  text-align: left;
}

.omc-role-catalog {
  display: grid;
  gap: 12px;
}

.omc-role-group {
  display: grid;
  gap: 7px;
}

.omc-role-group h4 {
  margin: 0;
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.omc-role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.omc-role-chip {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  gap: 1px 7px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  text-align: left;
}

.omc-role-chip:hover,
.omc-template-chip:hover,
.omc-model-chip:hover,
.omc-command-style button:hover,
.omc-worker-mini-chips button:hover {
  border-color: var(--accent);
}

.omc-role-chip strong {
  font-size: 12px;
  line-height: 1.05;
}

.omc-role-chip small {
  padding: 2px 5px;
  color: #2f5f2e;
  background: #edf6e9;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.omc-role-chip span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
}

.omc-team-roster {
  display: grid;
  gap: 9px;
}

.omc-worker-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  background: #fffdfa;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.omc-worker-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  align-self: start;
}

.omc-worker-count {
  display: grid;
  gap: 3px;
}

.omc-worker-count input {
  width: 58px;
  height: 30px;
}

.omc-worker-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.omc-worker-title strong {
  font-size: 13px;
  line-height: 1.1;
}

.omc-worker-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.omc-worker-remove {
  grid-column: 1 / -1;
  justify-self: start;
  height: 30px;
}

.omc-worker-chip-line {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.omc-worker-chip-line:nth-of-type(2) {
  grid-column: 2;
}

.omc-worker-chip-line:nth-of-type(3),
.omc-worker-chip-line:nth-of-type(4) {
  grid-column: 2;
}

.omc-worker-mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.omc-worker-mini-chips button {
  min-height: 27px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
}

.omc-routing-details {
  display: grid;
  gap: 7px;
}

.omc-routing-details > summary {
  width: max-content;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.omc-routing-details .ghost {
  justify-self: start;
}

.scenario-control {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  grid-template-areas:
    "label label"
    "select button";
  gap: 6px 7px;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.scenario-control label {
  grid-area: label;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.scenario-control select {
  grid-area: select;
  width: 100%;
  min-width: 0;
}

.scenario-run {
  grid-area: button;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 31px;
  padding: 0 12px;
  color: white;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.scenario-run:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.device-control {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  grid-template-areas:
    "label label"
    "select button";
  gap: 6px 7px;
  padding: 8px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.device-control label {
  grid-area: label;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.device-control select {
  grid-area: select;
  width: 100%;
  min-width: 0;
}

.device-run {
  grid-area: button;
  height: 31px;
  padding: 0 11px;
  color: white;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.device-run:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.task-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.task-button {
  position: relative;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon meta";
  column-gap: 8px;
  align-items: center;
  min-height: 39px;
  padding: 7px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.task-button:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.task-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.task-button.primary {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.task-button.primary .task-meta,
.task-button.primary .task-icon {
  color: rgba(255, 255, 255, 0.82);
}

.upload-images-panel {
  display: grid;
  gap: 10px;
}

.reports-panel {
  display: grid;
  gap: 9px;
}

.reports-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.reports-target-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  min-height: 34px;
  padding: 3px;
  background: #f5f4ee;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reports-target-switch button {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.reports-target-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 4px rgba(31, 38, 24, 0.12);
}

.reports-target-switch button[data-report-target="staging"][aria-pressed="true"] {
  color: #24537a;
}

.reports-target-switch button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.report-filter-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.report-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.report-filter[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.report-filter span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-filter strong {
  min-width: 22px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.reports-refresh {
  grid-area: auto;
  min-width: 118px;
}

.reports-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  padding: 6px 8px;
  color: var(--muted);
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
}

.reports-status-message,
.reports-status-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.reports-status-message {
  flex: 1 1 auto;
}

.reports-status-meta {
  flex: 0 1 auto;
  justify-content: flex-end;
  color: var(--subtle);
  font-size: 10px;
}

.reports-env-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  color: #5c3c00;
  background: #fff3cf;
  border: 1px solid #f3cf74;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.reports-env-badge[data-target="staging"] {
  color: #24537a;
  background: #e8f1f8;
  border-color: #bed5e8;
}

.reports-env-badge[data-target="unknown"] {
  color: var(--subtle);
  background: #f7f7f4;
  border-color: var(--line-soft);
}

.reports-status-message > span:last-child,
.reports-updated-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-live-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  color: var(--subtle);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.reports-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--subtle);
}

.reports-live-state[data-live-state="active"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line-soft));
}

.reports-live-state[data-live-state="active"] .reports-live-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.reports-live-state[data-live-state="paused"] {
  color: var(--amber);
}

.reports-live-state[data-live-state="paused"] .reports-live-dot {
  background: var(--amber);
}

.worker-loop {
  display: grid;
  gap: 8px;
}

.worker-loop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 240, 0.92)),
    repeating-linear-gradient(90deg, rgba(52, 108, 45, 0.035) 0 1px, transparent 1px 14px);
  box-shadow: inset 3px 0 0 var(--brand);
}

.worker-loop-head[data-loop-status="warn"] {
  box-shadow: inset 3px 0 0 var(--amber);
}

.worker-loop-head[data-loop-status="down"] {
  box-shadow: inset 3px 0 0 var(--danger);
}

.worker-loop-head-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.worker-loop-kicker {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.worker-loop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.worker-loop-chip {
  display: inline-grid;
  gap: 1px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.worker-loop-chip[data-chip-status="ok"] {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line-soft));
}

.worker-loop-chip[data-chip-status="warn"] {
  border-color: color-mix(in srgb, var(--amber) 34%, var(--line-soft));
}

.worker-loop-chip[data-chip-status="down"] {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line-soft));
}

.worker-loop-chip-label {
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.worker-loop-chip-value {
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.worker-loop-refresh {
  flex: 0 0 auto;
}

.worker-loop-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.worker-loop-meta-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.worker-loop-link {
  min-height: 24px;
  padding: 2px 8px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.worker-loop-link:disabled {
  opacity: 0.45;
}

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

.worker-loop-target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.55);
}

.worker-loop-target-label {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.worker-loop-target a {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-loop-target-health {
  color: var(--brand) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase;
}

.worker-loop-target[data-target-mode="staging"] {
  border-color: color-mix(in srgb, var(--brand) 22%, var(--line-soft));
}

.worker-loop-target[data-target-mode="production"] {
  border-color: color-mix(in srgb, var(--danger) 18%, var(--line-soft));
}

.worker-loop-steps {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
}

.worker-loop-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.worker-loop-step:last-child {
  border-bottom: 0;
}

.worker-loop-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--brand);
  background: #eef6ea;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line-soft));
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.worker-loop-step-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.worker-loop-step-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.worker-loop-step-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.worker-loop-step-warning {
  margin: 4px 0 0;
  color: color-mix(in srgb, var(--danger) 72%, var(--ink));
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.worker-loop-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  max-width: 460px;
}

.worker-loop-btn {
  min-height: 28px;
  padding: 4px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
}

.worker-loop-btn:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.worker-loop-btn[data-kind="primary"] {
  color: #fff;
  background: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 80%, #000);
}

.worker-loop-btn[data-kind="danger"] {
  color: #fff;
  background: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 80%, #000);
}

.worker-loop-btn:disabled,
.worker-loop-btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
}

.worker-loop-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.worker-loop-details {
  padding: 8px 10px;
  border: 1px dashed var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.35);
}

.worker-loop-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.worker-loop-checks {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.worker-loop-check {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
}

.worker-loop-check-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.worker-loop-check[data-check-status="ok"] .worker-loop-check-dot {
  background: var(--brand);
}

.worker-loop-check[data-check-status="warn"] .worker-loop-check-dot {
  background: var(--amber);
}

.worker-loop-check[data-check-status="down"] .worker-loop-check-dot {
  background: var(--danger);
}

.worker-loop-check strong {
  display: block;
  font-size: 11px;
}

.worker-loop-check small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.worker-loop-check em {
  color: var(--subtle);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.worker-loop-endpoints {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.worker-loop-endpoints div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.worker-loop-endpoints dt {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.worker-loop-endpoints dd {
  margin: 0;
}

.worker-loop-endpoints code {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .worker-loop-targets {
    grid-template-columns: 1fr;
  }

  .worker-loop-step {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .worker-loop-step-actions {
    grid-column: 2;
    justify-content: flex-start;
    max-width: none;
  }
}

.staging-panel {
  display: grid;
  gap: 9px;
}

.staging-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  color: #17351c;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 246, 232, 0.88)),
    repeating-linear-gradient(135deg, rgba(52, 108, 45, 0.04) 0 1px, transparent 1px 12px);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 8px;
  box-shadow: inset 4px 0 0 var(--brand);
}

.staging-hero[data-staging-status="warn"] {
  border-color: color-mix(in srgb, var(--amber) 34%, var(--line));
  box-shadow: inset 4px 0 0 var(--amber);
}

.staging-hero[data-staging-status="down"] {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
  box-shadow: inset 4px 0 0 var(--danger);
}

.staging-hero-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.staging-kicker {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.staging-hero-main strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.staging-hero-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.staging-hero-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.staging-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  color: var(--brand);
  background: #eef6ea;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line-soft));
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.staging-status-pill[data-staging-status="warn"] {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: color-mix(in srgb, var(--amber) 28%, var(--line-soft));
}

.staging-status-pill[data-staging-status="down"] {
  color: var(--danger);
  background: #fff0ed;
  border-color: color-mix(in srgb, var(--danger) 26%, var(--line-soft));
}

.staging-status-line .reports-status-meta {
  max-width: 58%;
}

.staging-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 9px;
}

.staging-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.staging-card-wide {
  grid-row: span 2;
}

.staging-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-soft);
}

.staging-card-head span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.staging-card-head strong {
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
}

.staging-checklist {
  display: grid;
  gap: 7px;
}

.staging-check {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 8px 9px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.staging-check-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(52, 108, 45, 0.10);
}

.staging-check[data-staging-status="warn"] .staging-check-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(201, 122, 44, 0.13);
}

.staging-check[data-staging-status="down"] .staging-check-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.staging-check div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staging-check strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staging-check small {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staging-check em {
  padding: 3px 8px;
  color: var(--muted);
  background: #f4f3ee;
  border-radius: 999px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 900;
}

.staging-check[data-staging-status="ok"] em {
  color: var(--brand);
}

.staging-check[data-staging-status="warn"] em {
  color: var(--amber);
}

.staging-check[data-staging-status="down"] em {
  color: var(--danger);
}

.staging-endpoints {
  display: grid;
  gap: 7px;
  margin: 0;
}

.staging-endpoints div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px 8px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.staging-endpoints dt {
  color: var(--subtle);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.staging-endpoints dd {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin: 0;
}

.staging-endpoints span {
  color: var(--brand);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.staging-endpoints [data-endpoint-mode="production"] span,
.staging-endpoints [data-endpoint-mode="missing"] span {
  color: var(--amber);
}

.staging-endpoints code {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.staging-cta {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.staging-cta[data-cta-kind="primary"] {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  box-shadow: inset 3px 0 0 var(--brand);
}

.staging-cta[data-cta-kind="danger"] {
  border-color: color-mix(in srgb, var(--amber) 32%, var(--line));
  box-shadow: inset 3px 0 0 var(--amber);
}

.staging-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(28, 31, 26, 0.08), inset 3px 0 0 currentColor;
}

.staging-cta:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.staging-cta span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staging-cta small,
.staging-muted,
.staging-empty {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staging-phases {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.staging-phase {
  position: relative;
  border: 1px solid rgba(15, 60, 30, 0.12);
  border-radius: 14px;
  padding: 16px 18px;
  background: #ffffff;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px 16px;
  align-items: start;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.staging-phase[data-active="true"] {
  border-color: rgba(15, 60, 30, 0.4);
  box-shadow: 0 1px 0 rgba(15, 60, 30, 0.08), 0 8px 24px rgba(15, 60, 30, 0.06);
  background: #f5fbf6;
}

.staging-phase[data-phase-status="down"] {
  border-color: rgba(180, 60, 50, 0.35);
}

.staging-phase-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 60, 30, 0.08);
  color: rgba(15, 60, 30, 0.85);
  font-weight: 600;
  font-size: 15px;
}

.staging-phase[data-active="true"] .staging-phase-marker {
  background: rgba(15, 60, 30, 0.18);
  color: #0f3c1e;
}

.staging-phase-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.staging-phase-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3c1e;
}

.staging-phase-description {
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(20, 40, 25, 0.78);
}

.staging-phase-warning {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(200, 90, 50, 0.08);
  border-left: 3px solid rgba(200, 90, 50, 0.55);
  font-size: 13px;
  color: rgba(120, 40, 20, 0.95);
}

.staging-phase-status {
  align-self: start;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 60, 30, 0.08);
  color: rgba(15, 60, 30, 0.85);
  white-space: nowrap;
}

.staging-phase-status[data-status="ok"] {
  background: rgba(60, 140, 80, 0.18);
  color: #1b5a30;
}

.staging-phase-status[data-status="warn"] {
  background: rgba(220, 150, 60, 0.18);
  color: #7a4810;
}

.staging-phase-status[data-status="down"] {
  background: rgba(200, 80, 70, 0.18);
  color: #7a1f1a;
}

.staging-phase-status[data-status="blocked"] {
  background: rgba(120, 120, 120, 0.18);
  color: #555;
}

.staging-phase[data-active="true"] .staging-phase-status[data-status="ok"]::before {
  content: "● ";
}

.staging-phase-actions {
  grid-column: 2 / span 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.staging-phase-action {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(15, 60, 30, 0.18);
  background: #ffffff;
  color: #0f3c1e;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.staging-phase-action:hover:not(:disabled):not([aria-disabled="true"]) {
  background: rgba(15, 60, 30, 0.05);
}

.staging-phase-action[data-kind="primary"] {
  background: #1b5a30;
  border-color: #1b5a30;
  color: #ffffff;
}

.staging-phase-action[data-kind="primary"]:hover:not(:disabled) {
  background: #144824;
}

.staging-phase-action[data-kind="danger"] {
  background: #ffffff;
  border-color: rgba(200, 80, 70, 0.55);
  color: #7a1f1a;
}

.staging-phase-action[data-kind="danger"]:hover:not(:disabled) {
  background: rgba(200, 80, 70, 0.08);
}

.staging-phase-action:disabled,
.staging-phase-action[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.staging-phase-checklist {
  grid-column: 2 / span 2;
  margin-top: 6px;
}

.staging-phase-checklist summary {
  cursor: pointer;
  font-size: 13px;
  color: rgba(15, 60, 30, 0.65);
  padding: 4px 0;
}

.staging-phase-checklist[open] summary {
  margin-bottom: 8px;
}

.staging-disabled-hint {
  font-size: 11.5px;
  color: rgba(60, 60, 60, 0.7);
  font-weight: 400;
}

.staging-tech-details {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 60, 30, 0.1);
  border-radius: 12px;
  background: rgba(245, 245, 240, 0.6);
}

.staging-tech-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(15, 60, 30, 0.7);
}

.staging-tech-details[open] summary {
  margin-bottom: 10px;
}

.staging-tech-details .staging-endpoints {
  margin-top: 0;
}

.staging-quick-links {
  display: inline-flex;
  gap: 14px;
  margin-left: 12px;
}

.staging-quick-link {
  font-size: 12.5px;
  color: rgba(15, 60, 30, 0.7);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.staging-quick-link:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .staging-phase {
    grid-template-columns: 32px 1fr;
  }
  .staging-phase-status {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .staging-phase-actions {
    grid-column: 1 / -1;
  }
  .staging-phase-checklist {
    grid-column: 1 / -1;
  }
}

.oa-monitor-panel {
  display: grid;
  gap: 10px;
}

.oa-monitor-toolbar,
.oa-monitor-message,
.oa-monitor-grid,
.oa-monitor-list,
.oa-monitor-error {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.oa-monitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.oa-monitor-toolbar > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.oa-monitor-toolbar strong {
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2f1ec;
  font-size: 11px;
  font-weight: 900;
}

.oa-monitor-toolbar strong[data-status="ok"] {
  color: var(--accent);
  background: #eef7ec;
}

.oa-monitor-toolbar strong[data-status="warn"],
.oa-monitor-toolbar strong[data-status="loading"] {
  color: var(--amber);
  background: #fff6e8;
}

.oa-monitor-toolbar strong[data-status="down"] {
  color: var(--danger);
  background: #fff0ef;
}

.oa-monitor-toolbar span,
.oa-monitor-message,
.oa-monitor-metric small,
.oa-monitor-item small {
  color: var(--muted);
}

.oa-monitor-toolbar span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-monitor-message {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.oa-monitor-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.oa-monitor-metric {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid var(--line-soft);
}

.oa-monitor-metric:last-child {
  border-right: 0;
}

.oa-monitor-metric span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.oa-monitor-metric strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-monitor-metric small {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-monitor-list {
  display: grid;
  overflow: hidden;
}

.oa-monitor-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.oa-monitor-item:last-child {
  border-bottom: 0;
}

.oa-monitor-item:hover {
  background: #f8faf6;
}

.oa-monitor-item span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.oa-monitor-item strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-monitor-item small {
  font-size: 11px;
  font-weight: 700;
}

.oa-monitor-error,
.oa-monitor-empty {
  padding: 12px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.oa-monitor-empty {
  color: var(--muted);
}

.status-badge.oa-active {
  color: #1f5b34;
  background: #e7f4eb;
  border-color: #bcdcc5;
}

.status-badge.oa-planned {
  color: #7a5a16;
  background: #fff4dd;
  border-color: #efd8a3;
}

.status-badge.oa-expired {
  color: #47515d;
  background: #eef1f3;
  border-color: #d4d9de;
}

.oa-diagnose {
  margin-top: 6px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.oa-diagnose > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.oa-diagnose > summary::-webkit-details-marker {
  display: none;
}

.oa-diagnose > summary::before {
  content: "▸";
  width: 12px;
  color: var(--subtle);
  font-size: 10px;
  transform: translateY(-1px);
}

.oa-diagnose[open] > summary::before {
  content: "▾";
}

.oa-diagnose > summary span {
  flex: 1 1 auto;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.oa-diagnose > summary strong {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  background: #f2f1ec;
}

.oa-diagnose > summary strong[data-oa-diagnose-status="ok"] {
  color: var(--accent);
  background: #eef7ec;
}

.oa-diagnose > summary strong[data-oa-diagnose-status="warn"],
.oa-diagnose > summary strong[data-oa-diagnose-status="loading"] {
  color: var(--amber);
  background: #fff6e8;
}

.oa-diagnose > summary strong[data-oa-diagnose-status="down"] {
  color: var(--danger);
  background: #fff0ef;
}

.oa-diagnose-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.oa-diagnose-endpoint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  word-break: break-all;
}

.oa-copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 16px;
  color: white;
  background: rgba(35, 47, 33, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 60;
}

.report-map-missing {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: #f7f7f3;
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.reports-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.364fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  height: calc(100vh - 245px);
  min-height: 420px;
  overflow: hidden;
}

.reports-list-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.reports-selection-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  padding: 5px 6px 5px 9px;
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.reports-selection-count {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reports-selection-count strong,
.reports-selection-count span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-selection-count strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.reports-selection-count span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.reports-selection-actions {
  display: inline-flex;
  gap: 4px;
}

.reports-selection-actions button {
  min-height: 30px;
  padding: 5px 8px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.reports-selection-actions button.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.reports-selection-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.reports-selection-bar[data-has-selection="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: inset 3px 0 0 var(--accent);
}

.reports-list {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.report-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 8px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.report-row[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.report-row-multi-selected,
.report-row[aria-selected="true"]:not([aria-pressed="true"]) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, white);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
}

.report-row-main {
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-row-main strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-row-main small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  word-break: normal;
  overflow-wrap: break-word;
}

.report-row-indicators {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.report-row-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  color: var(--muted);
  background: var(--line-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.report-row-indicator.warn {
  color: var(--amber);
  background: var(--amber-bg);
}

.report-row-indicator.positive {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--line-soft));
}

.report-row-indicator.clearance {
  color: #0e7490;
  background: #e6f7fb;
  border: 1px solid #b8e5ef;
}

.report-row-indicator.negative {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--line-soft));
}

.report-row-indicator.ai-precheck {
  min-width: 43px;
  font-weight: 900;
}

.report-row-indicator.ai-precheck.positive {
  color: #167035;
  background: #e4f6e9;
  border: 1px solid #b9e4c5;
}

.report-row-indicator.ai-precheck.negative {
  color: #b42318;
  background: #fff0ee;
  border: 1px solid #f2b9b2;
}

.report-row-indicator .inline-icon {
  flex: 0 0 auto;
}

.report-row-loading {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.report-row-loading .loading-spinner {
  width: 13px;
  height: 13px;
}

.report-row .status-badge {
  flex: 0 0 auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 24px;
  padding: 3px 8px;
  color: #30402f;
  background: #edf4eb;
  border: 1px solid #d7e5ce;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.status-badge.published {
  color: #1f5b34;
  background: #e7f4eb;
  border-color: #bcdcc5;
}

.status-badge.in_progress {
  color: #24537a;
  background: #e8f1f8;
  border-color: #bed5e8;
}

.status-badge.resolved {
  color: #47515d;
  background: #eef1f3;
  border-color: #d4d9de;
}

.status-badge.rejected {
  color: var(--danger);
  background: #fff0ee;
  border-color: #efc8c2;
}

.report-detail {
  position: relative;
  display: grid;
  gap: 9px;
  align-content: start;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.report-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.report-detail-refresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 7px 9px;
  color: var(--accent);
  background: #eef7ec;
  border: 1px solid #cfe4c7;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.report-detail-head div {
  min-width: 0;
}

.report-detail-head span:not(.status-badge),
.report-note span,
.report-categories span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.report-detail-head h3 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.2;
}

.report-detail-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 4px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.35;
}

.report-detail-meta > div {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid var(--line-soft);
}

.report-detail-meta > div:last-child {
  border-right: 0;
}

.report-detail-meta > div:first-child {
  padding-left: 0;
}

.report-detail-meta dt {
  margin: 0;
  color: var(--subtle);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.42px;
  text-transform: uppercase;
}

.report-detail-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.report-detail-meta dd.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.report-media-overview {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.report-media-overview.has-both {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr);
  height: clamp(300px, 34vh, 380px);
}

.report-map-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #f6faf4;
  border: 1px solid #dbe9d5;
  border-radius: 7px;
}

.report-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 0;
}

.report-map-head > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-map-head span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.report-map-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--brand);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-map-head em {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--brand);
  background: #eaf3e7;
  border: 1px solid #cfe4c9;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.report-map-head .report-media-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.report-map-head .report-media-open,
.report-photo-gallery .report-media-open {
  flex: 0 0 auto;
}

.report-media-open {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  color: var(--ink);
}

.report-media-open::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  background: currentColor;
  transform: translate(-50%, -50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='3' stroke-linecap='square' d='M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='3' stroke-linecap='square' d='M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.report-leaflet-map {
  width: 100%;
  height: clamp(180px, 23vh, 252px);
  margin-top: 2px;
  background: #dfe9d6;
  border-block: 1px solid rgba(82, 77, 61, 0.16);
}

.report-media-overview.has-both .report-leaflet-map {
  height: auto;
  min-height: 0;
}

.report-leaflet-map.leaflet-unavailable {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.report-map-preview p {
  margin: 0;
  padding: 0 12px 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.route-marker {
  width: 22px;
  height: 22px;
  background: #1f5ed8;
  border: 4px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(22, 37, 19, 0.28);
}

.route-marker.start {
  background: #278f4e;
}

.route-marker.end {
  background: #c94d2f;
}

.route-marker.tap {
  width: 20px;
  height: 20px;
  background: #1f5ed8;
  border-width: 3px;
}

.stamp-marker {
  width: 26px;
  height: 26px;
  background: #fff7dc;
  border: 3px solid #8a6a24;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(22, 37, 19, 0.22);
  transform: rotate(45deg);
}

.report-leaflet-map .leaflet-control-attribution {
  font-size: 10px;
}

.report-photo-gallery {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 10px 12px;
  background: #f6faf4;
  border: 1px solid #dbe9d5;
  border-radius: 7px;
}

.report-photo-gallery > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.report-photo-gallery > div:first-child > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-photo-gallery span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.report-photo-gallery strong {
  color: var(--brand);
  font-size: 11px;
}

.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-media-overview.has-both .report-photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(120px, 1fr);
  min-height: 0;
  overflow: auto;
  padding-right: 1px;
}

.report-media-overview.has-both .report-photo-gallery.single-photo .report-photo-grid {
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.report-photo-card {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  min-height: 96px;
  padding: 0;
  color: white;
  background: #edf4eb;
  border: 1px solid #d7e5ce;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  aspect-ratio: 4 / 3;
}

.report-photo-card:hover,
.report-photo-card:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(47, 143, 70, 0.16);
}

.report-media-overview.has-both .report-photo-card {
  min-height: 82px;
  height: 100%;
  aspect-ratio: auto;
}

.report-media-overview.has-both .report-photo-gallery.single-photo .report-photo-card {
  min-height: 0;
}

.report-photo-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.report-photo-card small {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 5px;
  color: white;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}

.report-media-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
}

.report-media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 28, 18, 0.62);
}

.report-media-modal-panel {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(1180px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  padding: 12px;
  overflow: auto;
  background: #fffefb;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(11, 24, 13, 0.35);
}

.report-media-modal-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-media-modal-panel header strong {
  font-size: 15px;
  line-height: 1.2;
}

.report-modal-map {
  height: min(76vh, 760px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-modal-photos {
  display: grid;
  align-items: center;
  justify-items: center;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  min-height: 0;
}

.report-modal-photos.single-photo {
  grid-template-columns: minmax(0, 1fr);
}

.report-modal-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  min-height: 220px;
  max-height: calc(100vh - 138px);
  color: white;
  background: #161b14;
  border: 1px solid #d7e5ce;
  border-radius: 7px;
  text-decoration: none;
}

.report-modal-photos.single-photo .report-modal-photo {
  width: fit-content;
  max-width: 100%;
}

.report-modal-photo img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 138px);
  display: block;
  object-fit: contain;
  background: #161b14;
}

.report-modal-photos.multi-photo .report-modal-photo img {
  width: 100%;
}

.report-modal-photo span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  color: white;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
}

.fixture-panel {
  display: grid;
  gap: 10px;
}

.fixture-toolbar,
.fixture-post-card,
.fixture-message {
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.fixture-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 10px 12px;
}

.fixture-toolbar > div,
.fixture-post-head > div,
.fixture-result > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.fixture-toolbar span,
.fixture-post-head span,
.fixture-result span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.fixture-toolbar strong,
.fixture-post-head strong,
.fixture-result strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-toolbar small {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-message {
  min-height: 34px;
  padding: 9px 11px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.fixture-browser {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(260px, 0.72fr) minmax(330px, 0.92fr) minmax(360px, 1.25fr);
  height: calc(100vh - 350px);
  min-height: 430px;
  overflow: hidden;
  background: #f9faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fixture-column {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 7px 6px;
  border-right: 1px solid var(--line-soft);
}

.fixture-column.root {
  background: #f2f4ef;
}

.fixture-column.folders {
  background: #fbfcf8;
}

.fixture-column.images {
  background: #fffefb;
}

.fixture-root-item,
.fixture-folder-row,
.fixture-file-row,
.fixture-image-row,
.fixture-image-pick {
  min-width: 0;
}

.fixture-root-item,
.fixture-folder-row,
.fixture-image-pick {
  width: 100%;
  color: var(--ink);
  border: 0;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.fixture-root-item,
.fixture-folder-row,
.fixture-file-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 7px;
  background: transparent;
}

.fixture-root-item {
  grid-template-columns: 22px minmax(0, 1fr);
}

.fixture-root-item.selected,
.fixture-folder-row[aria-pressed="true"],
.fixture-image-pick[aria-pressed="true"] {
  color: white;
  background: #1f6feb;
}

.fixture-folder-row:hover,
.fixture-image-pick:hover {
  background: #edf4eb;
}

.fixture-root-item:focus-visible,
.fixture-folder-row:focus-visible,
.fixture-image-pick:focus-visible {
  outline: 2px solid #174224;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.fixture-folder-row[aria-pressed="true"]:hover,
.fixture-image-pick[aria-pressed="true"]:hover {
  background: #1f6feb;
}

.fixture-folder-icon,
.fixture-doc-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(#67c9f5, #26a7df);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.fixture-folder-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -3px;
  width: 8px;
  height: 5px;
  border-radius: 3px 3px 0 0;
  background: #8bdefc;
}

.fixture-doc-icon {
  width: 15px;
  height: 18px;
  border: 1px solid #cfd8c8;
  background: linear-gradient(135deg, #ffffff 0 75%, #e6ece1 75%);
}

.fixture-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fixture-row-main strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-row-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-folder-row[aria-pressed="true"] .fixture-row-main small,
.fixture-image-pick[aria-pressed="true"] .fixture-row-main small {
  color: rgba(255, 255, 255, 0.82);
}

.fixture-chevron {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.fixture-folder-row[aria-pressed="true"] .fixture-chevron {
  color: rgba(255, 255, 255, 0.82);
}

.fixture-file-row.muted {
  color: var(--muted);
}

.fixture-image-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-height: 32px;
  padding: 1px 3px;
}

.fixture-image-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.fixture-image-pick {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 6px;
  background: transparent;
}

.fixture-image-pick img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  background: #e9efe4;
}

.fixture-preview {
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 24px 22px;
  background: #fff;
}

.fixture-preview-image {
  display: grid;
  place-items: center;
  min-height: 220px;
}

.fixture-preview-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 48vh;
  display: block;
  border-radius: 7px;
  box-shadow: 0 16px 42px rgba(24, 31, 20, 0.12);
}

.fixture-preview-meta {
  display: grid;
  gap: 9px;
}

.fixture-preview-meta h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.25;
}

.fixture-preview-meta > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fixture-preview-meta dl {
  margin: 0;
  display: grid;
  gap: 5px;
}

.fixture-preview-meta dl > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding-top: 5px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}

.fixture-preview-meta dt {
  color: var(--subtle);
  font-weight: 850;
}

.fixture-preview-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 700;
}

.fixture-post-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.fixture-post-head,
.fixture-target-row,
.fixture-result {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fixture-selection-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--accent);
  background: #edf8ed;
  border: 1px solid #cfe6c9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.fixture-category-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f8fbf5;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.fixture-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fixture-category-head span,
.fixture-category-head small {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.42px;
  text-transform: uppercase;
}

.fixture-category-head small {
  color: var(--muted);
}

.fixture-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.fixture-category-chip {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.fixture-category-chip[data-selected="true"] {
  color: #174224;
  background: #edf8ed;
  border-color: #b9ddb0;
}

.fixture-category-chip input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.fixture-category-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.fixture-post-card textarea,
.fixture-target-row input {
  width: 100%;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.fixture-post-card textarea {
  min-height: 86px;
  resize: vertical;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.4;
}

.fixture-target-row label {
  flex: 1 1 auto;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.fixture-target-row label span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.42px;
  text-transform: uppercase;
}

.fixture-target-row input {
  min-height: 36px;
  padding: 7px 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.fixture-target-row .scenario-run {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.fixture-result {
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  background: #f6faf4;
  border: 1px solid #dbe9d5;
  border-radius: 7px;
}

.fixture-result pre {
  flex: 1 0 100%;
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.35;
}

.report-note,
.report-categories,
.reports-empty {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-note p,
.reports-empty span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-categories strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.report-plausibility {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  color: #30402f;
  background: #edf4eb;
  border: 1px solid #d7e5ce;
  border-radius: 7px;
}

.report-plausibility.warn {
  color: #8a4d12;
  background: #fff6e8;
  border-color: #e8c999;
}

.report-plausibility strong {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-plausibility span {
  min-width: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.report-review-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-review-share > div {
  flex: 1 1 220px;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-review-share span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.report-review-share strong {
  font-size: 12px;
  line-height: 1.2;
}

.report-review-share button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.report-review-share .report-share-primary {
  order: 1;
}

.report-review-share .report-share-secondary {
  order: 2;
}

.report-review-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.report-review-summary div {
  display: grid;
  gap: 2px;
  padding: 8px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-review-summary strong {
  font-size: 15px;
  line-height: 1;
}

.report-review-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.report-review-list {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-review-list-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-soft);
}

.report-review-list-head span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.report-review-list-head strong {
  min-width: 24px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.report-review-list > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.report-review-item {
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--line);
  border-radius: 7px;
}

.report-review-item.plausible {
  border-left-color: var(--accent);
}

.report-review-item.unclear {
  border-left-color: #d49a37;
}

.report-review-item.reject {
  border-left-color: var(--danger);
}

.report-review-item div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  justify-content: space-between;
}

.report-review-item strong {
  font-size: 12px;
}

.report-review-item span,
.report-review-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.report-review-item p {
  color: var(--ink);
}

.report-review-item .muted {
  color: var(--muted);
}

.report-clearance-list {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-clearance-list-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-soft);
}

.report-clearance-list-head span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.report-clearance-list-head strong {
  min-width: 24px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.report-clearance-list > .muted {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.report-clearance-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.report-clearance-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.clearance-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.report-clearance-date {
  color: var(--muted);
  font-size: 11px;
}

.report-clearance-note {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.report-clearance-votes {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.report-clearance-reviews {
  display: grid;
  gap: 4px;
  padding-top: 2px;
  border-top: 1px solid var(--line-soft);
}

.report-clearance-review div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  justify-content: space-between;
}

.report-clearance-review strong {
  font-size: 12px;
}

.report-clearance-review span {
  font-size: 11px;
  font-weight: 700;
}

.report-clearance-review p {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.3;
}

.report-clearance-confirm {
  justify-self: start;
}

.report-clearance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-self: start;
}

.reports-empty {
  min-height: 110px;
  align-content: center;
}

.detail-empty {
  height: 100%;
}

.report-detail-loading {
  justify-items: center;
  text-align: center;
}

.report-detail-loading .loading-spinner {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.reports-empty strong {
  font-size: 13px;
}

.report-actions {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto auto;
  gap: 9px;
  margin: 2px -10px -10px;
  padding: 10px;
  background: rgba(255, 253, 247, 0.96);
  border-top: 1px solid var(--line);
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-left: 1px solid transparent;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 -10px 24px rgba(28, 31, 26, 0.08);
  backdrop-filter: blur(10px);
}

.report-actions textarea {
  width: 100%;
  min-height: 38px;
  resize: none;
  padding: 8px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  line-height: 1.35;
}

.report-readonly-note {
  margin: 0;
  padding: 8px 10px;
  color: #3f4a39;
  background: #eef7e8;
  border: 1px solid #cce3bd;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.report-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}

.report-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
  min-width: 0;
}

.report-action-group.workflow {
  flex: 1 1 320px;
}

.report-action-group.decision {
  flex: 0 1 auto;
}

.report-action-group.destructive {
  flex: 0 0 auto;
  margin-left: auto;
}

.report-action-divider {
  flex: 0 0 1px;
  align-self: stretch;
  width: 1px;
  margin: 0 4px;
  background: var(--line);
}

.report-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.report-action-button.primary {
  color: white;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.report-action-button.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, black);
  border-color: color-mix(in srgb, var(--accent) 88%, black);
}

.report-action-button.outline {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.report-action-button.outline:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--line));
  background: #fffdf7;
}

.report-action-button.danger-outline {
  color: var(--danger);
  background: white;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line));
}

.report-action-button.danger-outline:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 8%, white);
  border-color: color-mix(in srgb, var(--danger) 65%, var(--line));
}

.report-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.report-action-button .inline-icon {
  flex: 0 0 auto;
}

.report-delete-button {
  letter-spacing: 0.15px;
}

.report-delete-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 22, 18, 0.42);
}

.report-delete-modal {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(20, 22, 18, 0.22);
}

.report-delete-modal h3 {
  margin: 0;
  font-size: 16px;
}

.report-delete-modal p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.report-delete-warning {
  color: var(--danger);
  font-weight: 700;
}

.report-delete-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.report-delete-confirm {
  background: var(--danger);
  border-color: var(--danger);
}

.report-delete-confirm:disabled {
  opacity: 0.55;
}

.report-events,
.report-payload {
  margin: 0;
  padding: 8px 9px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-events summary,
.report-payload summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.report-event {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}

.report-event:first-child {
  margin-top: 7px;
}

.report-event strong {
  font-size: 12px;
}

.report-event span,
.report-event p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.report-payload pre {
  max-height: 300px;
  margin: 8px 0 0;
  overflow: auto;
  color: #f2f5ed;
  background: #182018;
  border-radius: 7px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.36;
}

.acquisition-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.offer-calculator {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 10px 12px;
  align-items: stretch;
  padding: 12px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.offer-input-card {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.offer-input-grid {
  display: grid;
  gap: 7px;
}

.offer-input-row {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) 88px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.offer-input-card label,
.offer-result span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.offer-input-card input {
  width: 100%;
  height: 28px;
  padding: 0 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  text-align: right;
}

.offer-input-card input:focus {
  outline: none;
}

.offer-input-row:focus-within {
  outline: 2px solid rgba(47, 143, 70, 0.22);
  border-color: var(--accent);
}

.offer-input-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.offer-summary {
  display: grid;
  gap: 8px;
  align-content: center;
  min-width: 0;
}

.offer-totals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.offer-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 9px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.offer-total.primary {
  color: var(--ink);
  background: rgba(47, 143, 70, 0.08);
  border-color: var(--accent);
}

.offer-total span {
  color: var(--subtle);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.offer-total.primary span {
  color: var(--accent);
}

.offer-total strong {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.offer-total.primary strong {
  color: var(--accent);
}

.offer-breakdown {
  display: grid;
  gap: 4px;
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.3;
}

.offer-breakdown > div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 9px;
  align-items: baseline;
}

.offer-breakdown span {
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.offer-breakdown strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.offer-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.offer-actions .scenario-run {
  grid-area: auto;
}

.offer-actions button {
  min-width: 0;
}

.offer-result {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.offer-result[hidden] {
  display: none;
}

.offer-result-head {
  display: grid;
  gap: 3px;
}

.offer-result-head strong {
  font-size: 13px;
}

.offer-result-link {
  justify-self: start;
  padding: 6px 12px;
  font-size: 12px;
}

.offer-result-log {
  margin: 0;
}

.offer-result-log summary {
  cursor: pointer;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  user-select: none;
}

.offer-result-log summary:hover {
  color: var(--accent);
}

.offer-result-log pre {
  max-height: 180px;
  margin: 6px 0 0;
  overflow: auto;
  padding: 8px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.35;
  white-space: pre-wrap;
}

#section-acquisition .task-button .task-meta {
  display: none;
}

#section-acquisition .task-button {
  min-height: 0;
}

.acquisition-table-block {
  min-width: 0;
}

.acquisition-materials-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.acquisition-materials-layout.is-preview-open {
  grid-template-columns:
    minmax(240px, var(--acquisition-table-width, 33%))
    12px
    minmax(360px, 1fr);
}

.acquisition-table-pane {
  min-width: 0;
  overflow-x: auto;
}

.acquisition-preview-resizer {
  align-self: stretch;
  min-height: 560px;
  cursor: col-resize;
  position: relative;
  touch-action: none;
}

.acquisition-preview-resizer::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  background: var(--line);
  border-radius: 999px;
  content: "";
}

.acquisition-preview-resizer:hover::before,
.acquisition-preview-resizer:focus-visible::before,
body.is-resizing-acquisition-preview .acquisition-preview-resizer::before {
  background: var(--accent);
}

body.is-resizing-acquisition-preview {
  cursor: col-resize;
  user-select: none;
}


.acquisition-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.25;
}

.acquisition-table th {
  padding: 0 3px 1px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.acquisition-table th button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  width: 100%;
  height: 18px;
  padding: 0 3px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.acquisition-table th button:hover {
  color: var(--brand);
}

.acquisition-table th button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acquisition-table th:nth-child(1) {
  width: 12%;
}

.acquisition-table th:nth-child(2) {
  width: 16%;
}

.acquisition-table th:nth-child(3) {
  width: 26%;
}

.acquisition-table th:nth-child(4) {
  width: 6%;
}

.acquisition-table th:nth-child(5),
.acquisition-table th:nth-child(6) {
  width: 11%;
}

.acquisition-table th:nth-child(7) {
  width: 7%;
  text-align: right;
}

.acquisition-table th:nth-child(8) {
  width: 4%;
  text-align: right;
}

.acquisition-table th:nth-child(9) {
  width: 6%;
  text-align: right;
}

.acquisition-table td {
  padding: 5px 6px;
  overflow: hidden;
  color: var(--ink);
  background: white;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.acquisition-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 7px 0 0 7px;
}

.acquisition-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
  text-align: right;
}

.acquisition-table td:nth-child(7) {
  text-align: right;
}

.acquisition-table td:nth-child(8) {
  text-align: right;
}

.acquisition-table td:nth-child(9) {
  text-align: right;
}

.acquisition-table tr:hover td {
  border-color: var(--accent);
}

.acquisition-table tr.previewable {
  cursor: pointer;
}

.acquisition-table tr.selected td {
  border-color: var(--accent);
  background: #f4fbf2;
}

.acquisition-table tr.missing td {
  color: var(--muted);
  background: #faf9f4;
}

.acquisition-table strong,
.acquisition-table small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acquisition-table strong {
  font-size: 9px;
  font-weight: 900;
}

.acquisition-table small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.acquisition-table-action.ghost {
  height: 22px;
  padding: 0 7px;
  font-size: 9px;
  font-weight: 900;
}

.acquisition-table-icon-action.ghost {
  width: 24px;
  height: 22px;
  padding: 0;
  font-size: 12px;
  font-weight: 900;
}

.is-preview-open .acquisition-table {
  min-width: 560px;
}

.is-preview-open .acquisition-table th:nth-child(1),
.is-preview-open .acquisition-table td:nth-child(1),
.is-preview-open .acquisition-table th:nth-child(4),
.is-preview-open .acquisition-table td:nth-child(4),
.is-preview-open .acquisition-table th:nth-child(6),
.is-preview-open .acquisition-table td:nth-child(6) {
  display: none;
}

.acquisition-preview-panel {
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(30, 26, 16, 0.10);
}

.acquisition-preview-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.acquisition-preview-header span,
.acquisition-preview-header small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.acquisition-preview-header strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acquisition-preview-header small {
  margin-top: 3px;
  text-transform: none;
}

.acquisition-preview-close.ghost {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.acquisition-preview-frame {
  display: block;
  width: 100%;
  height: min(72vh, 820px);
  min-height: 560px;
  border: 0;
  background: #f5f4ee;
}

@media (max-width: 980px) {
  .acquisition-materials-layout.is-preview-open {
    grid-template-columns: minmax(0, 1fr);
  }

  .acquisition-preview-resizer {
    display: none;
  }
}

.contacts-table-block {
  min-width: 0;
}

.contacts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 5px;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.25;
}

.contacts-table th {
  padding: 0 8px 2px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-align: left;
  text-transform: uppercase;
}

.contacts-table th:nth-child(1) {
  width: 16%;
}

.contacts-table th:nth-child(2) {
  width: 27%;
}

.contacts-table th:nth-child(3) {
  width: 21%;
}

.contacts-table th:nth-child(4) {
  width: 11%;
}

.contacts-table th:nth-child(5) {
  width: 9%;
}

.contacts-table th:nth-child(6) {
  width: 16%;
}

.contacts-table td {
  padding: 8px;
  color: var(--ink);
  background: white;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  vertical-align: middle;
  white-space: normal;
}

.contacts-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 7px 0 0 7px;
}

.contacts-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
}

.contacts-table tr:hover td {
  border-color: var(--accent);
}

.contacts-table td:nth-child(2) {
  color: var(--muted);
}

.contacts-table td:nth-child(3),
.contacts-table td:nth-child(4),
.contacts-table td:nth-child(5) {
  font-size: 8px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contacts-table a {
  display: block;
  color: var(--brand);
  font-weight: 900;
  text-decoration: none;
}

.contacts-table a + a {
  margin-top: 2px;
}

.contacts-table a:hover {
  text-decoration: underline;
}

.contact-copy-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  width: 100%;
  min-height: 22px;
  padding: 2px 5px;
  color: var(--brand);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  gap: 4px;
}

.contact-copy-button + .contact-copy-button {
  margin-top: 3px;
}

.contact-copy-button:hover {
  background: #f4faf2;
  border-color: rgba(47, 143, 70, 0.20);
}

.contact-copy-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-copy-hint {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  opacity: 0.62;
}

.contact-copy-hint::before,
.contact-copy-hint::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  content: '';
}

.contact-copy-hint::before {
  top: 3px;
  left: 1px;
}

.contact-copy-hint::after {
  top: 0;
  left: 4px;
  background: white;
}

.contact-copy-button.is-copied .contact-copy-hint {
  width: 16px;
  color: var(--brand);
  font-size: 8px;
  font-weight: 900;
  line-height: 13px;
  opacity: 1;
  text-align: center;
}

.contact-copy-button.is-copied .contact-copy-hint::before {
  position: static;
  width: auto;
  height: auto;
  border: 0;
  content: 'OK';
}

.contact-copy-button.is-copied .contact-copy-hint::after {
  display: none;
}

.contacts-table td span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 21px;
  padding: 0 7px;
  overflow: hidden;
  color: var(--brand);
  background: #eef4ec;
  border: 1px solid rgba(47, 143, 70, 0.18);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-table .contact-pipeline-jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  color: var(--brand);
  background: #eef7ec;
  border: 1px solid rgba(47, 143, 70, 0.28);
  border-radius: 999px;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.contacts-table .contact-pipeline-jump:hover {
  background: #dff0d8;
  border-color: rgba(47, 143, 70, 0.5);
}

.contacts-table .contact-status-plain {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.contacts-table tr.is-flash td {
  animation: contact-row-flash 1.4s ease;
}

@keyframes contact-row-flash {
  0%, 100% { background: transparent; }
  20%, 60% { background: #eef7ec; }
}

.lead-tracker-block {
  margin-top: 14px;
}

.lead-tracker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}

.lead-tracker-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.lead-kpi {
  min-width: 0;
  padding: 7px 8px;
  background: #fafbf7;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.lead-kpi span,
.lead-kpi strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-kpi span {
  color: var(--subtle);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.25px;
  text-transform: uppercase;
}

.lead-kpi strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.lead-field-wide {
  grid-column: span 2;
}

.lead-briefing-copy.ghost {
  min-height: 26px;
  padding: 0 10px;
  color: var(--brand);
  border-color: rgba(47, 143, 70, 0.24);
  font-size: 9px;
  font-weight: 900;
}

.lead-briefing-copy.ghost:hover,
.lead-briefing-copy.ghost.is-copied {
  background: #eef7ec;
  border-color: rgba(47, 143, 70, 0.42);
}

.lead-save-state {
  grid-column: 1 / -1;
  min-height: 12px;
  color: var(--brand);
  font-size: 8px;
  font-weight: 900;
  opacity: 0;
  text-align: right;
  text-transform: uppercase;
  transition: opacity 160ms ease;
}

.lead-save-state.is-visible {
  opacity: 1;
}

@media (max-width: 1180px) {
  .lead-tracker-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-tracker-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .lead-tracker-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-field-wide {
    grid-column: auto;
  }
}

.pipeline-view-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pipeline-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  gap: 12px;
  align-items: end;
}

.pipeline-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pipeline-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  background: #fafbf7;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pipeline-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px 6px;
  border-bottom: 1px solid var(--line);
}

.pipeline-column-title {
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.pipeline-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: var(--subtle);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.pipeline-column-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

.pipeline-column-empty {
  padding: 10px 6px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  text-align: center;
}

.pipeline-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 9px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.pipeline-card:hover {
  box-shadow: 0 6px 14px rgba(30, 26, 16, 0.08);
  transform: translateY(-1px);
}

.pipeline-card.is-top {
  border-color: rgba(122, 63, 22, 0.32);
  box-shadow: inset 3px 0 0 #c5621e;
  padding-left: 12px;
}

.pipeline-card.is-high {
  border-color: rgba(113, 94, 33, 0.32);
  box-shadow: inset 3px 0 0 #ad8a2a;
  padding-left: 12px;
}

.pipeline-card.is-top:hover {
  box-shadow: inset 3px 0 0 #c5621e, 0 6px 14px rgba(30, 26, 16, 0.08);
}

.pipeline-card.is-high:hover {
  box-shadow: inset 3px 0 0 #ad8a2a, 0 6px 14px rgba(30, 26, 16, 0.08);
}

.pipeline-card.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.pipeline-column.is-drop-target {
  background: #eef7ec;
  border-color: rgba(47, 143, 70, 0.42);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 70, 0.28);
}

.pipeline-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.pipeline-card-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.pipeline-card-priority {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 16px;
  padding: 0 6px;
  color: #715e21;
  background: #fbf4d5;
  border: 1px solid rgba(113, 94, 33, 0.16);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.pipeline-card-priority[data-priority="Top"] {
  color: #7a3f16;
  background: #fff0dd;
  border-color: rgba(122, 63, 22, 0.18);
}

.pipeline-card-priority[data-priority="Parken"] {
  color: var(--muted);
  background: #f4f4f0;
  border-color: var(--line);
}

.pipeline-card-meeting {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 2px 6px;
  color: var(--ink);
  background: #f8f7f1;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
}

.pipeline-card-next {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1180px) {
  .pipeline-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .pipeline-board {
    grid-auto-columns: minmax(200px, 1fr);
  }
  .pipeline-head .lead-tracker-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.worktree-table-block {
  min-width: 0;
}

.worktree-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.worktree-empty {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  font-size: 11px;
}

.worktree-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.25;
}

.worktree-table th {
  padding: 0 6px 2px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.worktree-table th:nth-child(1) {
  width: 18%;
}

.worktree-table th:nth-child(2) {
  width: 22%;
}

.worktree-table th:nth-child(3) {
  width: 11%;
}

.worktree-table th:nth-child(4) {
  width: 49%;
  text-align: right;
}

.worktree-table td {
  padding: 6px 8px;
  overflow: hidden;
  color: var(--ink);
  background: white;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.worktree-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 7px 0 0 7px;
}

.worktree-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
}

.worktree-table tr:hover td {
  border-color: var(--accent);
}

.worktree-list {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 9px;
  line-height: 1.25;
}

.worktree-list-head,
.wt-accordion-header {
  display: grid;
  grid-template-columns: minmax(120px, 18%) minmax(110px, 22%) minmax(86px, 11%) minmax(280px, 1fr);
  gap: 0;
  align-items: center;
}

.worktree-list-head {
  padding: 0 6px 2px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.worktree-list-head span:last-child {
  text-align: right;
}

.wt-accordion {
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.wt-accordion:hover,
.wt-accordion.is-open {
  border-color: var(--accent);
}

.wt-accordion-header {
  min-width: 0;
}

.wt-accordion-title,
.wt-accordion-cell {
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  overflow: hidden;
  color: var(--ink);
  white-space: nowrap;
}

.wt-accordion-title {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.wt-accordion-title:hover {
  background: #fbfcf8;
}

.wt-accordion-caret {
  display: inline-flex;
  flex: 0 0 13px;
  align-items: center;
  justify-content: center;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
}

.wt-title-copy {
  min-width: 0;
}

.wt-accordion-actions-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0;
  align-items: center;
  overflow: visible;
  white-space: normal;
}

.wt-actions-run,
.wt-actions-tools {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
  min-width: 0;
}

.wt-actions-run {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}

.wt-actions-run-primary,
.wt-actions-run-platforms {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
}

.wt-actions-run-primary {
  justify-content: flex-end;
}

.wt-actions-run-platforms {
  justify-content: center;
}

.wt-actions-copy-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-left: 1px solid var(--line);
}

.wt-actions-tools {
  justify-content: flex-end;
  padding: 0 4px;
  border-left: 1px solid var(--line);
}

.wt-actions-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 2px;
}

.wt-accordion code {
  display: inline-block;
  max-width: 100%;
  padding: 1px 5px;
  overflow: hidden;
  background: #f2f1eb;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worktree-table strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-accordion strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worktree-table small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-accordion small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-status-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 900;
  line-height: 14px;
  vertical-align: middle;
}

.wt-status-badge.wt-dirty {
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid rgba(201, 122, 44, 0.18);
}

.wt-status-badge.wt-ahead {
  color: var(--brand);
  background: #eef4ec;
  border: 1px solid rgba(47, 143, 70, 0.18);
}

.wt-status-badge.wt-behind {
  color: var(--danger);
  background: #fae9e7;
  border: 1px solid rgba(180, 35, 24, 0.18);
}

.worktree-table code {
  display: inline-block;
  max-width: 100%;
  padding: 1px 5px;
  overflow: hidden;
  background: #f2f1eb;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.wt-badge-ok {
  color: var(--brand);
  background: #eef4ec;
  border: 1px solid rgba(47, 143, 70, 0.18);
}

.wt-badge-warn {
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid rgba(201, 122, 44, 0.18);
}

.wt-badge-metro {
  color: #1d6fa5;
  background: #e8f2fb;
  border: 1px solid rgba(29, 111, 165, 0.18);
}

.worktree-table .wt-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
  justify-content: flex-end;
}

.wt-accordion .wt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.worktree-table .wt-action {
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.wt-accordion .wt-action {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.worktree-table .wt-action-primary {
  color: #0c5f48;
  background: #e8f7f0;
  border-color: rgba(12, 95, 72, 0.2);
  font-weight: 900;
}

.wt-accordion .wt-action-primary {
  color: #0c5f48;
  background: #e8f7f0;
  border-color: rgba(12, 95, 72, 0.2);
  font-weight: 900;
}

.worktree-table .wt-action-primary:hover {
  color: white;
  background: #0c5f48;
  border-color: #0c5f48;
}

.wt-accordion .wt-action-primary:hover {
  color: white;
  background: #0c5f48;
  border-color: #0c5f48;
}

.worktree-table .wt-action-tool {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.wt-accordion .wt-action-tool {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.worktree-table .wt-action-tool:hover {
  color: var(--brand);
  background: #f5f7f3;
  border-color: transparent;
}

.wt-accordion .wt-action-tool:hover {
  color: var(--brand);
  background: #f5f7f3;
  border-color: transparent;
}

.worktree-table .wt-action-sep {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  margin: 2px 4px;
  background: var(--line);
}

.wt-accordion .wt-action-sep {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  margin: 2px 4px;
  background: var(--line);
}

.wt-copy-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  min-width: max-content;
}

.wt-copy-group-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
}

.wt-copy-group-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
}

.wt-action-toolbar {
  height: 26px;
  padding: 0 10px;
  font-size: 10px;
}

.worktree-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
}

.worktree-project-switch {
  display: inline-flex;
  gap: 0;
  margin-right: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fffefb;
}

.worktree-project-pill {
  height: 26px;
  padding: 0 12px;
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.worktree-project-pill:last-child {
  border-right: none;
}

.worktree-project-pill:hover {
  background: rgba(47, 143, 70, 0.08);
}

.worktree-project-pill.is-active {
  background: var(--accent);
  color: #fff;
}

.worktree-project-pill.is-muted {
  color: var(--muted);
  font-style: italic;
}

.worktree-project-pill.is-muted.is-active {
  background: var(--muted);
  color: #fff;
}

.worktree-message {
  margin: 4px 0;
  padding: 8px 10px;
  background: #fffefb;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  color: var(--ink);
  font-size: 10px;
}

.worktree-create-form {
  display: grid;
  gap: 8px;
  margin: 6px 0 10px;
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.wt-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.wt-form-label {
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wt-form-label input,
.wt-form-label select {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.wt-form-label select {
  width: 100%;
}

.wt-form-base {
  max-width: 180px;
}

.wt-form-name {
  flex: 1 1 100%;
}

.wt-form-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.wt-form-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.wt-form-submit,
.wt-form-cancel {
  height: 28px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 800;
}

.worktree-table .wt-action-danger {
  margin-left: 4px;
  padding: 0 7px;
  color: var(--danger);
  border-color: transparent;
  background: transparent;
}

.wt-accordion .wt-action-danger {
  margin-left: 4px;
  padding: 0 7px;
  color: var(--danger);
  border-color: transparent;
  background: transparent;
}

.worktree-table .wt-action-danger:hover {
  color: white;
  background: var(--danger);
  border-color: var(--danger);
}

.wt-accordion .wt-action-danger:hover {
  color: white;
  background: var(--danger);
  border-color: var(--danger);
}

.wt-device-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 8px 8px 27px;
  background: #fbfcf8;
  border-top: 1px solid var(--line);
}

.wt-device-group {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-top: 8px;
}

.wt-device-heading {
  color: var(--subtle);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.wt-device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.wt-device-meta {
  min-width: 0;
}

.wt-device-meta span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-device-meta code {
  margin-top: 4px;
}

.wt-device-empty {
  margin: 0;
  padding: 8px;
  color: var(--muted);
  background: white;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.wt-accordion .wt-device-restart {
  min-width: 74px;
}

@media (max-width: 980px) {
  .worktree-list-head {
    display: none;
  }

  .wt-accordion-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .wt-accordion-actions-cell {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: auto;
    padding-top: 3px;
    padding-bottom: 5px;
  }

  .wt-accordion-cell {
    min-height: auto;
    padding-top: 3px;
    padding-bottom: 5px;
  }

  .wt-actions-copy-slot,
  .wt-actions-tools {
    justify-content: flex-start;
    padding-left: 0;
    border-left: 0;
  }

  .wt-actions-run,
  .wt-actions-tools {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .wt-device-panel {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 8px;
  }
}

.wt-metro-kill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.wt-metro-kill:hover {
  background: rgba(180, 35, 24, 0.15);
  color: var(--danger);
  opacity: 1;
}

.changelog-panel {
  display: grid;
  gap: 10px;
}

.changelog-action-card,
.changelog-result {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.changelog-result[hidden] {
  display: none;
}

.changelog-action-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.changelog-action-card > div,
.changelog-result {
  min-width: 0;
}

.changelog-action-card span,
.changelog-result > span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.changelog-action-card strong,
.changelog-result strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.changelog-action-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.changelog-result dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.changelog-result div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.changelog-result dt {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.changelog-result dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.github-trending-panel {
  display: grid;
  gap: 10px;
}

.github-trending-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(52, 108, 45, 0.07), transparent 42%),
    #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.github-trending-toolbar strong {
  display: block;
  font-size: 13px;
}

.github-trending-toolbar span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.github-trending-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.github-source-link {
  text-decoration: none;
}

.github-trending-status {
  min-height: 28px;
  padding: 7px 10px;
  color: var(--muted);
  background: #f8f7f0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.github-trending-status.is-error {
  color: var(--danger);
  background: #fff2ef;
  border-color: rgba(180, 35, 24, 0.24);
}

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

.github-trending-column {
  min-width: 0;
  overflow: hidden;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.github-trending-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: #f8f7f0;
  border-bottom: 1px solid var(--line-soft);
}

.github-trending-column > header span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.github-trending-column > header strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.github-trending-column > header a {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.github-trending-list {
  display: grid;
}

.github-repo-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.github-repo-card:last-child {
  border-bottom: 0;
}

.github-repo-rank {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--brand);
  background: #edf4e9;
  border: 1px solid rgba(52, 108, 45, 0.14);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.github-repo-main {
  min-width: 0;
}

.github-repo-name {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-repo-name span {
  color: var(--muted);
  font-weight: 700;
}

.github-repo-name:hover {
  color: var(--brand);
}

.github-repo-main p {
  display: -webkit-box;
  min-height: 31px;
  margin: 4px 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.github-repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
}

.github-repo-meta > span,
.github-repo-meta > strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 3px 6px;
  background: #f7f6ef;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.github-repo-meta > strong {
  color: var(--brand);
  background: #eef6ea;
  border-color: rgba(52, 108, 45, 0.14);
}

.github-language span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.github-trending-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 160px;
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1360px) {
  .github-trending-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.upload-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(260px, 1fr) minmax(180px, 0.7fr);
  gap: 9px;
}

.upload-json-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 1fr) auto;
  gap: 9px;
  align-items: end;
}

.upload-station-picker,
.upload-json-tools label,
.upload-json-tools > div,
.upload-destination,
.upload-station-card,
.upload-json-preview {
  display: grid;
  gap: 5px;
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.upload-toolbar span,
.upload-station-picker label,
.upload-json-tools span,
.upload-station-card span,
.upload-json-preview span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.upload-station-picker input,
.upload-json-tools input {
  width: 100%;
  min-width: 0;
  height: 34px;
}

.upload-station-picker input,
.upload-json-tools input,
.upload-json-preview textarea {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.upload-station-picker input,
.upload-json-tools input {
  padding: 0 9px;
}

.upload-suggestions {
  display: grid;
  gap: 5px;
  max-height: 232px;
  overflow: auto;
}

.upload-suggestion,
.upload-suggestion-empty {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-areas:
    "number name"
    "number city";
  gap: 2px 8px;
  align-items: center;
  min-height: 42px;
  padding: 7px 8px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.upload-suggestion {
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.upload-suggestion:hover,
.upload-suggestion[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.upload-suggestion strong {
  grid-area: number;
  color: var(--brand);
  font-size: 13px;
}

.upload-suggestion span {
  grid-area: name;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.upload-suggestion small {
  grid-area: city;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.upload-suggestion-empty {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.upload-destination strong,
.upload-station-card strong,
.upload-json-tools strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.upload-station-card small {
  color: var(--muted);
  font-size: 11px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 245px;
  padding: 26px;
  background:
    radial-gradient(circle at 22% 18%, rgba(47, 143, 70, 0.10), transparent 28%),
    linear-gradient(135deg, #fffefb, #f3f8ef);
  border: 2px dashed rgba(52, 108, 45, 0.32);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.drop-zone.dragging {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px rgba(47, 143, 70, 0.10);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
  color: white;
  background: var(--brand);
  border-radius: 18px;
  font-size: 28px;
  box-shadow: 0 14px 24px rgba(37, 77, 34, 0.24);
}

.drop-zone strong {
  font-size: 22px;
}

.drop-zone small {
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.upload-file-list {
  display: grid;
  gap: 7px;
}

.upload-json-preview textarea {
  min-height: 124px;
  resize: vertical;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre;
}

.upload-progress-panel {
  display: grid;
  gap: 7px;
  padding: 10px;
  background: #f7fbf5;
  border: 1px solid rgba(52, 108, 45, 0.18);
  border-radius: 8px;
}

.upload-progress-panel[hidden] {
  display: none;
}

.upload-progress-panel > span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.upload-progress-panel ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-progress-panel li {
  position: relative;
  padding: 7px 9px 7px 28px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.3;
}

.upload-progress-panel li::before {
  position: absolute;
  left: 9px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--subtle);
  content: "";
}

.upload-progress-panel li.active::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 143, 70, 0.12);
}

.upload-progress-panel li.ok::before {
  background: #2f8f46;
  box-shadow: 0 0 0 3px rgba(47, 143, 70, 0.12);
}

.upload-progress-panel li.warn::before {
  background: var(--amber);
}

.upload-progress-panel li.error::before {
  background: var(--danger);
}

.upload-empty,
.upload-file-row {
  padding: 9px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.upload-empty {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.upload-file-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.upload-file-row img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--line-soft);
}

.upload-file-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.upload-file-row strong,
.upload-file-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.upload-file-row span .loading-spinner {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.upload-file-row button {
  width: 30px;
  height: 30px;
  color: var(--danger);
  background: #fff7f6;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.upload-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 2px;
}

.upload-footer div {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.upload-footer span,
.upload-status {
  color: var(--muted);
  font-size: 11px;
}

.upload-status {
  margin: 0;
  min-height: 16px;
}

.task-icon {
  grid-area: icon;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.task-title {
  grid-area: title;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.task-meta {
  grid-area: meta;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-panel {
  position: sticky;
  top: 10px;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: var(--terminal-panel-height, calc(100vh - 20px));
  overflow: hidden;
}

.terminal-collapse-toggle {
  width: 28px;
  min-width: 28px;
  padding: 0;
  font-size: 13px;
  text-align: center;
  flex-shrink: 0;
}

.app-layout.terminal-collapsed {
  grid-template-columns: minmax(0, 1fr) 38px;
}

.terminal-panel.collapsed {
  height: auto;
  padding: 0;
  overflow: visible;
}

.terminal-panel.collapsed .terminal-head {
  padding: 6px;
  border-bottom: none;
}

.terminal-panel.collapsed .terminal-head > div:first-child {
  display: none;
}

.terminal-panel.collapsed .terminal-actions select,
.terminal-panel.collapsed .terminal-actions #stopRun {
  display: none;
}

.terminal-panel.collapsed #terminalOutput,
.terminal-panel.collapsed .xterm {
  display: none;
}

.terminal-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: #fffefb;
}

.terminal-head h2 {
  font-size: 14px;
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.terminal-actions select {
  min-width: 220px;
}

.terminal-actions select[hidden] {
  display: none;
}

select,
.ghost {
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

select {
  width: min(360px, 100%);
  padding: 0 9px;
  font-size: 12px;
}

.ghost {
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.ghost:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#terminalOutput {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
  margin: 0;
  padding: 13px;
  overflow: hidden;
  color: #f2f5ed;
  background: #121a13;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.34;
}

#terminalOutput.terminal-fallback {
  overflow: auto;
  white-space: pre-wrap;
}

#terminalOutput:focus {
  outline: 2px solid rgba(226, 188, 86, 0.55);
  outline-offset: -2px;
}

#terminalOutput.accepts-input:focus {
  outline-color: rgba(226, 188, 86, 0.82);
}

#terminalOutput .xterm {
  height: 100%;
}

#terminalOutput .xterm,
#terminalOutput .xterm-viewport,
#terminalOutput .xterm-screen {
  background: transparent;
}

#terminalOutput .xterm-viewport {
  scrollbar-color: rgba(226, 188, 86, 0.38) transparent;
}

#terminalOutput .xterm-screen {
  padding-bottom: 12px;
}

/* === Software Factory === */
.factory-team-panel {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.factory-template-sidebar,
.factory-template-detail {
  min-width: 0;
}

.factory-template-intro,
.factory-template-card,
.factory-detail-head,
.factory-lanes,
.factory-rule-card,
.factory-task-input,
.factory-command-box {
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.factory-template-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 9px 10px;
}

.factory-template-intro span,
.factory-detail-head span,
.factory-staffing-code span,
.factory-subhead span,
.factory-rule-card span,
.factory-task-input span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.factory-template-intro strong {
  font-size: 12px;
  line-height: 1.25;
}

.factory-template-list {
  display: grid;
  gap: 7px;
}

.factory-template-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 82px;
  padding: 9px 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.factory-template-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.factory-template-card span {
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.factory-template-card strong {
  font-size: 13px;
}

.factory-template-card code,
.factory-staffing-code code,
.factory-lane-row code,
.factory-command-box pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.factory-template-card code {
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.35;
}

.factory-template-detail {
  display: grid;
  gap: 9px;
}

.factory-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 10px;
  padding: 10px;
}

.factory-detail-head h3 {
  margin: 3px 0 5px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: 0;
}

.factory-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.factory-staffing-code {
  display: grid;
  gap: 5px;
  align-content: start;
  min-width: 0;
}

.factory-staffing-code code {
  display: block;
  padding: 8px;
  overflow-wrap: anywhere;
  color: #f2f5ed;
  background: #182018;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.35;
}

.factory-lane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 9px;
}

.factory-lanes,
.factory-rule-card,
.factory-task-input,
.factory-command-box {
  padding: 10px;
}

.factory-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.factory-subhead strong {
  color: var(--brand);
  font-size: 11px;
}

.factory-lane-row {
  display: grid;
  grid-template-columns: 64px 118px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
}

.factory-lane-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  color: white;
  background: var(--brand);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.factory-lane-row code {
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 10px;
}

.factory-lane-row strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.factory-rule-card {
  display: grid;
  gap: 6px;
  align-content: start;
  background: #eef4ec;
  border-color: rgba(47, 143, 70, 0.18);
}

.factory-rule-card strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.factory-rule-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.factory-task-input {
  display: grid;
  gap: 6px;
}

.factory-task-input textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  line-height: 1.35;
}

.factory-task-input textarea:focus {
  outline: 2px solid rgba(47, 143, 70, 0.22);
  border-color: var(--accent);
}

.factory-command-box pre {
  min-height: 68px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  color: #f2f5ed;
  background: #121a13;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.factory-command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.factory-command-actions .scenario-run {
  grid-area: auto;
}

.factory-command-actions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

/* === Software Factory === */
.factory-team-panel {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.factory-template-sidebar,
.factory-template-detail {
  min-width: 0;
}

.factory-template-intro,
.factory-template-card,
.factory-detail-head,
.factory-lanes,
.factory-rule-card,
.factory-task-input,
.factory-command-box {
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.factory-template-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 9px 10px;
}

.factory-template-intro span,
.factory-detail-head span,
.factory-staffing-code span,
.factory-subhead span,
.factory-rule-card span,
.factory-task-input span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.factory-template-intro strong {
  font-size: 12px;
  line-height: 1.25;
}

.factory-template-list {
  display: grid;
  gap: 7px;
}

.factory-template-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 82px;
  padding: 9px 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.factory-template-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.factory-template-card span {
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.factory-template-card strong {
  font-size: 13px;
}

.factory-template-card code,
.factory-staffing-code code,
.factory-lane-row code,
.factory-command-box pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.factory-template-card code {
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.35;
}

.factory-template-detail {
  display: grid;
  gap: 9px;
}

.factory-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 10px;
  padding: 10px;
}

.factory-detail-head h3 {
  margin: 3px 0 5px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: 0;
}

.factory-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.factory-staffing-code {
  display: grid;
  gap: 5px;
  align-content: start;
  min-width: 0;
}

.factory-staffing-code code {
  display: block;
  padding: 8px;
  overflow-wrap: anywhere;
  color: #f2f5ed;
  background: #182018;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.35;
}

.factory-lane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 9px;
}

.factory-lanes,
.factory-rule-card,
.factory-task-input,
.factory-command-box {
  padding: 10px;
}

.factory-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.factory-subhead strong {
  color: var(--brand);
  font-size: 11px;
}

.factory-lane-row {
  display: grid;
  grid-template-columns: 64px 118px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
}

.factory-lane-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  color: white;
  background: var(--brand);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.factory-lane-row code {
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 10px;
}

.factory-lane-row strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.factory-rule-card {
  display: grid;
  gap: 6px;
  align-content: start;
  background: #eef4ec;
  border-color: rgba(47, 143, 70, 0.18);
}

.factory-rule-card strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.factory-rule-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.factory-task-input {
  display: grid;
  gap: 6px;
}

.factory-task-input textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  line-height: 1.35;
}

.factory-task-input textarea:focus {
  outline: 2px solid rgba(47, 143, 70, 0.22);
  border-color: var(--accent);
}

.factory-command-box pre {
  min-height: 68px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  color: #f2f5ed;
  background: #121a13;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.factory-command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.factory-command-actions .scenario-run {
  grid-area: auto;
}

.factory-command-actions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 1280px) {
  body {
    min-width: 960px;
  }

  .shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .shell.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .terminal-resizer {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-tools {
    flex-wrap: wrap;
  }

  .health-grid {
    flex-wrap: wrap;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .section-columns {
    grid-template-columns: 1fr;
  }

  .offer-calculator {
    grid-template-columns: 1fr;
  }

  .offer-totals {
    grid-template-columns: 1fr;
  }

  .offer-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .factory-team-panel,
  .factory-detail-head,
  .factory-lane-grid {
    grid-template-columns: 1fr;
  }

  .factory-lane-row {
    grid-template-columns: 58px 110px minmax(0, 1fr);
  }

  .omc-mode-grid,
  .omc-options,
  .prompt-presets,
  .ipa-summary {
    grid-template-columns: 1fr;
  }

  .oa-monitor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fixture-browser {
    grid-template-columns: 150px 230px 290px minmax(300px, 1fr);
  }

  .fixture-preview {
    padding: 18px 16px;
  }

  .fixture-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oa-monitor-metric:nth-child(3n) {
    border-right: 0;
  }

  .terminal-panel {
    position: static;
    bottom: auto;
    top: auto;
    height: auto;
  }

  #terminalOutput {
    min-height: 260px;
    height: 34vh;
  }
}

@media (max-width: 960px) {
  body {
    min-width: 0;
  }
}

.perf-panel { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.perf-runs-table table.perf-table { width: 100%; border-collapse: collapse; }
.perf-runs-table th, .perf-runs-table td { padding: 6px 10px; border-bottom: 1px solid var(--border, #2b2b32); text-align: left; }
.perf-runs-table small { display: block; opacity: 0.6; font-size: 11px; }
.perf-empty { opacity: 0.6; font-style: italic; }
.perf-meta { opacity: 0.75; font-size: 13px; }
.perf-meta-status { opacity: 0.6; font-size: 12px; margin-top: 2px; }
.perf-metric-group { margin-top: 12px; }
.perf-metric-group h4 { margin: 0 0 4px; }
.perf-sample-list { list-style: none; padding-left: 0; max-height: 220px; overflow-y: auto; }
.perf-sample-list li { padding: 2px 0; border-bottom: 1px dashed rgba(255,255,255,0.05); font-size: 12px; }
.perf-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.perf-filters label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; opacity: 0.8; }
.perf-filters input, .perf-filters select { background: rgba(255,255,255,0.04); border: 1px solid var(--border, #2b2b32); color: inherit; padding: 4px 6px; border-radius: 4px; }
.perf-label-input { background: transparent; border: none; border-bottom: 1px dashed rgba(255,255,255,0.2); color: inherit; font-size: 1.1em; width: 100%; padding: 2px 0; }
.perf-notes-input { width: 100%; min-height: 80px; margin-top: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border, #2b2b32); color: inherit; padding: 6px; border-radius: 4px; resize: vertical; }
.perf-settings { background: rgba(255,255,255,0.03); padding: 8px 12px; border-radius: 6px; }
.perf-settings summary { cursor: pointer; user-select: none; }
.perf-settings-body { margin-top: 8px; font-size: 13px; line-height: 1.5; }
.perf-settings-body code { background: rgba(255,255,255,0.06); padding: 1px 4px; border-radius: 3px; }
.perf-compare { background: rgba(255,255,255,0.03); padding: 12px; border-radius: 6px; }
.perf-compare tr.perf-better td { color: #7fc97f; }
.perf-compare tr.perf-worse td { color: #f08080; }
.perf-compare tr.perf-neutral td { opacity: 0.85; }
.perf-chart { display: block; width: 100%; max-width: 360px; height: 80px; color: #7df; }

.lead-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 26, 16, 0.32);
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 90;
}

.lead-drawer-backdrop.is-open {
  opacity: 1;
}

.lead-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 92vw);
  display: flex;
  flex-direction: column;
  background: white;
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 32px rgba(30, 26, 16, 0.18);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 100;
}

.lead-drawer.is-open {
  transform: translateX(0);
}

.lead-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.lead-drawer-head small {
  display: block;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.lead-drawer-head h3 {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
}

.lead-drawer-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.lead-drawer-close:hover {
  background: #f4f4f0;
}

.lead-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 24px;
}

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

.lead-drawer-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lead-drawer-fields label > span {
  color: var(--subtle);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.25px;
  text-transform: uppercase;
}

.lead-drawer-fields input,
.lead-drawer-fields select,
.lead-drawer-fields textarea {
  width: 100%;
  padding: 7px 8px;
  color: var(--ink);
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.lead-drawer-fields textarea {
  resize: vertical;
  min-height: 64px;
}

.lead-drawer-fields .lead-field-wide {
  grid-column: 1 / -1;
}

.lead-drawer-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  grid-column: 1 / -1;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .pipeline-board {
    grid-auto-columns: minmax(180px, 240px);
  }
  .pipeline-card-next {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 720px) {
  .lead-drawer {
    width: 100vw;
    border-left: none;
  }
  .lead-drawer-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .lead-drawer-fields .lead-field-wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contacts-table tr.is-flash td {
    animation: none;
    background: #eef7ec;
  }
}


/* Software-Factory ============================================= */
.sw-factory-overview {
  display: grid;
  gap: 18px;
}

.sw-factory-hero {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.sw-factory-hero h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sw-factory-hero ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

.sw-factory-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sw-factory-level {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 6px;
}
.sw-factory-level-num { font-size: 11px; color: var(--subtle); letter-spacing: 0.06em; text-transform: uppercase; }
.sw-factory-level strong { font-size: 16px; }
.sw-factory-level-tag {
  justify-self: start;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--muted);
  background: var(--line-soft);
  border-radius: 999px;
}
.sw-factory-level-tag.is-target { color: white; background: var(--brand); }
.sw-factory-level p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.sw-factory-pilots-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.sw-factory-pilot-card {
  text-align: left;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sw-factory-pilot-card:hover { border-color: var(--brand-light); box-shadow: var(--shadow); }
.sw-factory-pilot-kicker { font-size: 11px; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.06em; }
.sw-factory-pilot-card strong { font-size: 15px; }
.sw-factory-pilot-roi { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.sw-factory-status-pill {
  justify-self: start;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
}
.sw-factory-status-pill.is-idee { background: var(--amber-bg); color: var(--amber); }
.sw-factory-status-pill.is-one-shot { background: #e8f1e3; color: var(--brand); }
.sw-factory-status-pill.is-wiederholbar { background: #e8f1e3; color: var(--brand); }
.sw-factory-status-pill.is-skill,
.sw-factory-status-pill.is-script,
.sw-factory-status-pill.is-cron-kandidat { background: #dceadb; color: var(--brand); }
.sw-factory-status-pill.is-aktiv { background: var(--brand); color: white; }
.sw-factory-status-pill.is-verworfen { background: #f4dada; color: var(--danger); }

.sw-factory-snapshot {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sw-factory-snapshot h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sw-factory-snapshot dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.sw-factory-snapshot dt { color: var(--muted); }

.sw-factory-pilot { display: grid; gap: 14px; }
.sw-factory-pilot-header { display: flex; align-items: center; gap: 10px; }

.sw-factory-pilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .sw-factory-pilot-grid { grid-template-columns: 1fr; } }

.sw-factory-spec, .sw-factory-action {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sw-factory-spec h3, .sw-factory-action h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sw-factory-spec h4, .sw-factory-action h4 { margin: 12px 0 4px; font-size: 12px; color: var(--muted); }
.sw-factory-spec dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.sw-factory-spec dt { color: var(--muted); font-weight: 500; }
.sw-factory-spec dd { margin: 0; }
.sw-factory-spec ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }

.sw-factory-prompt-block {
  display: grid;
  gap: 6px;
}
.sw-factory-prompt-block pre {
  margin: 0;
  padding: 10px 12px;
  background: #0e1f0a;
  color: #d8f1c4;
  border-radius: 8px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.sw-factory-copy-btn { justify-self: start; }
.sw-factory-roi-jump { margin-top: 12px; }

.sw-factory-usable {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--line-soft);
  font-size: 11px;
}
.sw-factory-usable.is-ja { background: #dceadb; color: var(--brand); }
.sw-factory-usable.is-teilweise { background: var(--amber-bg); color: var(--amber); }
.sw-factory-usable.is-nein { background: #f4dada; color: var(--danger); }

.sw-factory-empty { color: var(--muted); font-style: italic; margin: 0; }

/* ROI Log ===================================================== */
.roi-log-panel { display: grid; gap: 14px; }

.roi-log-form {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.roi-log-form h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.roi-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}
.roi-form-row { display: grid; gap: 4px; }
.roi-form-row > span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.roi-form-row input, .roi-form-row select, .roi-form-row textarea {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font: inherit;
  color: var(--ink);
}
.roi-form-row-wide { grid-column: 1 / -1; }

.roi-radio-group { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 4px 0; }
.roi-radio-group label { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }

.roi-form-error {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #fdecea;
  color: var(--danger);
  border-radius: 6px;
  font-size: 12px;
}
.roi-form-actions { margin-top: 12px; }

.roi-log-table-wrap {
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
}
.roi-log-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.roi-log-table th, .roi-log-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.roi-log-table th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; background: var(--line-soft); }
.roi-log-table tr:last-child td { border-bottom: none; }
.roi-delete-btn { padding: 2px 8px; font-size: 14px; line-height: 1; }

/* E2E-Verlauf ===================================================== */
.e2e-history-panel { display: grid; gap: 14px; }

.e2e-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.e2e-history-heading { display: grid; gap: 2px; }
.e2e-history-heading strong { font-size: 13px; }
.e2e-history-heading span { font-size: 11px; color: var(--muted); }

.e2e-history-status {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--line-soft);
  color: var(--muted);
}
.e2e-history-status.is-error {
  background: #fdecea;
  color: var(--danger);
}

.e2e-history-list {
  display: grid;
  gap: 6px;
}

.e2e-history-empty {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-style: italic;
  font-size: 13px;
}

.e2e-history-run {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.e2e-history-run-summary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
}
.e2e-history-run-summary:hover { background: var(--line-soft); }

.e2e-history-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.e2e-history-dot.is-ok   { background: var(--mt-good); }
.e2e-history-dot.is-fail { background: var(--danger); }
.e2e-history-dot.is-warn { background: var(--amber); }

.e2e-history-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 140px;
}

.e2e-history-score {
  font-size: 13px;
  font-weight: 600;
  min-width: 48px;
}

.e2e-history-flow {
  font-size: 11px;
  color: var(--subtle);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.e2e-history-chevron {
  font-size: 9px;
  color: var(--subtle);
  margin-left: auto;
}

.e2e-history-detail {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
}

.e2e-history-detail-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.e2e-history-flow-section { display: grid; gap: 4px; }

.e2e-history-flow-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.e2e-history-flow-label.is-regression { color: var(--danger); }
.e2e-history-flow-label.is-failed     { color: var(--amber); }
.e2e-history-flow-label.is-fixed      { color: var(--mt-good); }
.e2e-history-flow-label.is-new        { color: var(--brand); }

.e2e-history-detail-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.e2e-history-flow-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 2px;
}
.e2e-history-flow-list li { font-size: 12px; }
.e2e-history-flow-label.is-regression ~ .e2e-history-flow-list li { color: var(--danger); }

.e2e-history-run-count {
  font-size: 11px;
  color: var(--muted);
  background: var(--line-soft);
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.e2e-history-run-count:empty { display: none; }

.e2e-history-flows-table {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  list-style: none;
}

.e2e-history-flow-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 12px;
  list-style: none;
}
.e2e-history-flow-item.is-passed { color: var(--ink); }
.e2e-history-flow-item.is-failed { color: var(--danger); }

.e2e-history-flow-marker {
  flex: 0 0 auto;
  font-size: 11px;
  width: 12px;
  text-align: center;
}
.e2e-history-flow-item.is-passed .e2e-history-flow-marker { color: var(--mt-good); }
.e2e-history-flow-item.is-failed .e2e-history-flow-marker { color: var(--danger); }

.e2e-history-flow-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.e2e-history-flow-attempts {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
}

.e2e-history-dashboard-footer {
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}

.e2e-history-dashboard-link {
  font-size: 12px;
  color: var(--brand);
  text-decoration: none;
}
.e2e-history-dashboard-link:hover { text-decoration: underline; }

/* Software-Factory V1.1 — Chat Sessions =========================== */
.sw-factory-session-header {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.sw-factory-session-header-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.sw-factory-run-status {
  font-size: 12px;
  color: var(--muted);
}
.sw-factory-run-status--idle { font-style: italic; }
.sw-factory-cwd-warning {
  padding: 6px 10px;
  background: var(--amber-bg);
  color: var(--amber);
  border-radius: 6px;
  font-size: 12px;
}
.sw-factory-session-selectors,
.sw-factory-cwd-row,
.sw-factory-session-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.sw-factory-session-selectors label,
.sw-factory-cwd-row label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.sw-factory-session-selectors select,
.sw-factory-cwd-row input {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font: inherit;
}
.sw-factory-cwd-row input { min-width: 320px; flex: 1; }

.sw-factory-chat-wrap {
  display: grid;
  gap: 10px;
}
.sw-factory-chat-stream {
  max-height: 540px;
  overflow-y: auto;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
}
.sw-factory-chat-composer {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sw-factory-chat-composer.is-dragging {
  border-color: var(--brand);
  background: #f0f8ec;
}
.sw-factory-chat-dropzone textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font: inherit;
  resize: vertical;
}
.sw-factory-chat-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sw-factory-chat-file-chip {
  padding: 2px 8px;
  background: var(--line-soft);
  border-radius: 999px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sw-factory-chat-file-chip button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
}
.sw-factory-chat-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.sw-factory-chat-error {
  padding: 6px 10px;
  background: #fdecea;
  color: var(--danger);
  border-radius: 6px;
  font-size: 12px;
}

.sw-factory-past-runs {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sw-factory-past-runs h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.sw-factory-past-runs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sw-factory-past-runs-table th,
.sw-factory-past-runs-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.sw-factory-past-runs-table th { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }

.sw-factory-close-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 31, 26, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.sw-factory-close-modal {
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
  width: min(680px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.sw-factory-close-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.sw-factory-close-modal header h3 { margin: 0; font-size: 16px; }

/* ─── Weghindernis-Builder panel ──────────────────────────────────────── */
#section-weghindernis-builder,
#section-weghindernis-presets {
  padding: 14px;
}

#section-weghindernis-builder .section-heading,
#section-weghindernis-presets .section-heading {
  display: grid;
  justify-content: start;
  gap: 4px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom-color: var(--line);
}

#section-weghindernis-builder .section-heading span,
#section-weghindernis-presets .section-heading span {
  color: #4d554d;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

#section-weghindernis-builder .section-heading h2,
#section-weghindernis-presets .section-heading h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.22;
  font-weight: 800;
}

.builder-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding-bottom: 0;
  color: var(--ink);
  font-size: 18px;
}

/* Toolbar: target segmented control + hint */
.builder-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px;
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.builder-target {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  border: 1px solid #cfd3c7;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.builder-target button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  color: #3f493f;
  background: white;
  border: 0;
  border-right: 1px solid #cfd3c7;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}

.builder-target button:last-child {
  border-right: 0;
}

.builder-target button[aria-pressed="true"] {
  color: white;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.builder-target button:not([aria-pressed="true"]):hover {
  background: #f2f4ef;
  color: var(--ink);
}

.builder-target-hint {
  min-width: 0;
  color: #4d554d;
  font-size: 16px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.builder-target-hint.is-production {
  color: #8a4d12;
  padding: 9px 12px;
  background: var(--amber-bg);
  border: 1px solid #e8c999;
  border-radius: 8px;
}

/* Inline message (mirrors .fixture-message) */
.builder-message {
  min-height: 48px;
  padding: 12px 14px;
  color: #235f31;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  background: #f2faf0;
  border: 1px solid #cce7c6;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

/* Cards */
.builder-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.builder-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.builder-card-head > span {
  color: #4d554d;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.builder-card-head > small {
  min-width: 0;
  overflow: hidden;
  color: #4d554d;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Category grid — builder uses .fixture-category-chip from the existing rules;
   only the grid layout is redefined here so column count can differ if needed. */
.builder-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.builder-category-grid .fixture-category-chip {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border-color: #cfd3c7;
  border-radius: 8px;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.builder-category-grid .fixture-category-chip[data-selected="true"] {
  color: #173b1b;
  background: #edf8ed;
  border-color: #a6d39e;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 70, 0.14);
}

.builder-category-grid .fixture-category-chip:hover {
  border-color: rgba(47, 143, 70, 0.45);
}

.builder-category-grid .fixture-category-chip input {
  width: 20px;
  height: 20px;
}

.builder-category-grid .fixture-category-chip span {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

/* Note textarea */
.builder-note {
  width: 100%;
  min-height: 116px;
  padding: 13px 14px;
  color: var(--ink);
  background: white;
  border: 1px solid #cfd3c7;
  border-radius: 8px;
  font: inherit;
  font-size: 18px;
  line-height: 1.5;
  resize: vertical;
}

.builder-note:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

/* Station search + list */
.builder-station-search {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid #cfd3c7;
  border-radius: 8px;
  font: inherit;
  font-size: 18px;
}

.builder-station-search:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.builder-station-list {
  display: grid;
  gap: 0;
  max-height: 284px;
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: white;
}

.builder-station-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.builder-station-list button:last-child {
  border-bottom: 0;
}

.builder-station-list button:hover {
  background: #edf4eb;
}

.builder-station-list button[aria-pressed="true"] {
  color: white;
  background: var(--accent);
}

.builder-station-list button small {
  color: #4d554d;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.builder-station-list button[aria-pressed="true"] small {
  color: rgba(255, 255, 255, 0.82);
}

.builder-station-empty {
  min-height: 52px;
  padding: 14px;
  color: #4d554d;
  font-size: 16px;
  font-weight: 700;
}

/* Map card + Leaflet container */
.builder-map-card {
  /* inherits .builder-card grid */
}

.builder-map {
  height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e8ede4;
}

/* Geometry mode toggle (segmented, mirrors .builder-target) */
.builder-geo-toggle {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid #cfd3c7;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.builder-geo-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  color: #3f493f;
  background: white;
  border: 0;
  border-right: 1px solid #cfd3c7;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}

.builder-geo-toggle button:last-child {
  border-right: 0;
}

.builder-geo-toggle button[aria-pressed="true"] {
  color: white;
  background: var(--accent);
}

.builder-geo-toggle button:not([aria-pressed="true"]):hover {
  background: #f2f4ef;
  color: var(--ink);
}

/* Map action row */
.builder-map-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.builder-map-actions button {
  min-height: 48px;
  padding: 0 14px;
  color: #3f493f;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.builder-map-actions button:hover {
  background: #f2f4ef;
  color: var(--ink);
}

.builder-map-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.builder-geo-info {
  flex: 1 1 auto;
  min-width: 280px;
  color: #4d554d;
  font-size: 16px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Image browser — .fixture-browser is already styled; only minor overrides needed */
.builder-image-browser {
  grid-template-columns: minmax(140px, 0.38fr) minmax(230px, 0.62fr) minmax(280px, 0.72fr) minmax(340px, 1.05fr);
  height: 520px;
  min-height: 430px;
}

.builder-image-browser .fixture-root-item,
.builder-image-browser .fixture-folder-row,
.builder-image-browser .fixture-image-pick {
  min-height: 48px;
  border-radius: 8px;
}

.builder-image-browser .fixture-row-main strong,
.builder-image-browser .fixture-row-main small,
.builder-image-browser .fixture-preview-meta > span {
  font-size: 16px;
}

.builder-image-browser .fixture-image-row {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 52px;
}

.builder-image-browser .fixture-image-row input {
  width: 20px;
  height: 20px;
}

.builder-image-browser .fixture-image-pick {
  grid-template-columns: 42px minmax(0, 1fr);
}

.builder-image-browser .fixture-image-pick img {
  width: 36px;
  height: 36px;
}

.builder-image-browser .fixture-preview {
  padding: 20px;
}

.builder-image-browser .fixture-preview-meta h3 {
  font-size: 18px;
  line-height: 1.3;
}

/* Presets row */
.builder-preset-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.builder-preset-row select {
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #cfd3c7;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
}

.builder-preset-row input[type="text"] {
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #cfd3c7;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
}

.builder-preset-row button {
  min-height: 48px;
  padding: 0 14px;
  color: #3f493f;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.builder-preset-row button:hover {
  background: #f2f4ef;
  color: var(--ink);
}

.builder-preset-row button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

/* Submit summary */
.builder-actionbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(28, 31, 26, 0.06);
}

.builder-actionbar-summary {
  display: flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.builder-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  max-width: 240px;
  padding: 6px 10px;
  color: #263026;
  background: #f4f6f0;
  border: 1px solid #d9ddcf;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1.15;
}

.builder-summary-chip strong {
  color: #4d554d;
  font-size: 16px;
  font-weight: 800;
}

.builder-summary-chip span {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-confirm {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  min-height: 48px;
  color: #8a4d12;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.builder-confirm[hidden] {
  display: none !important;
}

.builder-confirm input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--amber);
  cursor: pointer;
}

/* .builder-send reuses .scenario-run; only layout overrides needed */
.builder-send {
  flex: 0 0 auto;
  min-height: 48px;
  min-width: 164px;
  padding: 0 18px;
  font-size: 16px;
}

.builder-send:disabled {
  color: #4d554d;
  background: #dfe8dc;
  border-color: #c9d8c5;
  opacity: 1;
}

/* Send result (mirrors .fixture-result) */
.builder-result {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  background: #f6faf4;
  border: 1px solid #dbe9d5;
  border-radius: 8px;
  font-size: 16px;
}

.builder-result pre {
  flex: 1 0 100%;
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
}

/* Preset sender tab */
.preset-sender-panel {
  display: grid;
  gap: 14px;
  color: var(--ink);
  font-size: 18px;
}

.preset-sender-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  grid-template-columns: none;
}

.preset-sender-toolbar .builder-target-hint {
  flex: 1 1 360px;
  min-width: 220px;
  max-width: 100%;
}

.preset-refresh,
.preset-next {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  height: auto;
  padding: 0 14px;
  font-size: 16px;
}

.preset-production-confirm {
  justify-self: end;
  padding: 0 14px;
  background: var(--amber-bg);
  border: 1px solid #e8c999;
  border-radius: 8px;
}

.preset-test-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.preset-test-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: #f8faf5;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.preset-test-summary strong {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
}

.preset-test-summary span {
  color: #4d554d;
  font-size: 16px;
  font-weight: 700;
}

.preset-test-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-test-filters button {
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.preset-test-filters button[aria-pressed="true"] {
  color: #163a1a;
  background: #eef8eb;
  border-color: #9bcf92;
}

.preset-batch-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  color: var(--ink);
  background: #f8faf5;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.preset-batch-panel[data-batch-running="true"] {
  background: #fffdf4;
  border-color: #dcc488;
}

.preset-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.preset-batch-actions .ghost,
.preset-batch-actions .scenario-run {
  min-height: 48px;
  height: auto;
  padding: 0 14px;
  font-size: 16px;
}

.preset-batch-actions .is-danger {
  color: #7c2f22;
  background: #fff0ed;
  border-color: #dea69d;
}

.preset-batch-status {
  display: grid;
  gap: 8px;
}

.preset-batch-bar {
  height: 10px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.preset-batch-bar span {
  display: block;
  height: 100%;
  background: #4f8f3c;
  border-radius: inherit;
  transition: width 180ms ease;
}

.preset-batch-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  color: #4d554d;
  font-size: 16px;
  font-weight: 700;
}

.preset-batch-copy strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.preset-test-list {
  display: grid;
  gap: 14px;
  contain: layout style;
}

.preset-test-row {
  display: grid;
  grid-template-columns: 48px minmax(280px, 1fr) 88px minmax(260px, 0.9fr) minmax(180px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 16px 18px;
  color: var(--ink);
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(28, 31, 26, 0.03);
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

.preset-test-row.is-blocked {
  border-color: #e7c8a2;
  background: #fffaf1;
}

.preset-test-row[data-run-tone="match"] {
  border-color: var(--line);
}

.preset-test-row[data-run-tone="mismatch"] {
  border-color: #d9958b;
  background: #fff8f6;
}

.preset-test-row[data-run-tone="waiting"] {
  border-color: #dcc488;
  background: #fffdf4;
}

.preset-test-row[data-run-tone="failed"] {
  border-color: #d4a19a;
  background: #fff6f3;
}

.preset-test-row.is-batch-current {
  outline: 3px solid #7eb56f;
  outline-offset: 2px;
}

.preset-test-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  background: #f6f5f0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.preset-test-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.preset-test-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.preset-test-title h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 650;
}

.preset-test-category {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.preset-field-label {
  margin-bottom: -2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preset-expect {
  flex: 0 0 auto;
  min-height: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.preset-expect.is-positive {
  color: #1c6b2e;
  background: #edf8ed;
  border: 1px solid #b9ddb0;
}

.preset-expect.is-negative {
  color: #7c2f22;
  background: #fff1ed;
  border: 1px solid #e3afa7;
}

.preset-expect.is-unknown {
  color: #4d554d;
  background: #f4f1e8;
  border: 1px solid #d8d0bf;
}

.preset-test-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.preset-test-meta span {
  display: inline-flex;
  align-items: baseline;
}

.preset-test-meta span:not(:last-child)::after {
  content: "·";
  margin: 0 8px;
  color: var(--line);
}

.preset-test-main p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.preset-test-result p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.preset-test-thumb {
  width: 88px;
  height: 66px;
  overflow: hidden;
  background: #f8faf5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preset-test-thumb img,
.preset-test-thumb .preset-image-missing,
.preset-test-thumb .preset-image-empty {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.preset-test-result {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.preset-result-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.preset-pill-icon {
  font-size: 11px;
  line-height: 1;
}

.preset-pill[data-tone="positive"] {
  color: #1c6b2e;
  background: #edf8ed;
  border: 1px solid #b9ddb0;
}

.preset-pill[data-tone="negative"] {
  color: #7c2f22;
  background: #fff0ed;
  border: 1px solid #dea69d;
}

.preset-pill[data-tone="review"] {
  color: #68410e;
  background: var(--amber-bg);
  border: 1px solid #e4c28e;
}

.preset-pill[data-tone="unknown"] {
  color: var(--muted);
  background: #f4f3ee;
  border: 1px solid var(--line-soft);
}

.preset-result-badge {
  min-height: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.preset-result-badge[data-run-tone="match"] {
  color: var(--muted);
  background: #f4f3ee;
  border: 1px solid var(--line-soft);
}

.preset-result-badge[data-run-tone="mismatch"] {
  color: #7c2f22;
  background: #fff0ed;
  border: 1px solid #dea69d;
}

.preset-result-badge[data-run-tone="waiting"] {
  color: #68410e;
  background: var(--amber-bg);
  border: 1px solid #e4c28e;
}

.preset-result-badge[data-run-tone="failed"] {
  color: #7c2f22;
  background: #fff0ed;
  border: 1px solid #dea69d;
}

.preset-result-badge[data-run-tone="untested"],
.preset-result-badge[data-run-tone="unknown"] {
  color: #4d554d;
  background: #f4f1e8;
  border: 1px solid #d8d0bf;
}

.preset-result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.preset-result-meta span:not(.preset-pill):not(:last-child)::after {
  content: "·";
  margin: 0 8px;
  color: var(--line);
}

.preset-run-history {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.preset-run-history span {
  min-height: 0;
  padding: 2px 6px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
}

.preset-run-history span[data-run-tone="match"] {
  color: var(--muted);
  background: transparent;
  border-color: var(--line-soft);
}

.preset-run-history span[data-run-tone="mismatch"],
.preset-run-history span[data-run-tone="failed"] {
  color: #7c2f22;
  background: #fff0ed;
  border-color: #dea69d;
}

.preset-run-history span[data-run-tone="waiting"] {
  color: #68410e;
  background: var(--amber-bg);
  border-color: #e4c28e;
}

.preset-test-actions {
  justify-content: flex-end;
}

.preset-test-actions .ghost,
.preset-test-actions .scenario-run {
  min-width: 0;
  white-space: nowrap;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.preset-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  color: var(--ink);
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(28, 31, 26, 0.05);
}

.preset-card.is-blocked {
  border-color: #e7c8a2;
  background: #fffaf1;
}

.preset-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preset-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.preset-card-head span:first-child {
  color: #4d554d;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.preset-card-head h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

.preset-status {
  flex: 0 0 auto;
  max-width: 210px;
  min-height: 34px;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-status.is-ready {
  color: #173b1b;
  background: #edf8ed;
  border: 1px solid #b9ddb0;
}

.preset-status.is-blocked {
  color: #8a4d12;
  background: var(--amber-bg);
  border: 1px solid #e8c999;
}

.preset-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin: 0;
}

.preset-meta > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: #f8faf5;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.preset-meta dt {
  color: #4d554d;
  font-size: 16px;
  font-weight: 800;
}

.preset-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.preset-note {
  margin: 0;
  padding: 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.preset-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 70px;
  align-items: center;
}

.preset-images img,
.preset-image-missing,
.preset-image-empty {
  width: 92px;
  height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.preset-images img {
  display: block;
  object-fit: cover;
}

.preset-image-missing,
.preset-image-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  color: #4d554d;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.preset-image-empty {
  width: auto;
  min-width: 128px;
  background: #f8faf5;
}

.preset-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-card-actions .ghost,
.preset-card-actions .scenario-run {
  min-height: 48px;
  height: auto;
  padding: 0 14px;
  font-size: 16px;
}

.preset-send {
  min-width: 174px;
}

.preset-empty {
  gap: 10px;
  padding: 18px;
  font-size: 18px;
}

.preset-empty .ghost {
  justify-self: start;
  min-height: 48px;
  height: auto;
  font-size: 16px;
}

.preset-sender-result small {
  color: #4d554d;
  font-size: 16px;
  font-weight: 700;
}

/* Leaflet attribution size inside the builder map */
.builder-map .leaflet-control-attribution {
  font-size: 12px;
}

@media (min-width: 1480px) {
  .builder-panel {
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  }

  .builder-toolbar,
  .builder-message,
  .builder-card--map,
  .builder-card--images,
  .builder-card--presets,
  .builder-actionbar,
  .builder-result {
    grid-column: 1 / -1;
  }

  .builder-card--categories,
  .builder-card--note {
    grid-column: 1;
  }

  .builder-card--station {
    grid-column: 2;
    grid-row: span 2;
  }
}

@media (max-width: 1479px) {
  .builder-toolbar,
  .preset-sender-toolbar,
  .builder-preset-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .builder-target,
  .builder-geo-toggle {
    justify-self: start;
  }

  .builder-image-browser {
    grid-template-columns: 150px minmax(230px, 0.8fr) minmax(300px, 1fr);
    overflow-x: auto;
  }

  .builder-image-browser .fixture-column.root {
    display: none;
  }

  .preset-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .preset-test-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preset-test-row {
    grid-template-columns: 48px minmax(0, 1fr) 88px;
    contain-intrinsic-size: auto 320px;
  }

  .preset-test-result,
  .preset-test-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .preset-sender-toolbar .builder-target-hint {
    flex: 1 1 100%;
    white-space: normal;
  }

  .preset-refresh,
  .preset-next {
    flex: 1 1 150px;
  }

  .preset-test-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preset-test-row {
    grid-template-columns: 48px minmax(0, 1fr);
    contain-intrinsic-size: auto 430px;
  }

  .preset-test-thumb {
    grid-column: 1 / -1;
    width: 100%;
    height: 160px;
  }

  .preset-test-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .preset-test-actions {
    justify-content: stretch;
  }

  .preset-test-actions .ghost,
  .preset-test-actions .scenario-run {
    flex: 1 1 180px;
  }
}

/* === Claude Cleanroom: lokale Agent-Anpassungen === */
.claude-custom-panel {
  display: grid;
  gap: 10px;
  color: #1b211d;
  font-size: 16px;
  line-height: 1.4;
}

.claude-custom-toolbar,
.claude-custom-note,
.claude-custom-group,
.claude-custom-empty,
.claude-custom-excluded {
  background: #fff;
  border: 1px solid #d7ddd5;
  border-radius: 8px;
}

.claude-custom-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0 10px;
  background:
    linear-gradient(90deg, rgba(47, 143, 70, 0.08), transparent 38%),
    transparent;
  border: 0;
  border-bottom: 1px solid #cdd8ca;
  border-radius: 0;
}

.claude-custom-toolbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 128px;
  height: 2px;
  background: linear-gradient(90deg, #2f8f46, rgba(47, 143, 70, 0));
  border-radius: 999px;
}

.claude-custom-toolbar > div,
.claude-custom-group header > div,
.claude-custom-main,
.claude-custom-excluded-row {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.claude-custom-toolbar span,
.claude-custom-group header span,
.claude-custom-summary-tile span,
.claude-custom-excluded-row span {
  color: #35443b;
  font-size: 13px;
  font-weight: 700;
}

.claude-custom-toolbar strong {
  color: #111713;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.claude-custom-toolbar code,
.claude-custom-path,
.claude-custom-excluded-row code {
  min-width: 0;
  overflow: hidden;
  color: #18221c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-custom-toolbar .ghost,
.claude-custom-action .ghost,
.claude-custom-action .scenario-run {
  min-height: 48px;
  height: auto;
  padding: 0 11px;
  font-size: 13px;
}

.claude-custom-summary {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.claude-custom-summary-tile {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  padding: 5px 9px;
  background: #ffffff;
  border: 1px solid #d9dfd7;
  border-radius: 7px;
}

.claude-custom-summary-tile strong {
  color: #0f1712;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.claude-custom-summary-tile[data-status="active"] {
  border-color: #9fc9a5;
  background: #f4fbf4;
}

.claude-custom-summary-tile[data-status="moved"] {
  border-color: #ceb989;
  background: #fff8e7;
}

.claude-custom-summary-tile[data-status="conflict"] {
  border-color: #d6a09b;
  background: #fff2f0;
}

.claude-custom-message {
  min-height: 38px;
  padding: 8px 10px;
  color: #172019;
  background: #f5f7f2;
  border: 1px solid #d5ded1;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

.claude-custom-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 0 2px 2px;
  color: #27342c;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14px;
}

.claude-custom-note strong {
  flex: 0 0 auto;
  color: #111713;
  font-weight: 850;
}

.claude-custom-group {
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(29, 42, 30, 0.045);
}

.claude-custom-group::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #2f8f46, rgba(47, 143, 70, 0.16));
}

.claude-custom-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 15px;
  background:
    linear-gradient(90deg, #f4f8f0 0%, #fffefb 62%),
    #f7f8f3;
  border-bottom: 1px solid #dce1d8;
}

.claude-custom-group header strong {
  color: #111713;
  font-size: 16px;
  font-weight: 850;
}

.claude-custom-group header small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: #26332a;
  background: #fff;
  border: 1px solid #d4ddcf;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.claude-custom-list {
  display: grid;
}

.claude-custom-row {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(128px, auto);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 8px 12px 8px 15px;
  border-top: 1px solid #e6e9e2;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.claude-custom-row::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  background: #aab8a6;
  border-radius: 0 999px 999px 0;
}

.claude-custom-row:hover {
  background: #fbfcf8;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 70, 0.08);
}

.claude-custom-row:first-child {
  border-top: 0;
}

.claude-custom-row[data-status="moved"] {
  background: #fffaf0;
}

.claude-custom-row[data-status="active"]::before {
  background: #2f8f46;
}

.claude-custom-row[data-status="moved"]::before {
  background: #c4912e;
}

.claude-custom-row[data-status="conflict"] {
  background: #fff5f3;
}

.claude-custom-row[data-status="conflict"]::before {
  background: #b42318;
}

.claude-custom-row[data-status="missing"]::before {
  background: #aab8a6;
}

.claude-custom-title {
  min-width: 0;
}

.claude-custom-title strong {
  color: #101713;
  font-size: 15px;
  font-weight: 850;
}

.claude-custom-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: #122018;
  background: #e8eee6;
  border: 1px solid #cbd6c8;
  font-size: 12px;
  font-weight: 850;
  justify-self: start;
}

.claude-custom-status[data-status="active"] {
  background: #e6f5e6;
  border-color: #9fc9a5;
}

.claude-custom-status[data-status="moved"] {
  background: #fff1c9;
  border-color: #cfb166;
}

.claude-custom-status[data-status="conflict"] {
  background: #ffe1dc;
  border-color: #c78379;
}

.claude-custom-status[data-status="missing"] {
  background: #eef1ed;
  border-color: #cfd7ce;
}

.claude-custom-main p {
  margin: 0;
  color: #27342c;
  font-size: 14px;
  font-weight: 500;
}

.claude-custom-path.backup {
  color: #6a4215;
}

.claude-custom-meta,
.claude-custom-examples {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.claude-custom-meta span,
.claude-custom-examples span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  color: #243129;
  background: #f2f4ef;
  border: 1px solid #dde3d8;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.claude-custom-examples span {
  background: #fff;
}

.claude-custom-action {
  display: flex;
  justify-content: flex-end;
}

.claude-custom-action .ghost,
.claude-custom-action .scenario-run {
  min-width: 112px;
}

.claude-custom-empty {
  display: grid;
  gap: 3px;
  min-height: 82px;
  place-content: center;
  padding: 16px;
  text-align: center;
}

.claude-custom-empty strong {
  font-size: 16px;
  font-weight: 850;
}

.claude-custom-empty span {
  color: #27342c;
  font-size: 14px;
  font-weight: 600;
}

.claude-custom-excluded {
  padding: 0;
}

.claude-custom-excluded summary {
  min-height: 42px;
  padding: 10px 12px;
  color: #172019;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.claude-custom-related summary {
  color: #26332a;
  background: #fbfcf8;
}

.claude-custom-excluded > div {
  display: grid;
  border-top: 1px solid #e1e5de;
}

.claude-custom-excluded-row {
  padding: 9px 12px;
  border-top: 1px solid #edf0ea;
}

.claude-custom-excluded-row:first-child {
  border-top: 0;
}

.claude-custom-excluded-row strong {
  color: #111713;
  font-size: 14px;
  font-weight: 850;
}

@media (max-width: 1180px) {
  .claude-custom-toolbar,
  .claude-custom-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .claude-custom-row {
    gap: 7px;
  }

  .claude-custom-action {
    justify-content: stretch;
  }

  .claude-custom-action .ghost,
  .claude-custom-action .scenario-run {
    width: 100%;
  }
}

/* === Support-Themen ======================================================= */
.support-themes-panel {
  display: grid;
  gap: 18px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

/* === Hero === */
.support-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: 22px 26px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(89, 157, 57, 0.16), transparent 60%),
    linear-gradient(135deg, #1f4f25, #163d1c 55%, #102d14);
  border: 1px solid rgba(16, 45, 20, 0.55);
  border-radius: 16px;
  color: #f3f7ec;
  box-shadow: var(--shadow);
}

.support-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}

.support-hero-main {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.support-hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d6efbf;
  background: rgba(120, 200, 110, 0.16);
  border: 1px solid rgba(120, 200, 110, 0.32);
  border-radius: 999px;
}

.support-hero-main h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.support-hero-main p {
  margin: 0;
  font-size: 15.5px;
  font-weight: 500;
  color: rgba(243, 247, 236, 0.82);
}

.support-hero-main p strong {
  color: #ffffff;
  font-weight: 800;
}

.support-hero-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  align-content: center;
  min-width: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.support-hero-meta li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  backdrop-filter: blur(2px);
}

.support-hero-meta .meta-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(214, 239, 191, 0.85);
}

.support-hero-meta .meta-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* === Cards === */
.support-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 14px;
}

.support-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(28, 31, 26, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.support-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 143, 70, 0.4);
  box-shadow: var(--shadow);
}

.support-card-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 10px 18px;
  color: #ffffff;
  background: linear-gradient(160deg, var(--brand-light), var(--brand) 70%);
}

.support-card--medal.medal-1 .support-card-rail {
  background: linear-gradient(160deg, #f6c453, #d99412);
}

.support-card--medal.medal-2 .support-card-rail {
  background: linear-gradient(160deg, #cdd4dc, #9aa5b1);
}

.support-card--medal.medal-3 .support-card-rail {
  background: linear-gradient(160deg, #e0a373, #b9722f);
}

.support-card-rank {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
}

.support-card-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.95);
}

.support-card-count small {
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.support-card-body {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 15px 17px 18px;
}

.support-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.support-card-head h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.support-card-signal {
  flex: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 999px;
}

.support-card[data-heat="hot"] .support-card-signal {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.24);
}

.support-card[data-heat="warm"] .support-card-signal {
  color: #92580a;
  background: rgba(201, 122, 44, 0.13);
  border: 1px solid rgba(201, 122, 44, 0.26);
}

.support-card[data-heat="cool"] .support-card-signal {
  color: #1f5a2c;
  background: rgba(47, 143, 70, 0.12);
  border: 1px solid rgba(47, 143, 70, 0.24);
}

.support-card-focus {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: #3a423b;
}

.support-card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.support-card-keywords span {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #2c3a30;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.support-card-heat {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--line-soft);
}

.support-card-heat span {
  display: block;
  height: 100%;
}

.support-card[data-heat="hot"] .support-card-heat span {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.support-card[data-heat="warm"] .support-card-heat span {
  background: linear-gradient(90deg, #d8a13a, #c97a2c);
}

.support-card[data-heat="cool"] .support-card-heat span {
  background: linear-gradient(90deg, var(--brand-light), var(--brand));
}

@media (max-width: 1180px) {
  .support-hero {
    flex-direction: column;
    gap: 18px;
  }

  .support-hero-meta {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    min-width: 0;
  }

  .support-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .support-card {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .support-card-rank {
    font-size: 22px;
  }

  .support-card-head {
    flex-direction: column;
    gap: 6px;
  }
}

/* === Online-Board (eingebettete geschützte Web-Version) === */
.task-section.online-board-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  min-height: calc(100vh - 76px);
  padding: 6px;
}

.online-board-section .section-heading {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 0;
  padding: 0 4px 6px;
}

.online-board-section .section-heading span {
  color: #26352b;
  font-size: 16px;
  letter-spacing: 0;
}

.online-board-section .section-heading h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  margin-right: auto;
}

.online-board-panel {
  display: grid;
  width: 100%;
  min-height: 0;
}

.online-board-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.online-board-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.online-board-refresh,
.online-board-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
}

.online-board-refresh {
  border: 1px solid #cfd7ce;
  background: #fff;
  color: var(--ink);
}

.online-board-refresh:hover,
.online-board-refresh:focus-visible {
  border-color: var(--accent);
}

.online-board-open {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.online-board-open:hover,
.online-board-open:focus-visible {
  background: var(--brand);
  border-color: var(--brand);
}

.online-board-frame-wrap {
  min-height: 0;
  background: #eef2ed;
}

.online-board-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.online-board-webview {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.online-board-panel--electron .online-board-frame {
  display: none;
}

.online-board-panel--electron .online-board-webview {
  display: flex;
}

@media (max-width: 760px) {
  .task-section.online-board-section {
    min-height: calc(100vh - 64px);
  }

  .online-board-actions {
    align-items: stretch;
  }

  .online-board-refresh,
  .online-board-open {
    flex: 1 1 170px;
  }
}

.perf-section-head,
.perf-recorder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.perf-section-head h3,
.perf-recorder-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.perf-section-head span,
.perf-recorder-head p,
.perf-recorder-status span {
  color: var(--muted);
}

.perf-recorder {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.09), rgba(255,255,255,0.025));
  box-shadow: 0 12px 32px rgba(10, 22, 30, 0.08);
}

.perf-recorder-head small {
  display: block;
  margin-bottom: 4px;
  color: var(--accent, #0891b2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.perf-recorder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(100%, 280px);
}

.perf-prepare-button {
  min-height: 48px;
  font-weight: 800;
  white-space: nowrap;
}

.perf-record-button,
.perf-runtime-record-button {
  min-width: 128px;
  min-height: 48px;
  font-weight: 800;
}

.perf-runtime-record-button {
  border-color: rgba(8, 145, 178, 0.32);
  background: rgba(8, 145, 178, 0.08);
  color: #075f75;
}

.perf-recorder-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(110px, 0.6fr) minmax(130px, 0.7fr) minmax(190px, 1fr);
  gap: 10px;
  align-items: end;
}

.perf-recorder-grid label,
.perf-recorder-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.perf-recorder-label {
  grid-column: 1 / -1;
}

.perf-recorder-grid select,
.perf-recorder-grid input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.72);
  color: var(--ink);
  font: inherit;
}

.perf-selected-path {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.perf-prepare-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perf-prepare-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgba(8, 145, 178, 0.2);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.1);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.perf-prepare-chips strong {
  color: #075f75;
  font-weight: 900;
}

.perf-recorder-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.45);
}

.perf-recorder-status strong {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #075f75;
  font-size: 12px;
  font-weight: 800;
}

.perf-recorder-status.is-active strong {
  background: rgba(217, 119, 6, 0.18);
  color: #8a4b00;
}

.perf-finish-button {
  margin-left: auto;
  min-height: 38px;
  white-space: nowrap;
}

.perf-finish-button + .perf-cancel-button {
  margin-left: 0;
}

.perf-cancel-button {
  margin-left: auto;
  min-height: 38px;
  white-space: nowrap;
}

.perf-history,
.perf-compare,
.perf-detail,
.perf-runs-table,
.perf-tti-coverage,
.perf-settings {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.48);
}

.perf-history,
.perf-detail,
.perf-runs-table,
.perf-tti-coverage,
.perf-compare {
  padding: 14px;
}

.perf-tti-coverage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255,255,255,0.56);
}

.perf-tti-primary-value {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid rgba(8, 145, 178, 0.22);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  color: #075f75;
  font-size: 16px;
  font-weight: 900;
}

.perf-tti-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.perf-tti-primary,
.perf-tti-grid > div {
  min-width: 0;
}

.perf-tti-primary {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 10px;
  background: rgba(8, 145, 178, 0.08);
}

.perf-tti-primary span,
.perf-tti-grid h4 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.perf-tti-primary code {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.perf-tti-primary strong {
  color: #075f75;
  font-size: 16px;
  font-weight: 900;
}

.perf-tti-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.perf-tti-list span {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.62);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.perf-tti-list strong {
  font-weight: 900;
}

.perf-history-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.perf-history-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.perf-history-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perf-history-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.perf-bar-trend {
  max-width: none;
  color: #0891b2;
}

.perf-bar-trend rect {
  fill: currentColor;
  opacity: 0.72;
}

.perf-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 1px 4px 1px 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.11);
  color: #075f75;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.perf-summary-chip.is-warning {
  background: rgba(217, 119, 6, 0.14);
  color: #8a4b00;
}

.perf-boot-relief {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.1fr);
  gap: 14px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.10), rgba(255,255,255,0.42));
}

.perf-boot-relief.is-worse {
  border-color: rgba(220, 38, 38, 0.20);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.08), rgba(255,255,255,0.42));
}

.perf-boot-relief-kicker {
  display: block;
  margin-bottom: 4px;
  color: #075f75;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.perf-boot-relief.is-worse .perf-boot-relief-kicker {
  color: #991b1b;
}

.perf-boot-relief strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.15;
}

.perf-boot-relief p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.perf-boot-relief-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.perf-boot-relief-stats div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.55);
}

.perf-boot-relief-stats dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.perf-boot-relief-stats dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.perf-delta-bar {
  position: relative;
  display: block;
  width: 120px;
  height: 12px;
  border-radius: 999px;
  background: rgba(20, 30, 38, 0.08);
  overflow: hidden;
}

.perf-delta-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: block;
  border-radius: inherit;
}

.perf-delta-bar.is-positive i {
  background: #dc2626;
}

.perf-delta-bar.is-negative i {
  background: #16a34a;
}

.perf-table td strong {
  display: block;
  font-weight: 800;
}

.perf-table td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.perf-duration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.perf-duration-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
}

.perf-duration-row strong,
.perf-duration-row span {
  display: block;
}

.perf-duration-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.perf-command {
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .perf-recorder-grid,
  .perf-tti-grid,
  .perf-history-row,
  .perf-boot-relief,
  .perf-boot-relief-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .perf-recorder-head,
  .perf-section-head {
    flex-direction: column;
  }

  .perf-recorder-actions {
    justify-content: stretch;
    width: 100%;
  }

  .perf-recorder-actions button {
    flex: 1 1 180px;
  }

  .perf-tti-list span {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* === Trace-Analyse (Messungen / .mt-) === */
.mt-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mt-tab {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.62);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.mt-tab:hover {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.09);
}

.mt-tab.is-active {
  border-color: #0891b2;
  background: #0891b2;
  color: #fff;
}

.mt-device-bar {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.28));
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
}

.mt-device-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
}

.mt-device-toolbar .mt-device-label {
  flex: 1 1 280px;
}

.mt-device-toolbar .mt-refresh {
  flex: 0 0 auto;
  align-self: end;
}

.mt-device-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.72);
}

.mt-device-select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
}

.mt-device-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.72);
}

.mt-device-ios-note {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.78);
}

.mt-device-ios-note strong {
  font-weight: 600;
}

.mt-generate {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mt-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.07), rgba(255, 255, 255, 0.4));
  box-shadow: var(--shadow);
}

.mt-intro-kicker {
  color: var(--accent, #0891b2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mt-intro-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.mt-intro p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.mt-intro-foot {
  color: var(--muted);
  font-size: 12px !important;
}

.mt-intro-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 2px 0 0;
}

.mt-intro-stats div {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.mt-intro-stats dt {
  margin: 0 0 2px;
  color: var(--accent, #0891b2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mt-intro-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.mt-section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mt-section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.mt-compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
}

.mt-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mt-compare-table th,
.mt-compare-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.mt-compare-table thead th {
  color: var(--accent, #0891b2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mt-compare-table tbody th[scope="row"] {
  width: 118px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.mt-compare-table tbody tr:last-child th,
.mt-compare-table tbody tr:last-child td {
  border-bottom: none;
}

.mt-compare-table code {
  font-size: 11px;
}

.mt-capture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.mt-capture-card {
  gap: 10px;
}

.mt-capture-card.is-accent {
  border-color: rgba(8, 145, 178, 0.35);
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.06), rgba(255, 255, 255, 0.52));
}

.mt-capture-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mt-gen-badge {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent, #0891b2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mt-capture-card.is-accent .mt-gen-badge {
  border-color: rgba(8, 145, 178, 0.35);
  background: rgba(8, 145, 178, 0.12);
}

.mt-gen-summary {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.mt-capture-details {
  display: grid;
  gap: 6px;
  margin: 0;
}

.mt-capture-details div {
  display: grid;
  gap: 2px;
}

.mt-capture-details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mt-capture-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.mt-helper-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.mt-helper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.mt-hermes-workflow {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.mt-hermes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 13px;
  line-height: 1.35;
}

.mt-hermes-head strong {
  font-weight: 700;
  color: var(--ink);
}

.mt-hermes-head span {
  color: rgba(15, 23, 42, 0.68);
  font-size: 12px;
}

.mt-hermes-notice {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--mt-warn) 28%, var(--line-soft));
  background: var(--mt-warn-bg);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.82);
}

.mt-hermes-notice strong {
  font-weight: 600;
  color: var(--ink);
}

.mt-hermes-notice code {
  font-size: 12px;
}

.mt-hermes-steps {
  display: grid;
  gap: 4px;
}

.mt-hermes-step {
  display: grid;
  grid-template-columns: 22px 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.mt-hermes-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
  font-size: 11px;
  font-weight: 700;
}

.mt-hermes-btn {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mt-hermes-btn.is-primary {
  border-color: #0891b2;
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
}

.mt-hermes-cmd {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(24, 32, 24, 0.92);
  color: #eef2ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
}

.mt-hermes-more {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.72);
}

.mt-hermes-more summary {
  cursor: pointer;
  font-weight: 600;
}

.mt-hermes-more p {
  margin: 6px 0 0;
  line-height: 1.4;
}

.mt-helper-card .report-action-button {
  width: 100%;
}

.mt-gen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.mt-gen-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  box-shadow: var(--shadow);
}

.mt-gen-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.mt-run-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255,255,255,0.52);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.mt-run-status-hint {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.72);
}

.mt-run-status-hint strong {
  font-weight: 700;
}

.mt-trace-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mt-trace-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.48);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.mt-trace-item:hover {
  border-color: #0891b2;
  background: rgba(255,255,255,0.7);
}

.mt-trace-item.is-active {
  border-color: #0891b2;
  box-shadow: inset 3px 0 0 #0891b2;
}

.mt-trace-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-trace-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.mt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.mt-refresh {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.mt-refresh:hover {
  border-color: #0891b2;
  color: #075f75;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.09);
}

.mt-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.mt-kpi {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
}

.mt-kpi-value {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.mt-kpi.is-good .mt-kpi-value {
  color: #16a34a;
}

.mt-kpi.is-warn .mt-kpi-value {
  color: #c97a2c;
}

.mt-kpi.is-bad .mt-kpi-value {
  color: #dc2626;
}

.mt-kpi-label {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .5px;
  line-height: 1.3;
  text-transform: uppercase;
}

.mt-chart {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  box-shadow: var(--shadow);
}

.mt-chart-title {
  margin-bottom: 8px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .4px;
  line-height: 1.3;
  text-transform: uppercase;
}

.mt-hist {
  display: block;
  width: 100%;
  height: 160px;
}

.mt-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mt-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.mt-bar-label {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20,30,38,0.08);
}

.mt-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #0891b2;
}

.mt-bar-value {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  white-space: nowrap;
}

.mt-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.mt-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.11);
  color: #075f75;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
}

.mt-badge.is-good {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.mt-badge.is-warn {
  background: rgba(201, 122, 44, 0.12);
  color: #c97a2c;
}

.mt-badge.is-bad {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.mt-report-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: start;
}

.mt-report-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mt-report-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.48);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.mt-report-item:hover {
  border-color: #0891b2;
  background: rgba(255,255,255,0.7);
}

.mt-report-item.is-active {
  border-color: #0891b2;
  box-shadow: inset 3px 0 0 #0891b2;
}

.mt-report-content {
  max-height: 60vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.mt-report-content h1,
.mt-report-content h2,
.mt-report-content h3 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
}

.mt-report-content h1:first-child,
.mt-report-content h2:first-child,
.mt-report-content h3:first-child {
  margin-top: 0;
}

.mt-report-content h1 {
  font-size: 22px;
}

.mt-report-content h2 {
  font-size: 18px;
}

.mt-report-content h3 {
  font-size: 15px;
}

.mt-report-content ul {
  margin: 8px 0 12px 18px;
  padding: 0;
}

.mt-report-content li {
  margin: 4px 0;
}

.mt-report-content table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 12px;
}

.mt-report-content th,
.mt-report-content td {
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.mt-report-content th {
  background: rgba(8, 145, 178, 0.08);
  color: #075f75;
  font-weight: 900;
}

.mt-report-content pre,
.mt-report-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.mt-report-content pre {
  overflow: auto;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.mt-report-content code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.07);
  color: var(--ink);
  font-size: 0.92em;
}

.mt-report-content pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
}

.mt-report-content strong {
  color: var(--ink);
  font-weight: 900;
}

.mt-empty,
.mt-error {
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.mt-error {
  color: var(--danger);
}

.mt-spinner {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mt-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mt-section-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

/* === Perfetto Verdict-First (P0) === */
/* Clones .perf-boot-relief card + .mt-kpi traffic-light language.
   Color is ALWAYS paired with icon+text in the markup; tone classes here
   exist for emphasis + to feed SVG `currentColor`, never as sole signal. */
/* Semantic tone utilities (1) */
.mt-tone-good { color: var(--mt-good); }
.mt-tone-warn { color: var(--mt-warn); }
.mt-tone-bad { color: var(--mt-bad); }

/* (2) Verdict hero — clone of .perf-boot-relief, 3-column decision layout */
.mt-verdict {
  display: grid;
  grid-template-columns: auto 1fr minmax(170px, 210px);
  gap: 14px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, rgba(28, 31, 26, 0.05), rgba(255, 255, 255, 0.42));
  animation: mtVerdictIn 360ms var(--ease) both;
}

/* Per-state: tinted gradient + the `color` that SVG currentColor inherits */
.mt-verdict.is-good {
  color: var(--mt-good);
  border-color: color-mix(in srgb, var(--mt-good) 30%, var(--line));
  background: linear-gradient(180deg, var(--mt-good-bg), rgba(255, 255, 255, 0.42));
}

.mt-verdict.is-warn {
  color: var(--mt-warn);
  border-color: color-mix(in srgb, var(--mt-warn) 30%, var(--line));
  background: linear-gradient(180deg, var(--mt-warn-bg), rgba(255, 255, 255, 0.42));
}

.mt-verdict.is-bad {
  color: var(--mt-bad);
  border-color: color-mix(in srgb, var(--mt-bad) 30%, var(--line));
  background: linear-gradient(180deg, var(--mt-bad-bg), rgba(255, 255, 255, 0.42));
}

.mt-verdict.is-unknown {
  color: var(--muted);
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(28, 31, 26, 0.05), rgba(255, 255, 255, 0.42));
}

.mt-verdict-kicker {
  display: block;
  margin-bottom: 4px;
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.mt-verdict-main {
  /* Mittlere Grid-Spalte: muss schrumpfen dürfen, damit lange Slice-Namen
     in der Headline umbrechen statt die Gauge-Spalte zu quetschen. */
  min-width: 0;
}

.mt-verdict-word {
  display: block;
  color: var(--ink);
  font-size: 26px;
  font-weight: 850;
  line-height: 1.12;
}

.mt-verdict-headline {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* (3) Traffic light — vertical stack of 3 dots, lit dot inherits state color */
.mt-traffic {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  padding: 4px;
}

.mt-light {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.16;
  transition: opacity 200ms var(--ease), box-shadow 200ms var(--ease);
}

.mt-light.is-good { color: var(--mt-good); }
.mt-light.is-warn { color: var(--mt-warn); }
.mt-light.is-bad { color: var(--mt-bad); }

.mt-traffic[data-on="good"] .mt-light.is-good,
.mt-traffic[data-on="warn"] .mt-light.is-warn,
.mt-traffic[data-on="bad"] .mt-light.is-bad {
  opacity: 1;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent);
}

/* (4) Half-circle gauge — right column; zones FIX-colored, needle = currentColor */
.mt-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.mt-gauge {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;
}

.mt-gauge-cap {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
}

.mt-gauge-zone {
  fill: none;
  stroke-linecap: round;
}

.mt-gauge-zone.is-good { stroke: var(--mt-good); }
.mt-gauge-zone.is-warn { stroke: var(--mt-warn); }
.mt-gauge-zone.is-bad { stroke: var(--mt-bad); }

.mt-gauge-needle {
  stroke: currentColor;
  stroke-linecap: round;
}

.mt-gauge-num {
  fill: var(--ink);
  font: 800 16px ui-monospace, Menlo, monospace;
  text-anchor: middle;
}

/* (5) WARUM — 3 laymen cards, clone of .perf-boot-relief-stats grid */
.mt-why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.mt-why-card {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.mt-why-label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-transform: uppercase;
}

.mt-why-value {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.mt-why-hint {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

/* (6) WAS TUN — single action row */
.mt-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mt-warn-bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.mt-action-icon {
  flex: none;
  font-size: 16px;
  line-height: 1;
}

/* (7) Smoothness bar — reuses .mt-chart shell */
.mt-smooth-bar {
  position: relative;
  display: flex;
  height: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mt-bad-bg);
}

.mt-smooth-good {
  height: 100%;
  background: var(--mt-good);
  animation: mtSmoothGrow 520ms var(--ease) both;
}

.mt-smooth-bad {
  height: 100%;
  background: var(--mt-bad);
}

/* Tick marks: ok limit at 90% (≈10% slow) and hard limit at 75% (≈25% slow) */
.mt-smooth-bar::before,
.mt-smooth-bar::after {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: rgba(28, 31, 26, 0.55);
  pointer-events: none;
}

.mt-smooth-bar::before { left: 90%; }
.mt-smooth-bar::after { left: 75%; }

.mt-smooth-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

/* (8) Details — secondary, clearly subordinate to the verdict */
.mt-details {
  margin-top: 4px;
}

.mt-details > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
  transition: color 200ms var(--ease);
}

.mt-details > summary::-webkit-details-marker {
  display: none;
}

.mt-details > summary::before {
  content: "\25B8"; /* ▸ */
  display: inline-block;
  color: var(--subtle);
  font-size: 11px;
  transition: transform 200ms var(--ease);
}

.mt-details[open] > summary::before {
  content: "\25BE"; /* ▾ */
}

.mt-details > summary:hover {
  color: var(--ink);
}

.mt-details[open] > summary {
  margin-bottom: 10px;
}

.mt-details[open] > :not(summary) {
  margin-top: 10px;
}

@keyframes mtVerdictIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mtSmoothGrow {
  from { flex-basis: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mt-verdict,
  .mt-smooth-good {
    animation: none !important;
  }
}

/* (9) Responsive: collapse verdict + why to single column, gauge below */
@media (max-width: 980px) {
  .mt-verdict {
    grid-template-columns: minmax(0, 1fr);
  }

  .mt-verdict .mt-traffic {
    flex-direction: row;
    justify-content: flex-start;
  }

  .mt-gauge-wrap {
    align-items: flex-start;
  }

  .mt-gauge {
    max-width: 240px;
  }

  .mt-why {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .mt-report-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mt-bar-row {
    grid-template-columns: minmax(90px, 120px) 1fr;
  }

  .mt-bar-value {
    grid-column: 2;
  }

  .mt-toolbar,
  .mt-trace-item {
    align-items: stretch;
    flex-direction: column;
  }
}

/* --- Fokus-Cockpit ---------------------------------------------------------- */
.focus-cockpit {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.focus-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 14px;
  align-items: start;
}

.focus-middle {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 14px;
  align-items: start;
}

.focus-prep-summary {
  display: grid;
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(52, 108, 45, 0.08), transparent 44%),
    var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.focus-prep-summary-head {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.focus-prep-eyebrow {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.focus-prep-summary h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0;
}

.focus-prep-summary-head p {
  max-width: 880px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

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

.focus-prep-chip {
  min-height: 48px;
  padding: 8px 10px;
  background: #fffefb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.focus-prep-chip span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.focus-prep-chip strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}

.focus-prep-thesis {
  margin: 0;
  max-width: 80ch;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(52, 108, 45, 0.08);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.55;
}

.focus-prep-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 16px;
  align-items: start;
}

.focus-prep-main,
.focus-prep-side,
.focus-prep-section {
  min-width: 0;
}

.focus-prep-side {
  display: grid;
  gap: 14px;
}

.focus-prep-section-title {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.focus-prep-steps,
.focus-prep-argument-list,
.focus-prep-bullet-list,
.focus-prep-materials ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.focus-prep-steps {
  display: grid;
  gap: 8px;
}

.focus-prep-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}

.focus-prep-steps li:first-child {
  border-top: none;
  padding-top: 0;
}

.focus-prep-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.focus-prep-steps strong,
.focus-prep-argument-list strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
}

.focus-prep-steps p,
.focus-prep-argument-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.focus-prep-argument-list {
  display: grid;
  gap: 10px;
}

.focus-prep-argument-list li {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line-soft);
}

.focus-prep-argument-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.focus-prep-bullet-list {
  display: grid;
  gap: 7px;
}

.focus-prep-bullet-list li,
.focus-prep-materials li {
  position: relative;
  padding-left: 17px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.focus-prep-bullet-list li::before,
.focus-prep-materials li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-light);
}

.focus-prep-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  padding-top: 2px;
}

.focus-prep-materials {
  min-width: 0;
}

.focus-prep-materials summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--brand);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.focus-prep-materials ul {
  display: grid;
  gap: 7px;
  padding-bottom: 2px;
}

.focus-goal-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.focus-kpi {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.focus-kpi span {
  font-size: 11px;
  color: var(--muted);
}

.focus-kpi strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.focus-goal-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: visible;
}

.focus-goal-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--amber);
  transition: width 0.6s var(--ease);
}

.focus-goal-fill.is-on-track {
  background: var(--mt-good);
}

.focus-goal-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--ink);
  opacity: 0.55;
}

.focus-goal-forecast {
  position: absolute;
  top: -5px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--brand);
  transform: translateX(-6px);
}

.focus-goal-hint {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.focus-meeting-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.focus-countdown {
  min-width: 74px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.focus-countdown.is-soon {
  background: var(--danger);
}

.focus-countdown strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.focus-countdown span {
  font-size: 11px;
  opacity: 0.85;
}

.focus-meeting-info p {
  margin: 4px 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.focus-meeting-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.focus-checklist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.focus-checklist-count {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.focus-checklist,
.focus-action-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.focus-checklist li,
.focus-action-list li {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line-soft);
}

.focus-checklist li:last-child,
.focus-action-list li:last-child {
  border-bottom: none;
}

.focus-checklist label,
.focus-action-list label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
}

.focus-check-label {
  font-weight: 600;
  font-size: 12.5px;
}

.focus-check-detail {
  margin: 3px 0 0 24px;
  font-size: 11.5px;
  color: var(--muted);
}

.focus-checklist li.is-done .focus-check-label,
.focus-action-list li.is-done .focus-check-label {
  text-decoration: line-through;
  color: var(--subtle);
}

.focus-checklist li.is-done .focus-check-detail,
.focus-action-list li.is-done .focus-check-detail {
  color: var(--subtle);
}

.focus-action-list li.is-overdue .focus-check-label {
  color: var(--danger);
}

.focus-due {
  font-size: 11px;
  color: var(--muted);
  background: var(--line-soft);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

.focus-due.is-soon {
  background: var(--amber-bg);
  color: var(--amber);
}

.focus-due.is-overdue {
  background: var(--mt-bad-bg);
  color: var(--danger);
}

.focus-lead-link {
  border: none;
  background: none;
  color: var(--brand);
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
}

.focus-lead-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.focus-lead-list button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--paper);
  padding: 9px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.focus-lead-list button:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow);
}

.focus-lead-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.focus-lead-row strong {
  font-size: 12.5px;
}

.focus-lead-stage {
  font-size: 11px;
  color: var(--muted);
  background: var(--line-soft);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

.focus-lead-stage[data-priority="Top"] {
  background: var(--mt-good-bg);
  color: var(--mt-good);
}

.focus-lead-stage[data-priority="Hoch"] {
  background: var(--amber-bg);
  color: var(--amber);
}

.focus-lead-next {
  font-size: 11.5px;
  color: var(--muted);
}

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

.focus-plan-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.focus-plan-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--brand);
  color: #fff;
}

.focus-plan[data-plan="plan-b"] .focus-plan-tag {
  background: var(--amber);
}

.focus-plan-summary,
.focus-plan-criteria,
.focus-plan-watchout {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink);
}

.focus-plan-criteria {
  color: var(--brand);
}

.focus-plan-watchout {
  color: var(--muted);
}

.focus-decision-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1500px) {
  .focus-top,
  .focus-middle,
  .focus-plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .focus-prep-summary-head,
  .focus-prep-grid,
  .focus-prep-footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .focus-prep-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .focus-prep-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  .focus-cockpit input,
  .focus-cockpit button { display: none !important; }
  .focus-prep-summary { box-shadow: none; break-inside: avoid; }
  .focus-prep-summary,
  .focus-prep-thesis,
  .focus-prep-chip,
  .focus-prep-step-index {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .focus-prep-materials > ul { display: grid !important; }
}

/* =============================================================================
   Prio-Matrix (Software-Factory): 2x2-Portfolio-Sicht der offenen Kanban-Karten.
   GUI-only — Score-Chips (.session-score-chip) kommen aus board.css.
   ============================================================================= */

.kanban-matrix-block {
  display: grid;
  gap: 12px;
}

.kanban-matrix-meta {
  margin: 0;
  font-size: 12px;
  color: var(--subtle);
}

.kanban-matrix-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--subtle);
}

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

@media (max-width: 1100px) {
  .kanban-matrix-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kanban-matrix-quadrant {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
}

.kanban-matrix-quadrant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.kanban-matrix-quadrant-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.kanban-matrix-quadrant-head p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--subtle);
}

.kanban-matrix-count {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.kanban-matrix-quadrant--prio-delegate .kanban-matrix-count,
.kanban-matrix-quadrant--prio-delegate h3 {
  color: #3f7a34;
}

.kanban-matrix-quadrant--prio-delegate .kanban-matrix-count {
  background: #e8f5e4;
}

.kanban-matrix-quadrant--prio-with-you .kanban-matrix-count,
.kanban-matrix-quadrant--prio-with-you h3 {
  color: #534ab7;
}

.kanban-matrix-quadrant--prio-with-you .kanban-matrix-count {
  background: #edebfa;
}

.kanban-matrix-quadrant--prio-mid .kanban-matrix-count,
.kanban-matrix-quadrant--prio-mid h3 {
  color: #9a6b1a;
}

.kanban-matrix-quadrant--prio-mid .kanban-matrix-count {
  background: #fdf3e0;
}

.kanban-matrix-quadrant--prio-later .kanban-matrix-count {
  background: #f3f2ed;
  color: var(--subtle);
}

.kanban-matrix-list {
  list-style: none;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 2px 0 0;
  max-height: 460px;
  overflow-y: auto;
}

.kanban-matrix-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: #fafaf7;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.kanban-matrix-card:hover {
  border-color: var(--brand);
}

.kanban-matrix-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.kanban-matrix-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.kanban-matrix-card-tags {
  font-size: 10px;
  color: var(--subtle);
  min-width: 0;
  overflow-wrap: anywhere;
}

.kanban-matrix-empty {
  margin: 0;
  font-size: 12px;
  color: var(--subtle);
}

/* === Review-Protokolle (reviews.js) ================================= */
.rev-view { display: block; width: 100%; }

.rev-wrap { display: flex; flex-direction: column; gap: 16px; }

.rev-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.rev-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.rev-select-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rev-select {
  min-height: 40px;
  min-width: 320px;
  max-width: 560px;
  padding: 8px 12px;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.rev-select:hover { border-color: var(--accent); }
.rev-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.rev-count { font-size: 13px; color: var(--subtle); }

.rev-refresh {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.rev-refresh:hover { border-color: var(--accent); background: var(--line-soft); }

.rev-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.rev-title { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.3; }

.rev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rev-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--line-soft);
  color: var(--muted);
}
.rev-chip-date { color: var(--ink); }
.rev-chip-branch {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  background: var(--surface);
}
.rev-chip-project {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(47, 143, 70, 0.08);
}

.rev-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
}
.rev-verdict-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}
.rev-verdict-good { color: var(--mt-good); background: var(--mt-good-bg); border-color: var(--mt-good); }
.rev-verdict-warn { color: var(--mt-warn); background: var(--mt-warn-bg); border-color: var(--mt-warn); }
.rev-verdict-bad { color: var(--mt-bad); background: var(--mt-bad-bg); border-color: var(--mt-bad); }
.rev-verdict-mixed { color: var(--mt-warn); background: var(--mt-warn-bg); border-color: var(--mt-warn); }
.rev-verdict-neutral { color: var(--muted); background: var(--line-soft); border-color: var(--line); }

.rev-summary { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

.rev-content { font-size: 15.5px; line-height: 1.65; color: var(--ink); max-width: 980px; }
.rev-content h1, .rev-content h2, .rev-content h3 { color: var(--ink); line-height: 1.3; margin: 1.4em 0 0.5em; }
.rev-content h1:first-child, .rev-content h2:first-child, .rev-content h3:first-child { margin-top: 0; }
.rev-content h1 { font-size: 24px; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rev-content h2 { font-size: 20px; font-weight: 700; }
.rev-content h3 { font-size: 16.5px; font-weight: 600; color: var(--muted); }
.rev-content p { margin: 0.7em 0; }
.rev-content ul, .rev-content ol { margin: 0.6em 0; padding-left: 1.5em; }
.rev-content li { margin: 0.3em 0; }
.rev-content a { color: var(--accent); text-decoration: underline; }
.rev-content strong { font-weight: 700; color: var(--ink); }
.rev-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--line-soft);
  color: var(--ink);
}
.rev-content pre { margin: 0.8em 0; padding: 12px 14px; border-radius: 10px; background: var(--ink); overflow-x: auto; }
.rev-content pre code { background: none; color: #f3f7ec; padding: 0; }
.rev-content blockquote {
  margin: 0.8em 0;
  padding: 8px 14px;
  border-left: 3px solid var(--amber);
  background: var(--amber-bg);
  color: var(--ink);
  border-radius: 0 8px 8px 0;
}
.rev-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 14px; }
.rev-content th, .rev-content td { text-align: left; padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; }
.rev-content th { background: var(--line-soft); font-weight: 600; }
.rev-content tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.015); }

.rev-empty, .rev-spinner, .rev-error {
  padding: 24px;
  text-align: center;
  font-size: 15px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.rev-error { color: var(--mt-bad); border-color: var(--mt-bad); background: var(--mt-bad-bg); border-style: solid; }
.rev-spinner { color: var(--accent); }

/* ── Validierungs-Cockpit (Launch-Control-Board) ──────────────────────────── */
.val-cockpit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.val-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.val-bar-spacer {
  flex: 1 1 auto;
}
.val-add {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 36px;
}
.val-add:hover { background: var(--brand); }
.val-refresh {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
  min-height: 36px;
}
.val-refresh:hover { border-color: var(--accent); }
.val-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--line-soft);
  border-radius: 999px;
  padding: 5px 12px;
}
.val-chip.is-active { color: var(--mt-good); background: var(--mt-good-bg); }
.val-select {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  min-height: 34px;
  width: 100%;
  cursor: pointer;
}
.val-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.val-select.val-filter { width: auto; min-width: 130px; }
.val-error {
  font-size: 14px;
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 7px;
  padding: 8px 12px;
}
.val-board {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.val-row {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1.3fr) minmax(120px, 0.9fr) minmax(150px, 1.2fr) 86px auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
}
.val-row:first-child { border-top: none; }
.val-row.is-locked { background: rgba(47, 143, 70, 0.04); }
.val-head {
  background: var(--line-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 7px;
  padding-bottom: 7px;
}
.val-cell { min-width: 0; }
.val-cell-status { display: flex; justify-content: center; }
.val-cell-metro { text-align: right; }
.val-cell-metro code {
  font-size: 13px;
  color: var(--muted);
  background: var(--line-soft);
  border-radius: 5px;
  padding: 2px 6px;
}
.val-cell-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.val-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: var(--subtle);
}
.val-dot.is-running { background: var(--mt-good); box-shadow: 0 0 0 3px var(--mt-good-bg); }
.val-dot.is-ok { background: var(--accent); }
.val-dot.is-fail { background: var(--mt-bad); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14); }
.val-dot.is-idle { background: var(--line); }
.val-static {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.val-plat {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}
.val-act {
  font: inherit;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 34px;
  min-height: 34px;
  padding: 0 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.val-act:hover:not(:disabled) { border-color: var(--accent); }
.val-act:disabled { opacity: 0.4; cursor: not-allowed; }
.val-act-start { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.val-act-start:hover:not(:disabled) { background: var(--brand); }
.val-act-stop { color: var(--danger); border-color: rgba(180, 35, 24, 0.4); }
.val-act-remove { color: var(--muted); }
.val-empty {
  font-size: 15px;
  color: var(--muted);
  padding: 18px 14px;
  margin: 0;
}
.val-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ===== Routinen (privat, lokal) ===== */
.rtn-panel { display: flex; flex-direction: column; gap: 18px; }
.rtn-summary {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 14px;
  align-items: stretch;
}
.rtn-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 96px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.rtn-stat-num { font-size: 30px; font-weight: 700; color: var(--brand); line-height: 1; }
.rtn-stat-label { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.rtn-tip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--amber-bg);
  border: 1px solid var(--line-soft);
}
.rtn-tip-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.rtn-tip p { margin: 6px 0 0; font-size: 14px; color: var(--ink); line-height: 1.4; }
.rtn-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .rtn-grid { grid-template-columns: 1fr; } .rtn-summary { grid-template-columns: 1fr 1fr; } .rtn-tip { grid-column: 1 / -1; } }
.rtn-block-title { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.rtn-note { font-size: 12px; color: var(--subtle); margin: 10px 0 0; }

.rtn-habits { display: flex; flex-direction: column; gap: 8px; }
.rtn-habit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.rtn-habit:hover { border-color: var(--brand-light); }
.rtn-habit.is-done { background: var(--mt-good-bg); border-color: var(--mt-good); }
.rtn-habit input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.rtn-habit-body { display: flex; flex-direction: column; gap: 2px; }
.rtn-habit-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.rtn-habit.is-done .rtn-habit-label { text-decoration: line-through; color: var(--muted); }
.rtn-habit-body small { font-size: 12px; color: var(--subtle); line-height: 1.35; }

.rtn-metrics { display: flex; flex-direction: column; gap: 12px; }
.rtn-metric { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.rtn-metric-head { display: flex; align-items: baseline; gap: 8px; }
.rtn-metric-label { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1; }
.rtn-metric-value { font-size: 18px; font-weight: 700; color: var(--brand); }
.rtn-delta { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 999px; }
.rtn-delta.is-good { color: var(--mt-good); background: var(--mt-good-bg); }
.rtn-delta.is-watch { color: var(--amber); background: var(--amber-bg); }
.rtn-spark { display: block; width: 100%; height: 28px; margin: 8px 0; }
.rtn-spark polyline { stroke: var(--subtle); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rtn-spark.is-good polyline { stroke: var(--mt-good); }
.rtn-spark.is-watch polyline { stroke: var(--amber); }
.rtn-spark circle { fill: var(--subtle); }
.rtn-spark-empty { display: block; font-size: 12px; color: var(--subtle); margin: 8px 0; }
.rtn-metric-input { display: flex; align-items: center; gap: 8px; }
.rtn-metric-input input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
}
.rtn-metric-input input:focus { outline: none; border-color: var(--brand-light); }
.rtn-metric-unit { font-size: 12px; color: var(--muted); flex: 0 0 auto; }

.rtn-wissen .rtn-search-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rtn-search {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
}
.rtn-search:focus { outline: none; border-color: var(--brand-light); }
.rtn-search-count { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.rtn-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.rtn-cat h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }
.rtn-cat[hidden] { display: none; }
.rtn-cat-count { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--line-soft); border-radius: 999px; padding: 1px 7px; }
.rtn-tip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rtn-tip-list li {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  padding: 10px 12px 10px 28px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  position: relative;
}
.rtn-tip-list li[hidden] { display: none; }
.rtn-tip-list li::before { content: "✓"; position: absolute; left: 11px; top: 10px; color: var(--brand-light); font-weight: 700; }

/* ============================================================================
   TERMINMAPPE — Premium Field Dossier  ·  meeting command-center for the LHG pitch
   Base: "Premium Field Dossier". One signature: a live countdown rendered as a
   collectible Lüneburger-Heide nature stamp. All classes namespaced .tm-*,
   all colours from system tokens (tints via color-mix; rgba veils of --sb-text).
   Uses the repo-standard sans stack; no ornamental display serif.
   ============================================================================ */
#section-terminmappe .section-heading { display: none; }

.tm-dossier {
  --tm-display: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --tm-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --tm-on: var(--sb-text);
  --tm-on-soft: rgba(243, 247, 236, .74);
  --tm-on-faint: rgba(243, 247, 236, .66);
  --tm-hair: rgba(243, 247, 236, .16);
  --tm-veil: rgba(243, 247, 236, .05);
  --tm-radius: 18px;

  font-family: var(--tm-sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--tm-radius);
  box-shadow: var(--shadow);
  overflow: clip;
}
.tm-dossier *, .tm-dossier *::before, .tm-dossier *::after { box-sizing: border-box; }

/* ---------- HERO ---------- */
.tm-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(26px, 4vw, 52px) clamp(22px, 4vw, 56px) clamp(20px, 3vw, 34px);
  color: var(--tm-on);
  background:
    radial-gradient(120% 150% at 86% -12%, var(--sb-bg-1), transparent 58%),
    linear-gradient(158deg, var(--sb-bg-1), var(--sb-bg-2) 52%, var(--sb-bg-3));
  overflow: clip;
}
.tm-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.tm-contour path { fill: none; stroke: var(--tm-on); stroke-width: 1.4; opacity: .1; }
.tm-hero-sheep { fill: var(--tm-on); opacity: .075; }

.tm-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
}
.tm-hero-main { min-width: 0; max-width: 64ch; }

.tm-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--tm-on-soft);
}
.tm-eyebrow-mark { width: 15px; height: 15px; flex: none; }
.tm-heather-stem { fill: none; stroke: var(--brand-light); stroke-width: 1.3; stroke-linecap: round; }
.tm-heather-bloom { fill: var(--amber); }

.tm-title {
  margin: 0;
  font-family: var(--tm-display);
  font-weight: 500;
  font-size: clamp(28px, 3.3vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--tm-on);
  text-wrap: balance;
}
.tm-subtitle {
  margin: 12px 0 0; max-width: 60ch;
  font-size: 14.5px; line-height: 1.5; color: var(--tm-on-soft);
}
.tm-thesis {
  margin: 20px 0 0; max-width: 60ch;
  padding-left: 18px; border-left: 2px solid var(--tm-hair);
  font-family: var(--tm-display); font-style: normal; font-weight: 600;
  font-size: clamp(16.5px, 1.5vw, 19px); line-height: 1.58; color: var(--tm-on);
}

.tm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.tm-copy {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  font: inherit; font-size: 14.5px; font-weight: 650;
  color: var(--brand); background: var(--paper);
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(16, 45, 20, .28);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.tm-copy:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(16, 45, 20, .34); }
.tm-copy:active { transform: translateY(0); }
.tm-copy-ico { width: 18px; height: 18px; color: var(--brand-light); }
.tm-copy.is-copied { color: var(--brand); background: var(--mt-good-bg); }
.tm-copy.is-copied .tm-copy-ico { color: var(--mt-good); }
.tm-copy:focus-visible { outline: 3px solid var(--sb-text); outline-offset: 3px; }

.tm-open-lead {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 18px;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--tm-on); background: var(--tm-veil);
  border: 1px solid var(--tm-hair); border-radius: 12px; cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.tm-open-lead svg { width: 17px; height: 17px; color: var(--tm-on-soft); }
.tm-open-lead:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--sb-text) 12%, transparent);
  border-color: color-mix(in srgb, var(--sb-text) 30%, transparent);
}
.tm-open-lead:active { transform: translateY(0); }
.tm-open-lead:focus-visible { outline: 3px solid var(--sb-text); outline-offset: 3px; }
.tm-actions-hint { font-size: 12.5px; color: var(--tm-on-faint); }

.tm-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 26px; margin: 28px 0 0; padding-top: 22px;
  border-top: 1px solid var(--tm-hair);
}
.tm-meta-item {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 2px; align-items: start; min-width: 0;
}
.tm-meta-item svg { grid-row: 1 / span 2; width: 18px; height: 18px; margin-top: 2px; color: var(--tm-on-soft); }
.tm-meta-k { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tm-on-faint); }
.tm-meta-v { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--tm-on); }

/* ---------- STAMP COUNTDOWN MEDALLION (signature) ---------- */
.tm-hero-aside { display: flex; justify-content: center; }
.tm-stamp-wrap {
  position: relative; width: clamp(184px, 17vw, 232px); aspect-ratio: 1 / 1;
  display: grid; place-items: center;
}
.tm-stamp-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.tm-stamp-edge { fill: none; stroke: var(--tm-on); stroke-width: 2; stroke-dasharray: 2.4 4.2; opacity: .55; }
.tm-stamp-rim { fill: none; stroke: var(--tm-on); stroke-width: 1.2; opacity: .32; }
.tm-stamp-arc-text {
  fill: var(--tm-on); font-family: var(--tm-display); font-size: 10px;
  letter-spacing: .2em; text-anchor: middle; opacity: .78;
}
.tm-stamp-sheep { fill: var(--tm-on); opacity: .5; }
.tm-stamp-core {
  position: relative; z-index: 1;
  display: grid; justify-items: center; text-align: center; gap: 2px;
  transform: translateY(-6px);
}
.tm-stamp-num {
  font-family: var(--tm-display); font-weight: 500;
  font-size: clamp(52px, 6vw, 72px); line-height: .92;
  color: var(--tm-on); font-variant-numeric: tabular-nums;
}
.tm-stamp-wrap.is-word .tm-stamp-num { font-size: clamp(30px, 3.4vw, 40px); }
.tm-stamp-unit { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tm-on-soft); }
.tm-stamp-date { margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--tm-on-faint); }

.tm-stamp-wrap.is-urgent .tm-stamp-edge { stroke: var(--amber); opacity: .9; }
.tm-stamp-wrap.is-urgent .tm-stamp-unit { color: color-mix(in srgb, var(--amber) 62%, var(--sb-text)); }
.tm-stamp-wrap.is-today .tm-stamp-edge { stroke: var(--brand-light); opacity: .9; }
.tm-stamp-wrap.is-past .tm-stamp-edge { stroke: var(--subtle); opacity: .55; }
.tm-stamp-wrap.is-past .tm-stamp-num { color: var(--tm-on-soft); }

@keyframes tm-pulse {
  0%, 100% { transform: translateY(-6px) scale(1); }
  50% { transform: translateY(-6px) scale(1.045); }
}
.tm-stamp-wrap.is-urgent .tm-stamp-core { animation: tm-pulse 2.6s var(--ease) infinite; }

/* ---------- CHIP DATA-STRIP ---------- */
.tm-chips {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin-top: clamp(24px, 3vw, 34px);
  background: var(--tm-hair); border: 1px solid var(--tm-hair);
  border-radius: 14px; overflow: clip;
}
.tm-chip { display: grid; gap: 5px; padding: 16px 18px; background: var(--tm-veil); }
.tm-chip-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tm-on-faint); }
.tm-chip-value { font-size: 14.5px; font-weight: 600; line-height: 1.32; color: var(--tm-on); }
.tm-chip.is-watch { position: relative; }
.tm-chip.is-watch .tm-chip-label { color: var(--amber); }
.tm-chip.is-watch::before {
  content: ""; position: absolute; top: 14px; right: 14px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 3px rgba(201, 122, 44, .22);
}

/* ---------- BODY ---------- */
.tm-body {
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: clamp(24px, 3.4vw, 52px);
  padding: clamp(28px, 3.6vw, 48px) clamp(22px, 4vw, 56px);
}
.tm-main, .tm-section { min-width: 0; }

.tm-section-head { margin-bottom: 20px; }
.tm-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 9px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--brand);
}
.tm-kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }
.tm-kicker--amber { color: var(--amber); }
.tm-section-title {
  margin: 0; font-family: var(--tm-display); font-weight: 500;
  font-size: clamp(20px, 2vw, 26px); line-height: 1.12; letter-spacing: 0; color: var(--ink);
}

/* talkTrack — numbered timeline with connecting spine */
.tm-track { list-style: none; margin: 0; padding: 0; position: relative; }
.tm-track::before {
  content: ""; position: absolute; left: 19px; top: 14px; bottom: 18px;
  width: 2px; background: linear-gradient(var(--line), var(--line-soft));
}
.tm-track-item { position: relative; padding: 0 0 30px 62px; }
.tm-track-item:last-child { padding-bottom: 0; }
.tm-track-node {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brand); color: var(--surface);
  box-shadow: 0 0 0 5px var(--paper), var(--shadow); z-index: 1;
}
.tm-track-num { font-family: var(--tm-display); font-weight: 600; font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums; }
.tm-track-body { min-width: 0; }
.tm-track-label { margin: 7px 0 0; font-family: var(--tm-display); font-weight: 500; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.25; color: var(--ink); }
.tm-track-text { margin: 8px 0 0; max-width: 64ch; font-size: 15.5px; line-height: 1.62; color: var(--muted); }

/* aside margin */
.tm-aside { display: grid; gap: clamp(26px, 3vw, 38px); align-content: start; }

.tm-args { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.tm-arg { padding: 0 0 16px; border-bottom: 1px solid var(--line-soft); }
.tm-arg:last-child { padding-bottom: 0; border-bottom: none; }
.tm-arg-label { display: block; position: relative; padding-left: 16px; font-size: 15px; font-weight: 700; line-height: 1.34; color: var(--ink); }
.tm-arg-label::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 2px; background: var(--brand-light); transform: rotate(45deg) translateY(-1px); }
.tm-arg-text { margin: 7px 0 0; padding-left: 16px; font-size: 14px; line-height: 1.55; color: var(--muted); }

.tm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tm-list-item { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.tm-list-item::before { content: ""; position: absolute; left: 3px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-light); }

.tm-watch { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tm-watch-item {
  position: relative; padding: 11px 14px 11px 36px;
  font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--amber-bg);
  border: 1px solid color-mix(in srgb, var(--amber) 26%, transparent);
  border-radius: 10px;
}
.tm-watch-item::before {
  content: "!"; position: absolute; left: 13px; top: 11px;
  display: grid; place-items: center; width: 14px; height: 14px;
  font-size: 10px; font-weight: 800; color: var(--surface);
  background: var(--amber); border-radius: 50%;
}

/* ---------- FOOTER ---------- */
.tm-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(18px, 2.4vw, 26px) clamp(22px, 4vw, 56px) clamp(24px, 3vw, 34px);
  border-top: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--paper), var(--ink) 2%);
}
.tm-materials { min-width: 0; max-width: 100%; }
.tm-materials-summary {
  display: inline-flex; align-items: center; gap: 9px; list-style: none;
  font-size: 13.5px; font-weight: 650; color: var(--brand); cursor: pointer;
}
.tm-materials-summary::-webkit-details-marker { display: none; }
.tm-materials-summary svg { width: 18px; height: 18px; color: var(--brand-light); }
.tm-materials-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.tm-materials[open] .tm-materials-summary { margin-bottom: 12px; }
.tm-materials-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 9px 28px;
}
.tm-materials-item { position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.tm-materials-item::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 1px; background: var(--subtle); transform: rotate(45deg); }
.tm-foot-note { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 12.5px; color: var(--subtle); }
.tm-foot-mark {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--brand-light), var(--brand));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 921px) {
  .tm-aside { padding-left: clamp(24px, 3vw, 48px); border-left: 1px solid var(--line-soft); }
}
@media (max-width: 920px) {
  .tm-hero-grid { grid-template-columns: 1fr; }
  .tm-hero-aside { order: -1; justify-content: flex-start; }
  .tm-hero-main { max-width: none; }
  .tm-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tm-chips { grid-template-columns: 1fr; }
  .tm-meta { grid-template-columns: 1fr; }
  .tm-stamp-wrap { width: 172px; }
  .tm-track-item { padding-left: 54px; }
  .tm-foot { flex-direction: column; align-items: flex-start; }
  .tm-actions { gap: 12px; }
  .tm-copy, .tm-open-lead { flex: 1 1 auto; justify-content: center; }
  .tm-actions-hint { flex-basis: 100%; }
}

/* ---------- MOTION GUARD ---------- */
@media (prefers-reduced-motion: reduce) {
  .tm-dossier *, .tm-dossier *::before, .tm-dossier *::after { animation: none !important; transition: none !important; }
  .tm-copy:hover, .tm-open-lead:hover { transform: none; }
}

/* ---------- PRINT ---------- */
@media print {
  .tm-dossier { box-shadow: none; border: 1px solid var(--line); }
  .tm-hero { background: var(--paper); color: var(--ink); }
  .tm-hero-bg { display: none; }
  .tm-title, .tm-thesis, .tm-subtitle, .tm-meta-k, .tm-meta-v,
  .tm-stamp-num, .tm-stamp-unit, .tm-stamp-date, .tm-stamp-arc-text,
  .tm-chip-label, .tm-chip-value { color: var(--ink); fill: var(--ink); }
  .tm-eyebrow { color: var(--brand); }
  .tm-thesis { border-left-color: var(--line); }
  .tm-meta { border-top-color: var(--line); }
  .tm-copy, .tm-open-lead, .tm-actions-hint { display: none; }
  .tm-stamp-edge, .tm-stamp-rim { stroke: var(--ink); opacity: .7; }
  .tm-stamp-sheep { fill: var(--ink); opacity: .7; }
  .tm-chips { background: var(--line); border-color: var(--line); }
  .tm-chip { background: var(--surface); }
  .tm-aside { border-left: none; padding-left: 0; }
  .tm-track-item, .tm-arg, .tm-watch-item, .tm-materials { break-inside: avoid; }
}
