/* ==========================================================================
   Achievements & Impostor Syndrome — Greycy Farias
   Sou Teacher Carlos — Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500&display=swap');

:root {
  --azul: #092d5a;
  --azul-2: #123f78;
  --azul-tint-10: rgba(9, 45, 90, 0.06);
  --azul-tint-20: rgba(9, 45, 90, 0.12);
  --verde: #b1d6c0;
  --verde-escura: #4b8f6b;
  --verde-tint: #eaf4ee;
  --amarelo: #fff56e;
  --amarelo-tint: #fffbd6;
  --texto: #10243f;
  --texto-suave: #526074;
  --texto-fraco: #8494a6;
  --branco: #ffffff;
  --fundo: #f6f8fa;
  --erro: #b5493f;
  --erro-tint: #fbebe9;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 10px 34px rgba(9, 45, 90, 0.10);
  --shadow-soft: 0 2px 10px rgba(9, 45, 90, 0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--fundo);
  color: var(--texto);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
#app {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 16px 64px;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; }
textarea, input, select { font-family: inherit; font-size: 15px; }
:focus-visible { outline: 3px solid var(--azul-2); outline-offset: 2px; }
a.stc-link { color: var(--azul-2); font-weight: 600; }

/* ---- Header -------------------------------------------------------------*/
.stc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 20px;
  background: var(--branco);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.stc-header-brand { display: flex; gap: 14px; align-items: flex-start; }
.stc-logo { width: 40px; height: 40px; flex-shrink: 0; margin-top: 2px; }
.stc-eyebrow { font-size: 12.5px; color: var(--texto-fraco); font-weight: 600; margin: 0 0 4px; }
.stc-title { font-size: 21px; color: var(--azul); line-height: 1.2; }
.stc-subtitle { font-size: 14px; color: var(--texto-suave); margin-top: 6px; font-style: italic; max-width: 40ch; }
.stc-ring-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.stc-ring { display: block; }
.stc-ring-bg { fill: none; stroke: var(--azul-tint-10); }
.stc-ring-fg { fill: none; stroke: var(--verde-escura); stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.stc-ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--azul); }

.stc-dash {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--azul-tint-10);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 10px;
}
.stc-dash-stat { background: var(--branco); padding: 12px 8px; text-align: center; }
.stc-dash-value { display: block; font-size: 18px; font-weight: 800; color: var(--azul); }
.stc-dash-label { display: block; font-size: 11.5px; color: var(--texto-fraco); margin-top: 2px; }

/* ---- Module nav -----------------------------------------------------------*/
.stc-modnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 2px 6px;
  scrollbar-width: thin;
}
.stc-modtab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--azul-tint-20);
  background: var(--branco);
  color: var(--texto-suave);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 8px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.stc-modtab-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800;
  background: var(--azul-tint-10); color: var(--azul);
  flex-shrink: 0;
}
.stc-modtab-count { color: var(--texto-fraco); font-weight: 500; font-size: 12px; }
.stc-modtab.is-active { border-color: var(--azul); background: var(--azul); color: var(--branco); }
.stc-modtab.is-active .stc-modtab-icon { background: rgba(255,255,255,0.18); color: var(--branco); }
.stc-modtab.is-active .stc-modtab-count { color: rgba(255,255,255,0.75); }
.stc-modtab.is-complete:not(.is-active) { border-color: var(--verde-escura); }
.stc-modtab.is-complete:not(.is-active) .stc-modtab-icon { background: var(--verde-tint); color: var(--verde-escura); }
.stc-modtab.is-locked { opacity: 0.5; }

/* ---- Module body ----------------------------------------------------------*/
.stc-module { margin-top: 18px; }
.stc-module-head { padding: 4px 4px 16px; }
.stc-module-title { font-size: 24px; color: var(--azul); }
.stc-module-subtitle { font-size: 14.5px; color: var(--texto-suave); font-style: italic; margin-top: 4px; }
.stc-module-progress { margin-top: 14px; }
.stc-progressbar { height: 6px; background: var(--azul-tint-10); border-radius: var(--radius-pill); overflow: hidden; }
.stc-progressbar-fill { height: 100%; background: var(--verde-escura); border-radius: var(--radius-pill); transition: width 0.4s ease; }
.stc-module-progress-label { display: block; font-size: 12px; color: var(--texto-fraco); margin-top: 6px; }

/* ---- Card -----------------------------------------------------------------*/
.stc-card, .stc-final {
  background: var(--branco);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 20px 26px;
}
.stc-card-head { margin-bottom: 18px; }
.stc-card-title { font-size: 19px; color: var(--azul); }
.stc-card-instruction { font-size: 14.5px; color: var(--texto-suave); margin-top: 6px; }
.stc-checkpoint { border: 1.5px dashed var(--verde-escura); }

/* ---- Buttons ----------------------------------------------------------------*/
.stc-btn {
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  min-height: 46px;
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.stc-btn:active { transform: scale(0.97); }
.stc-btn-primary { background: var(--azul); color: var(--branco); }
.stc-btn-primary:disabled { opacity: 0.45; }
.stc-btn-secondary { background: var(--branco); color: var(--azul); border: 1.5px solid var(--azul); }
.stc-btn-secondary:disabled { opacity: 0.45; }
.stc-btn-ghost { background: transparent; color: var(--texto-suave); text-decoration: underline; padding: 8px 4px; }
.stc-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.stc-continue { margin-top: 14px; }

/* ---- Chips / word bank ------------------------------------------------------*/
.stc-wordbank { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding: 12px; background: var(--fundo); border-radius: var(--radius-md); }
.stc-chip {
  border: 1.5px solid var(--azul-tint-20);
  background: var(--branco);
  color: var(--azul);
  border-radius: var(--radius-pill);
  padding: 11px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 600;
  touch-action: manipulation;
}
.stc-chip.is-selected { border-color: var(--amarelo); background: var(--amarelo-tint); }
.stc-chip.is-placed { background: var(--verde-tint); border-color: var(--verde-escura); color: var(--verde-escura); }
.stc-chip-choice.is-correct { background: var(--verde-tint); border-color: var(--verde-escura); color: var(--verde-escura); }
.stc-chip-choice.is-wrong { background: var(--erro-tint); border-color: var(--erro); color: var(--erro); }
.stc-chip-static { background: var(--azul-tint-10); border-color: transparent; color: var(--azul); }

/* ---- Blanks / sentence rows -------------------------------------------------*/
.stc-sentence-list { display: flex; flex-direction: column; gap: 16px; }
.stc-sentence-row, .stc-mcq-inline-row { font-size: 15.5px; line-height: 2.1; }
.stc-blank {
  display: inline-block;
  min-width: 90px;
  border: none;
  border-bottom: 2px solid var(--azul);
  background: var(--azul-tint-10);
  border-radius: 6px 6px 0 0;
  padding: 4px 10px;
  font-weight: 700;
  color: var(--azul);
  font-size: 14.5px;
}
.stc-blank.is-filled { background: var(--verde-tint); color: var(--verde-escura); border-color: var(--verde-escura); }
.stc-inline-options { display: inline-flex; gap: 8px; margin: 0 6px; }
.stc-reminder:empty { display: none; }
.stc-tip-box {
  position: relative;
  margin-top: 8px;
  background: var(--verde-tint);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13.5px;
  font-style: italic;
  color: var(--texto);
  max-width: 340px;
}
.stc-tip-box strong { display: block; font-style: normal; color: var(--verde-escura); font-size: 12px; text-transform: none; margin-bottom: 2px; }

/* ---- Match --------------------------------------------------------------------*/
.stc-match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stc-match-col { display: flex; flex-direction: column; gap: 8px; }
.stc-match-item {
  text-align: left;
  border: 1.5px solid var(--azul-tint-20);
  background: var(--branco);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--texto);
  min-height: 46px;
}
.stc-match-item.is-selected { border-color: var(--amarelo); background: var(--amarelo-tint); }
.stc-match-item.is-done { border-color: var(--verde-escura); background: var(--verde-tint); color: var(--verde-escura); opacity: 0.75; }
.stc-explain-pop { background: var(--azul-tint-10); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; white-space: pre-line; margin-top: 8px; color: var(--azul); }

/* ---- Sort 2 columns -------------------------------------------------------------*/
.stc-sort-pile { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.stc-sort-card { border: 1.5px solid var(--azul-tint-20); background: var(--branco); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13.5px; font-weight: 600; max-width: 100%; text-align: left; }
.stc-sort-card.is-selected { border-color: var(--amarelo); background: var(--amarelo-tint); }
.stc-sort-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stc-sort-col { background: var(--fundo); border-radius: var(--radius-md); padding: 12px; min-height: 90px; cursor: pointer; }
.stc-sort-col h4 { font-size: 13px; color: var(--azul); margin-bottom: 8px; }
.stc-sort-placed { background: var(--verde-tint); color: var(--verde-escura); border-radius: var(--radius-sm); padding: 7px 10px; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.stc-note-box { background: var(--amarelo-tint); border-radius: var(--radius-md); padding: 14px; margin-top: 16px; font-size: 13.5px; }
.stc-note-box strong { color: var(--azul); display: block; margin-bottom: 4px; }
.stc-personal-form { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.stc-field-label { font-size: 13px; font-weight: 700; color: var(--azul); margin-top: 8px; }

/* ---- Text inputs / textarea -----------------------------------------------------*/
.stc-textarea, .stc-text-input, .stc-inline-input {
  width: 100%;
  border: 1.5px solid var(--azul-tint-20);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  color: var(--texto);
  background: var(--branco);
  resize: vertical;
}
.stc-inline-input { width: 130px; display: inline-block; margin: 0 4px; padding: 6px 8px; }
.stc-textarea:focus, .stc-text-input:focus, .stc-inline-input:focus { border-color: var(--azul); }
.stc-select {
  border: 1.5px solid var(--azul-tint-20);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--azul);
  background: var(--branco);
  margin: 0 4px;
}
.stc-inline-feedback { font-size: 13px; font-weight: 700; }
.stc-inline-feedback.is-correct { color: var(--verde-escura); }
.stc-inline-feedback.is-incorrect { color: var(--erro); }

/* ---- Reorder ------------------------------------------------------------------*/
.stc-reorder-item { border-top: 1px solid var(--azul-tint-10); padding-top: 16px; margin-top: 16px; }
.stc-reorder-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.stc-built-sentence { min-height: 44px; border: 1.5px dashed var(--azul-tint-20); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.stc-placeholder { color: var(--texto-fraco); font-size: 13.5px; font-style: italic; }

/* ---- Edit sentence --------------------------------------------------------------*/
.stc-edit-item { border-top: 1px solid var(--azul-tint-10); padding-top: 16px; margin-top: 16px; }
.stc-edit-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.stc-context { font-size: 12.5px; color: var(--texto-fraco); font-style: italic; margin-bottom: 6px; }
.stc-hint { font-size: 13.5px; color: var(--texto-suave); margin-top: 6px; font-style: italic; }
.stc-model-answer { font-size: 14px; color: var(--verde-escura); font-weight: 700; margin-top: 8px; }

/* ---- MCQ ------------------------------------------------------------------------*/
.stc-mcq-item { border-top: 1px solid var(--azul-tint-10); padding-top: 16px; margin-top: 16px; }
.stc-mcq-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.stc-mcq-prompt { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.stc-mcq-options { display: flex; flex-direction: column; gap: 8px; }
.stc-option-card {
  text-align: left;
  border: 1.5px solid var(--azul-tint-20);
  background: var(--branco);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  min-height: 46px;
  font-size: 14.5px;
  color: var(--texto);
}
.stc-option-card.is-correct { border-color: var(--verde-escura); background: var(--verde-tint); color: var(--verde-escura); font-weight: 700; }
.stc-option-card.is-wrong { border-color: var(--erro); background: var(--erro-tint); color: var(--erro); }
.stc-option-card:disabled { opacity: 0.6; }

/* ---- Select all -------------------------------------------------------------------*/
.stc-select-all-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.stc-checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; padding: 4px 0; }
.stc-checkbox-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--azul); flex-shrink: 0; }

/* ---- Word family ------------------------------------------------------------------*/
.stc-family-item { border-top: 1px solid var(--azul-tint-10); padding-top: 16px; margin-top: 16px; }
.stc-family-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.stc-family-chain { font-size: 13px; color: var(--texto-fraco); margin-bottom: 8px; font-weight: 600; }
.stc-family-sentence { font-size: 15px; line-height: 2.2; margin-bottom: 10px; }

/* ---- Scenario / speech bubble -------------------------------------------------------*/
.stc-scenario-item { border-top: 1px solid var(--azul-tint-10); padding-top: 18px; margin-top: 18px; }
.stc-scenario-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.stc-speech-bubble {
  position: relative;
  background: var(--azul);
  color: var(--branco);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  max-width: 90%;
}
.stc-speech-bubble::after {
  content: "";
  position: absolute;
  left: 22px; bottom: -9px;
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid var(--azul);
}
.stc-speech-from { font-size: 11.5px; font-weight: 700; opacity: 0.75; display: block; margin-bottom: 4px; }
.stc-speech-bubble p { font-size: 15px; font-style: italic; line-height: 1.4; }

/* ---- Reframe / translate / reading / reflection --------------------------------------*/
.stc-example-box, .stc-passage { background: var(--fundo); border-radius: var(--radius-md); padding: 16px; margin-bottom: 18px; }
.stc-example-before { color: var(--erro); font-size: 14px; margin-bottom: 6px; }
.stc-example-after { color: var(--verde-escura); font-size: 14px; font-weight: 700; }
.stc-passage h4 { color: var(--azul); font-size: 15px; margin-bottom: 10px; }
.stc-passage p { font-size: 14.5px; color: var(--texto-suave); margin-bottom: 10px; line-height: 1.6; }
.stc-passage p:last-child { margin-bottom: 0; }
.stc-reframe-item, .stc-translate-item, .stc-reading-item, .stc-reflection-item, .stc-final-item {
  border-top: 1px solid var(--azul-tint-10); padding-top: 16px; margin-top: 16px;
}
.stc-reframe-item:first-child, .stc-translate-item:first-child, .stc-reading-item:first-child,
.stc-reflection-item:first-child, .stc-final-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.stc-thought, .stc-pt-text, .stc-q, .stc-lead { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--azul); }
.stc-final-item h4 { font-size: 15px; color: var(--azul); margin-bottom: 10px; }

/* ---- Conversation ---------------------------------------------------------------------*/
.stc-convo { background: var(--fundo); border-radius: var(--radius-md); padding: 16px; margin-bottom: 14px; }
.stc-convo-line { font-size: 15px; line-height: 2.1; margin-bottom: 4px; }

/* ---- Speaking --------------------------------------------------------------------------*/
.stc-speaking-questions { padding-left: 20px; margin-bottom: 18px; }
.stc-speaking-questions li { font-size: 14.5px; margin-bottom: 6px; color: var(--texto-suave); }
.stc-recorder-status { font-size: 13.5px; color: var(--texto-suave); margin-top: 10px; }
.stc-audio-preview { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.stc-audio-preview audio { width: 100%; }
.stc-transcript { font-size: 13px; font-style: italic; color: var(--texto-suave); }

/* ---- Feedback ------------------------------------------------------------------------*/
.stc-feedback { margin-top: 10px; font-size: 14px; font-weight: 700; padding: 8px 0; }
.stc-feedback-correct { color: var(--verde-escura); }
.stc-feedback-incorrect { color: var(--erro); }

/* ---- Final screen ----------------------------------------------------------------------*/
.stc-final { margin-top: 18px; text-align: left; }
.stc-final-hero h2 { font-size: 25px; color: var(--azul); margin-bottom: 8px; }
.stc-final-hero p { font-size: 15px; color: var(--texto-suave); }
.stc-final-progress { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; background: var(--verde-tint); border-radius: var(--radius-pill); padding: 12px 18px; }
.stc-final-progress-count { font-weight: 700; color: var(--verde-escura); font-size: 14px; }
.stc-final-progress-pct { font-weight: 800; color: var(--verde-escura); font-size: 18px; }
.stc-final-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; }
.stc-final-block { background: var(--fundo); border-radius: var(--radius-md); padding: 14px 16px; }
.stc-final-block h4 { font-size: 13.5px; color: var(--azul); margin-bottom: 8px; }
.stc-final-block ul { margin: 0; padding-left: 18px; }
.stc-final-block li { font-size: 13.5px; color: var(--texto-suave); margin-bottom: 4px; }
.stc-final-review { margin-top: 6px; }
.stc-final-review h3 { font-size: 15px; color: var(--azul); margin-bottom: 10px; }
.stc-review-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.stc-review-item { border-top: 1px solid var(--azul-tint-10); padding-top: 14px; margin-top: 14px; }
.stc-review-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* ---- Responsive: small phones — stack two-column widgets ------------------------------*/
@media (max-width: 400px) {
  .stc-match { grid-template-columns: 1fr; }
  .stc-sort-cols { grid-template-columns: 1fr; }
}

/* ---- Responsive: tablet / desktop -------------------------------------------------------*/
@media (min-width: 640px) {
  #app { padding: 32px 24px 80px; }
  .stc-header { padding: 28px 30px 26px; }
  .stc-title { font-size: 25px; }
  .stc-card, .stc-final { padding: 32px 34px 34px; }
  .stc-final-grid { grid-template-columns: repeat(3, 1fr); }
  .stc-sort-cols { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .stc-modnav { flex-wrap: wrap; overflow-x: visible; padding: 16px 0 6px; }
  .stc-modtab { flex: 0 1 auto; }
}
@media (min-width: 900px) {
  .stc-dash { grid-template-columns: repeat(4, 1fr); }
  :root { --max-w: 860px; }
}
@media (min-width: 1200px) {
  :root { --max-w: 920px; }
  .stc-card, .stc-final { padding: 40px 48px 46px; }
}

/* ---- Reduced motion -----------------------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
