/* =========================================================================
   Irregular Verbs Trainer — design system
   -------------------------------------------------------------------------
   Visual language borrowed from three local references that share one
   "warm editorial paper" system:
     · politics-wiki (css/wiki.css)                      — master tokens
     · Nexus-Core (frontend/css/styles.css)              — copies politics-wiki
     · portfolio (css/styles.css + DESIGN.md)            — terracotta variant
   No frameworks, no webfonts, no build step. Works from file://.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Surfaces — warm parchment, never pure white/cold gray */
  --paper:         #f7f6f0;
  --paper-raised:  #fffefb;
  --paper-hover:   #ffffff;
  --surface-2:     #f3f0e8;
  --paper-sunk:    #efece2;

  /* Ink */
  --ink:           #1a1916;
  --ink-soft:      #3d3b35;
  --ink-muted:     #6c6860;
  --ink-faint:     #c9c4b8;

  /* Rules / borders */
  --rule:          #e4e0d5;
  --rule-soft:     #eeeae0;
  --rule-strong:   #c9c3b5;

  /* Accent — Politics Wiki deep blue (educational, restrained) */
  --accent:        #2a4b8d;
  --accent-hover:  #1b3568;
  --accent-visited:#5a4b7d;
  --accent-wash:   rgba(42, 75, 141, 0.08);
  --on-accent:     #ffffff;

  /* Functional states */
  --ok:            #2f7d4f;
  --ok-strong:     #25663f;
  --ok-wash:       rgba(47, 125, 79, 0.10);
  --bad:           #a3271b;
  --bad-wash:      rgba(163, 39, 27, 0.09);

  /* Portfolio signature accent — used sparingly (badges, brand dot) */
  --terracotta:    #c96442;

  --focus:         #1a56c4;
  --focus-halo:    rgba(26, 86, 196, 0.22);

  /* Typography */
  --font-serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  /* Radius — small, editorial */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-full: 999px;

  /* Elevation — quiet, multi-property lift */
  --shadow-sm: 0 1px 2px rgba(26, 25, 22, 0.05);
  --shadow:    0 1px 3px rgba(26, 25, 22, 0.07), 0 10px 24px -12px rgba(26, 25, 22, 0.16);
  --shadow-pop:0 10px 30px -10px rgba(26, 25, 22, 0.28);

  /* Motion — one movement step, like the reference */
  --dur-micro:   140ms;
  --dur:         200ms;
  --dur-reveal:  600ms;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --stagger:     55ms;

  /* Pointer spotlight origin (updated from JS) */
  --mx: 50%;
  --my: 0%;

  --header-h: 74px;
  --container: 1280px;
  --gutter: clamp(1rem, 3vw, 2.25rem);
}

/* -------------------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

p { margin: 0; }

button { font-family: inherit; }

input { font-family: inherit; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.is-hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------------------
   3. Ambient background — grid, spotlight, drifting orbs
   ------------------------------------------------------------------------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(26, 25, 22, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 25, 22, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 25%, transparent 78%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

/* Spotlight that follows the pointer (Politics-Wiki radial gradient). */
.bg-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    600px circle at var(--mx) var(--my),
    rgba(42, 75, 141, 0.10),
    rgba(201, 100, 66, 0.05) 40%,
    transparent 65%
  );
  transition: background-position 0.15s linear;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: orb-drift 22s var(--ease-out) infinite alternate;
}
.orb--1 { width: 420px; height: 420px; top: -140px; left: -100px;  background: radial-gradient(circle, rgba(42,75,141,.30), transparent 70%); }
.orb--2 { width: 380px; height: 380px; top: 30%;   right: -120px; background: radial-gradient(circle, rgba(201,100,66,.26), transparent 70%); animation-delay: -7s; }
.orb--3 { width: 460px; height: 460px; bottom: -180px; left: 30%;  background: radial-gradient(circle, rgba(90,75,125,.22), transparent 70%); animation-delay: -13s; }

@keyframes orb-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(30px, -24px, 0) scale(1.08); }
  100% { transform: translate3d(-24px, 20px, 0) scale(0.96); }
}

/* -------------------------------------------------------------------------
   4. Layout
   ------------------------------------------------------------------------- */
.app {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.app__main {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: start;
}

/* -------------------------------------------------------------------------
   5. Header / brand / score
   ------------------------------------------------------------------------- */
.app__header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--paper-raised) 88%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: var(--shadow-sm);
  animation: enter-panel var(--dur-reveal) var(--ease-out) both;
  overflow: hidden;
}

/* travelling "packet" scan line along the header top edge (portfolio packets) */
.app__header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 8%,
    var(--terracotta) 16%,
    transparent 24%,
    transparent 100%);
  background-size: 260% 100%;
  animation: packet-scan 6s linear infinite;
  opacity: 0.85;
}

@keyframes packet-scan {
  from { background-position: 130% 0; }
  to   { background-position: -130% 0; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--accent), var(--accent-visited));
  color: var(--on-accent);
  box-shadow: 0 6px 16px -6px rgba(42, 75, 141, 0.6);
  position: relative;
  overflow: hidden;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.5) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: sheen-sweep 4.5s var(--ease-out) infinite;
}
.brand__mark-inner {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__text { min-width: 0; }

.brand__title {
  font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.4rem);
  white-space: nowrap;
}
.brand__title span {
  color: var(--accent);
  font-style: italic;
}

.brand__subtitle {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: min(280px, 46vw);
}

.score__bar-track {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  overflow: hidden;
}
.score__bar {
  height: 100%;
  width: 0%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--ok), #4caf72);
  transition: width var(--dur-reveal) var(--ease-out), background var(--dur) linear;
  animation: progress-grow 700ms var(--ease-out) both;
}
@keyframes progress-grow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

.score__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--ink-muted);
}
.score__stat b { font-size: 0.95rem; color: var(--ink); }
.score__stat--ok b { color: var(--ok-strong); }
.score__stat--bad b { color: var(--bad); }

.score__stat.pop { animation: count-pop 380ms var(--ease-spring); }
@keyframes count-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.score__msg {
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------
   6. Panels
   ------------------------------------------------------------------------- */
.panel {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: enter-panel var(--dur-reveal) var(--ease-out) both;
}
.picker  { animation-delay: 80ms;  max-height: calc(100vh - var(--header-h) - 4.5rem); position: sticky; top: calc(var(--header-h) + 1rem); }
.practice{ animation-delay: 160ms; }

@keyframes enter-panel {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--rule);
}

.panel__title {
  font-size: 1.15rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.badge b { color: var(--accent); }

.panel__badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
/* Shown only while a random draw is active (practice set < pool). */
.badge--practice {
  background: color-mix(in srgb, var(--terracotta) 10%, var(--surface-2));
  border-color: color-mix(in srgb, var(--terracotta) 35%, var(--rule));
}
.badge--practice b { color: var(--terracotta); }

/* -------------------------------------------------------------------------
   7. Verb picker
   ------------------------------------------------------------------------- */
.picker__search {
  position: relative;
  margin: 0.9rem 1.15rem 0.6rem;
}
.picker__search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  width: 17px; height: 17px;
  transform: translateY(-50%);
  fill: var(--ink-muted);
  pointer-events: none;
}
#verb-search {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.875rem;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
#verb-search::placeholder { color: var(--ink-muted); }
#verb-search:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-halo);
}

.picker__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.15rem 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
}
.picker__random {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
#random-count {
  width: 3.4rem;
  padding: 0.32rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: center;
}
#random-count:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-halo);
}

.picker__list {
  overflow-y: auto;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-strong) transparent;
}
.picker__list::-webkit-scrollbar { width: 8px; }
.picker__list::-webkit-scrollbar-thumb {
  background: var(--rule-strong);
  border-radius: var(--r-full);
  border: 2px solid var(--paper-raised);
}

.verb-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
  animation: line-in 420ms var(--ease-out) both;
}
.verb-item:nth-child(1) { animation-delay: calc(var(--stagger) * 0); }
.verb-item:nth-child(2) { animation-delay: calc(var(--stagger) * 1); }
.verb-item:nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
.verb-item:nth-child(4) { animation-delay: calc(var(--stagger) * 3); }
.verb-item:nth-child(5) { animation-delay: calc(var(--stagger) * 4); }
.verb-item:nth-child(n+6) { animation-delay: calc(var(--stagger) * 5); }

.verb-item:hover { background: var(--accent-wash); }
.verb-item.is-checked {
  background: var(--accent-wash);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--rule));
}

.verb-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-xs);
  background: var(--paper-raised);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.verb-item input[type="checkbox"]::after {
  content: "";
  width: 9px; height: 9px;
  transform: scale(0);
  background: var(--on-accent);
  clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 16%, 84% 0, 38% 66%);
  transition: transform var(--dur-micro) var(--ease-spring);
}
.verb-item input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.verb-item input[type="checkbox"]:checked::after { transform: scale(1.15); }

.verb-item__text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink);
}
.verb-item__hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12ch;
}

/* -------------------------------------------------------------------------
   8. Buttons
   ------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  overflow: hidden;
  transition: background var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out),
              transform var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-micro) var(--ease-out);
}
.btn svg { width: 15px; height: 15px; fill: currentColor; flex: none; }

.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--rule-strong);
  color: var(--ink);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn--primary {
  padding: 0.5rem 1rem;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-size: 0.875rem;
  box-shadow: 0 6px 16px -8px rgba(42, 75, 141, 0.7);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}
/* sheen sweep on hover (Politics-Wiki pw-sheen-sweep) */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.42) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.55s var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(130%); }

.btn--danger {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--rule));
  color: var(--bad);
}
.btn--danger:hover {
  background: var(--bad-wash);
  border-color: var(--bad);
}

.btn:active { transform: scale(0.97); }

/* -------------------------------------------------------------------------
   9. Practice panel
   ------------------------------------------------------------------------- */
.practice__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.practice__body {
  padding: 0.5rem 0.85rem 0.85rem;
  flex: 1;
  min-height: 0;
}

.practice__foot {
  padding: 0.75rem 1.15rem 1rem;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.practice__foot b { color: var(--ink-soft); }
.practice__foot i { font-family: var(--font-serif); }

/* empty state */
.empty {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--ink-muted);
}
.empty__icon {
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-lg);
  font-size: 1.5rem;
  color: var(--accent);
  background: var(--accent-wash);
  animation: float-y 3.5s var(--ease-out) infinite;
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* -------------------------------------------------------------------------
   10. Table
   ------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--paper-raised);
}

.verb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.verb-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.6rem 0.75rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.verb-table thead th:first-child { border-radius: var(--r-sm) 0 0 0; }
.th-status { width: 42px; }

.verb-table tbody td,
.verb-table tbody th {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}
.verb-table tbody tr:last-child td,
.verb-table tbody tr:last-child th { border-bottom: none; }
.verb-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }

.verb-row {
  animation: line-in 460ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 38ms);
  transition: background var(--dur) var(--ease-out);
}
.verb-row:hover { background: var(--accent-wash); }

@keyframes line-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cell--inf {
  width: 22%;
  text-align: left;
  min-width: 6.5rem;
}
.inf-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.cell--status { width: 42px; text-align: center; }

.answer-input {
  width: 100%;
  min-width: 6rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-micro) var(--ease-out),
              background var(--dur-micro) var(--ease-out);
}
.answer-input::placeholder { color: var(--ink-faint); font-style: italic; }
.answer-input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-halo);
}

.answer-input.is-correct {
  border-color: color-mix(in srgb, var(--ok) 55%, var(--rule));
  background: var(--ok-wash);
  color: var(--ok-strong);
  animation: correct-pop 380ms var(--ease-spring);
}
@keyframes correct-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}

.answer-input.is-wrong {
  border-color: color-mix(in srgb, var(--bad) 55%, var(--rule));
  background: var(--bad-wash);
  color: var(--bad);
}
.answer-input.is-empty { border-style: dashed; }

.answer-reveal {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--bad);
  animation: reveal-in 300ms var(--ease-out) both;
}
.answer-reveal__label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.66rem;
  opacity: 0.8;
}
.answer-reveal b { font-family: var(--font-serif); font-size: 0.85rem; }

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.status-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  background: transparent;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring);
}
.row--correct .status-dot {
  background: var(--ok);
  border-color: var(--ok);
  transform: scale(1.1);
}
.row--wrong .status-dot {
  background: var(--bad);
  border-color: var(--bad);
}

.row--correct { background: color-mix(in srgb, var(--ok-wash) 70%, transparent); }
.row--wrong   { background: color-mix(in srgb, var(--bad-wash) 70%, transparent); }

.verb-row.shake { animation: shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* -------------------------------------------------------------------------
   11. Confetti (perfect score)
   ------------------------------------------------------------------------- */
.confetti {
  position: fixed;
  top: -12px;
  width: 8px; height: 13px;
  border-radius: 2px;
  z-index: 999;
  pointer-events: none;
  animation: confetti-fall 2s var(--ease-out) forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* -------------------------------------------------------------------------
   12. Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .app__main { grid-template-columns: 1fr; }
  .picker {
    position: static;
    max-height: none;
  }
  .picker__list { max-height: 260px; }
  .brand__subtitle { display: none; }
}

@media (max-width: 620px) {
  :root { --header-h: 0px; }
  .app__header {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }
  .score { min-width: 0; }
  .practice__controls .btn { flex: 1 1 auto; justify-content: center; }
  .verb-item__hint { display: none; }
  .verb-table { font-size: 0.8rem; }
  .cell--inf { min-width: 5rem; }
  .answer-input { min-width: 5rem; }
}

/* -------------------------------------------------------------------------
   13. Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .bg-glow::after { display: none; }
  .brand__mark::after { display: none; }
}
