/* =========================================================
   worksmart365 · Academy Games — shared base
   Geerbt aus dem Academy-Designsystem (E-Learning):
   Inter, Deep Blue #082F7B, Akzent-Orange #EA6020,
   16px-Cards, weiche Schatten. Diese Datei ist die
   gemeinsame Basis fuer ALLE Games der Reihe.
   ========================================================= */

:root {
  /* Base */
  --bg:         #FFFFFF;
  --bg-alt:     #F5F5F5;
  --ink:        #141413;
  --ink-soft:   #404040;
  --muted:      #737373;
  --line:       #E3E3E3;

  /* Grays */
  --gray-50:  #F5F5F5;
  --gray-100: #E3E3E3;
  --gray-400: #979797;
  --gray-500: #737373;
  --gray-700: #404040;
  --gray-900: #141413;

  /* Brand */
  --primary-blue:   #1A6AFF;
  --deep-blue:      #082F7B;
  --deep-blue-2:    #0B3A9A;
  --accent:         #EA6020;
  --accent-dk:      #C04D10;
  --accent-soft:    #FDE8D8;
  --accent-ring:    rgba(234, 96, 32, 0.18);

  /* Semantic */
  --success:      #18794E;
  --success-soft: #E7F4EC;
  --warn:         #A06B00;
  --warn-soft:    #FFF2CC;
  --error:        #B4333A;
  --error-soft:   #FBE3E6;
  --info:         var(--deep-blue);
  --info-soft:    #E4ECFA;

  /* Radii */
  --radius: 8px;
  --radius-lg: 16px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-soft: 0 2px 8px rgba(20, 20, 19, 0.06);
  --shadow:      0 8px 24px rgba(20, 20, 19, 0.10);
  --shadow-lg:   0 20px 48px rgba(20, 20, 19, 0.14);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Das hidden-Attribut muss auch dann greifen, wenn Komponenten
   (z. B. .btn) ein eigenes display setzen — Author-CSS schlaegt sonst
   die UA-Regel [hidden]{display:none}. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--ink);
  margin: 0 0 0.4em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.2rem; margin-bottom: 0.3em; font-weight: 800; }
h2 { font-size: 1.6rem; margin: 1.4em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 0.5em; }
p { margin: 0 0 1em; color: var(--ink-soft); }
/* Start-Karte „So funktioniert's": h3 sitzt direkt unter dem Kartenpolster,
   ohne extra margin-top → Text vertikal mittig statt oben-lastig. */
.card.howto h3:first-child { margin-top: 0; }
strong { color: var(--ink); font-weight: 700; }

/* =========================================================
   BUTTONS  (aus Academy)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.btn:hover { background: var(--ink); color: #fff; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); color: #fff; }
.btn-accent { background: var(--deep-blue); color: #fff; border-color: var(--deep-blue); }
.btn-accent:hover { background: var(--deep-blue-2); border-color: var(--deep-blue-2); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--gray-50); color: var(--ink); border-color: var(--ink); }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }

/* =========================================================
   BRAND / TOPBAR  (neu fuer Games)
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;          /* Wortmarke oben-links bündig */
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem 1.5rem;    /* mehr Leerraum unter der Wortmarke */
  background: var(--deep-blue);
  color: #fff;
}
.brand { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; color: #fff; text-decoration: none; }
.brand .accent { color: inherit; }   /* Wortmarke komplett weiss */
.brand:hover { text-decoration: none; }
.brand__sub { display: block; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-top: 1px; }
.topbar__right { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; }
.topbar__link { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 600; font-size: 0.85rem; }
.topbar__link:hover { color: #fff; text-decoration: underline; }

.lang-toggle { display: inline-flex; gap: 4px; }
.lang-toggle button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
}
.lang-toggle button:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.lang-toggle button.active { background: #fff; color: var(--deep-blue); border-color: #fff; }

/* =========================================================
   LAYOUT
   ========================================================= */
.wrap { max-width: 880px; margin: 0 auto; padding: 2.2rem 1.4rem 4rem; }
.wrap--wide { max-width: 1040px; }

.eyebrow { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 0.6rem; }

/* =========================================================
   CARDS / CALLOUTS / PILLS  (aus Academy)
   ========================================================= */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.2rem;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 1.2rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.4rem 0;
}
.callout h4 { margin: 0 0 0.4rem; color: var(--accent-dk); }
.callout p:last-child { margin-bottom: 0; }
.callout--success { border-left-color: var(--success); background: var(--success-soft); }
.callout--success h4 { color: var(--success); }
.callout--warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout--warn h4 { color: var(--warn); }
.callout--info { border-left-color: var(--deep-blue); background: var(--info-soft); }
.callout--info h4 { color: var(--deep-blue); }

.pill { display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pill--blue   { background: var(--info-soft); color: var(--deep-blue); }
.pill--orange { background: var(--accent-soft); color: var(--accent-dk); }
.pill--green  { background: var(--success-soft); color: var(--success); }
.pill--gray   { background: var(--gray-100); color: var(--gray-700); }

/* =========================================================
   PROGRESS  (aus Academy)
   ========================================================= */
.progress-track { background: var(--gray-100); height: 6px; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.35s ease; width: 0; }

/* =========================================================
   TOAST  (aus Academy)
   ========================================================= */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 10px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   RECAP  (Auswertung: aufklappbare Runden — alle Games teilen das)
   Zeile = Button (a11y/Tastatur), Detail klappt darunter auf und
   zeigt Loesung + Begruendung der Runde erneut (Lerneffekt).
   ========================================================= */
.recap { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.6rem; }
.recap-hint { font-size: 0.85rem; color: var(--muted); margin: -0.25rem 0 0.9rem; }
.recap__item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.recap__row {
  display: flex; align-items: center; gap: 0.8rem; width: 100%;
  padding: 0.7rem 1rem; background: none; border: 0; cursor: pointer;
  text-align: left; font: inherit; color: var(--ink); line-height: 1.3;
}
.recap__row:hover { background: var(--gray-50); }
.recap__row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.recap__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.recap__dot--success { background: var(--success); }
.recap__dot--warn { background: var(--warn); }
.recap__dot--error { background: var(--error); }
.recap__title { font-weight: 600; font-size: 0.93rem; color: var(--ink); flex: 1; min-width: 0; }
.recap__lvl { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }
.recap__pts { font-weight: 700; font-size: 0.88rem; color: var(--ink); flex-shrink: 0; }
.recap__chev { color: var(--muted); font-size: 0.7rem; flex-shrink: 0; transition: transform 0.18s ease; }
.recap__row[aria-expanded="true"] .recap__chev { transform: rotate(180deg); }
.recap__detail { padding: 0.2rem 1rem 1rem; border-top: 1px solid var(--line); animation: recapIn 0.18s ease; }
.recap__scen { font-size: 0.92rem; color: var(--ink-soft); font-style: italic; margin: 0.85rem 0 0.7rem; }
.recap__detail .feedback__body { font-size: 0.95rem; }
.recap__detail h4 { margin-top: 0.9rem; }
@keyframes recapIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* =========================================================
   SITE FOOTER
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 1.4rem; text-align: center; color: var(--muted); font-size: 0.85rem; }
.site-footer a { color: var(--muted); text-decoration-color: var(--accent); }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  .wrap { padding: 1.6rem 1.1rem 3rem; }
  .topbar { padding: 0.75rem 1.1rem; }
  .topbar__right .topbar__link { display: none; }
}
