/* Iteron Solo — „Tactile & Crisp Ocean”. Tokeni + componente comune.
   Paleta sursa: docs/stitch_iteron_solo_gamified_learning_ui/iteron_solo_design_system.md
   Întregul UI e construit pe aceste tokeni; neumorph/clay a fost înlocuit cu
   borduri tactile 2px + lip solid 4px (border-b-4). */


:root {
  /* fundal & suprafețe (aliniate cu landing-ul Iteron dark clay) */
  --bg: #0D0E0E;
  --surface: #161717;
  --surface-2: #1F2120;
  --surface-3: #272927;
  --surface-4: #2F3230;
  --surface-5: #383B38;
  --line: rgba(232, 224, 210, .12);
  --line-soft: rgba(232, 224, 210, .07);

  /* text */
  --text: #E8E0D2;
  --muted: #A29C91;
  --faint: #757067;
  --on-accent: #071A17;

  /* Iteron teal */
  --accent: #2DD4BF;
  --accent-hi: #5FE6D4;
  --accent-deep: #0B6B62;
  --accent-ink: #071A17;
  --accent-soft: rgba(45, 212, 191, .14);

  /* semantic */
  --error: #F87171;
  --error-bg: rgba(248, 113, 113, .14);
  --error-ink: #FECACA;
  --success: #34D399;
  --success-bg: rgba(52, 211, 153, .14);
  --success-ink: #A7F3D0;
  --warning: #F5A962;
  --gold: #F5A962;
  --xp: #F5A962;

  /* cod */
  --code-bg: #111312;
  --code-ink: #E8E0D2;
  --code-line: rgba(232, 224, 210, .12);

  /* sintaxă cod */
  --code-kw: #C792EA;
  --code-str: #34D399;
  --code-num: #F5A962;
  --code-com: #757067;
  --code-fn: #5FE6D4;
  --code-op: #2DD4BF;

  /* forme */
  --r-sm: 10px;
  --r-card: 24px;
  --r-btn: 16px;
  --r-pill: 9999px;

  /* takt & clay */
  --border: 1.5px solid var(--line);
  --border-soft: 1.5px solid var(--line-soft);
  --lip: 4px;
  --clay: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -2px 0 rgba(0, 0, 0, .28), 0 18px 30px -20px rgba(0, 0, 0, .9);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 220ms;
  --dur-fast: 100ms;

  /* tipografie */
  --f-display: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 700px at 18% -8%, #141917 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 108%, #121614 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.boot { display: grid; place-items: center; min-height: 100vh; color: var(--faint); font-family: var(--f-body); }
[hidden] { display: none !important; }

/* ---------- tipografie utilitară ---------- */
.td-display { font-family: var(--f-display); font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -.5px; }
.td-headline { font-family: var(--f-display); font-weight: 700; font-size: 32px; line-height: 1.18; letter-spacing: -.25px; }
.td-headline-md { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.25; }
.td-headline-sm { font-family: var(--f-display); font-weight: 700; font-size: 20px; line-height: 1.3; }
.td-title { font-family: var(--f-body); font-weight: 700; font-size: 18px; line-height: 1.33; }
.td-title-md { font-family: var(--f-body); font-weight: 600; font-size: 16px; line-height: 1.375; }
.td-body { font-family: var(--f-body); font-weight: 500; font-size: 16px; line-height: 1.5; }
.td-body-md { font-family: var(--f-body); font-weight: 500; font-size: 14px; line-height: 1.43; }
.td-label { font-family: var(--f-body); font-weight: 700; font-size: 14px; line-height: 1.28; letter-spacing: .2px; }
.td-label-sm { font-family: var(--f-body); font-weight: 700; font-size: 12px; line-height: 1.33; letter-spacing: .3px; }
.td-code { font-family: var(--f-mono); font-weight: 500; font-size: 14px; line-height: 1.57; }
.td-code-sm { font-family: var(--f-mono); font-weight: 500; font-size: 12px; line-height: 1.5; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- suprafațe ---------- */
.card, .panel {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-card);
}
.card-low { background: var(--surface-2); border: var(--border); border-radius: var(--r-card); }
.card-flat { background: var(--surface-2); border: var(--border-soft); border-radius: var(--r-card); }

/* ---------- butoane tactile ---------- */
.solo-btn, .ipath-btn, .ex-btn, .clip-run, .clip-runall {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
  border: var(--border);
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--text);
  padding: 12px 18px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: none;
  transition: transform var(--dur-fast) ease-out, background var(--dur-fast) ease-out,
              border-color var(--dur-fast) ease-out, filter var(--dur-fast) ease-out;
}
.solo-btn svg, .ipath-btn svg, .ex-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.solo-btn:hover, .ipath-btn:hover, .ex-btn:hover, .clip-run:hover, .clip-runall:hover { background: var(--surface-2); }
.solo-btn:active, .ipath-btn:active, .ex-btn:active, .clip-run:active, .clip-runall:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
.solo-btn:disabled, .ipath-btn:disabled, .ex-btn:disabled { opacity: .5; cursor: default; transform: none; }

.solo-btn.primary, .ipath-btn-primary, .ex-btn-primary, .clip-runall {
  background: linear-gradient(180deg, var(--accent-hi) 0%, var(--accent) 55%, #21B2A1 100%);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 0 var(--accent-deep), 0 14px 22px -14px rgba(45, 212, 191, .5);
  color: var(--accent-ink);
  text-transform: none;
  font-weight: 800;
}
.solo-btn.primary:hover, .ipath-btn-primary:hover, .ex-btn-primary:hover, .clip-runall:hover { filter: brightness(1.06); transform: translateY(-1px); }
.solo-btn.primary:active, .ipath-btn-primary:active, .ex-btn-primary:active, .clip-runall:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .28), 0 1px 0 var(--accent-deep);
}
.solo-btn.ghost, .ipath-btn-ghost { background: var(--surface); color: var(--muted); }
.solo-btn.sm, .ipath-btn-sm, .ex-btn-sm { padding: 8px 14px; min-height: 44px; font-size: 13px; }

.solo-iconbtn, .ipath-iconbtn, .ex-iconbtn {
  width: 44px; height: 44px; border-radius: var(--r-btn);
  border: var(--border); background: var(--surface); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.solo-iconbtn:hover, .ipath-iconbtn:hover { background: var(--surface-2); color: var(--text); }
.solo-iconbtn:active, .ipath-iconbtn:active { transform: translateY(2px); border-bottom-width: 2px; }
.solo-iconbtn svg, .ipath-iconbtn svg, .ex-iconbtn svg { width: 20px; height: 20px; }

/* ---------- chips & badge-uri ---------- */
.solo-chip, .ipath-chip, .ex-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--surface-2); border: var(--border-soft);
  font-family: var(--f-body); font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.solo-chip svg, .ipath-chip svg, .ex-chip svg { width: 16px; height: 16px; }
.solo-chip-streak, .ipath-chip-streak { color: var(--gold); background: rgba(245, 169, 98, .12); border-color: rgba(245, 169, 98, .32); }
.solo-chip-xp, .ipath-chip-xp { color: var(--accent); background: var(--accent-soft); border-color: rgba(45, 212, 191, .35); }
.solo-chip-gem, .ipath-chip-gem { color: var(--accent-hi); }
.solo-chip-lang { background: var(--surface); }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--r-pill);
  background: rgba(245, 169, 98, .16); color: var(--gold); border: 1.5px solid rgba(245, 169, 98, .4);
  font-family: var(--f-body); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums;
}
.badge-dot { width: 10px; height: 10px; min-width: 10px; padding: 0; border-radius: 50%; }

/* ---------- taburi / pill-uri de filtrare ---------- */
.solo-lang-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.solo-lang-pill, .ex-tab, .ipath-tab-pill {
  font-family: var(--f-body); font-weight: 700; font-size: 13.5px;
  padding: 8px 16px; min-height: 40px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.solo-lang-pill:hover, .ex-tab:hover { color: var(--text); background: var(--surface-2); }
.solo-lang-pill.active, .ex-tab.active {
  background: var(--accent-soft); color: var(--accent-hi);
  border-color: rgba(45, 212, 191, .45);
}
.solo-lang-cnt { font-variant-numeric: tabular-nums; color: var(--faint); }

/* ---------- inputuri ---------- */
.solo-input, .ex-input, .ex-table-input, .ipath-input {
  font-family: var(--f-body); font-size: 15px; color: var(--text);
  background: var(--surface); border: var(--border); border-radius: var(--r-btn);
  padding: 12px 14px; min-height: 44px; width: 100%;
}
.solo-input:focus, .ex-input:focus, .ex-table-input:focus, .ipath-input:focus,
.solo-input:focus-visible, .ex-input:focus-visible, .ex-table-input:focus-visible, .ipath-input:focus-visible {
  outline: none;
  border-color: var(--accent-hi);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ex-table-input { text-align: center; font-family: var(--f-mono); }

/* ---------- elemente comune ---------- */
.divider-b { border-bottom: 2px solid var(--line-soft); }
.elevated { box-shadow: 0 2px 0 rgba(11, 28, 48, .06); }
.scrim { background: rgba(11, 28, 48, .45); }

@media (max-width: 560px) {
  .td-display { font-size: 28px; line-height: 1.2; letter-spacing: -.25px; }
  .td-headline { font-size: 24px; line-height: 1.25; }
}
