/* GENERIERT aus @werbungmacher-org/tokens v0.6.0 — nicht von Hand editieren (scripts/generate.mjs). */
:root,
[data-theme="light"] {
  --color-surface-bg: #ffffff;
  --color-surface-fg: #111827;
  --color-surface-muted: #f9fafb;
  --color-surface-border: #e5e7eb;
  --color-surface-ring: #2055a0;

  --brand-50: 241 245 251;
  --brand-100: 221 232 243;
  --brand-200: 185 208 232;
  --brand-300: 142 177 214;
  --brand-400: 93 140 190;
  --brand-500: 32 85 160;
  --brand-600: 26 70 132;
  --brand-700: 20 55 104;
  --brand-800: 14 41 80;
  --brand-900: 8 26 54;
  --brand-950: 4 13 30;
}

[data-theme="dark"] {
  --color-surface-bg: #0f172a;
  --color-surface-fg: #f1f5f9;
  --color-surface-muted: #1e293b;
  --color-surface-border: #334155;
  --color-surface-ring: #5d8cbe;

  --brand-50: 20 55 104;
  --brand-100: 26 70 132;
  --brand-200: 32 85 160;
  --brand-300: 93 140 190;
  --brand-400: 142 177 214;
  --brand-500: 185 208 232;
  --brand-600: 221 232 243;
  --brand-700: 241 245 251;
  --brand-800: 249 251 254;
  --brand-900: 253 254 255;
  --brand-950: 255 255 255;
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --color-surface-bg: #0f172a;
    --color-surface-fg: #f1f5f9;
    --color-surface-muted: #1e293b;
    --color-surface-border: #334155;
    --color-surface-ring: #5d8cbe;

    --brand-50: 20 55 104;
    --brand-100: 26 70 132;
    --brand-200: 32 85 160;
    --brand-300: 93 140 190;
    --brand-400: 142 177 214;
    --brand-500: 185 208 232;
    --brand-600: 221 232 243;
    --brand-700: 241 245 251;
    --brand-800: 249 251 254;
    --brand-900: 253 254 255;
    --brand-950: 255 255 255;
  }
}

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

@font-face {
  font-family: Inter;
  src: url("/assets/inter-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: var(--color-surface-bg);
  --fg: var(--color-surface-fg);
  --muted-bg: var(--color-surface-muted);
  --border: var(--color-surface-border);
  --muted: color-mix(in srgb, var(--fg) 67%, var(--bg));
  --primary: rgb(var(--brand-700));
  --soft: rgb(var(--brand-50));
  --shadow: 0 10px 30px color-mix(in srgb, var(--fg) 5%, transparent);
  font-family: Inter, system-ui, sans-serif;
  color: var(--fg);
  background: var(--muted-bg);
  font-size: 14px;
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: var(--primary);
  text-decoration: none;
}
p {
  margin: 0;
  line-height: 1.65;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.16rem;
  font-weight: 650;
}
h3 {
  font-size: 1rem;
  font-weight: 650;
}
small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}
svg {
  flex-shrink: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-surface-ring);
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--fg) 30%, var(--bg));
  border-radius: 9px;
  background: var(--bg);
  color: var(--fg);
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
select {
  appearance: auto;
  padding-right: 28px;
}
label {
  display: block;
  font-size: 0.88rem;
  font-weight: 550;
  margin-bottom: 7px;
}
form > div:has(> label),
.form-grid > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
label + input,
label + select,
label + textarea {
  margin-top: 0;
}
input[type="checkbox"] {
  min-height: 20px;
  width: 20px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -70px;
  background: var(--bg);
  padding: 14px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100dvh;
}
.app-shell > aside {
  width: 240px !important;
  background: var(--bg);
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  overflow: auto;
}
.app-shell > div {
  grid-column: 2;
  min-width: 0;
}
.app-shell main {
  min-width: 0;
}
.side-nav {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 16px;
}
.side-nav > div:first-child {
  height: 99px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  font-size: 1.12rem;
  font-weight: 720;
  letter-spacing: -0.03em;
}
.brand small {
  font-weight: 450;
  letter-spacing: 0;
  font-size: 0.71rem;
  margin-top: 4px;
}
.brand-images { display: block; }
.brand-logo { display: block; height: 36px; width: auto; max-width: 100%; object-fit: contain; }
.brand-logo-dark { display: none; }
html[data-theme="dark"] .brand-logo-light { display: none; }
html[data-theme="dark"] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .brand-logo-light { display: none; }
  html[data-theme="auto"] .brand-logo-dark { display: block; }
}
.header-brand { display: none; }
.login-brand { margin-bottom: 28px; }
.login-brand .brand-logo { height: 48px; }
.side-nav > div:nth-child(2) {
  flex: 1;
  padding: 13px 0;
}
.side-nav nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.side-nav nav > div > div:first-child:not(:has(a)) {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--muted);
  padding: 0 14px;
  margin-bottom: 12px;
}
.side-nav nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.side-nav nav a {
  min-height: 47px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 530;
  font-size: 0.92rem;
}
.side-nav nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--soft);
  font-weight: 650;
}
.side-nav nav a:hover {
  background: var(--muted-bg);
  color: var(--fg);
}
.sidebar-footer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 22px 8px;
  border-top: 1px solid var(--border);
  font-size: 0.79rem;
  font-weight: 550;
  color: var(--muted);
}
.sidebar-footer small {
  font-size: 0.67rem;
  font-weight: 400;
  margin-top: 4px;
}
.topbar {
  height: 77px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
}
.topbar-start,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 550;
  color: var(--fg);
  font-size: 0.82rem;
  letter-spacing: 0;
}
.breadcrumb > span {
  color: var(--border);
}
.connection-state {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 7px;
}
.connection-state:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.wm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 570;
  transition:
    background 0.16s,
    transform 0.16s;
  white-space: normal;
}
.wm-button:hover {
  background: var(--muted-bg);
  transform: translateY(-1px);
}
.wm-button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}
.wm-button.primary:hover {
  background: rgb(var(--brand-600));
}
.topbar .wm-button {
  border: 0;
  background: transparent;
  padding: 10px;
  color: var(--muted);
}
#menu-toggle {
  display: none;
}
#menu-close {
  display: none;
}
.overview-status > summary {
  display: none;
}
.section-loading,
.section-error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.section-loading {
  min-height: 126px;
}
.section-error {
  border-bottom: 1px solid var(--border);
}
#main-content {
  max-width: 1540px;
  margin: 0 auto;
  padding: 36px 38px 64px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}
.eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 11px;
}
h1 {
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 650;
  letter-spacing: -0.06em;
}
.page-heading p:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 760px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.metric-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}
.metric-card > div:first-child {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.metric-card > div:first-child > span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
  letter-spacing: 0.025em;
  font-weight: 550;
  max-width: 150px;
}
.metric-card svg {
  color: var(--muted);
  width: 17px;
}
.metric-card > div:nth-child(2) {
  font-size: 1.85rem;
  font-weight: 620;
  letter-spacing: -0.06em;
  line-height: 1.25;
}
.metric-card > div:last-child {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(275px, 1fr);
  gap: 24px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 25px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 15px;
  margin-bottom: 22px;
}
.section-heading p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 7px;
  max-width: 590px;
}
.task-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.task-form summary {
  padding: 10px 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.83rem;
  min-height: 44px;
}
.details-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}
.form-footer {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.form-footer > .muted {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.71rem;
  margin-bottom: 6px;
}
.form-footer > .muted svg {
  width: 14px;
}
.muted {
  color: var(--muted);
  font-size: 0.82rem;
}
.data-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.empty-state {
  padding: 26px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
.empty-state h3 {
  color: var(--fg);
  font-size: 0.92rem;
  letter-spacing: -0.015em;
}
.empty-state p {
  font-size: 0.8rem;
  max-width: 350px;
}
.empty-state svg {
  width: 28px;
  height: 28px;
  margin-bottom: 5px;
}
.process-panel {
  background: var(--soft);
  border-color: color-mix(in srgb, var(--primary) 15%, var(--border));
  box-shadow: none;
}
.process-panel h2 {
  font-size: 1.25rem;
  max-width: 225px;
  line-height: 1.4;
}
.process-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 17px;
  counter-reset: step;
}
.process-list li {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1.5;
}
.process-list li > span,
.step-number {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--primary);
  font-size: 0.7rem;
  flex-shrink: 0;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 44px;
}
.filter-bar {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 15px;
}
.filter-bar > div {
  min-width: 170px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  padding: 0 12px;
  margin-bottom: 0;
  min-width: 0;
}
.search-field svg {
  color: var(--muted);
}
.search-field input {
  border: 0;
  background: transparent;
  padding-left: 0;
}
.view > .panel {
  margin-top: 24px;
}
.view > .search-field {
  margin-bottom: 20px;
}
#job-list {
  margin: 20px 0 25px;
}
.record-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  min-width: 0;
}
.record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}
.record-head h3 {
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 90px;
}
.record-card > p {
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.7rem;
  color: var(--muted);
}
.record-meta > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.record-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.record-actions:empty {
  display: none;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--muted-bg);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.4;
  color: var(--fg);
}
.status-badge[data-tone="active"] {
  background: var(--soft);
  color: var(--primary);
  border-color: rgb(var(--brand-200));
}
.status-badge[data-tone="blocked"] {
  border-style: dashed;
  border-width: 1.5px;
}
.status-badge[data-tone="done"] {
  border-color: var(--primary);
}
.team-preview {
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 0.81rem;
  line-height: 1.65;
}
.team-preview strong {
  display: block;
  margin-bottom: 8px;
}
.team-preview ul {
  padding-left: 19px;
  margin: 6px 0;
}
.team-preview small {
  margin-top: 8px;
}
.inline-error,
.notice {
  border: 1px solid var(--primary);
  border-radius: 9px;
  background: var(--soft);
  padding: 12px 15px;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--fg);
}
.notice {
  margin-bottom: 24px;
}
.action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.operation-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.operation-card {
  display: flex;
  align-items: start;
  flex-direction: column;
  gap: 14px;
}
.operation-card > svg {
  color: var(--primary);
  width: 24px;
  height: 24px;
}
.operation-card > p {
  color: var(--muted);
  font-size: 0.84rem;
  flex: 1;
}
.operation-card .wm-button {
  margin-top: 6px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.resource-grid strong {
  display: block;
  font-size: 1.55rem;
  margin-bottom: 6px;
}
.resource-grid progress {
  width: 100%;
  height: 5px;
  accent-color: var(--primary);
}
.help-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.help-step p {
  color: var(--muted);
  font-size: 0.9rem;
}
.step-number {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}
.architecture {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.architecture > div {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--muted-bg);
  position: relative;
}
.architecture > div:not(:last-child):after {
  content: "→";
  position: absolute;
  right: -16px;
  top: 50%;
  color: var(--muted);
}
.architecture strong {
  font-size: 0.83rem;
}
.prose {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}
.prose .wm-button {
  align-self: start;
}
.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 1fr);
  align-items: center;
  gap: 48px;
  min-height: calc(100dvh - 190px);
  padding: 30px 0 90px;
}
.login-copy h1 {
  font-size: clamp(2.7rem, 4vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.07em;
  margin-bottom: 24px;
}
.login-copy > p:last-of-type {
  color: var(--muted);
  font-size: 1rem;
  max-width: 420px;
}
.login-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}
.login-points > span {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--muted);
}
.login-points svg {
  color: var(--primary);
}
.login-card {
  padding: 32px;
}
.login-lock {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 13px;
  background: var(--soft);
  color: var(--primary);
  margin-bottom: 23px;
}
.login-card > p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.85rem;
}
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 25px 0 20px;
}
.login-card > small {
  font-size: 0.72rem;
}
.login-card h2 {
  font-size: 1.4rem;
}
dialog {
  width: min(800px, calc(100vw - 32px));
  max-height: 88dvh;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 30px 90px color-mix(in srgb, var(--fg) 20%, transparent);
}
dialog::backdrop {
  background: color-mix(in srgb, var(--fg) 45%, transparent);
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}
.dialog-heading h2 {
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
#action-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#action-fields label {
  margin: 0;
}
#action-error {
  margin-top: 20px;
}
.detail-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
}
.detail-section h3 {
  margin-bottom: 15px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}
.detail-grid dt {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-grid dd {
  margin: 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.detail-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.9rem;
}
.timeline {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline li {
  border-left: 1px solid var(--border);
  padding: 0 0 20px 19px;
  font-size: 0.82rem;
  position: relative;
  overflow-wrap: anywhere;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}
.timeline small {
  margin-bottom: 5px;
}
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.evidence-grid > div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.evidence-grid strong {
  display: block;
  margin-bottom: 8px;
}
.raw-data {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.6 Inter,
    system-ui,
    sans-serif;
  background: var(--muted-bg);
  padding: 15px;
  border-radius: 9px;
  max-height: 350px;
  overflow: auto;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 90;
  padding: 15px 21px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 11px;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  font-size: 0.88rem;
  line-height: 1.6;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.view {
  animation: arrive 0.25s ease-out;
}
@keyframes arrive {
  from {
    transform: translateY(5px);
  }
  to {
    transform: translateY(0);
  }
}
@media (min-width: 1600px) {
  #main-content {
    padding-left: 52px;
    padding-right: 52px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .app-shell > aside {
    width: 205px !important;
  }
  .side-nav {
    padding: 0 10px;
  }
  .brand {
    font-size: 1rem;
  }
  .brand small {
    font-size: 0.64rem;
  }
  .topbar {
    padding: 0 25px;
  }
  #main-content {
    padding: 29px 25px 55px;
  }
  .metrics {
    gap: 12px;
  }
  .metric-card {
    padding: 17px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    gap: 18px;
  }
  .panel {
    padding: 21px;
  }
  .login-panel {
    gap: 28px;
  }
  .login-card {
    padding: 24px;
  }
  .architecture {
    grid-template-columns: 1fr 1fr;
  }
  .architecture > div:nth-child(2):after {
    display: none;
  }
}
@media (max-width: 950px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-grid > .stack:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .login-panel {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 24px 0;
    min-height: auto;
  }
  .login-copy h1 {
    font-size: 3rem;
  }
  .login-points {
    display: none;
  }
  .login-card {
    max-width: 520px;
  }
  .breadcrumb {
    font-size: 0.58rem;
    gap: 9px;
  }
  .connection-state {
    max-width: 130px;
    font-size: 0.65rem;
  }
  .filter-bar {
    flex-wrap: wrap;
  }
  .filter-bar > .search-field {
    flex-basis: 100%;
  }
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .app-shell {
    display: block;
  }
  .app-shell > aside {
    transform: translateX(-100%);
    width: 250px !important;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  body.menu-open .app-shell > aside {
    transform: translateX(0);
  }
  body.menu-open:after {
    content: "";
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--fg) 30%, transparent);
    z-index: 35;
  }
  .topbar {
    height: 67px;
    padding: 0 15px;
  }
  .topbar-start {
    gap: 7px;
  }
  .breadcrumb {
    display: none;
  }
  .header-brand { display: flex; align-items: center; min-height: 44px; }
  .header-brand .brand-logo { height: 22px; }
  .breadcrumb > span {
    display: none;
  }
  .breadcrumb strong {
    font-size: 0.85rem;
  }
  .topbar-actions {
    gap: 1px;
  }
  .connection-state {
    max-width: 105px;
    margin-right: 2px;
    font-size: 0.62rem;
    line-height: 1.4;
  }
  .topbar .wm-button {
    min-width: 44px;
    padding: 8px;
  }
  #menu-toggle {
    display: inline-flex;
  }
  #menu-close {
    display: inline-flex;
    flex-shrink: 0;
    margin-left: auto;
    padding: 8px;
    border: 0;
  }
  .side-nav > div:first-child {
    padding: 0;
    gap: 8px;
  }
  body.menu-open {
    overflow: hidden;
  }
  .overview-status {
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
  }
  .overview-status > summary {
    display: list-item;
    min-height: 44px;
    padding: 8px 0 12px;
    cursor: pointer;
    color: var(--fg);
    font-size: 0.86rem;
    font-weight: 600;
  }
  #status-summary {
    display: block;
    margin: 5px 0 0 15px;
    font-size: 0.77rem;
    font-weight: 400;
    color: var(--muted);
  }
  #main-content {
    padding: 20px 18px 44px;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  .page-heading h1 {
    font-size: 1.9rem;
    letter-spacing: -0.055em;
    line-height: 1.16;
  }
  .page-heading p:last-child {
    font-size: 0.84rem;
    line-height: 1.7;
    margin-top: 12px;
  }
  .eyebrow {
    font-size: 0.58rem;
  }
  .metrics {
    gap: 10px;
    margin-bottom: 20px;
  }
  .metric-card {
    padding: 15px 13px;
    gap: 12px;
    border-radius: 10px;
  }
  .metric-card > div:first-child > span {
    font-size: 0.58rem;
    max-width: 120px;
    min-height: 26px;
  }
  .metric-card svg {
    width: 14px;
  }
  .metric-card > div:nth-child(2) {
    font-size: 1.65rem;
  }
  .metric-card > div:last-child {
    font-size: 0.64rem;
  }
  .overview-grid {
    gap: 20px;
  }
  .stack {
    gap: 20px;
  }
  .overview-grid > .stack:last-child {
    display: flex;
    align-items: stretch;
  }
  .panel {
    padding: 21px 18px;
    border-radius: 12px;
  }
  .section-heading {
    margin-bottom: 16px;
  }
  h2 {
    font-size: 1.08rem;
  }
  .section-heading p {
    font-size: 0.79rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .task-form {
    gap: 18px;
  }
  textarea,
  input,
  select {
    font-size: 16px;
  }
  .form-footer {
    gap: 9px;
  }
  .form-footer .wm-button {
    flex: 1;
    font-size: 0.75rem;
    padding: 11px 8px;
  }
  .form-footer > .muted {
    font-size: 0.65rem;
  }
  .filter-bar {
    gap: 13px;
    align-items: end;
  }
  .filter-bar > div {
    min-width: 0;
    flex: 1;
  }
  .filter-bar > .wm-button {
    font-size: 0.73rem;
  }
  .record-card {
    padding: 16px;
  }
  .record-head h3 {
    font-size: 0.9rem;
    min-width: 170px;
  }
  .record-meta {
    gap: 8px;
    font-size: 0.66rem;
  }
  .record-actions .wm-button {
    font-size: 0.75rem;
  }
  .operation-grid,
  .help-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .architecture {
    grid-template-columns: 1fr;
  }
  .architecture > div:not(:last-child):after {
    content: "↓";
    right: 50%;
    top: auto;
    bottom: -20px;
  }
  .architecture > div:nth-child(2):after {
    display: block;
  }
  .login-panel {
    padding: 16px 0 30px;
    gap: 28px;
  }
  .login-copy h1 {
    font-size: 2.7rem;
    margin-bottom: 17px;
  }
  .login-copy > p:last-of-type {
    font-size: 0.9rem;
  }
  .login-card {
    padding: 25px 21px;
  }
  .login-card h2 {
    font-size: 1.3rem;
  }
  .login-lock {
    margin-bottom: 19px;
  }
  .login-copy .eyebrow {
    font-size: 0.57rem;
    letter-spacing: 0.105em;
  }
  .topbar-actions #refresh {
    display: none;
  }
  dialog {
    padding: 22px 18px;
    max-height: 92dvh;
    border-radius: 13px;
  }
  .detail-grid,
  .evidence-grid {
    grid-template-columns: 1fr;
  }
  .resource-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .detail-grid {
    gap: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.side-nav nav > div {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--muted);
}
.side-nav nav > div > ul {
  margin-top: 11px;
  letter-spacing: 0;
}

.artifact-file {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 12px;
  overflow-wrap: anywhere;
}
.artifact-file strong {
  font-size: 0.85rem;
}
.artifact-file small {
  word-break: break-all;
}

/* Company proofs share the same card and control primitives as the task views. */
.record-proof:empty { display: none; }
.record-proof { display: grid; gap: 12px; margin-top: 14px; overflow-wrap: anywhere; }
.record-proof p { margin: 0; }
.proof-note { padding: 13px 15px; border-left: 3px solid var(--primary); background: var(--muted-bg); border-radius: 0 8px 8px 0; font-size: 0.8rem; line-height: 1.6; }
.proof-note strong { display: block; font-size: 0.8rem; }
.proof-note ul { margin: 6px 0 0; padding-left: 18px; }
.proof-note li + li { margin-top: 5px; }
.qualification { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.qualification > strong { font-size: 0.9rem; }
.practice-proof summary { cursor: pointer; padding: 12px 0; min-height: 44px; font-size: 0.8rem; font-weight: 600; }
.practice-content { display: grid; gap: 12px; padding: 4px 0 12px; }
.practice-metrics { margin: 0; }
.practice-metrics > div { padding: 12px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.practice-metrics p { margin-top: 6px; font-size: 0.75rem; line-height: 1.6; }
.case-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.case-list li { display: grid; gap: 4px; padding-bottom: 9px; border-bottom: 1px solid var(--border); font-size: 0.8rem; }
.case-list span { color: var(--muted); }
#role-search, #workspace-search { margin-bottom: 16px; }
.record-actions button:disabled { cursor: not-allowed; opacity: 0.65; }
@media (max-width: 700px) {
  .record-head { align-items: flex-start; flex-wrap: wrap; }
  .record-proof .record-actions { gap: 9px; }
  .record-actions button { white-space: normal; text-align: left; }
}
.section-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.section-links .wm-button { background: transparent; }
.panel h2, #maintenance-actions { scroll-margin-top: 92px; }
#operations-status { display: grid; gap: 12px; }
.show-more { justify-self: start; }
@media (min-width: 1000px) {
  #operations-status { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
