/* ================= SkillForge · Oberfläche =================
   Eigene Regeln nur mit den Variablen aus fsp/tokens.css. Bausteine kommen aus fsp/components.css.
   Schriften: selbst gehostet, Dateien liegen beim Bauen unter fonts/. */

@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-900-normal.woff2") format("woff2");
}
@font-face {
  font-family: "FSP Fuge";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fsp-fuge.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Marke ---------- */
/* App-Name in FSP Fuge. Die Schrift hat nur Versalien: Kleinbuchstaben nutzen dieselben Glyphen,
   der Name erscheint daher in Versalien. Keine Synthese für Fett, die Schrift hat nur einen Schnitt. */
h1.title { font-family: var(--display); font-weight: 400; font-synthesis: none; }

/* ---------- Seite ---------- */
.page { display: flex; flex-direction: column; gap: 28px; padding-top: 32px; padding-bottom: 40px; }
@media (min-width: 900px) { .page { padding-top: 56px; gap: 36px; } }

.intro { display: flex; flex-direction: column; gap: 12px; }
.intro .lead { max-width: 60ch; }
.intro .chip { align-self: flex-start; }

.layout { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 28px; }
}
.pane { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.foot { border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- Formularfelder ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font: 600 14px/1.3 var(--sans); color: var(--ink); }
.field .hint { margin-top: -2px; }
.in.area {
  min-height: 420px; height: auto; padding: 14px;
  font: 400 14px/1.55 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
  resize: vertical; tab-size: 2;
}
@media (min-width: 900px) { .in.area { min-height: 560px; } }
select.in { appearance: auto; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .btn, .actions .cta { flex: 1 1 150px; }
.actions .cta { min-width: 0; }
.btn:disabled, .cta:disabled { cursor: default; opacity: .4; }
.cta:disabled:hover, .cta:disabled:active { background: var(--acc); transform: none; }

.status { min-height: 1.45em; }
.is-warn { color: var(--warn); }

/* Reiter: Tippflächen mindestens 44 px */
.seg { align-self: flex-start; max-width: 100%; }
.seg > button { min-height: 44px; }
.seg > button:focus-visible { outline-offset: 0; }

/* ---------- Analyse ---------- */
.skill-name { overflow-wrap: anywhere; }
.arch { align-self: flex-start; }
.tiles .tile b { font-size: 30px; }
.tiles .tile span { overflow-wrap: anywhere; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-title { font: 700 17px/1.3 var(--sans); color: var(--ink); }
.lrow .txt { overflow-wrap: anywhere; min-width: 0; }
.lrow .txt .row { gap: 6px; }
.lrow .txt b { overflow-wrap: anywhere; }
.lrow .txt > span:not(.kick) { overflow-wrap: anywhere; }
.lrow .cell { min-width: 48px; }
ol.lrows, ul.lrows { margin: 0; }
.param .flag { font: 600 14px/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.gate-card .row { gap: 6px; }
.gate-card b { overflow-wrap: anywhere; }
.gate-card code { overflow-wrap: anywhere; }

code, .mono { font-family: var(--mono); font-size: 13px; }

/* ---------- Code ---------- */
.code-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; }
.code-head .row { gap: 8px; }
.code-head .btn { flex: 0 0 auto; }
.code-meta { font: 500 12px/1.35 var(--mono); color: var(--muted); letter-spacing: .02em; }
.code-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r16);
  overflow: auto; max-height: 72vh;
}
ol.code {
  counter-reset: line; list-style: none; margin: 0; padding: 12px 0;
  font: 400 13px/1.6 var(--mono); color: var(--ink);
}
ol.code li {
  counter-increment: line; display: flex; align-items: flex-start; gap: 14px;
  padding-right: 16px; white-space: pre;
}
ol.code li::before {
  content: counter(line); flex: none; width: 3.5ch; padding-left: 10px;
  text-align: right; color: var(--faint); user-select: none;
}
ol.code li > span { min-width: 0; }

/* ---------- Review-Gate ---------- */
.gate-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-head output { font: 800 18px/1 var(--cond); color: var(--ink); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; min-height: 44px; margin: 0; accent-color: var(--acc); cursor: pointer; }
.gate-result { gap: 14px; }
.gscore {
  font: 900 clamp(64px, 14vw, 104px)/.92 var(--cond);
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink);
  overflow-wrap: anywhere;
}
.gstatus { font: 700 18px/1.3 var(--sans); }
.gstatus.good { color: var(--good); }
.gstatus.bad { color: var(--warn); }
.gbar { position: relative; height: 12px; border-radius: var(--pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.gbar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: var(--acc); transition: width .2s var(--ease); }
.gbar > .mark { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.gate-formula { border-top: 1px solid var(--line); padding-top: 12px; }
