/* ==========================================================================
   HRT PERFORMANCE — Software-Shop
   Erweiterung von css/style.css ("Leiterbahn"). Nutzt ausschliesslich die
   Tokens der Hauptseite: keine eigenen Farben, keine eigenen Schriften.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Kopf
   -------------------------------------------------------------------------- */

.brand { gap: 0.7rem; }
.brand-tag {
  color: var(--text-faint);
  border-left: 1px solid var(--line-strong);
  padding-left: 0.7rem;
  font-size: 0.62rem;
}

.phead--tight { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }

/* --------------------------------------------------------------------------
   Sprachumschalter — klein, oben rechts, auf jeder Breite sichtbar
   -------------------------------------------------------------------------- */

.nav-right { display: flex; align-items: center; gap: 0.6rem; }

.langsw {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.langsw-opt {
  display: inline-flex; align-items: center;
  min-height: 32px; padding: 0 0.7em;
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.1em; color: var(--text-faint);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.langsw-opt + .langsw-opt { border-left: 1px solid var(--line-strong); }
.langsw-opt:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.langsw-opt.is-on { background: var(--brand); color: #fff; }
.langsw-opt.is-on:hover { background: var(--brand-soft); }

/* --------------------------------------------------------------------------
   Voraussetzungen an die Datei
   -------------------------------------------------------------------------- */

/* Kurzfassung direkt unter dem Titel */
.reqstrip {
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 860px) {
  .reqstrip { grid-template-columns: repeat(3, 1fr) auto; }
}
.reqstrip-item {
  display: flex; gap: 0.65rem; align-items: center;
  background: var(--surface); padding: 0.85rem 1.1rem;
  font-size: 0.84rem; font-weight: 300; color: var(--text-dim);
  line-height: 1.4;
  transition: background-color var(--t) var(--ease);
}
.reqstrip-item .ico { color: var(--brand); font-size: 1rem; flex: none; }
.reqstrip-more {
  display: flex; align-items: center; gap: 0.5em; justify-content: center;
  background: var(--surface-2); padding: 0.85rem 1.2rem;
  color: var(--brand); font-size: 0.62rem; white-space: nowrap;
  transition: background-color var(--t) var(--ease);
}
.reqstrip:hover .reqstrip-item { background: var(--surface-2); }
.reqstrip:hover .reqstrip-more { background: var(--brand-dim); }

/* Langfassung als eigener Abschnitt */
.reqs-grid {
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 900px) { .reqs-grid { grid-template-columns: repeat(3, 1fr); } }
.reqcard {
  background: var(--surface);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  display: grid; gap: 0.6rem; align-content: start;
}
.reqcard-n { font-size: 0.66rem; }
.reqcard-t {
  font-size: 1.08rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3;
}
.reqcard-d {
  color: var(--text-dim); font-size: 0.9rem; font-weight: 300; line-height: 1.6;
}

/* Merkkasten direkt über dem Upload-Feld */
.reqbox {
  border: 1px solid rgba(255, 106, 31, 0.3);
  background: rgba(255, 106, 31, 0.06);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
}
.reqbox-h { font-size: 0.6rem; margin-bottom: 0.65rem; }
.reqbox-list { display: grid; gap: 0.5rem; }
.reqbox-list li {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.82rem; color: var(--text-dim); font-weight: 300; line-height: 1.45;
}
.reqbox-list .ico {
  color: var(--brand); font-size: 0.85rem; margin-top: 0.25em; flex: none;
}
.reqbox-more {
  display: inline-block; margin-top: 0.8rem;
  font-size: 0.75rem; line-height: 1.5;
  color: var(--brand); text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Ablaufleiste
   -------------------------------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0;
}
@media (min-width: 760px) { .flow { grid-template-columns: repeat(4, 1fr); } }

.flow-step {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface);
  padding: 0.85rem 1rem;
  color: var(--text-faint);
}
.flow-n {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
}
.flow-l {
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 1.3;
}
.flow-step.is-done { color: var(--text-dim); }
.flow-step.is-done .flow-n {
  border-color: var(--brand); color: var(--brand); background: var(--brand-dim);
}
.flow-step.is-done .flow-n .ico { font-size: 0.8rem; }
.flow-step.is-now { color: var(--text); background: var(--surface-2); }
.flow-step.is-now .flow-n {
  border-color: var(--brand); background: var(--brand); color: #fff;
  box-shadow: 0 0 0 3px var(--brand-dim);
}

/* --------------------------------------------------------------------------
   Steuergeraet-Auswahl — das Kachelraster der Startseite
   -------------------------------------------------------------------------- */

.tiles { display: grid; gap: clamp(0.9rem, 2vw, 1.4rem); grid-template-columns: 1fr; }
@media (min-width: 620px)  { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

.tile {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease),
              background-color var(--t) var(--ease);
}
.tile:hover { border-color: var(--brand); transform: translateY(-4px); background: var(--surface-2); }

/* --- Bildfläche: Steuergerät als technische Zeichnung --- */
.tile-art {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 16 / 10; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(75% 95% at 50% 50%, rgba(255, 106, 31, 0.1), transparent 70%),
    var(--bg-soft);
}
.board {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.5; transition: opacity var(--t) var(--ease);
}
.tile:hover .board { opacity: 0.85; }
.board-trace, .board-pin {
  fill: none; stroke: var(--line-strong); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.board-body { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.board-die {
  fill: var(--surface-2); stroke: var(--brand); stroke-width: 1.5; opacity: 0.75;
}
.board-node { fill: var(--brand); }

.tile-code {
  position: relative;
  font-size: clamp(1.7rem, 4.5vw, 2.3rem); font-weight: 300;
  letter-spacing: -0.04em; line-height: 1;
  transition: color var(--t) var(--ease);
}
.tile:hover .tile-code { color: var(--brand); }

.tile-flag {
  position: absolute; top: 0.85rem; left: 0.85rem;
  font-size: 0.58rem; color: var(--text-faint);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.3em 0.75em;
  background: rgba(6, 6, 7, 0.6);
}

/* --- Text unter dem Bild --- */
/* Flex statt Grid: nur so schiebt margin-top:auto die Preiszeile nach unten,
   damit sie über alle Kacheln einer Reihe auf einer Linie steht. */
.tile-body {
  display: flex; flex-direction: column; gap: 0.35rem; flex: 1;
  padding: clamp(1rem, 2.2vw, 1.3rem);
}
.tile-name { font-size: 1.02rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.tile-ecu { font-size: 0.62rem; letter-spacing: 0.1em; }
.tile-note {
  margin-top: 0.5rem;
  color: var(--text-dim); font-size: 0.85rem; font-weight: 300; line-height: 1.55;
}
.tile-price {
  margin-top: auto; padding-top: 1rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
}
.tile-eur { font-size: 1.15rem; font-weight: 400; letter-spacing: -0.02em; }
.tile-eur--ask {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint);
}
.tile-go { display: inline-flex; align-items: center; gap: 0.45em; font-size: 0.64rem; }
.tile-go .ico { transition: transform var(--t) var(--ease); }
.tile:hover .tile-go .ico { transform: translateX(3px); }

/* --- Kacheln ohne Kaufmöglichkeit treten zurück --- */
.tile--soon { background: var(--bg-soft); }
.tile--soon .tile-art { background: var(--bg-soft); }
.tile--soon .board { opacity: 0.28; }
.tile--soon:hover .board { opacity: 0.55; }
.tile--soon .tile-code { color: var(--text-dim); }
.tile-flag--soon { color: var(--brand); border-color: rgba(255, 106, 31, 0.4); }
.tile-eur--soon { color: var(--text-dim); font-weight: 300; }

.tiles-note {
  color: var(--text-faint); font-size: 0.88rem; font-weight: 300;
}
.tiles-note a { color: var(--brand); text-decoration: underline; }

/* Verweis auf die Werkstattseite im Footer */
.flink { color: var(--brand); }
.flink:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Preis
   -------------------------------------------------------------------------- */

.pricebox { display: grid; gap: 0.3rem; }
.price {
  font-size: clamp(1.9rem, 3.5vw, 2.4rem); font-weight: 300;
  letter-spacing: -0.035em; line-height: 1;
}
.pricebox--lg .price { font-size: clamp(2.4rem, 5vw, 3.1rem); }
.price-note {
  font-family: var(--font-mono); font-size: 0.64rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Kauf-Layout: Beschreibung + klebende Kaufkarte
   -------------------------------------------------------------------------- */

.buylayout { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 1000px) {
  .buylayout { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); }
  .buycol { order: 2; }
  .buymain { order: 1; }
  .buycard { position: sticky; top: 6rem; }
}

/* Die Textspalte ist je nach Viewport mal voll breit, mal nur ~500px neben
   der Kaufkarte. Die Raster darin richten sich deshalb nach der Spalte,
   nicht nach dem Fenster. */
.buymain { container-type: inline-size; }

.buycard {
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: clamp(1.4rem, 3vw, 1.85rem);
}
.buy-fine {
  margin-top: 1rem;
  font-size: 0.78rem; line-height: 1.6; color: var(--text-faint); font-weight: 300;
}
.buy-fine a { color: var(--brand); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Upload-Feld
   -------------------------------------------------------------------------- */

.drop {
  display: grid; justify-items: center; gap: 0.35rem;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 1.75rem 1.25rem; text-align: center;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.drop:hover, .drop.is-hot { border-color: var(--brand); background: var(--brand-dim); }
.drop:focus-within { border-color: var(--brand); }
.drop-ico { font-size: 1.75rem; color: var(--text-faint); margin-bottom: 0.3rem; }
.drop.is-hot .drop-ico, .drop.has-file .drop-ico { color: var(--brand); }
.drop-big { font-size: 0.95rem; font-weight: 500; letter-spacing: -0.01em; word-break: break-all; }
.drop-hint {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint);
  line-height: 1.5;
}
.drop.has-file { border-style: solid; border-color: var(--brand); }
.drop-err {
  margin-top: 0.6rem; font-size: 0.8rem; color: var(--brand-soft);
}

/* --------------------------------------------------------------------------
   Listen
   -------------------------------------------------------------------------- */

.ticks { display: grid; gap: 0.7rem; }
.ticks li { display: flex; gap: 0.7rem; align-items: flex-start; }
.ticks .ico { color: var(--brand); font-size: 0.9rem; margin-top: 0.3em; flex: none; }
.ticks span { color: var(--text-dim); font-size: 0.9rem; font-weight: 300; line-height: 1.55; }
.ticks b { color: var(--text); font-weight: 500; }
@container (min-width: 36rem) {
  .ticks--two { grid-template-columns: repeat(2, 1fr); gap: 0.7rem 2rem; }
}

.reqs { display: grid; gap: 0.85rem; }
.reqs li {
  position: relative; padding-left: 1.6rem;
  color: var(--text-dim); font-size: 0.92rem; font-weight: 300; line-height: 1.6;
}
.reqs li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 10px; height: 1px; background: var(--brand);
}

.hints { display: grid; gap: 0.7rem; }
.hints li {
  border-left: 2px solid var(--brand);
  padding: 0.15rem 0 0.15rem 0.9rem;
  color: var(--text-dim); font-size: 0.9rem; font-weight: 300;
  font-family: var(--font-mono); line-height: 1.6;
  word-break: break-word;
}

.howto { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; counter-reset: howto; }
.howto li {
  background: var(--surface); padding: clamp(1.1rem, 2.5vw, 1.5rem);
  display: grid; gap: 0.4rem; counter-increment: howto;
  position: relative; padding-left: clamp(3.4rem, 6vw, 4rem);
}
.howto li::before {
  content: "0" counter(howto);
  position: absolute; left: clamp(1.1rem, 2.5vw, 1.5rem); top: clamp(1.15rem, 2.5vw, 1.55rem);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Slots
   -------------------------------------------------------------------------- */

.slots { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@container (min-width: 42rem) { .slots { grid-template-columns: repeat(3, 1fr); } }
.slot { background: var(--surface); padding: clamp(1.1rem, 2.5vw, 1.4rem); display: grid; gap: 0.45rem; align-content: start; }
.slot-k { font-size: 0.64rem; }
.slot-n { font-size: 1.05rem; font-weight: 500; letter-spacing: -0.015em; }
.slot-d { font-size: 0.88rem; }

/* --------------------------------------------------------------------------
   Zustaende
   -------------------------------------------------------------------------- */

.state { display: flex; gap: 1rem; align-items: flex-start; }
.state-ic {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--text-dim);
}
.state-ic .ico { font-size: 1.2rem; }
.state--ok .state-ic, .state-ic--ok {
  border-color: var(--brand); color: var(--brand); background: var(--brand-dim);
}
.state--err .state-ic, .state-ic--err {
  border-color: var(--brand-soft); color: var(--brand-soft);
  background: rgba(255, 106, 31, 0.08);
}

.msgcard {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 62rem;
}

/* --------------------------------------------------------------------------
   Download
   -------------------------------------------------------------------------- */

.dlcard {
  display: grid; gap: 1.5rem; align-items: center;
  border: 1px solid var(--brand); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255,106,31,0.1), var(--surface) 55%);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
@media (min-width: 820px) { .dlcard { grid-template-columns: 1fr auto; } }
.dlcard-main { display: flex; gap: 1.1rem; align-items: flex-start; }
.btn--lg { min-height: 56px; padding-inline: 2.2rem; font-size: 0.8rem; }

.fp {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--brand); background: var(--bg-soft);
  border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 0.25em 0.5em; word-break: break-all;
}
.fp-big { margin-top: 0.75rem; }
.fp-big .fp { font-size: 0.78rem; line-height: 2.1; }

/* --------------------------------------------------------------------------
   Kleinigkeiten
   -------------------------------------------------------------------------- */

.notice--plain {
  border-color: var(--line-strong);
  background: var(--surface);
}
.notice--plain .ico { color: var(--text-dim); }

.steps--two { grid-template-columns: 1fr; }
@container (min-width: 34rem) { .steps--two { grid-template-columns: repeat(2, 1fr); } }

.flow + .section { padding-top: clamp(2rem, 4vw, 3rem); }


/* Statt Inline-style-Attributen (die CSP verbietet sie) */
.section--msg { padding-top: clamp(8rem, 16vw, 12rem); }
.notice--gap { margin-bottom: 2rem; }
