/* PN-Technik Tuning-Konfigurator (Claude, 2026-11-06). Farben und Schriften aus pn-tokens.css. */
html.pn-skin { --tn-warn: #FFB547; --tn-warn-soft: #E8C48A; --tn-stock: #6B7079; --tn-nm: #FF8A4C; --tn-ease: cubic-bezier(0.23, 1, 0.32, 1); }
html.pn-skin.pn-theme-light { --tn-warn: #A15C00; --tn-warn-soft: #8A5A12; --tn-stock: #9AA0A8; --tn-nm: #C2410C; }
*, *::before, *::after { box-sizing: border-box; }
html.pn-skin body { margin: 0; background: var(--pn-bg); color: var(--pn-ink); font: 16px/1.5 var(--pn-font-text); -webkit-font-smoothing: antialiased; }
html.embed-mode body { background: transparent; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.tn__visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tn { max-width: 1240px; margin: 0 auto; padding: 40px 24px 64px; display: grid; gap: 20px; }
html.embed-mode .tn { padding: 0; max-width: none; }
html.embed-mode .tn__hero { display: none; }

/* Kopf (nur ohne Einbettung) */
.tn__hero { padding: 8px 0 12px; }
.tn__logo { display: block; height: 36px; width: auto; margin-bottom: 40px; }
.tn__eyebrow { margin: 0 0 10px; font: 500 13px var(--pn-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pn-accent-text); }
.tn__title { margin: 0 0 14px; font: 800 clamp(44px, 7vw, 88px)/.92 var(--pn-font-display); text-transform: uppercase; }
.tn__lead { margin: 0; max-width: 640px; color: var(--pn-muted); font-size: 17px; }

.tn__card { position: relative; background: var(--pn-surface); border: 1px solid var(--pn-line); padding: 32px; }
.tn__card::before { content: ""; position: absolute; inset: -1px -1px auto -1px; height: 2px; background: linear-gradient(90deg, var(--pn-accent), transparent 70%); }
html.embed-mode .tn__card { border-color: var(--pn-line); }

/* Fahrzeugart */
.tn__types { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.tn__types button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; cursor: pointer;
  border: 1px solid var(--pn-line); background: var(--pn-field); font-weight: 600; font-size: 14px;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms var(--tn-ease);
}
.tn__types button:active { transform: scale(0.97); }
.tn__types svg { width: 22px; height: 22px; flex-shrink: 0; }
.tn__types button[aria-checked="true"] { border-color: var(--pn-accent); color: var(--pn-accent-text); background: var(--pn-accent-soft); }

/* Schnellsuche */
.tn__search { position: relative; margin: 0 0 20px; }
.tn__label, .tn__steps label > span { display: block; font-size: 13px; color: var(--pn-muted); }
.tn__label { margin: 0 0 6px; }
.tn__field { position: relative; }
.tn__field svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--pn-accent-text); pointer-events: none; }
.tn__field input {
  width: 100%; min-height: 52px; padding: 0 16px 0 50px; background: var(--pn-field); border: 1px solid var(--pn-line);
  border-radius: 0; font-size: 16px; -webkit-appearance: none; appearance: none;
}
.tn__field input::placeholder { color: var(--pn-muted); opacity: .7; }
.tn__hits {
  list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; z-index: 5; left: 0; right: 0; max-height: 380px; overflow: auto;
  background: var(--pn-quiet); border: 1px solid var(--pn-line-strong); box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}
.tn__hits button { display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: transparent; font-size: 15px; cursor: pointer; }
.tn__hits button span { color: var(--pn-muted); }
.tn__hits button:focus-visible { outline: 2px solid var(--pn-accent); outline-offset: -2px; background: var(--pn-surface); }
.tn__nohit { padding: 12px; font-size: 14px; color: var(--pn-muted); }
.tn__nohit button, .tn__missing button {
  display: inline; width: auto; padding: 0; border: 0; background: none; color: var(--pn-accent-text); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* Auswahlfelder */
.tn__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tn__steps label { display: flex; flex-direction: column; gap: 6px; }
.tn__steps b { font: 500 12px var(--pn-font-mono); color: var(--pn-accent-text); margin-right: 4px; }
.tn__steps select {
  width: 100%; min-height: 52px; padding: 0 36px 0 12px; background-color: var(--pn-field); border: 1px solid var(--pn-line);
  border-radius: 0; font-size: 16px; cursor: pointer; -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--pn-accent) 50%), linear-gradient(135deg, var(--pn-accent) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
  transition: border-color 140ms ease;
}
.tn__steps select option, .tn__steps select optgroup { background: var(--pn-surface); color: var(--pn-ink); }
.tn__steps select:disabled { color: var(--pn-muted); opacity: .5; cursor: not-allowed; }
.tn__steps select:not(:disabled):focus-visible, .tn__field input:focus-visible { outline: 2px solid var(--pn-accent); outline-offset: 0; border-color: var(--pn-accent); }
.tn__status { margin: 12px 0 0; font-size: 14px; color: var(--pn-muted); }
.tn__status:empty { display: none; }

@media (hover: hover) and (pointer: fine) {
  .tn__types button:hover, .tn__steps select:not(:disabled):hover, .tn__stage:hover { border-color: var(--pn-line-strong); }
  .tn__types button[aria-checked="true"]:hover, .tn__stage.is-on:hover { border-color: var(--pn-accent); }
  .tn__hits button:hover { background: var(--pn-surface); }
  .tn__chip:hover span { border-color: var(--pn-accent); }
  .tn__btn--primary:hover { background: var(--pn-accent-hover); }
  .tn__btn--ghost:hover { border-color: var(--pn-accent); }
}

/* Ergebnis */
.tn__result { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--pn-line); outline: none; opacity: 0; transform: translateY(8px); scroll-margin-top: 16px; }
.tn__result.is-in { opacity: 1; transform: none; transition: opacity 260ms var(--tn-ease), transform 260ms var(--tn-ease); }
.tn__crumb { margin: 0 0 6px; font: 500 12px var(--pn-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--pn-accent-text); }
.tn__name { margin: 0 0 16px; font: 800 clamp(28px, 3.4vw, 40px)/1.02 var(--pn-font-display); text-transform: uppercase; }
.tn__name span { color: var(--pn-muted); font-weight: 700; }
.tn__facts { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tn__facts li { padding: 8px 12px; border: 1px solid var(--pn-line); background: var(--pn-field); font-size: 14px; font-weight: 600; }
.tn__facts small { display: block; font-weight: 400; font-size: 11.5px; color: var(--pn-muted); }

.tn__stages { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.tn__stage {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; cursor: pointer;
  border: 1px solid var(--pn-line); background: var(--pn-field); transition: border-color 160ms ease;
}
.tn__stage input { position: absolute; opacity: 0; pointer-events: none; }
.tn__stage.is-on { border-color: var(--pn-accent); box-shadow: inset 0 2px 0 var(--pn-accent); }
.tn__stage:has(input:focus-visible) { outline: 2px solid var(--pn-accent); outline-offset: 2px; }
.tn__stagehead { display: flex; flex-direction: column; gap: 2px; }
.tn__stagehead b { font: 800 26px/1 var(--pn-font-display); text-transform: uppercase; }
.tn__stagehead em { font-style: normal; font-size: 13px; color: var(--pn-muted); }
.tn__gain { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.tn__gain strong { font: 800 32px/1 var(--pn-font-display); color: var(--pn-accent-text); }
.tn__gain small { font-size: 13px; color: var(--pn-muted); }
.tn__indiv { font: 700 22px/1.1 var(--pn-font-display); text-transform: uppercase; }
.tn__info { font-size: 13.5px; color: var(--pn-muted); line-height: 1.45; }

/* Rundinstrumente */
.tn__gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tn__gauge { margin: 0; min-width: 0; }
.tn__gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.tn__g-track { fill: none; stroke: var(--pn-quiet); stroke-width: 10; }
.tn__g-red { fill: none; stroke: #E5484D; stroke-width: 2; opacity: .55; }
.tn__tick { stroke: var(--pn-line-strong); stroke-width: 1.2; }
.tn__tick.is-big { stroke: var(--pn-muted); stroke-width: 2; }
.tn__ticklbl { fill: var(--pn-muted); font: 500 10px var(--pn-font-mono); text-anchor: middle; }
.tn__g-stock, .tn__g-gain { fill: none; stroke-width: 10; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tn__g-stock { stroke: var(--tn-stock); }
.tn__gauge--ps .tn__g-gain { stroke: var(--pn-accent); filter: drop-shadow(0 0 6px var(--pn-accent)); }
.tn__gauge--nm .tn__g-gain { stroke: var(--tn-nm); filter: drop-shadow(0 0 6px var(--tn-nm)); }
.tn__needle { transform-box: view-box; transform-origin: 110px 106px; transform: rotate(-120deg); }
.tn__needle path { fill: var(--pn-ink); }
.tn__hub { fill: var(--pn-surface); stroke: var(--pn-ink); stroke-width: 2; }
.tn__g-val { fill: var(--pn-ink); font: 800 38px var(--pn-font-display); text-anchor: middle; font-variant-numeric: tabular-nums; }
.tn__g-unit { fill: var(--pn-muted); font: 500 11px var(--pn-font-mono); text-anchor: middle; letter-spacing: .1em; }
.tn__gauge figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 8px; margin-top: -6px; font-size: 13px; text-align: center; }
.tn__gauge figcaption span { width: 100%; color: var(--pn-muted); }
.tn__gauge figcaption b { font: 800 22px/1 var(--pn-font-display); }
.tn__gauge--ps figcaption b { color: var(--pn-accent-text); }
.tn__gauge--nm figcaption b { color: var(--tn-nm); }
.tn__gauge figcaption small { color: var(--pn-muted); font-size: 12px; }
.tn__gauges.is-vis .tn__g-stock { stroke-dashoffset: 0; transition: stroke-dashoffset 500ms var(--tn-ease); }
.tn__gauges.is-vis .tn__g-gain { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--tn-ease) 450ms; }
.tn__needle { animation: none; }
.tn__gauges.is-vis .tn__needle { animation: tn-needle 1400ms var(--tn-ease) 150ms both; }
@keyframes tn-needle {
  0% { transform: rotate(-120deg); }
  35% { transform: rotate(var(--from)); }
  100% { transform: rotate(var(--to)); }
}

/* Leistungsdiagramm */
.tn__dyno { margin: 28px 0 0; padding: 20px; border: 1px solid var(--pn-line); background: var(--pn-field); }
.tn__d-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.tn__d-head > b { font: 800 24px/1 var(--pn-font-display); text-transform: uppercase; }
.tn__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--pn-muted); }
.tn__legend span { display: inline-flex; align-items: center; gap: 6px; }
.tn__legend i { display: inline-block; width: 18px; height: 3px; }
.tn__legend .l-ps { background: var(--pn-accent); }
.tn__legend .l-nm { background: var(--tn-nm); }
.tn__legend .l-dash { background: repeating-linear-gradient(90deg, var(--tn-stock) 0 4px, transparent 4px 7px); }
.tn__dyno svg { display: block; width: 100%; height: auto; overflow: visible; }
.tn__d-grid { stroke: var(--pn-line); stroke-width: 1; }
.tn__d-ax { fill: var(--pn-muted); font: 500 11px var(--pn-font-mono); }
.tn__d-ax--ps { fill: var(--pn-accent-text); }
.tn__d-ax--nm { fill: var(--tn-nm); }
.tn__d-stop1 { stop-color: var(--pn-accent); stop-opacity: .28; }
.tn__d-stop2 { stop-color: var(--pn-accent); stop-opacity: 0; }
.tn__d-area { opacity: 0; }
.tn__d-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tn__d-line.is-stock { stroke-width: 2; stroke: var(--tn-stock); stroke-dasharray: .012 .008; stroke-dashoffset: 0; opacity: 0; }
.tn__d-ps.is-tuned { stroke: var(--pn-accent); filter: drop-shadow(0 0 5px var(--pn-accent)); }
.tn__d-nm.is-tuned { stroke: var(--tn-nm); filter: drop-shadow(0 0 5px var(--tn-nm)); }
.tn__d-gain { stroke: var(--pn-accent); stroke-width: 1.5; stroke-dasharray: 3 3; opacity: 0; }
.tn__d-peak { opacity: 0; }
.tn__d-peak circle { stroke: var(--pn-field); stroke-width: 2.5; }
.tn__d-peak text { font: 800 16px var(--pn-font-display); }
.tn__d-peak--ps circle, .tn__d-peak--ps text { fill: var(--pn-accent-text); }
.tn__d-peak--nm circle, .tn__d-peak--nm text { fill: var(--tn-nm); }
.tn__d-note { margin: 10px 0 0; font-size: 12px; color: var(--pn-muted); }
.tn__dyno.is-vis .tn__d-line.is-stock { opacity: 1; transition: opacity 400ms ease 200ms; }
.tn__dyno.is-vis .tn__d-line.is-tuned { stroke-dashoffset: 0; transition: stroke-dashoffset 1400ms var(--tn-ease) 500ms; }
.tn__dyno.is-vis .tn__d-area { opacity: 1; transition: opacity 600ms ease 1300ms; }
.tn__dyno.is-vis .tn__d-gain, .tn__dyno.is-vis .tn__d-peak { opacity: 1; transition: opacity 300ms ease 1600ms; }

/* Optionen */
.tn__opts { margin-top: 28px; }
.tn__opts h4 { margin: 0 0 14px; font: 800 24px/1 var(--pn-font-display); text-transform: uppercase; }
.tn__optgroup { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.tn__optgroup legend { padding: 0; margin: 0 0 8px; font: 500 12px var(--pn-font-mono); color: var(--pn-muted); text-transform: uppercase; letter-spacing: .06em; }
.tn__optgroup p { margin: -2px 0 8px; font-size: 13px; color: var(--pn-muted); }
.tn__optgroup--warn legend { color: var(--tn-warn); }
.tn__optgroup--warn p { color: var(--tn-warn-soft); }
.tn__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tn__chip { position: relative; cursor: pointer; }
.tn__chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tn__chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--pn-line);
  background: var(--pn-field); font-size: 14px; transition: border-color 140ms ease, color 140ms ease;
}
.tn__chip span::before { content: ""; width: 14px; height: 14px; border: 1px solid var(--pn-line-strong); flex-shrink: 0; transition: background-color 140ms ease; }
.tn__chip input:checked + span { border-color: var(--pn-accent); color: var(--pn-accent-text); }
.tn__chip input:checked + span::before { background: var(--pn-accent); border-color: var(--pn-accent); box-shadow: inset 0 0 0 2px var(--pn-field); }
.tn__chip input:focus-visible + span { outline: 2px solid var(--pn-accent); outline-offset: 2px; }
.tn__optgroup--warn .tn__chip input:checked + span { border-color: var(--tn-warn); color: var(--tn-warn); }
.tn__optgroup--warn .tn__chip input:checked + span::before { background: var(--tn-warn); border-color: var(--tn-warn); }
.tn__none { font-size: 14px; color: var(--pn-muted); }

.tn__disc { margin: 20px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--pn-muted); max-width: 900px; }
.tn__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }
.tn__price { font-size: 14px; color: var(--pn-muted); }
.tn__missing { margin: 24px 0 0; font-size: 14px; color: var(--pn-muted); }

.tn__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 0; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 140ms var(--tn-ease);
}
.tn__btn:active { transform: scale(0.97); }
.tn__btn:focus-visible { outline: 2px solid var(--pn-accent); outline-offset: 3px; }
.tn__btn--primary { background: var(--pn-accent); color: var(--pn-on-accent); }
.tn__btn--ghost { border-color: var(--pn-line-strong); color: var(--pn-ink); }
.tn__btn[disabled] { opacity: .6; cursor: progress; }

/* Anfrage */
.tn__request { scroll-margin-top: 16px; border-color: var(--pn-accent); }
.tn__formtitle { margin: 0 0 12px; font: 800 30px/1 var(--pn-font-display); text-transform: uppercase; }
.tn__summary { margin: 0 0 20px; padding: 12px 14px; border-left: 2px solid var(--pn-accent); background: var(--pn-field); font-size: 14px; line-height: 1.5; }
.tn__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tn__grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--pn-muted); }
.tn__grid input[type=text], .tn__grid input[type=email], .tn__grid input[type=tel], .tn__grid textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; background: var(--pn-field); color: var(--pn-ink);
  border: 1px solid var(--pn-line); border-radius: 0; font-size: 16px;
}
.tn__grid textarea { resize: vertical; }
.tn__grid input:focus-visible, .tn__grid textarea:focus-visible { outline: 2px solid var(--pn-accent); outline-offset: 0; border-color: var(--pn-accent); }
.tn__full { grid-column: 1 / -1; }
.tn__contact { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.tn__contact legend { float: left; margin-right: 12px; padding: 0; font-size: 13px; color: var(--pn-muted); }
.tn__contact label { flex-direction: row; align-items: center; gap: 8px; color: var(--pn-ink); font-size: 14px; }
.tn__grid input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--pn-accent); flex-shrink: 0; }
.tn__consent { flex-direction: row !important; align-items: flex-start; gap: 10px !important; line-height: 1.5; }
.tn__consent input { margin-top: 2px !important; }
.tn__consent a { color: var(--pn-accent-text); }
.tn__error { margin: 0 0 14px; color: var(--pn-error); font-size: 14px; }
.tn__done { text-align: left; }
.tn__done svg { width: 48px; height: 48px; color: var(--pn-ok); margin-bottom: 12px; }
.tn__done p { margin: 0 0 12px; color: var(--pn-muted); }

@media (max-width: 989px) {
  .tn__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn__stages { grid-template-columns: 1fr 1fr; }
  .tn__stages .tn__stage:first-child { grid-column: 1 / -1; }
  .tn__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tn { padding: 24px 16px 48px; }
  .tn__card { padding: 22px 16px; }
  .tn__logo { margin-bottom: 28px; }
  .tn__types button { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 0 10px; font-size: 13px; }
  .tn__steps, .tn__grid { grid-template-columns: 1fr; }
  .tn__cta .tn__btn { flex: 1 1 100%; }
  /* Stage 2 und Eco kompakt nebeneinander, damit die Optionen schneller kommen */
  .tn__stage { padding: 16px 14px; gap: 8px; }
  .tn__stage:not(:first-child) .tn__info { display: none; }
  .tn__stage:not(:first-child) .tn__stagehead b { font-size: 22px; }
  .tn__stage:not(:first-child) .tn__indiv { font-size: 16px; }
  .tn__gain strong { font-size: 28px; }
  .tn__g-val { font-size: 34px; }
  .tn__dyno { padding: 14px 10px; margin-left: -6px; margin-right: -6px; }
  .tn__d-ax { font-size: 12px; }
  .tn__ticklbl { font-size: 13px; }
  .tn__d-peak text { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn__result, .tn__result.is-in { transform: none; transition: opacity 120ms linear; }
  .tn__gauges.is-vis .tn__g-stock, .tn__gauges.is-vis .tn__g-gain, .tn__dyno.is-vis .tn__d-line.is-tuned { transition: none; }
  .tn__dyno.is-vis .tn__d-area, .tn__dyno.is-vis .tn__d-gain, .tn__dyno.is-vis .tn__d-peak, .tn__dyno.is-vis .tn__d-line.is-stock { transition: opacity 120ms linear; }
  .tn__gauges.is-vis .tn__needle { animation: none; transform: rotate(var(--to)); }
  .tn__types button, .tn__btn { transition: none; }
}
.tn__gain .is-nm strong { color: var(--tn-nm); }
