/* lc.automiq.eu — POC · LANSERRING × AUTOMIQ
   Dunkle Lanserring-CI, identisch zur FULL-App: tiefes Schwarz, Bronze-Glut,
   warmweiße Serif (Cormorant Garamond) für Titel, Montserrat für UI,
   iOS-26 Liquid Glass auf Karten/Topbar. Self-hosted Fonts (kein CDN). */

/* ---------- Montserrat (self-hosted) ---------- */
@font-face { font-family:'Montserrat'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/montserrat-400.woff2') format('woff2'); }
@font-face { font-family:'Montserrat'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/montserrat-500.woff2') format('woff2'); }
@font-face { font-family:'Montserrat'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/montserrat-600.woff2') format('woff2'); }
@font-face { font-family:'Montserrat'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/montserrat-700.woff2') format('woff2'); }

/* ---------- Cormorant Garamond (self-hosted) — Display-Serif ---------- */
@font-face { font-family:'Cormorant Garamond'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/cormorant-500.woff2') format('woff2'); }
@font-face { font-family:'Cormorant Garamond'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/cormorant-600.woff2') format('woff2'); }

/* ---------- Dark-CI Tokens (identisch zur FULL-App) ---------- */
:root {
  --ivory: #0B0B0B;                 /* Grund */
  --linen: #14120F;
  --ink: #F3EFE7;                   /* warmweißer Text */
  --ink-2: rgba(243,239,231,.60);
  --ink-3: rgba(243,239,231,.38);
  --bronze: #C09A6C;
  --bronze-deep: #CBA678;
  --brass: #C9A26F;
  --accent: #C09A6C;               /* pro Projekt via inline überschreibbar, Default Bronze */
  --ok: #7FAE8C;
  --warn: #D2A94A;
  --alert: #CE7263;

  --glass: rgba(18,16,14,.48);
  --glass-strong: rgba(22,19,16,.66);
  --glass-border: rgba(255,255,255,.12);
  --glass-edge: rgba(255,255,255,.20);
  --glass-hl-top: rgba(255,255,255,.30);
  --glass-hl-bot: rgba(0,0,0,.20);
  --glass-refract: rgba(255,255,255,.12);
  --glass-float: 0 1px 2px rgba(0,0,0,.35), 0 22px 60px -22px rgba(0,0,0,.62);

  --sep: rgba(255,255,255,.10);
  --soft-fill: rgba(255,255,255,.06);
  --cell-hover: rgba(255,255,255,.06);
  --row-hover: rgba(255,255,255,.035);
  --paper: #1C1916;
  --ring: rgba(200,162,116,.72);
  --focus-border: rgba(192,154,108,.55);
  --focus-ring: rgba(192,154,108,.16);

  --pill-ok-bg: rgba(127,174,140,.16);
  --pill-warn-bg: rgba(210,169,74,.16);
  --pill-warn-fg: #D8B45E;
  --pill-alert-bg: rgba(206,114,99,.16);
  --badge-bg: rgba(192,154,108,.14);

  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 24px 60px -18px rgba(0,0,0,.6);
  --shadow-soft: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.45);
  --btn-ink-shadow: 0 10px 26px -10px rgba(0,0,0,.7);
  --on-accent: #FBF7F0;

  --serif-display: 'Cormorant Garamond', "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --r-card: 20px;
  --r-ctl: 12px;
  --ease: cubic-bezier(.3,.8,.3,1);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='8' viewBox='0 0 11 8' fill='none'%3E%3Cpath d='M1 1.4 5.5 6 10 1.4' stroke='%23C09A6C' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- LIGHT (Ivory) — identisch zur FULL-App, Kontrast-Pass 13.08. ---------- */
html[data-theme='light'] {
  --ivory: #F4F1EB;
  --linen: #EDE8DF;
  --ink: #1C1915;
  --ink-2: rgba(41, 35, 28, .78);
  --ink-3: rgba(41, 35, 28, .56);
  --bronze: #7E5C3B;
  --bronze-deep: #5F4429;
  --brass: #A87E4E;
  --accent: #7E5C3B;
  --ok: #3E6B4B;
  --warn: #96731F;
  --alert: #983D32;
  --glass: rgba(255, 255, 254, .56);
  --glass-strong: rgba(255, 255, 254, .78);
  --glass-border: rgba(255, 255, 255, .65);
  --glass-edge: rgba(255, 255, 255, .72);
  --glass-hl-top: rgba(255, 255, 255, .9);
  --glass-hl-bot: rgba(0, 0, 0, .06);
  --glass-refract: rgba(255, 255, 255, .55);
  --glass-float: 0 1px 2px rgba(30, 22, 12, .05), 0 22px 60px -22px rgba(64, 48, 28, .22);
  --sep: rgba(46, 40, 33, .14);
  --soft-fill: rgba(255, 255, 254, .55);
  --cell-hover: rgba(255, 255, 255, .6);
  --row-hover: rgba(255, 255, 255, .35);
  --paper: #ffffff;
  --ring: rgba(126, 92, 59, .66);
  --focus-border: rgba(126, 92, 59, .55);
  --focus-ring: rgba(126, 92, 59, .15);
  --pill-ok-bg: rgba(62, 107, 75, .14);
  --pill-warn-bg: rgba(150, 115, 31, .15);
  --pill-warn-fg: #7A5C13;
  --pill-alert-bg: rgba(152, 61, 50, .13);
  --badge-bg: rgba(126, 92, 59, .13);
  --shadow: 0 1px 2px rgba(30, 22, 12, .05), 0 24px 60px -18px rgba(64, 48, 28, .22);
  --shadow-soft: 0 1px 2px rgba(30, 22, 12, .04), 0 10px 30px -12px rgba(64, 48, 28, .14);
  --btn-ink-shadow: 0 10px 26px -10px rgba(30, 27, 23, .5);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--ivory); color: var(--ink);
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh; position: relative; isolation: isolate;
  overflow-x: clip;
}
/* Aurora-Grund — Bronze-Glut auf Schwarz (die Bühne hinter dem Glas) */
body::before {
  content: ""; position: fixed; inset: -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(42% 34% at 12% 6%, rgba(180,138,90,.10), transparent 65%),
    radial-gradient(36% 30% at 88% 10%, rgba(150,105,62,.07), transparent 60%),
    radial-gradient(50% 42% at 82% 96%, rgba(130,95,58,.08), transparent 62%),
    linear-gradient(170deg, #100E0C 0%, #0B0A09 55%, #090808 100%);
}
html[data-theme='light'] body::before {
  background:
    radial-gradient(42% 34% at 12% 8%, rgba(180, 138, 90, .34), transparent 65%),
    radial-gradient(38% 30% at 88% 6%, rgba(142, 107, 74, .20), transparent 60%),
    radial-gradient(50% 42% at 82% 92%, rgba(103, 122, 104, .16), transparent 62%),
    radial-gradient(44% 38% at 8% 88%, rgba(196, 178, 148, .38), transparent 60%),
    linear-gradient(165deg, #F7F4EE 0%, #EFE9DE 55%, #EAE2D4 100%);
}
html[data-theme='light'] body::after { opacity: .5; }
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b { font-weight: 600; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
::selection { background: rgba(180,138,90,.3); }

/* ---------- Liquid-Glass-Baustein (iOS-26) ---------- */
.card {
  position: relative; isolation: isolate;
  background: var(--glass);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--glass-hl-top), inset 0 -1px 0 var(--glass-hl-bot), var(--glass-float);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 28% 0%, var(--glass-refract), transparent 56%);
  mix-blend-mode: plus-lighter;
}
.hidden { display: none; }

/* ---------- Reveals — eigener Compositing-Layer (translateZ) gegen backdrop-Ghosts ---------- */
.reveal { opacity: 0; transform: translateY(10px) translateZ(0); animation: rise .6s var(--ease) forwards; will-change: opacity, transform; }
.reveal.d1 { animation-delay: .07s; } .reveal.d2 { animation-delay: .14s; } .reveal.d3 { animation-delay: .21s; }
@keyframes rise { to { opacity: 1; transform: translateZ(0); } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: translateZ(0); } }

/* ---------- Login ---------- */
.login-stage { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(400px, 100%);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(44px) saturate(185%); backdrop-filter: blur(44px) saturate(185%);
  border: 1px solid var(--glass-edge); border-radius: 24px;
  box-shadow: inset 0 1px 0 var(--glass-hl-top), inset 0 -1px 0 var(--glass-hl-bot), var(--shadow);
  padding: 40px 34px 28px; text-align: center; position: relative; isolation: isolate;
}
.login-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 28% 0%, var(--glass-refract), transparent 56%); mix-blend-mode: plus-lighter;
}
.login-mark { font-size: 14px; font-weight: 700; letter-spacing: .34em; color: var(--bronze); margin-bottom: 22px; }
.login-mark span { color: var(--ink-3); margin: 0 2px; }
.login-card h1 { font-family: var(--serif-display); font-weight: 500; font-size: 34px; letter-spacing: -.005em; line-height: 1.08; }
.login-sub { font-size: 11px; letter-spacing: .26em; color: var(--ink-2); margin: 10px 0 26px; text-transform: uppercase; }
.login-err { background: var(--pill-alert-bg); color: var(--alert); font-size: 13.5px; padding: 10px 12px; border-radius: var(--r-ctl); margin-bottom: 14px; }
.field { display: block; text-align: left; margin-bottom: 12px; }
.field span { display: block; font-size: 11.5px; letter-spacing: .04em; color: var(--ink-2); margin: 0 4px 6px; }
.field input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); padding: 12px 14px;
  border: 1px solid var(--sep); border-radius: var(--r-ctl); background: var(--soft-fill);
  outline: none; transition: box-shadow .2s var(--ease), background .2s, border-color .2s;
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus { background: var(--paper); border-color: var(--focus-border); box-shadow: 0 0 0 3px var(--focus-ring); }
/* Chrome-Autofill übermalt die Felder sonst WEISS → dunkles Feld behalten,
   damit Text UND Passwort-Auge im Dark Mode sichtbar bleiben */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
  box-shadow: 0 0 0 1000px var(--paper) inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 999999s ease-out 0s;
}
.btn-primary {
  width: 100%; margin-top: 8px; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .01em;
  color: var(--on-accent); background: linear-gradient(140deg, var(--brass), #8A6540); border: 0; border-radius: 999px; padding: 13px;
  cursor: pointer; box-shadow: 0 10px 26px -12px rgba(107,79,51,.55);
  transition: transform .15s var(--ease), box-shadow .2s, opacity .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(107,79,51,.62); }
.btn-primary:active { transform: scale(.98); opacity: .9; }
.login-foot { font-size: 11.5px; color: var(--ink-3); margin-top: 20px; letter-spacing: .02em; }

/* ---------- Nav (Liquid-Glass-Topbar) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 var(--glass-hl-top) inset;
}
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 13px 22px; display: flex; align-items: center; gap: 16px; }
.nav-brand { font-size: 12px; font-weight: 700; letter-spacing: .3em; color: var(--bronze); }
.nav-brand span { color: var(--ink-3); }
.nav-crumb { font-size: 13px; color: var(--ink-2); flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-out { font-size: 13px; color: var(--bronze-deep); transition: color .2s; }
.nav-out:hover { color: var(--bronze); }

/* Theme-Toggle (Mond/Sonne) — Dark zeigt Mond, Light zeigt Sonne */
.nav-theme { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  margin-right: 12px; padding: 0; border-radius: 999px; border: 1px solid var(--sep);
  background: var(--soft-fill); color: var(--ink-2); cursor: pointer; transition: color .18s, border-color .18s; }
.nav-theme:hover { color: var(--bronze); border-color: var(--focus-border); }
.nav-theme .ic-sun { display: none; }
html[data-theme='light'] .nav-theme .ic-sun { display: block; }
html[data-theme='light'] .nav-theme .ic-moon { display: none; }

/* Hilfe-Link + Tour-Knopf (geführte Tour, Kit: work/_tools/gefuehrte-tour-kit) */
.nav-help { font-size: 13px; color: var(--ink-2); margin-right: 6px; transition: color .2s; }
.nav-help:hover { color: var(--bronze); }
.nav-tour { display: inline-flex; align-items: center; height: 30px; margin-right: 12px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--focus-border); background: var(--badge-bg); color: var(--bronze);
  font: 600 12px/1 var(--sans); letter-spacing: .04em; cursor: pointer; transition: background .18s, color .18s; }
.nav-tour:hover { background: var(--bronze); color: var(--on-accent); }

/* Tour-Karte in Lanserring-CI — nur Variablen, Kit-Regeln bleiben unberührt */
:root {
  --tour-akzent:   var(--bronze);
  --tour-schleier: rgba(4, 3, 2, .72);
  --tour-flaeche:  #17140F;
  --tour-linie:    rgba(255, 255, 255, .14);
  --tour-ink:      var(--ink);
  --tour-ink2:     var(--ink-2);
  --tour-ink3:     var(--ink-3);
  --tour-radius:   14px;
  --tour-schrift:  var(--sans);
}
html[data-theme='light'] {
  --tour-schleier: rgba(28, 25, 21, .48);
  --tour-flaeche:  #FFFDF9;
  --tour-linie:    rgba(41, 35, 28, .16);
}
.t-karte .t-titel { font-family: var(--serif-display); font-weight: 600; font-size: 21px; letter-spacing: 0; }
.t-abschnitt, .t-nachlese { background: var(--glass); backdrop-filter: blur(12px); }
#hilfe h2 { font-family: var(--serif-display); font-weight: 500; font-size: 26px; margin: 26px 0 12px; }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 22px 88px; }
.wrap-narrow { max-width: 720px; }
.large-title { font-family: var(--serif-display); font-weight: 500; font-size: clamp(34px, 4vw, 46px); letter-spacing: -.005em; line-height: 1.06; }
.lead { color: var(--ink-2); margin: 10px 0 26px; max-width: 60ch; font-size: 14px; }
.eyebrow { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--bronze); margin-bottom: 6px; font-weight: 600; }

/* ---------- Projekte ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 18px; }
.proj-card {
  display: block; position: relative;
  isolation: isolate;                       /* eigener Stacking-Context → keine backdrop-Ghosts */
  background: var(--glass);
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-edge); border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--glass-hl-top), inset 0 -1px 0 var(--glass-hl-bot), var(--glass-float);
  padding: 26px; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.proj-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 28% 0%, var(--glass-refract), transparent 56%); mix-blend-mode: plus-lighter;
}
.proj-card:hover { transform: translateY(-3px) translateZ(0); border-color: var(--focus-border); box-shadow: inset 0 1px 0 var(--glass-hl-top), inset 0 -1px 0 var(--glass-hl-bot), var(--shadow); }
.proj-type { font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--bronze); }
.proj-name { font-family: var(--serif-display); font-weight: 500; font-size: 27px; letter-spacing: -.005em; margin: 6px 0 18px; line-height: 1.1; }
.proj-kpis { display: flex; gap: 26px; padding-top: 16px; border-top: 1px solid var(--sep); }
.proj-kpis b { display: block; font-family: var(--serif-display); font-weight: 500; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.02; }
.proj-kpis span { font-size: 11px; color: var(--ink-2); }
.proj-go { margin-top: 20px; font-size: 13.5px; font-weight: 600; color: var(--bronze-deep); }
.proj-go span { display: inline-block; transition: transform .25s var(--ease); }
.proj-card:hover .proj-go span { transform: translateX(3px); }
.note-card {
  background: var(--badge-bg); border: 1px solid var(--glass-border); border-radius: var(--r-card);
  padding: 18px 20px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}
.note-card b { color: var(--bronze-deep); }

/* ---------- Projekt-Kopf + Tabs ---------- */
.proj-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.head-kpi { text-align: right; }
.head-kpi b { display: block; font-family: var(--serif-display); font-weight: 500; font-size: 34px; font-variant-numeric: tabular-nums; color: var(--bronze); line-height: 1; }
.head-kpi span { font-size: 11.5px; color: var(--ink-2); }
.seg { display: inline-flex; background: var(--soft-fill); border: 1px solid var(--sep); border-radius: 999px; padding: 3px; gap: 2px; margin-bottom: 22px; }
.seg a { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--ink-2); padding: 8px 17px; border-radius: 999px; transition: color .2s, background .2s; }
.seg a.on { background: var(--ink); color: var(--ivory); }

/* ---------- Pläne ---------- */
.plan-split { display: grid; grid-template-columns: 108px 1fr; gap: 16px; align-items: start; }
.page-rail { display: flex; flex-direction: column; gap: 10px; max-height: 74vh; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.rail-item { border: 2px solid transparent; border-radius: 12px; padding: 0; background: none; cursor: pointer; transition: border-color .2s; }
.rail-item img { border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.rail-item span { display: block; font-size: 10.5px; color: var(--ink-2); padding: 4px 2px 4px; font-variant-numeric: tabular-nums; }
.rail-item.on { border-color: var(--bronze); }
.plan-canvas { padding: 14px; margin-bottom: 14px; }
.plan-canvas img { width: 100%; border-radius: 9px; }
.plan-info { padding: 18px 20px; }
.pi-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 8px; }
.pi-title { font-family: var(--serif-display); font-weight: 500; font-size: 21px; letter-spacing: -.005em; }
.pi-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.pi-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--sep); font-size: 13.5px; }
.pi-row > span { color: var(--ink-2); font-size: 12.5px; }
.pi-furn { display: grid; gap: 8px; }
.furn { display: flex; gap: 9px; align-items: baseline; }
.furn b { font-size: 13.5px; font-weight: 600; }
.furn small { display: block; color: var(--ink-2); font-size: 12px; }

/* ---------- Pills & Dots ---------- */
.pill { font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.ok    { background: var(--pill-ok-bg);    color: var(--ok); }
.pill.warn  { background: var(--pill-warn-bg);  color: var(--pill-warn-fg); }
.pill.alert { background: var(--pill-alert-bg); color: var(--alert); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.alert { background: var(--alert); }

/* ---------- Positionen ---------- */
.sec-note { font-size: 13.5px; color: var(--ink-2); max-width: 72ch; margin-bottom: 16px; line-height: 1.6; }
.pos-list { display: grid; gap: 10px; }
.pos summary { display: flex; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; list-style: none; }
.pos summary::-webkit-details-marker { display: none; }
.pos-marker { font-family: ui-monospace, "SF Mono", monospace; font-size: 12.5px; font-weight: 700; color: var(--bronze);
  background: var(--badge-bg); border-radius: 8px; padding: 6px 9px; }
.pos-title { flex: 1; } .pos-title b { display: block; font-size: 15px; letter-spacing: -.005em; }
.pos-title small { color: var(--ink-2); font-size: 12px; }
.pos-right { display: flex; gap: 8px; align-items: center; }
.pos[open] summary { border-bottom: 1px solid var(--sep); }
.pos-body { padding: 6px 18px 16px; }
.code-lines { display: grid; gap: 7px; }
.code-line { display: grid; grid-template-columns: 74px 44px 1fr; gap: 10px; align-items: baseline; }
.code-line code { font-size: 12.5px; font-weight: 700; background: var(--soft-fill); color: var(--bronze-deep); padding: 3px 7px; border-radius: 6px; text-align: center; }
.code-line em { font-style: normal; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.code-line small { font-size: 12.5px; color: var(--ink-2); }
.gate-reasons { color: var(--pill-warn-fg); font-size: 13px; }

/* ---------- Entwurf ---------- */
.doc { padding: 30px 34px; max-width: 860px; }
.doc-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.doc-kicker { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); margin-bottom: 6px; font-weight: 600; }
.doc-title { font-family: var(--serif-display); font-weight: 500; font-size: 28px; letter-spacing: -.005em; }
.doc-total { text-align: right; } .doc-total span { font-size: 11.5px; color: var(--ink-2); display: block; }
.doc-total b { font-family: var(--serif-display); font-weight: 500; font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.doc-cat { margin-top: 22px; }
.doc-cat-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze); padding-bottom: 8px; border-bottom: 1px solid var(--sep); }
.doc-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--sep); font-size: 14px; }
.doc-no { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.doc-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.flag { color: var(--warn); font-style: normal; }
.doc-totals { margin-top: 22px; display: grid; gap: 8px; justify-items: end; }
.doc-totals > div { display: grid; grid-template-columns: auto 160px; gap: 20px; font-size: 14px; }
.doc-totals span { color: var(--ink-2); } .doc-totals b { text-align: right; font-variant-numeric: tabular-nums; }
.doc-totals .grand { border-top: 1px solid var(--ink); padding-top: 10px; font-size: 17px; }
.doc-totals .grand b { font-family: var(--serif-display); font-weight: 500; font-size: 20px; }
.doc-disclaimer { margin-top: 26px; font-size: 12px; color: var(--ink-3); max-width: 70ch; line-height: 1.6; }

/* ---------- Abgleich ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 22px 22px; }
.kpi b { display: block; font-family: var(--serif-display); font-weight: 500; font-size: 38px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--bronze); line-height: 1.02; }
.kpi span { font-size: 12px; color: var(--ink-2); margin-top: 2px; display: block; }
.match { margin-top: 16px; overflow: hidden; }
.match-head, .match-row { display: grid; grid-template-columns: 1fr 130px 130px 120px; gap: 14px; padding: 13px 20px; align-items: center; }
.match-head { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--sep); }
.match-row { border-bottom: 1px solid var(--sep); font-size: 14px; transition: background .16s var(--ease); }
.match-row:hover { background: var(--row-hover); }
.match-row:last-child { border-bottom: 0; }
.m-title { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: baseline; }
.m-title b { font-size: 14px; letter-spacing: -.005em; }
.m-title small { grid-column: 2; color: var(--ink-2); font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.delta { font-weight: 700; }
.delta.ok { color: var(--ok); } .delta.warn { color: var(--pill-warn-fg); } .delta.alert { color: var(--alert); }
.match-row.extra { background: var(--pill-warn-bg); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .plan-split { grid-template-columns: 1fr; }
  .page-rail { flex-direction: row; max-height: none; overflow-x: auto; }
  .rail-item { flex: 0 0 92px; }
  .match-head { display: none; }
  .match-row { grid-template-columns: 1fr auto; }
  .match-row .num:nth-child(2) { display: none; }
  .proj-head { flex-direction: column; align-items: start; }
  .doc { padding: 22px 18px; }
}

/* ---------- Passwort-Auge ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; padding: 8px; cursor: pointer; color: var(--ink-3);
  border-radius: 8px; display: grid; place-items: center; transition: color .2s; }
.pw-eye:hover { color: var(--ink-2); }
.pw-eye:active { color: var(--bronze); }

/* ---------- POC-Ausbau: Upload, Status, Neues Projekt ---------- */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.title-row .lead { margin-bottom: 0; }
.btn-new { width: auto; padding: 12px 22px; text-decoration: none; display: inline-block; font-size: 13.5px; }
.form-card { padding: 24px; margin-top: 6px; }
.type-pick { display: flex; gap: 10px; }
.type-pick label { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 15px; border-radius: var(--r-ctl); white-space: nowrap; user-select: none; -webkit-user-select: none;
  background: var(--soft-fill); border: 1px solid var(--sep); font-size: 14px; cursor: pointer; transition: background .18s, box-shadow .18s, border-color .18s; }
/* Natives Radio komplett unsichtbar über die ganze Karte legen (klickbar, aber nie sichtbar —
   die globale input-Breitenregel machte es sonst zum hässlichen Balken beim Drücken) */
.type-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  appearance: none; -webkit-appearance: none; cursor: pointer; }
/* Eigener Radio-Punkt */
.type-pick label::before { content: ""; flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--ink-3); background: transparent; transition: border-color .18s, background .18s, box-shadow .18s; }
.type-pick label:has(input:checked) { background: var(--badge-bg); border-color: var(--focus-border); box-shadow: inset 0 0 0 1px var(--focus-border); }
.type-pick label:has(input:checked)::before { border-color: var(--bronze); box-shadow: inset 0 0 0 3.5px var(--bronze); }
.type-pick label:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--focus-ring), inset 0 0 0 1px var(--focus-border); }
.note-inline { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; margin: 14px 0 18px; padding: 13px 15px;
  background: var(--badge-bg); border: 1px solid var(--glass-border); border-radius: var(--r-ctl); }
.proj-pending .proj-status { margin: 14px 0 6px; }
.status-bar { height: 5px; border-radius: 99px; background: var(--soft-fill); overflow: hidden; }
.status-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brass), #8A6540); }
.status-label { display: block; margin-top: 9px; font-size: 12px; color: var(--ink-2); }
.steps-card { display: flex; padding: 20px 16px; gap: 4px; }
.steps-card .step { flex: 1; text-align: center; position: relative; }
/* Mobil: 6 Statusschritte sind breiter als 390px — Leiste scrollt IN sich
   (nie die Seite; gemessen 90px H-Overflow am 27.08.) */
@media (max-width: 700px) {
  .steps-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .steps-card .step { flex: 0 0 auto; min-width: 86px; }
  .steps-card .step span { white-space: nowrap; }
}
.steps-card .step i { display: block; width: 12px; height: 12px; border-radius: 50%; margin: 0 auto 8px;
  background: var(--soft-fill); position: relative; z-index: 1; }
.steps-card .step::before { content: ""; position: absolute; top: 5.5px; left: -50%; right: 50%; height: 1.5px; background: var(--sep); }
.steps-card .step:first-child::before { display: none; }
.steps-card .step.done::before { background: var(--bronze); opacity: .5; }
.steps-card .step.done i { background: var(--bronze); }
.steps-card .step.now i { box-shadow: 0 0 0 4px var(--focus-ring); }
.steps-card .step span { font-size: 11px; color: var(--ink-2); }
.steps-card .step.now span { color: var(--ink); font-weight: 600; }
.upload-card { padding: 20px; margin-top: 14px; }
.drop { border: 1.5px dashed var(--glass-border); border-radius: var(--r-ctl); padding: 36px 18px; text-align: center;
  cursor: pointer; background: var(--soft-fill); transition: all .15s; }
.drop.over { border-color: var(--bronze); background: var(--badge-bg); }
.drop b { display: block; font-size: 15px; margin-bottom: 5px; }
.drop span { font-size: 12.5px; color: var(--ink-2); }
.drop input { display: none; }
/* ---------- Unterschritte + Live-Info (Bereinigung/Schwärzung) ---------- */
.note-card { padding: 24px 26px; margin-top: 18px; }
.note-line { margin: 14px 2px 2px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.substeps { display: flex; flex-direction: column; gap: 0; }
.substep { display: flex; gap: 14px; align-items: flex-start; padding: 11px 2px; }
.substep + .substep { border-top: 1px solid var(--sep); }
.substep i { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 99px; margin-top: 5px;
  background: var(--soft-fill); border: 1.5px solid var(--glass-border); }
.substep.done i { background: var(--ok); border-color: var(--ok); }
.substep.act i { background: var(--bronze); border-color: var(--bronze); animation: lc-pulse 1.6s ease-in-out infinite; }
.substep.need i { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bronze) 22%, transparent); }
@keyframes lc-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }
.substep b { display: block; font-size: 13.5px; }
.substep span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.substep.act b { color: var(--ink); }
.substep:not(.act):not(.done) { opacity: .55; }
.live-timer { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---------- Apple-Stil-Aktivitätsrad (12 Striche) ---------- */
.lc-spin rect { fill: var(--ink); opacity: .15; animation: lc-spin-fade 1s linear infinite; }
@keyframes lc-spin-fade { from { opacity: .9; } to { opacity: .12; } }
.sub-spin { flex: 0 0 18px; width: 18px; margin-top: 1px; display: inline-flex; }
.calc-load { display: flex; gap: 16px; align-items: flex-start; padding: 6px 2px; }
.calc-load .lc-spin { flex: 0 0 30px; margin-top: 2px; }
.calc-load b { font-size: 14px; }

/* ---------- Schritt zurück ---------- */
.back-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sep); }
.btn-back { padding: 8px 18px; font-size: 12.5px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--glass-border); background: transparent; color: var(--ink-2); transition: all .15s; }
.btn-back:hover { border-color: var(--bronze); color: var(--ink); }

/* ---------- Begriffsliste (Prüfung + Freigabe) ---------- */
.bl-form { margin-top: 4px; }
.bl-box { max-height: 360px; overflow: auto; border: 1px solid var(--glass-border); border-radius: 12px; padding: 4px 14px; background: var(--soft-fill); }
.bl-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 13.5px; cursor: pointer; }
.bl-row + .bl-row { border-top: 1px dotted var(--sep); }
.bl-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--bronze); flex: 0 0 auto; }
.bl-begriff { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bl-ersatz { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.bl-treffer { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.bl-hinweis { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.bl-add { margin-top: 12px; }
.bl-add-row { display: flex; gap: 10px; margin-bottom: 8px; }
.bl-add-row input:first-child { flex: 2; }
.bl-add-row input:last-child { flex: 1; }
.bl-cta { margin-top: 12px; }

.drop-pick { display: block; margin-top: 10px; }
.drop-pick a { color: var(--bronze); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- Upload-Fortschritt (Schema drive.automiq.eu) ---------- */
.up-panel { margin: 14px 0 4px; padding: 14px 16px; border: 1px solid var(--glass-border);
  border-radius: var(--r-ctl); background: var(--soft-fill); position: relative; }
.up-bar { height: 8px; border-radius: 99px; background: var(--badge-bg); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--bronze); transition: width .25s ease; }
.up-stats { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; font-size: 13px;
  font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.up-stats b { font-size: 14px; }
.up-stats span { color: var(--ink-2); font-size: 12.5px; }
.up-now { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; padding-right: 110px; }
.up-cancel { position: absolute; right: 12px; bottom: 12px; padding: 7px 16px; font-size: 12.5px;
  border-radius: 99px; border: 1px solid var(--glass-border); background: transparent;
  color: var(--ink); cursor: pointer; transition: all .15s; }
.up-cancel:hover { border-color: var(--alert); color: var(--alert); }

.up-list { margin: 12px 0; }
.up-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--sep); font-size: 13.5px; }
.up-row:last-child { border-bottom: 0; }
.up-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-size { color: var(--ink-2); font-size: 12px; }
.up-state { min-width: 20px; text-align: right; }
.up-row.done .up-state { color: var(--ok); }
.up-row.err { opacity: .6; }
.up-row.err .up-state { color: var(--alert); font-size: 12px; }

/* ---------- KI-Budget-Tracker (nur Automiq) ---------- */
.api-card { padding: 20px 22px; margin-top: 14px; }
.api-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.api-head b { font-size: 14px; }
.api-head span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.api-left { font-family: var(--serif-display); font-weight: 500; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.api-left small { font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--ink-2); }
.api-bar { height: 6px; border-radius: 99px; background: var(--soft-fill); overflow: hidden; }
.api-bar i { display: block; height: 100%; min-width: 2px; border-radius: 99px; background: var(--ok); transition: width .3s var(--ease); }
.api-bar i.hot { background: var(--alert); }
.api-meta { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 10px;
  font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- POC/FULL-Umschalter (nur Automiq) ---------- */
.mode-switch { display: inline-flex; background: var(--soft-fill); border: 1px solid var(--sep); border-radius: 999px; padding: 3px; margin-right: 12px;
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.mode-switch a { font-size: 11px; font-weight: 700; letter-spacing: .12em; padding: 5px 13px; border-radius: 999px; color: var(--ink-2); transition: color .18s, background .18s; }
.mode-switch a:hover { color: var(--ink); }
.mode-switch a.on { background: var(--ink); color: var(--ivory); }

/* ---------- Selects zähmen (bronze Chevron statt System-Pfeil) ---------- */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 11px center; background-size: 10px 7px;
  padding-right: 30px;
}
select::-ms-expand { display: none; }

/* ---------- Fokus: bronze Ring (nie blau) ---------- */
*:focus-visible { outline: none; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--ivory), 0 0 0 4px var(--ring); border-radius: 10px;
}
.field input:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); border-radius: var(--r-ctl); }

/* ---------- Nav mobil: 7 Elemente passen nicht in 390px (gemessen 90px Overflow 27.08.) ---------- */
@media (max-width: 700px) {
  .nav-inner { gap: 8px; padding: 11px 12px; }
  .nav-crumb { display: none; }                  /* Projektname steht gross auf der Seite */
  .nav-brand { margin-right: auto; }
  .nav-help, .nav-out { font-size: 12px; }
  .nav-tour { padding: 0 9px; font-size: 11px; margin-right: 4px; height: 26px; }
  .mode-switch a { padding: 4px 8px; font-size: 10.5px; }
}

/* Entwurf: unbepreiste Detail-Zeilen dezent */
.doc-price-leer { color: var(--ink-3); font-weight: 400; }
