:root {
  color-scheme: dark;
  --bg: #07050e;
  --bg-deep: #12081f;
  --panel: rgba(15, 11, 28, 0.88);
  --panel-strong: rgba(22, 14, 40, 0.96);
  --panel-soft: rgba(27, 18, 46, 0.78);
  --ink: #f3efff;
  --muted: #b8afcf;
  --line: rgba(183, 118, 255, 0.22);
  --line-strong: rgba(183, 118, 255, 0.42);
  --accent: #b46cff;
  --accent-strong: #8f3dff;
  --accent-soft: rgba(180, 108, 255, 0.12);
  --neon: #a7ff2e;
  --neon-soft: rgba(167, 255, 46, 0.1);
  --cover: #b46cff;
  --duct: #a7ff2e;
  --warning: #ffd86b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(180, 108, 255, 0.24), transparent 22%),
    radial-gradient(circle at 82% 10%, rgba(167, 255, 46, 0.12), transparent 18%),
    radial-gradient(circle at 82% 72%, rgba(143, 61, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #090611 0%, #05030a 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 90%);
  opacity: 0.35;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.app-version {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 50;
  padding: 5px 9px;
  border: 1px solid rgba(167, 255, 46, 0.28);
  border-radius: 999px;
  background: rgba(9, 6, 17, 0.72);
  color: rgba(243, 239, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 18px rgba(167, 255, 46, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
  min-height: 360px;
  margin-bottom: 28px;
}

.hero-brand {
  display: grid;
  gap: 0;
  justify-items: start;
  align-self: center;
}

.hero-logo-wrap {
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  min-width: 0;
}

.brand-logo {
  width: clamp(300px, 34vw, 520px);
  height: auto;
  display: block;
  margin: 0;
  opacity: 0.96;
  filter:
    drop-shadow(0 28px 54px rgba(0, 0, 0, 0.46))
    drop-shadow(0 0 34px rgba(180, 108, 255, 0.1));
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--neon);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Avenir Next Condensed", "Helvetica Neue", sans-serif;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.95;
  margin-bottom: 14px;
  text-shadow: 0 0 24px rgba(180, 108, 255, 0.18);
}

h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.lead,
.hero-note p,
.notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-note,
.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(23, 15, 41, 0.98), rgba(11, 8, 22, 0.95));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-note::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(180, 108, 255, 0.1), transparent 34%),
    linear-gradient(300deg, rgba(167, 255, 46, 0.06), transparent 28%);
  opacity: 0.9;
}

.hero-note {
  padding: 18px;
  border-radius: 22px;
}

.hero-note strong {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: 0.06em;
}

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

.panel {
  border-radius: 26px;
  padding: 22px;
  backdrop-filter: blur(18px);
}

.panel > * {
  position: relative;
  z-index: 1;
}

.form-panel,
.summary-panel,
.preview-panel,
.table-panel {
  grid-column: 1 / -1;
}

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

.field-wide {
  grid-column: span 3;
}

.length-extension-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 14px;
  align-items: stretch;
}

.length-extension-row #length-field {
  margin-bottom: 14px;
}

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

.inner-size-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(167, 255, 46, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 15% 10%, rgba(167, 255, 46, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(22, 16, 38, 0.96), rgba(8, 6, 18, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(0, 0, 0, 0.24);
}

.inner-size-info strong {
  color: var(--neon);
  font-size: 0.95rem;
}

.inner-size-info code {
  display: block;
  color: #efe9ff;
  white-space: normal;
}

.outer-corner-extension-panel {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  min-height: 108px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(167, 255, 46, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 10%, rgba(167, 255, 46, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(180, 108, 255, 0.12), rgba(8, 6, 18, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(0, 0, 0, 0.28);
}

.outer-corner-extension-art {
  display: block;
  width: 92px;
  aspect-ratio: 1;
  align-self: center;
  border-radius: 14px;
  background-color: rgba(8, 6, 17, 0.8);
  background-image: url("/termination-assets/bild%202.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.34);
}

.outer-corner-extension-copy {
  display: grid;
  gap: 7px;
  align-content: center;
}

.outer-corner-extension-copy strong {
  color: var(--ink);
  line-height: 1.1;
}

.outer-corner-extension-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.outer-corner-extension-choice {
  display: grid;
  grid-template-columns: minmax(104px, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.9rem;
}

.outer-corner-extension-choice > span {
  color: var(--muted);
}

.outer-corner-extension-choice small {
  color: var(--neon);
}

.outer-corner-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.outer-corner-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.outer-corner-toggle-track {
  position: relative;
  width: 52px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.12), transparent 42%),
    rgba(243, 239, 255, 0.18);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.36),
    0 8px 20px rgba(0, 0, 0, 0.22);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.outer-corner-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f7f4ff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 160ms ease, background 160ms ease;
}

.outer-corner-toggle input:checked + .outer-corner-toggle-track {
  border-color: rgba(167, 255, 46, 0.65);
  background:
    radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(167, 255, 46, 0.92), rgba(180, 108, 255, 0.78));
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.25),
    0 0 18px rgba(167, 255, 46, 0.24);
}

.outer-corner-toggle input:checked + .outer-corner-toggle-track::after {
  transform: translateX(24px);
  background: #ffffff;
}

.outer-corner-toggle input:focus-visible + .outer-corner-toggle-track {
  outline: 3px solid rgba(167, 255, 46, 0.35);
  outline-offset: 3px;
}

.outer-corner-toggle-state {
  min-width: 28px;
  color: var(--muted);
  font-weight: 700;
}

.outer-corner-toggle-state::after {
  content: attr(data-off);
}

.outer-corner-toggle input:checked ~ .outer-corner-toggle-state {
  color: var(--neon);
}

.outer-corner-toggle input:checked ~ .outer-corner-toggle-state::after {
  content: attr(data-on);
}

.outer-corner-extension-copy code {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--neon);
  background: rgba(4, 3, 10, 0.58);
  overflow-wrap: anywhere;
}

.field span,
legend {
  font-weight: 700;
  color: #efe9ff;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(183, 118, 255, 0.22);
  border-radius: 16px;
  padding: 13px 15px;
  background: rgba(9, 7, 19, 0.92);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

input::placeholder {
  color: #8f85a9;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow:
    0 0 0 3px rgba(167, 255, 46, 0.12),
    0 0 22px rgba(167, 255, 46, 0.08);
  transform: translateY(-1px);
}

textarea {
  min-height: 160px;
  resize: vertical;
  font-family: "SFMono-Regular", "Roboto Mono", monospace;
  line-height: 1.45;
}

small {
  color: #9f95b8;
}

.info-strip,
.notice {
  margin: 8px 0 16px;
  padding: 15px 17px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(180, 108, 255, 0.1), rgba(167, 255, 46, 0.08)),
    rgba(12, 9, 25, 0.85);
  border: 1px solid rgba(167, 255, 46, 0.18);
}

.info-strip strong,
.notice strong {
  color: var(--neon);
}

.license-panel {
  margin-bottom: 22px;
}

.license-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.license-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(167, 255, 46, 0.26);
  background: rgba(167, 255, 46, 0.08);
  color: var(--neon);
  font-weight: 800;
}

.license-badge.is-blocked {
  border-color: rgba(255, 216, 107, 0.4);
  background: rgba(255, 216, 107, 0.12);
  color: var(--warning);
}

.license-message {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.license-actions {
  display: grid;
  gap: 10px;
}

.license-action-row {
  margin-bottom: 4px;
}

.license-import-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(180, 108, 255, 0.2);
  background: rgba(10, 7, 20, 0.76);
}

.choice-group {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 8, 20, 0.64);
}

.toggle-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toggle-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.toggle-row input[type="radio"] {
  accent-color: var(--neon);
}

.termination-section {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
}

.termination-block {
  padding: 16px;
  border: 1px solid rgba(180, 108, 255, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(180, 108, 255, 0.09), rgba(167, 255, 46, 0.035)),
    rgba(7, 5, 16, 0.72);
}

.termination-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.termination-heading span {
  font-weight: 800;
  color: var(--ink);
}

.termination-heading small {
  text-align: right;
}

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

.termination-card {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(183, 118, 255, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 25% 10%, rgba(180, 108, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(20, 14, 35, 0.94), rgba(8, 6, 18, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.termination-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.termination-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 255, 46, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.32);
}

.termination-card:has(input:checked) {
  border-color: rgba(167, 255, 46, 0.9);
  background:
    radial-gradient(circle at 50% 0%, rgba(167, 255, 46, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(29, 22, 46, 0.98), rgba(9, 7, 18, 0.94));
  box-shadow:
    0 0 0 1px rgba(167, 255, 46, 0.24),
    0 0 26px rgba(167, 255, 46, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.34);
}

.termination-card:has(input:focus-visible) {
  outline: 3px solid rgba(167, 255, 46, 0.34);
  outline-offset: 3px;
}

.termination-card strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.1;
}

.termination-card small {
  color: var(--muted);
  line-height: 1.35;
}

.termination-art {
  display: block;
  width: min(132px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 4px;
  min-height: 0;
  border-radius: 16px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.termination-art svg {
  display: none;
}

.termination-card:has(input[value="straight"]) .termination-art {
  background-image: url("/termination-assets/a%201.png");
}

.termination-card:has(input[value="cap"]) .termination-art {
  background-image: url("/termination-assets/a%202%20Kappe.png");
}

.termination-card:has(input[value="cornerRight"]) .termination-art {
  background-image: url("/termination-assets/a%203%20rechts.png");
}

.termination-card:has(input[value="cornerLeft"]) .termination-art {
  background-image: url("/termination-assets/a%204%20links.png");
}

.termination-card:has(input[value="innerCorner"]) .termination-art {
  background-image: url("/termination-assets/a%204%20innenecke2.png");
}

.termination-card:has(input[value="outerCorner"]) .termination-art {
  background-image: url("/termination-assets/a%206%20ausseneck.png");
}

.photo-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.photo-option-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(183, 118, 255, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 25% 10%, rgba(180, 108, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(20, 14, 35, 0.94), rgba(8, 6, 18, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.photo-option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.photo-option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 255, 46, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.32);
}

.photo-option-card:has(input:checked) {
  border-color: rgba(167, 255, 46, 0.9);
  background:
    radial-gradient(circle at 50% 0%, rgba(167, 255, 46, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(29, 22, 46, 0.98), rgba(9, 7, 18, 0.94));
  box-shadow:
    0 0 0 1px rgba(167, 255, 46, 0.24),
    0 0 26px rgba(167, 255, 46, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.34);
}

.photo-option-card:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.44;
  filter: grayscale(0.25) saturate(0.75);
}

.photo-option-card:has(input:disabled):hover {
  transform: none;
  border-color: rgba(183, 118, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.24);
}

.photo-option-card:has(input:focus-visible) {
  outline: 3px solid rgba(167, 255, 46, 0.34);
  outline-offset: 3px;
}

.photo-option-card strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.1;
}

.photo-option-card small {
  color: var(--muted);
  line-height: 1.35;
}

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

.product-type-card {
  min-height: 132px;
}

.product-choice-card {
  min-height: 232px;
}

.product-type-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #071005;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.68), transparent 28%),
    linear-gradient(135deg, var(--neon), #b46cff);
  box-shadow:
    0 0 0 1px rgba(167, 255, 46, 0.2),
    0 14px 34px rgba(167, 255, 46, 0.18);
}

.product-type-art {
  display: block;
  width: min(340px, 100%);
  aspect-ratio: 16 / 9;
  margin: 0 auto 10px;
  border-radius: 20px;
  background-color: rgba(8, 6, 17, 0.8);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(167, 255, 46, 0.15),
    0 18px 38px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(167, 255, 46, 0.1);
  overflow: hidden;
}

.product-type-art-cables {
  background-image: url("/public/product-assets/product-cables-photo.png");
}

.product-type-art-led-strip {
  background-image: url("/public/product-assets/product-led-strip-photo.png");
}

.photo-option-art {
  display: block;
  width: min(156px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 4px;
  border-radius: 16px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.led-option-art {
  display: block;
  width: min(156px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 4px;
  border-radius: 16px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.led-option-a {
  background-image: url("/led-assets/led-a.png");
}

.led-option-b {
  background-image: url("/led-assets/led-b.png");
}

.led-option-c {
  background-image: url("/led-assets/led-c.png");
}

.led-option-straight {
  background-image: url("/led-assets/led-gerade.png");
}

.led-option-inner {
  background-image: url("/led-assets/led-innenecke.png");
}

.led-option-outer {
  background-image: url("/led-assets/led-ausseneck.png");
}

.led-option-cap {
  background-image: url("/led-assets/led-cap.png");
}

.led-degree-0 {
  background-image: url("/led-assets/led-degree-0.png?v=20260503l");
}

.led-degree-15 {
  background-image: url("/led-assets/led-degree-15.png?v=20260503l");
}

.led-degree-30 {
  background-image: url("/led-assets/led-degree-30.png?v=20260503l");
}

.led-degree-45 {
  background-image: url("/led-assets/led-degree-45.png?v=20260503l");
}

.holes-art-none {
  background-image: url("/termination-assets/b%20keine.png");
}

.holes-art-enabled {
  background-image: url("/termination-assets/b%20bohrungen.png");
}

.cover-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cover-type-art-standard {
  background-image: url("/termination-assets/A4%20standard.png");
}

.cover-type-art-reinforced {
  background-image: url("/termination-assets/A4%20verst%C3%A4rkt.png");
}

.cover-type-art-thin {
  background-image: url("/termination-assets/A4%20d%C3%BCnn.png");
}

.wall-art-left-none,
.wall-art-right-none {
  background-image: url("/termination-assets/c%20wandaussparung%20keine.png");
}

.wall-art-right-none {
  transform: scaleX(-1);
}

.wall-art-left-enabled {
  background-image: url("/termination-assets/C%20Wandaussparung%20links.png");
}

.wall-art-right-enabled {
  background-image: url("/termination-assets/C%20Wandaussparung%20rechts.png");
}

.cover-art-none {
  background-image: url("/termination-assets/d%20keine.png");
}

.cover-art-enabled,
.cover-art-circle {
  background-image: url("/termination-assets/d%20kreis.png");
}

.cover-art-rectangle {
  background-image: url("/termination-assets/d%20rechteck.png");
}

.subsection.hidden {
  display: none;
}

.cutout-list {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.cover-cutout-item,
.wall-cutout-item {
  padding: 14px;
  border: 1px solid rgba(180, 108, 255, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(180, 108, 255, 0.08), rgba(167, 255, 46, 0.04)),
    rgba(6, 4, 14, 0.56);
}

.cutout-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cutout-title {
  color: var(--neon);
}

.cutout-add-button {
  margin-bottom: 14px;
}

.choice-note {
  color: #9f95b8;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .cover-type-grid {
    grid-template-columns: 1fr;
  }
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.card {
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(20, 14, 35, 0.92), rgba(8, 6, 18, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 36px rgba(0, 0, 0, 0.22);
}

.card:nth-child(odd) {
  border-color: rgba(180, 108, 255, 0.28);
}

.card:nth-child(even) {
  border-color: rgba(167, 255, 46, 0.18);
}

.card .label {
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card .value {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

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

.ghost {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(167, 255, 46, 0.22);
  background: linear-gradient(135deg, rgba(180, 108, 255, 0.92), rgba(143, 61, 255, 0.92));
  color: #f8f5ff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 16px 30px rgba(102, 37, 193, 0.38);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.ghost:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 4px rgba(167, 255, 46, 0.08),
    0 18px 36px rgba(102, 37, 193, 0.42);
  filter: saturate(1.1);
}

.ghost:active {
  transform: translateY(0);
}

.ghost[disabled] {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
  filter: grayscale(0.15);
}

.ghost[disabled]:hover {
  transform: none;
  box-shadow: none;
}

.secondary-action {
  background: linear-gradient(135deg, rgba(22, 17, 35, 0.95), rgba(12, 9, 21, 0.92));
  color: var(--neon);
  border-color: rgba(167, 255, 46, 0.26);
  box-shadow:
    0 0 0 1px rgba(167, 255, 46, 0.05) inset,
    0 14px 26px rgba(0, 0, 0, 0.25);
}

.export-status {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  align-items: start;
  gap: 16px;
  margin: 0 0 14px;
}

.viewer-stage,
.viewer-sidebar {
  border-radius: 22px;
  border: 1px solid rgba(180, 108, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(14, 10, 25, 0.96), rgba(8, 6, 17, 0.94));
}

.viewer-stage {
  min-height: 390px;
  overflow: hidden;
  position: relative;
}

.viewer-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.viewer-tool-button {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(167, 255, 46, 0.18);
  background: rgba(11, 9, 22, 0.88);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.viewer-tool-button:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 255, 46, 0.38);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.32),
    0 0 0 4px rgba(167, 255, 46, 0.08);
}

.viewer-overlay-measures {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(88%, 360px);
}

.viewer-overlay-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(180, 108, 255, 0.18);
  background: rgba(11, 9, 22, 0.88);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.viewer-canvas {
  display: block;
  width: 100%;
  height: 390px;
  cursor: grab;
}

.viewer-canvas:active {
  cursor: grabbing;
}

.viewer-sidebar {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.viewer-meta,
.viewer-toggle-block {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(180, 108, 255, 0.1);
}

.viewer-status {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.viewer-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.viewer-nav-button {
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(180, 108, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.viewer-nav-button:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 255, 46, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.viewer-nav-button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.viewer-selection-meta {
  text-align: center;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.viewer-measures {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.viewer-measure-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(180, 108, 255, 0.08);
}

.viewer-measure-label {
  color: #9f95b8;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.viewer-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
  gap: 14px;
  margin-top: 12px;
}

.viewer-selection-block {
  margin-top: 16px;
}

.viewer-toggle-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.viewer-toggle-column h4 {
  margin: 0;
  color: var(--neon);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.viewer-toggle-list {
  display: grid;
  gap: 10px;
}

.viewer-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.viewer-toggle-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(180, 108, 255, 0.08);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.viewer-toggle-item:hover {
  transform: translateY(-1px);
  border-color: rgba(180, 108, 255, 0.24);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.viewer-toggle-item.is-active {
  border-color: rgba(167, 255, 46, 0.36);
  background:
    linear-gradient(135deg, rgba(167, 255, 46, 0.08), rgba(180, 108, 255, 0.08)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 0 0 3px rgba(167, 255, 46, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.18);
}

.viewer-thumb {
  width: 74px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.viewer-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.viewer-toggle-text strong {
  font-size: 0.94rem;
  color: var(--ink);
  word-break: break-word;
}

.viewer-toggle-text small {
  color: #9f95b8;
}

.download-links {
  margin: 0 0 18px;
  padding: 15px 17px;
  border-radius: 18px;
  border: 1px solid rgba(180, 108, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(14, 10, 25, 0.94), rgba(8, 6, 17, 0.92));
}

.download-links.hidden {
  display: none;
}

.download-links h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.download-links p {
  margin: 0 0 12px;
  color: var(--muted);
}

.download-links ul {
  margin: 0;
  padding-left: 18px;
}

.download-links li + li {
  margin-top: 6px;
}

.download-links a {
  color: var(--neon);
  text-decoration: none;
  font-weight: 700;
}

.download-links a:hover {
  text-decoration: underline;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.diagram {
  min-height: 220px;
  border: 1px dashed rgba(180, 108, 255, 0.22);
  border-radius: 20px;
  padding: 14px;
  background:
    radial-gradient(circle at top right, rgba(167, 255, 46, 0.06), transparent 24%),
    rgba(9, 7, 18, 0.92);
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.legend {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 12px currentColor;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(180, 108, 255, 0.16);
  background: rgba(8, 6, 17, 0.78);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid rgba(180, 108, 255, 0.12);
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}

tbody tr:hover {
  background: rgba(167, 255, 46, 0.06);
}

th {
  color: #d4c8f2;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.02);
}

td {
  color: var(--ink);
}

code {
  font-family: "SFMono-Regular", ui-monospace, monospace;
  color: #d9ff9b;
}

a {
  color: var(--neon);
}

@media (max-width: 920px) {
  .hero,
  .layout,
  .preview-grid,
  .field-grid,
  .summary-cards {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    gap: 24px;
  }

  .hero-logo-wrap {
    justify-self: start;
  }

  .brand-logo {
    width: min(100%, 340px);
  }

  .field-wide {
    grid-column: span 1;
  }

  .length-extension-row {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-layout {
    grid-template-columns: 1fr;
  }

  .termination-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .termination-heading small {
    text-align: left;
  }

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

  .photo-option-grid {
    grid-template-columns: 1fr;
  }

  .ghost {
    width: 100%;
    justify-content: center;
  }

  .action-row {
    width: 100%;
  }

  .viewer-canvas {
    height: 320px;
  }

  .viewer-overlay-measures {
    max-width: calc(100% - 28px);
  }
}

@media (max-width: 640px) {
  .termination-grid {
    grid-template-columns: 1fr;
  }
}
