:root {
  color-scheme: dark;
  --bg: #050506;
  --surface: rgba(22, 22, 25, 0.78);
  --surface-strong: rgba(34, 34, 38, 0.92);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --blue: #2997ff;
  --green: #32d74b;
  --amber: #ffd60a;
  --red: #ff453a;
  --violet: #bf5af2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 142px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}


#map,
#metrics,
#costs,
#optimizer,
#files-report,
#grundlagen,
#general-costs {
  scroll-margin-top: 142px;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 12%, rgba(88, 88, 92, 0.24), transparent 30rem),
    linear-gradient(180deg, #09090b 0%, #050506 36%, #0b0b0d 100%);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(190px, 300px) minmax(360px, 1fr) minmax(190px, 300px);
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  min-height: 104px;
  padding: 10px clamp(16px, 4vw, 54px);
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px);
}

.topnav a,
.primary-action {
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 54px;
  object-fit: contain;
}

.inventorlab-logo img {
  border-radius: 8px;
  background: #fff;
  padding: 3px;
}


.inventorlab-logo {
  justify-self: end;
}

.header-brand-stack {
  display: grid;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.account-stack {
  justify-items: start;
  align-content: center;
}

.hsnr-stack {
  justify-items: start;
}

.inventorlab-stack {
  justify-items: end;
}

.logout-link {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 12px;
  color: rgba(245, 245, 247, 0.74);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.logout-link:hover {
  color: var(--blue);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.legal-links a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--blue);
}

.header-legal-links {
  justify-content: flex-end;
  max-width: 260px;
}

.header-legal-links a {
  color: rgba(245, 245, 247, 0.62);
  font-size: 11px;
}

.topnav {
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: clamp(12px, 1.05vw, 14px);
  min-width: 0;
}

.topnav-row {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 26px);
  align-items: center;
}

.topnav a {
  color: rgba(245, 245, 247, 0.74);
  font-weight: 600;
  white-space: nowrap;
}

.topnav a:hover {
  color: var(--blue);
}

.topnav-button {
  border: 0;
  background: transparent;
  color: rgba(245, 245, 247, 0.74);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.topnav-button:hover {
  color: var(--blue);
}

.user-chip {
  max-width: min(300px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(245, 245, 247, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 92vh;
  padding: 122px clamp(18px, 5vw, 72px) 8vh;
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-content,
.hero-metrics {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 920px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 1120px;
  font-size: 92px;
  line-height: 0.96;
  font-weight: 760;
  white-space: nowrap;
}

h2 {
  font-size: 38px;
  line-height: 1.05;
}

.hero-copy {
  max-width: 720px;
  margin: 26px 0 0;
  color: rgba(245, 245, 247, 0.78);
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.28;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-action,
.secondary-action,
.panel-button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
}

.primary-action,
.panel-button.accent {
  background: var(--blue);
  color: white;
}

.secondary-action,
.panel-button {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border: 1px solid var(--line);
}

.storage-panel,
.pdf-panel,
.file-panel {
  display: grid;
  gap: 12px;
}

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

.storage-panel .panel-button,
.pdf-panel .panel-button {
  width: 100%;
  padding-inline: 14px;
}

.storage-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.storage-status[data-type="success"] {
  color: var(--green);
}

.storage-status[data-type="error"] {
  color: var(--red);
}

.files-report {
  padding: 0 clamp(16px, 4vw, 54px) 44px;
}

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

.file-panel {
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.files-report .section-header {
  margin-bottom: 18px;
}

.file-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.file-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.files-report {
  padding-bottom: 76px;
}

.vsm-foundations {
  padding: 0 clamp(16px, 4vw, 54px) 84px;
}

.vsm-foundations .section-header {
  margin-bottom: 18px;
}

.foundation-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.learning-section .foundation-flow {
  margin-top: 24px;
}

.foundation-flow + .learning-grid {
  margin-top: 24px;
}

.example-section {
  margin-top: 28px;
}

.compact-header {
  margin-bottom: 14px;
}

.compact-header h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
}

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

.example-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 250px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.045)),
    var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(26px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.example-card:hover {
  transform: translateY(-3px);
  border-color: rgba(41, 151, 255, 0.55);
  background:
    linear-gradient(145deg, rgba(41,151,255,0.18), rgba(255,255,255,0.05)),
    var(--surface);
}

.example-card span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 820;
}

.example-card strong {
  max-width: 100%;
  font-size: 22px;
  line-height: 1.12;
}

.example-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.foundation-flow article,
.foundation-metrics article,
.foundation-roots {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.foundation-flow article {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 22px;
}

.foundation-flow strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
}

.foundation-flow h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.foundation-flow p,
.foundation-roots p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.foundation-metric-intro {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}

.foundation-metric-intro h3 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
}

.foundation-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.foundation-metrics article {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 250px;
  padding: 18px;
}

.foundation-metrics span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.foundation-metrics strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
}

.foundation-metrics p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.foundation-metrics b {
  color: var(--text);
  font-weight: 720;
}

.foundation-metrics code {
  align-self: end;
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 12px;
  white-space: normal;
}

.people-section-head {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}

.people-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

.foundation-roots {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  padding: 22px;
}

.foundation-people {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.42;
}

.foundation-people strong {
  color: var(--text);
}

.foundation-portrait {
  margin: 0;
}

.foundation-portrait img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.foundation-portrait figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(780px, 100%);
  margin-top: 9vh;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-metrics div {
  display: grid;
  gap: 6px;
  padding: clamp(16px, 3vw, 28px);
  background: rgba(18, 18, 21, 0.72);
  backdrop-filter: blur(20px);
}

.hero-metrics span {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 720;
}

.hero-metrics small,
.metrics-grid span,
.optimizer p,
.station-result,
.takt-pill small {
  color: var(--muted);
}

.workbench {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 18px;
  padding: 44px clamp(16px, 4vw, 54px);
}

.control-panel,
.map-stage,
.metrics-grid article,
.insights article {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(26px);
  box-shadow: var(--shadow);
}

.control-panel {
  position: sticky;
  top: 74px;
  align-self: start;
  display: grid;
  gap: 16px;
  border-radius: 8px;
  padding: 22px;
}

.panel-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.control-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.control-panel label span,
.station-kpis label,
.quality-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

select {
  appearance: none;
}


.variant-mix-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.variant-mix-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.variant-mix-head strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.variant-mix-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.variant-mix-chart {
  display: grid;
  place-items: center;
}

.variant-mix-donut {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 132px;
  aspect-ratio: 1;
}

.variant-mix-donut svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.variant-mix-donut span,
.variant-mix-donut small {
  position: relative;
  z-index: 1;
}

.variant-mix-donut span {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.variant-mix-donut small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.variant-mix-list {
  display: grid;
  gap: 8px;
}

.variant-mix-list label {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) minmax(92px, 130px) 48px 62px;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.variant-mix-list i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.variant-mix-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-mix-list input {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.variant-mix-list input[type="range"] {
  min-height: 24px;
  padding: 0;
  accent-color: var(--blue);
}

.variant-share-value {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.variant-mix-list b {
  color: var(--text);
  font-size: 11px;
  text-align: right;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.segmented button {
  border: 0;
  border-radius: 999px;
  min-height: 34px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button.is-active {
  background: var(--text);
  color: #050506;
}

.map-stage {
  min-width: 0;
  border-radius: 8px;
  padding: clamp(18px, 3vw, 30px);
}

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.stage-head h2 {
  font-size: 46px;
  white-space: nowrap;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
}

.takt-pill {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 140px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.takt-pill span {
  font-size: 28px;
  font-weight: 720;
}

.vsm-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 34px 26px;
  margin-top: 34px;
}

.station-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 254px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055)),
    rgba(12, 12, 14, 0.72);
}

.station-card::after {
  content: "→";
  position: absolute;
  top: 44%;
  right: -26px;
  color: rgba(245, 245, 247, 0.58);
  font-size: 24px;
}

.station-card:last-child::after {
  content: "";
}

.station-card.is-bottleneck {
  border-color: rgba(255, 214, 10, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 214, 10, 0.34), rgba(255, 214, 10, 0.16)),
    rgba(46, 38, 4, 0.94);
  box-shadow: 0 0 0 2px rgba(255, 214, 10, 0.28), 0 24px 70px rgba(255, 214, 10, 0.16);
}

.kanban-card {
  border-color: rgba(48, 209, 88, 0.55);
  background:
    linear-gradient(180deg, rgba(48, 209, 88, 0.18), rgba(48, 209, 88, 0.055)),
    rgba(8, 24, 14, 0.78);
}

.kanban-symbol {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid rgba(48, 209, 88, 0.45);
  border-radius: 8px;
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.kanban-card .station-status,
.kanban-status {
  color: var(--green);
}

.supplier-card {
  border-color: rgba(255, 159, 10, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 159, 10, 0.18), rgba(255, 159, 10, 0.055)),
    rgba(32, 20, 6, 0.78);
}

.supplier-symbol {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid rgba(255, 159, 10, 0.46);
  border-radius: 8px;
  color: var(--amber);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.supplier-status,
.supplier-cost {
  color: var(--amber);
}

.supplier-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-variant-details,
.station-variant-details,
.supplier-price-variants {
  display: grid;
  gap: 8px;
}

.supplier-variant-row,
.station-variant-row {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255, 159, 10, 0.28);
  border-radius: 8px;
  background: rgba(255, 159, 10, 0.06);
}

.supplier-variant-row strong,
.station-variant-row strong {
  color: var(--text);
  font-size: 12px;
}

.supplier-variant-row label,
.station-variant-row label,
.supplier-price-variants label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.supplier-variant-row input,
.station-variant-row input,
.supplier-price-variants input,
.variant-name {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.variant-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.variant-toggle input {
  width: auto;
  min-height: 0;
  accent-color: var(--blue);
}

.cost-variant-toggle {
  margin-top: 2px;
}


.station-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.station-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}

.station-name {
  min-width: 0;
  min-height: 42px;
  border: 0;
  padding-left: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
}

.icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

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

.station-kpis label,
.quality-row label {
  display: grid;
  color: var(--muted);
  font-size: 12px;
}

.station-kpis input,
.quality-row input {
  min-width: 0;
  padding: 8px;
}

.station-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  font-size: 13px;
}

.station-oee {
  color: var(--text);
  font-weight: 700;
}

.station-status {
  color: var(--amber);
}

.flow-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.flow-chart {
  min-width: 0;
}

.flow-chart h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.timeline {
  display: grid;
  gap: 10px;
}

.time-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.takt-bar span {
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.takt-bar.is-over span {
  background: linear-gradient(90deg, var(--amber), #ff453a);
}

.takt-reference {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.takt-reference-bar span {
  background: rgba(245, 245, 247, 0.76);
}


.cost-workbench {
  padding: 0 clamp(16px, 4vw, 54px) 44px;
}

.cost-workbench .section-header {
  margin-bottom: 18px;
}

.cost-stage {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.cost-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.cost-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.cost-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(320px, 1.25fr);
  gap: 14px;
}

.cost-summary-tile {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.cost-chart-tile {
  align-content: start;
}

.cost-summary span {
  color: var(--text);
  font-size: 30px;
  font-weight: 760;
  line-height: 1;
}

.cost-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.unit-cost-chart-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.unit-cost-donut {
  display: grid;
  place-items: center;
  align-content: center;
  position: relative;
  width: 118px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.unit-cost-donut svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.unit-cost-donut span {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.unit-cost-donut small {
  position: relative;
  z-index: 1;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.unit-cost-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.unit-cost-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.unit-cost-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.unit-cost-legend span {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-cost-legend strong {
  color: var(--text);
  font-size: 12px;
}


.storage-cost-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.storage-cost-panel h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.storage-cost-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.storage-cost-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.storage-cost-tile {
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.storage-cost-tile span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.storage-cost-tile strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.storage-cost-results {
  padding-top: 0;
  border-top: 0;
}

.cost-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cost-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055)), rgba(12, 12, 14, 0.72);
}

.cost-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

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

.cost-field-group {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.cost-field-group h4 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
}

.cost-fields label,
.calculated-rate-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.cost-field-group input,
.calculated-rate {
  font-size: 15px;
}

.calculated-rate {
  display: grid;
  align-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.calculated-rate {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.cost-results {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cost-results div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.cost-results strong {
  color: var(--text);
  text-align: right;
}

.report-cost-block h3 {
  margin-top: 18px;
}

.report-table-gap {
  height: 16px;
}

.report-cost-table {
  width: 100%;
  table-layout: fixed;
  margin-top: 12px;
  font-size: 9px;
}

.report-cost-table th,
.report-cost-table td {
  padding: 5px 4px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 54px) 44px;
}

.section-header {
  grid-column: 1 / -1;
}

.section-header h2 {
  font-size: 46px;
}

.metrics-grid article {
  display: grid;
  gap: 8px;
  min-height: 178px;
  border-radius: 8px;
  padding: 22px;
}

.metrics-grid p {
  margin: 0;
  color: var(--muted);
}

.metrics-grid strong {
  font-size: clamp(34px, 5vw, 62px);
}

.optimizer {
  display: grid;
  gap: 22px;
  padding: 34px clamp(16px, 4vw, 54px) 70px;
}

.optimizer-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.optimizer-copy,
.optimizer-header > p,
.insights {
  min-width: 0;
}

.optimizer-header > p {
  max-width: 720px;
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
}

.optimizer-copy h2 {
  max-width: none;
  font-size: 46px;
  white-space: nowrap;
}

.insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.insights article {
  display: grid;
  grid-template-rows: 8px minmax(0, 1fr);
  gap: 14px;
  min-height: 178px;
  border-radius: 8px;
  padding: 18px;
}

.insights article::before {
  content: "";
  border-radius: 999px;
  background: var(--blue);
}

.insights h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.insights p {
  margin: 0;
  line-height: 1.45;
}

.print-report {
  display: none;
}

.report-page {
  color: #111;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

.report-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e5e5;
}

.report-header img {
  width: 100%;
  max-height: 34px;
  object-fit: contain;
}

.report-header div {
  text-align: center;
}

.report-header p,
.report-header h1 {
  margin: 0;
}

.report-header p {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-header h1 {
  margin-top: 5px;
  color: #111;
  font-size: 28px;
  line-height: 1.05;
  white-space: normal;
}

.report-header span {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 11px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 0;
}

.report-cost-summary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
}

.report-chart-summary-tile {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.report-unit-cost-chart {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
}

.report-unit-cost-chart .unit-cost-donut {
  width: 96px;
  box-shadow: none;
}

.report-unit-cost-chart .unit-cost-donut span {
  color: #111;
  font-size: 13px;
}

.report-unit-cost-chart .unit-cost-donut small {
  color: #666;
  font-size: 8px;
}

.report-unit-cost-chart .unit-cost-legend {
  gap: 4px;
}

.report-unit-cost-chart .unit-cost-legend div {
  grid-template-columns: 8px minmax(0, 1fr) 34px;
  gap: 5px;
  color: #666;
  font-size: 8.5px;
}

.report-unit-cost-chart .unit-cost-legend i {
  width: 8px;
  height: 8px;
}

.report-unit-cost-chart .unit-cost-legend span {
  font-size: 8.5px;
}

.report-unit-cost-chart .unit-cost-legend strong {
  color: #111;
  font-size: 8.5px;
  text-align: right;
}


.report-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 0;
}

.report-meta article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #f8f8f8;
}

.report-meta span {
  color: #666;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-meta strong {
  color: #111;
  font-size: 14px;
}

.report-summary article,
.report-section,
.report-vsm article,
.report-insights article {
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
}

.report-summary article {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.report-summary span,
.report-summary small,
.report-section th,
.report-vsm dt {
  color: #666;
}

.report-summary strong {
  color: #111;
  font-size: 25px;
  line-height: 1;
}

.report-summary small {
  font-size: 10px;
}

.report-section {
  margin-top: 14px;
  padding: 14px;
  break-inside: avoid;
}

.report-section h2 {
  margin: 0 0 10px;
  color: #111;
  font-size: 18px;
  line-height: 1.15;
}

.report-section h3 {
  margin: 0 0 8px;
  color: #111;
  font-size: 13px;
}

.report-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.report-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.report-section th,
.report-section td {
  padding: 7px 0;
  border-bottom: 1px solid #ededed;
  text-align: left;
  vertical-align: top;
}

.report-section td {
  color: #111;
  font-weight: 700;
  text-align: right;
}

.report-cost-matrix th,
.report-cost-matrix td {
  overflow-wrap: anywhere;
}

.report-cost-matrix th:nth-child(n + 2),
.report-cost-matrix td:nth-child(n + 2) {
  text-align: center;
  vertical-align: middle;
}

.report-hourly-total th,
.report-hourly-total td {
  border-top: 1.5px solid #9a9a9a;
  background: #f3f6fb;
  font-weight: 800;
}

.report-unit-cost-row th,
.report-unit-cost-row td {
  padding-top: 11px;
  border-top: 6px solid #fff;
  background: #eef7ff;
  font-weight: 800;
}

.report-vsm {
  display: grid;
  gap: 7px;
}

.report-vsm-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  break-inside: avoid;
  page-break-inside: avoid;
}

.report-vsm article {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  padding: 10px;
}


.report-vsm article.is-supplier {
  border-color: #ff9f0a;
  background: #fff8ed;
  box-shadow: inset 0 0 0 1px #ffcf8a;
}

.report-vsm article.is-bottleneck {
  border-color: #c89200;
  background: #fff7cc;
  box-shadow: inset 0 0 0 1px #c89200;
}

.report-vsm h3,
.report-insights h3 {
  margin: 0 0 8px;
  color: #111;
  font-size: 13px;
  line-height: 1.2;
}

.report-vsm dl {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 10px;
}

.report-vsm dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.report-vsm dd {
  margin: 0;
  color: #111;
  font-weight: 700;
  text-align: right;
}

.report-arrow {
  display: grid;
  flex: 0 0 16px;
  place-items: center;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.report-row-turn {
  display: flex;
  justify-content: flex-end;
  padding-right: 26px;
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.report-flow-block {
  break-before: page;
  page-break-before: always;
  page-break-inside: auto;
}

.report-flow-grid {
  display: grid;
  gap: 12px;
}

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

.report-chart h3 {
  margin: 0 0 8px;
  color: #111;
  font-size: 12px;
}

.report-timeline {
  display: grid;
  gap: 8px;
}

.report-timeline div {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
  color: #333;
  font-size: 10px;
}

.report-timeline b {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececec;
}

.report-timeline i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #005aa9, #16a4d8);
}

.report-takt-timeline i {
  background: linear-gradient(90deg, #16a34a, #005aa9);
}

.report-takt-timeline b.is-over i {
  background: linear-gradient(90deg, #f59e0b, #dc2626);
}

.report-takt-reference {
  padding-top: 4px;
  border-top: 1px solid #d8d8d8;
}

.report-takt-reference i {
  background: #7a7a7a;
}

.report-timeline strong {
  text-align: right;
}

.report-insights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.report-insights article {
  padding: 12px;
  border-left: 5px solid #005aa9;
}

.report-insights p {
  margin: 0;
  color: #333;
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(135px, 1fr) auto minmax(135px, 1fr);
    min-height: 84px;
  }

  .brand-logo img {
    height: 46px;
  }

  h1 {
    font-size: 58px;
  }

  h2,
  .stage-head h2,
  .section-header h2 {
    font-size: 34px;
  }

  .optimizer-copy h2 {
    font-size: 34px;
  }

  .workbench {
    grid-template-columns: 1fr;
  }

  .insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-panel {
    position: static;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-report-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cost-head,
  .cost-summary,
  .unit-cost-chart-card,
  .report-cost-summary {
    grid-template-columns: 1fr;
  }

  .unit-cost-donut {
    margin: 0 auto;
  }

  .foundation-flow {
    grid-template-columns: 1fr;
  }

  .foundation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foundation-roots {
    grid-template-columns: 1fr;
  }

  .file-panel:last-child {
    grid-column: 1 / -1;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html,
  body {
    min-width: 0;
    background: #fff;
    color: #111;
  }

  body.print-mode .app-shell {
    display: none;
  }

  body.print-mode .print-report {
    display: block;
  }

  .report-page {
    width: 100%;
  }

  .report-section {
    page-break-inside: avoid;
  }

  .report-flow-block {
    break-before: page;
    page-break-before: always;
    page-break-inside: auto;
  }

  .report-vsm-row {
    page-break-inside: avoid;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 104px;
  }

  #map,
  #metrics,
  #costs,
  #optimizer,
  #files-report,
  #grundlagen,
  #general-costs {
    scroll-margin-top: 104px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    min-height: 78px;
    padding: 8px 14px;
  }

  .topnav {
    display: none;
  }

  .brand-logo img {
    height: 42px;
  }

  h1 {
    font-size: 28px;
  }

  h2,
  .stage-head h2,
  .section-header h2 {
    font-size: 24px;
  }

  .optimizer-copy h2 {
    font-size: 24px;
  }

  .hero {
    min-height: 88vh;
    padding-top: 104px;
  }

  .hero-metrics,
  .metrics-grid,
  .insights {
    grid-template-columns: 1fr;
  }

  .file-report-grid,
  .storage-actions,
  .foundation-flow,
  .example-grid,
  .foundation-metrics,
  .foundation-roots,
  .cost-head,
  .cost-fields,
  .storage-cost-fields {
    grid-template-columns: 1fr;
  }

  .file-panel:last-child {
    grid-column: auto;
  }

  .optimizer-header {
    gap: 12px;
  }

  .optimizer-header > p {
    font-size: 16px;
  }

  .insights article {
    min-height: 0;
  }

  .stage-head {
    display: grid;
  }

  .takt-pill {
    justify-items: start;
  }

  .station-card::after {
    top: auto;
    right: 18px;
    bottom: -29px;
    transform: rotate(90deg);
  }

  .flow-charts {
    grid-template-columns: 1fr;
  }

  .time-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 460px);
  min-height: 100vh;
  background: radial-gradient(circle at 22% 24%, rgba(41, 151, 255, 0.28), transparent 34rem), #050506;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.login-visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-brand-strip {
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #fff;
}

.login-brand-strip img {
  max-width: min(38vw, 260px);
  height: 48px;
  object-fit: contain;
}

.login-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 56px);
  background: rgba(18, 18, 22, 0.94);
  border-left: 1px solid var(--line);
}

.login-card h1 {
  white-space: normal;
  font-size: clamp(42px, 5vw, 72px);
}

.login-card p,
.login-card small {
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-field button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { min-height: 240px; }
  .login-card { border-left: 0; border-top: 1px solid var(--line); }
}


/* Zukunftsorientierte Produktionsgestaltung */
#management,
#wertstrom,
#qualitaet,
#werkzeuge,
#unterlagen,
#start {
  scroll-margin-top: 142px;
}

.learning-shell {
  background:
    radial-gradient(circle at 60% 0%, rgba(41, 151, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 18% 30%, rgba(191, 90, 242, 0.12), transparent 28rem),
    linear-gradient(180deg, #000 0%, #08080a 42%, #050506 100%);
}

.learning-main {
  padding: 142px clamp(18px, 5vw, 72px) 72px;
}

.learning-hero {
  min-height: calc(100vh - 124px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
}

.learning-hero-copy {
  max-width: 980px;
}

.learning-hero h1 {
  max-width: 940px;
  margin: 0 0 26px;
  font-size: clamp(38px, 5.8vw, 86px);
  line-height: 1.02;
  letter-spacing: 0;
}

.learning-hero p {
  max-width: 760px;
  color: rgba(245, 245, 247, 0.72);
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.5;
  margin: 0 0 28px;
}

.learning-hero-panel {
  display: grid;
  gap: 12px;
}

.learning-hero-panel div,
.learning-card,
.tool-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.095), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.learning-hero-panel div {
  display: grid;
  gap: 6px;
  padding: 20px;
}

.learning-hero-panel span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.learning-hero-panel strong {
  font-size: 24px;
}

.learning-hero-panel small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.learning-section {
  padding: 76px 0;
}

.learning-grid,
.tool-grid {
  display: grid;
  gap: 22px;
}

.learning-grid.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.learning-grid.three,
.tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.learning-card,
.tool-card {
  padding: clamp(20px, 3vw, 32px);
}

.learning-card h3,
.tool-card strong {
  display: block;
  margin: 0 0 18px;
  font-size: clamp(20px, 1.65vw, 28px);
  line-height: 1.18;
}

.learning-card p,
.learning-card li,
.definition-list dd,
.source-list li,
.tool-card small {
  color: rgba(245, 245, 247, 0.72);
  line-height: 1.58;
}

.learning-list,
.source-list,
.pill-list {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.learning-list li,
.source-list li {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 12px 0;
}

.learning-list.compact li {
  padding: 8px 0;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-list li,
.cycle-row span,
.dmaic-strip span {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 7px 11px;
  color: rgba(245,245,247,0.82);
  background: rgba(255,255,255,0.06);
  font-weight: 700;
  font-size: 13px;
}

.definition-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.definition-list dt {
  color: var(--text);
  font-weight: 800;
}

.definition-list dd {
  margin: -8px 0 6px;
}

.cycle-row,
.dmaic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.dmaic-strip span {
  color: #00111f;
  background: linear-gradient(180deg, #6ec3ff, #2997ff);
  border: 0;
}

.tool-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.tool-callout div,
.tool-callout span {
  display: grid;
  gap: 4px;
}

.tool-callout span {
  color: var(--muted);
}

.tool-card {
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(41,151,255,0.45);
  background: linear-gradient(180deg, rgba(41,151,255,0.18), rgba(255,255,255,0.055));
}

.tool-card span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.source-list a {
  color: var(--blue);
  text-decoration: none;
}

.source-list a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .learning-hero,
  .learning-grid.two,
  .learning-grid.three,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .learning-main {
    padding-top: 150px;
  }
}


.section-header {
  margin-bottom: clamp(24px, 4vw, 44px);
}

.section-header h2 {
  max-width: 1060px;
  margin-top: 8px;
  font-size: clamp(30px, 4.2vw, 62px);
  line-height: 1.08;
}

.site-footer {
  display: flex;
  justify-content: flex-end;
  padding: 28px clamp(18px, 5vw, 72px) 42px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(245,245,247,0.72);
  text-align: right;
}

.site-footer p {
  margin: 0;
  line-height: 1.45;
}

.site-footer a {
  color: var(--blue);
  text-decoration: none;
}

.management-methods {
  margin-top: 22px;
}

.visual-card {
  overflow: hidden;
}

.waste-wheel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.waste-wheel span,
.five-s-flow span,
.principle-lane span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 8px 10px;
  color: rgba(245,245,247,0.86);
  background: linear-gradient(180deg, rgba(41,151,255,0.18), rgba(255,255,255,0.055));
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.five-s-flow {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.five-s-flow span {
  justify-content: flex-start;
  border-radius: 8px;
}

.five-s-flow span::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--green);
}

.principle-lane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.principle-lane i {
  width: 22px;
  height: 1px;
  background: rgba(245,245,247,0.42);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(160px, 230px) minmax(260px, 1fr) minmax(160px, 230px);
  }

  .topnav-row {
    gap: 10px;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: sticky;
    grid-template-columns: 1fr;
    justify-items: stretch;
    min-height: 0;
  }

  .inventorlab-stack,
  .account-stack {
    justify-items: start;
  }

  .header-legal-links {
    justify-content: flex-start;
  }

  .learning-main {
    padding-top: 34px;
  }

  .learning-hero {
    min-height: auto;
    padding-top: 22px;
  }
}


/* Header symmetry and tighter learning typography */
.account-stack,
.inventorlab-stack {
  width: min(260px, 100%);
}

.account-stack .user-chip,
.account-stack .logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.72);
  background: #fff;
  color: #111113;
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
}

.account-stack .logout-link:hover {
  color: #005aa9;
}

.inventorlab-logo {
  width: 100%;
}

.inventorlab-logo img {
  height: 62px;
  border-radius: 10px;
  padding: 5px;
}

.learning-hero {
  min-height: auto;
  padding: clamp(24px, 5vw, 56px) 0 clamp(52px, 7vw, 92px);
  align-items: center;
}

.learning-hero h1 {
  max-width: 820px;
  font-size: clamp(32px, 4.25vw, 64px);
  line-height: 1.08;
  margin-bottom: 30px;
  overflow-wrap: anywhere;
}

.learning-hero p {
  margin-bottom: 34px;
}

.learning-hero-panel strong {
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.2;
}

.section-header {
  margin-bottom: clamp(34px, 5vw, 58px);
}

.section-header h2 {
  max-width: 920px;
  font-size: clamp(26px, 3.25vw, 46px);
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.learning-card h3,
.tool-card strong {
  font-size: clamp(19px, 1.45vw, 25px);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.learning-section {
  padding: clamp(62px, 8vw, 96px) 0;
}

.materials-grid {
  align-items: start;
}

.materials-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.materials-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff453a, #bf1e2e);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22), 0 18px 36px rgba(0,0,0,0.28);
}

.material-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.material-list a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  color: rgba(245,245,247,0.82);
  text-decoration: none;
  line-height: 1.25;
}

.material-list a::before {
  content: "";
  width: 14px;
  height: 18px;
  border-radius: 3px;
  background: rgba(255,255,255,0.88);
  box-shadow: inset -4px 4px 0 rgba(255,69,58,0.32);
}

.material-list a:hover {
  border-color: rgba(41,151,255,0.45);
  color: #fff;
  background: rgba(41,151,255,0.12);
}

@media (max-width: 1180px) {
  .account-stack,
  .inventorlab-stack {
    width: min(220px, 100%);
  }
}

@media (max-width: 760px) {
  .account-stack,
  .inventorlab-stack {
    width: 100%;
  }

  .inventorlab-logo img {
    max-width: 240px;
  }

  .learning-hero h1 {
    font-size: clamp(30px, 11vw, 44px);
  }
}


.learning-hero h1 br {
  display: block;
}


/* Hero title collision fix */
.learning-hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.62fr);
  gap: clamp(42px, 7vw, 118px);
}

.learning-hero-copy {
  min-width: 0;
  max-width: 760px;
}

.learning-hero h1 {
  max-width: 720px;
  font-size: clamp(30px, 3.65vw, 54px);
  line-height: 1.12;
  margin-bottom: 34px;
  text-wrap: balance;
}

.learning-hero-panel {
  align-self: center;
  min-width: 280px;
}

@media (max-width: 1220px) {
  .learning-hero {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .learning-hero-copy {
    max-width: 860px;
  }

  .learning-hero h1 {
    max-width: 760px;
    font-size: clamp(30px, 6vw, 58px);
  }

  .learning-hero-panel {
    max-width: 760px;
  }
}

/* Management image modal */
.image-modal-trigger {
  display: inline;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(41,151,255,0.42);
  text-underline-offset: 6px;
}

.image-modal-trigger:hover,
.image-modal-trigger:focus-visible {
  color: var(--blue);
  outline: none;
}

.learning-image-modal[aria-hidden="true"] {
  display: none;
}

.learning-image-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 52px);
}

.learning-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(18px);
}

.learning-image-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 96vw);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: #050506;
  box-shadow: 0 34px 120px rgba(0,0,0,0.72);
}

.learning-image-modal-dialog img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.learning-image-modal-dialog figcaption {
  display: grid;
  gap: 6px;
  padding: 18px 22px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
}

.learning-image-modal-dialog figcaption strong {
  color: var(--text);
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.18;
}

.learning-image-modal-dialog figcaption span {
  color: rgba(245,245,247,0.72);
  line-height: 1.5;
}

.learning-image-modal-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  background: rgba(0,0,0,0.62);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.learning-image-modal-close:hover,
.learning-image-modal-close:focus-visible {
  background: rgba(41,151,255,0.86);
  outline: none;
}

/* Refined login screen */
.login-screen-zpg {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr);
  width: 100vw;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 20%, rgba(41,151,255,0.18), transparent 34rem),
    radial-gradient(circle at 72% 76%, rgba(191,90,242,0.12), transparent 28rem),
    #000;
}

.login-visual-zpg {
  position: relative;
  display: grid;
  align-items: center;
  padding: clamp(28px, 6vw, 86px);
  overflow: hidden;
}

.login-visual-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  max-width: 880px;
}

.login-visual-content h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(34px, 5.4vw, 78px);
  line-height: 1.06;
  letter-spacing: 0;
}

.login-visual-content h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1.22;
  font-weight: 800;
}

.login-visual-content img {
  width: min(760px, 92%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  box-shadow: 0 34px 96px rgba(0,0,0,0.52);
}

.login-card-zpg {
  align-self: center;
  justify-self: center;
  width: min(520px, calc(100% - 36px));
  margin: 0 clamp(18px, 4vw, 58px) 0 0;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.045));
  box-shadow: 0 28px 90px rgba(0,0,0,0.58);
}

.login-card-logo {
  display: block;
  width: min(260px, 80%);
  height: auto;
  margin: 0 0 28px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
}

.login-card-zpg h1 {
  font-size: clamp(30px, 3vw, 44px);
}

@media (max-width: 980px) {
  .login-screen-zpg {
    grid-template-columns: 1fr;
  }

  .login-card-zpg {
    width: min(620px, calc(100% - 36px));
    margin: 0 auto 38px;
  }

  .login-visual-zpg {
    min-height: auto;
    padding-bottom: 34px;
  }
}

/* Tool launcher modal */
.tool-card {
  appearance: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.tool-launch-modal[aria-hidden="true"] {
  display: none;
}

.tool-launch-modal {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 28px);
}

.tool-launch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(16px);
}

.tool-launch-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1500px, 98vw);
  height: min(920px, 94vh);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: #050506;
  box-shadow: 0 34px 120px rgba(0,0,0,0.72);
}

.tool-launch-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: rgba(18,18,20,0.96);
}

.tool-launch-dialog header strong {
  color: var(--text);
  font-size: 16px;
}

.tool-launch-dialog header div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-launch-dialog header a,
.tool-launch-dialog header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  padding: 0 12px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.tool-launch-dialog header button {
  width: 34px;
  padding: 0;
  font-size: 23px;
  line-height: 1;
}

.tool-launch-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}


/* Login title overlap fix */
.login-visual-content h1 {
  max-width: 680px;
  font-size: clamp(28px, 4.1vw, 56px);
  line-height: 1.12;
}

.login-visual-content h2 {
  max-width: 620px;
  font-size: clamp(15px, 1.55vw, 23px);
  line-height: 1.25;
}

.login-visual-content {
  gap: 18px;
}

@media (max-width: 980px) {
  .login-visual-content h1 {
    font-size: clamp(28px, 8vw, 44px);
  }

  .login-visual-content h2 {
    font-size: clamp(15px, 4vw, 21px);
  }
}

.section-subtitle {
  display: inline-block;
  color: rgba(245,245,247,0.68);
  font-size: 0.62em;
  font-weight: 700;
}
