:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #15803d;
  --red: #dc2626;
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe3ef;
  --soft: #f4f7fb;
  --white: #fff;
  --violet: #7c3aed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top, #dbeafe, transparent 38rem),
    var(--soft);
  font-family:
    Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.primary {
  color: white;
  background: var(--blue);
}

.secondary {
  color: var(--ink);
  background: #e8eef7;
}

.danger {
  color: white;
  background: var(--red);
}

.page {
  width: min(920px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 60px;
}

.candidate {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 900;
}

.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 0 8px;
}

.sound {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  flex: 0 0 94px;
  border-radius: 28px;
  color: white;
  background: var(--violet);
  font-size: 60px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(124,58,237,.22);
}

h1 {
  margin: 0 0 7px;
  font-size: clamp(30px, 7vw, 50px);
  line-height: 1;
}

h2 {
  margin: 4px 0 16px;
  font-size: clamp(23px, 4vw, 31px);
}

p {
  line-height: 1.55;
}

.lead,
.muted {
  color: var(--muted);
}

.lead {
  margin: 0;
  font-size: 17px;
}

.progress {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0 4px;
}

.progress span {
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: #e8eef7;
  font-size: 13px;
  font-weight: 800;
}

.progress .active {
  color: white;
  background: var(--blue);
}

.card {
  margin-top: 16px;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 14px 40px rgba(30,64,175,.08);
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
}

.formula {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 18px 0 26px;
  padding: 20px;
  border-radius: 20px;
  background: #f5f3ff;
  font-size: clamp(28px, 7vw, 46px);
  font-weight: 900;
}

.formula .arrow {
  color: var(--muted);
}

.formula .accent {
  color: var(--violet);
}

.instruction-grid,
.media-grid,
.future-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.instruction,
.media-placeholder {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.icon,
.media-icon {
  margin-bottom: 8px;
  font-size: 32px;
}

.instruction p,
.media-placeholder p {
  margin-bottom: 0;
  color: var(--muted);
}

.planned {
  display: inline-block;
  margin-top: 10px;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.mirror {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-top: 14px;
  border-radius: 22px;
  background: #0f172a;
}

.mirror video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.mirror-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.button-row,
.audio-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.audio-placeholder {
  flex: 1 1 160px;
  color: var(--ink);
  background: #e8eef7;
}

.big-target {
  padding: 18px;
  text-align: center;
  color: var(--violet);
  font-size: clamp(38px, 9vw, 70px);
  font-weight: 900;
}

.status,
.note {
  margin-top: 13px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--muted);
}

#myRecording {
  width: 100%;
  margin-top: 15px;
}

.words {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.word {
  padding: 18px 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--soft);
  text-align: center;
  font-size: 23px;
  font-weight: 900;
}

.word span {
  color: var(--violet);
}

.word small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.sentence-ladder {
  display: grid;
  gap: 8px;
}

.sentence-ladder > div {
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--soft);
  font-size: 18px;
  font-weight: 750;
}

.sentence-ladder .final-sentence {
  color: white;
  background: var(--violet);
  font-size: clamp(20px, 5vw, 30px);
}

.future-grid {
  grid-template-columns: repeat(2, 1fr);
}

.future-grid div {
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--soft);
  font-weight: 700;
}

@media (max-width: 700px) {
  .instruction-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .words {
    grid-template-columns: repeat(2, 1fr);
  }

  .future-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: flex-start;
  }

  .sound {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    border-radius: 22px;
    font-size: 48px;
  }
}


.probe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.play-audio {
  color: var(--ink);
  background: #e8eef7;
}

.play-audio:hover {
  background: #dbeafe;
}

.play-audio.playing {
  color: white;
  background: var(--violet);
}

.word-audio {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.word-audio button {
  min-width: 44px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
}

.sentence-audio {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.sentence-audio button {
  flex: 1 1 190px;
}

@media (max-width: 600px) {
  .probe-grid {
    grid-template-columns: 1fr;
  }
}


.visual-card {
  display: flex;
  flex-direction: column;
}

.visual-asset {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

/* ARTICULATION VISUAL LAYOUT V2 */

.media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.visual-card {
  padding: 18px;
}

.visual-card-wide {
  grid-column: 1 / -1;
}

.visual-link {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  cursor: zoom-in;
}

.visual-asset {
  width: 100%;
  height: 330px;
  margin: 0;
  object-fit: contain;
  border-radius: 16px;
  background: white;
  border: 1px solid #e2e8f0;
}

.visual-asset-wide {
  height: 390px;
}

.visual-link:hover .visual-asset {
  border-color: var(--blue);
  box-shadow: 0 8px 24px rgba(37,99,235,.10);
}

@media (max-width: 700px) {
  .media-grid {
    grid-template-columns: 1fr;
  }

  .visual-card-wide {
    grid-column: auto;
  }

  .visual-asset,
  .visual-asset-wide {
    height: auto;
    min-height: 260px;
  }
}

/* GT_ARTICULATION_WIZARD_CSS_V1 */

.wizard-hidden,
.wizard-internal-hidden {
  display: none !important;
}

#lessonProgress {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 0;
  background: rgba(244,247,251,.94);
  backdrop-filter: blur(10px);
}

#lessonProgress span {
  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease;
}

#lessonProgress span.done {
  color: #166534;
  background: #dcfce7;
}

#lessonProgress span.active {
  color: white;
  background: var(--blue);
}

.wizard-controls {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 40px rgba(30,64,175,.08);
}

.wizard-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.wizard-progress-row strong {
  color: var(--ink);
}

.wizard-progress-bar {
  overflow: hidden;
  height: 8px;
  margin: 12px 0 16px;
  border-radius: 999px;
  background: #e8eef7;
}

#wizardProgressFill {
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .25s ease;
}

.wizard-buttons {
  display: flex;
  gap: 10px;
}

.wizard-buttons button {
  flex: 1 1 0;
}

.wizard-completion {
  padding-top: 42px;
  padding-bottom: 42px;
  text-align: center;
}

.completion-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 44px;
  font-weight: 900;
}

.completion-text {
  max-width: 650px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 17px;
}

@media (max-width: 600px) {
  .wizard-buttons {
    flex-direction: column-reverse;
  }

  .wizard-buttons button {
    width: 100%;
  }
}


/* GT_ARTICULATION_ACTION_GATES_CSS_V1 */

.wizard-gate-status {
  margin: 14px 0 16px;
  padding: 13px 15px;
  border-radius: 14px;
  font-weight: 750;
  line-height: 1.45;
  transition:
    transform .18s ease,
    background .18s ease;
}

.wizard-gate-status.ready {
  color: #166534;
  background: #dcfce7;
}

.wizard-gate-status.locked {
  color: #92400e;
  background: #fff7ed;
}

.wizard-gate-status.gate-attention {
  transform: scale(1.015);
  background: #ffedd5;
}

.play-audio.action-complete {
  color: #166534;
  background: #dcfce7;
}

.word {
  position: relative;
}

.word.word-complete {
  border-color: #86efac;
  background: #f0fdf4;
}

.word.word-complete::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  background: #16a34a;
  font-size: 14px;
  font-weight: 900;
}

#wizardNext:disabled {
  color: #94a3b8;
  background: #e2e8f0;
  opacity: 1;
  cursor: not-allowed;
}


/* GT_WORD_PRONUNCIATION_UI_CSS_V1 */

.word-pronunciation-controls {
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.word-pronunciation-button {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
  cursor: pointer;
}

.word-pronunciation-button:hover:not(:disabled) {
  background: #dbeafe;
}

.word-pronunciation-button:disabled {
  cursor: wait;
  opacity: .7;
}

.word-pronunciation-result {
  min-height: 38px;
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.35;
}

.word-pronunciation-result.waiting {
  color: #1e40af;
  background: #eff6ff;
}

.word-pronunciation-result.success {
  color: #166534;
  background: #dcfce7;
}

.word-pronunciation-result.retry {
  color: #92400e;
  background: #fff7ed;
}

.word-pronunciation-result.error {
  color: #991b1b;
  background: #fef2f2;
}

.word.pronunciation-pass {
  box-shadow:
    inset 0 0 0 2px
    rgba(34,197,94,.25);
}

.word.pronunciation-retry {
  box-shadow:
    inset 0 0 0 2px
    rgba(245,158,11,.20);
}


/* GT_UE_ACOUSTIC_FEEDBACK_CSS_V1 */

.ue-acoustic-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #c4b5fd;
  border-radius: 18px;
  background: #faf5ff;
}

.ue-acoustic-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6d28d9;
  background: #ede9fe;
  font-size: 12px;
  font-weight: 900;
}

.ue-acoustic-panel h3 {
  margin: 4px 0 8px;
}

.ue-acoustic-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.ue-acoustic-recordings {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.ue-acoustic-record,
.ue-acoustic-check {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  font-weight: 850;
  cursor: pointer;
}

.ue-acoustic-record {
  color: #5b21b6;
  background: white;
}

.ue-acoustic-record.recorded {
  color: #166534;
  border-color: #86efac;
  background: #f0fdf4;
}

.ue-acoustic-check {
  width: 100%;
  margin-top: 12px;
  color: white;
  background: #7c3aed;
}

.ue-acoustic-check:disabled {
  color: #94a3b8;
  border-color: #e2e8f0;
  background: #e2e8f0;
  cursor: not-allowed;
}

.ue-acoustic-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  background: white;
  line-height: 1.45;
}

.ue-acoustic-result.waiting {
  color: #1e40af;
  background: #eff6ff;
}

.ue-acoustic-result.success {
  color: #166534;
  background: #dcfce7;
}

.ue-acoustic-result.feedback {
  color: #92400e;
  background: #fff7ed;
}

.ue-acoustic-result.retry {
  color: #92400e;
  background: #fffbeb;
}

.ue-acoustic-result.error {
  color: #991b1b;
  background: #fef2f2;
}

@media (max-width: 700px) {
  .ue-acoustic-recordings {
    grid-template-columns: 1fr;
  }
}



/* GT_PUBLIC_DEMO_POLISH_V1 */

/*
Experimental acoustic i -> ü -> u module
stays in the candidate source but is not
shown in today's public demonstration.
*/
.ue-acoustic-panel {
  display: none !important;
}

/*
The green corner icon means:
"reference audio listened",
not "pronunciation accepted".
*/
.word.word-complete::after {
  content: "🔊";
  font-size: 12px;
}

