:root {
  --ink: #18222d;
  --muted: #66717d;
  --line: #dfe5e8;
  --paper: #ffffff;
  --background: #f4f7f5;
  --teal: #0e6f72;
  --teal-dark: #07585a;
  --teal-soft: #e7f4f1;
  --gold: #f2b84b;
  --success: #1d7a4a;
  --success-soft: #e9f7ef;
  --warning: #9a5a00;
  --warning-soft: #fff4dc;
  --error: #a33737;
  --error-soft: #fff0f0;
  --shadow: 0 15px 45px rgba(31, 49, 48, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(14, 111, 114, 0.28);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(223, 229, 232, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px 13px 13px 4px;
  color: white;
  background: var(--teal);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.level-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-pill {
  min-width: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.level-pill.active {
  border-color: var(--teal);
  color: white;
  background: var(--teal);
}

.level-pill:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.menu-button {
  display: none;
  align-items: center;
  gap: 7px;
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 70px 0 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 740px;
  margin: 13px 0 15px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-card {
  min-width: 205px;
  padding: 22px 24px;
  border: 1px solid rgba(14, 111, 114, 0.18);
  border-radius: 18px;
  background: var(--teal-soft);
}

.hero-card span,
.hero-card strong {
  display: block;
}

.hero-card-label {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card strong {
  margin: 4px 0 1px;
  color: var(--teal-dark);
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1;
}

.hero-card span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  position: sticky;
  top: 77px;
  z-index: 80;
  margin-bottom: 26px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 28px rgba(31, 49, 48, 0.07);
  backdrop-filter: blur(12px);
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px 10px 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fbfcfc;
}

.search-box input:focus {
  border-color: var(--teal);
  background: white;
}

.unfinished-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.unfinished-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.results-count {
  min-width: 72px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.word-grid {
  padding-bottom: 60px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}

.word-card {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.image-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e8eeeb;
}

.word-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #f3f7f8;
}

.word-number {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  color: white;
  background: rgba(24, 34, 45, 0.68);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.16);
  font-weight: 800;
  backdrop-filter: blur(7px);
}

.listen-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.listen-button:hover {
  background: white;
  transform: translateY(-2px);
}

.listen-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.card-content {
  flex: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.word-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.word-title {
  margin: 0;
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  line-height: 1.05;
}

.word-pos {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.level-badge {
  padding: 5px 9px;
  border-radius: 7px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
}

.word-details {
  margin: 17px 0 18px;
  display: grid;
  gap: 12px;
}

.word-details > div {
  padding-left: 12px;
  border-left: 3px solid var(--teal-soft);
}

.word-details dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.word-details dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
}

.word-example .highlight {
  color: var(--teal-dark);
  font-weight: 800;
}

.practice-box {
  position: relative;
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(14, 111, 114, 0.2);
  border-radius: 16px;
  background: linear-gradient(145deg, #f5fbf9, #ffffff);
}

.practice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--teal-dark);
}

.practice-heading > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chatgpt-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--teal);
  font-size: 15px;
}

.saved-label {
  position: absolute;
  top: 17px;
  right: 13px;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.sentence-label {
  margin-top: 10px;
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.sentence-label strong {
  color: var(--ink);
}

.sentence-input {
  width: 100%;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  margin-top: 6px;
  padding: 9px 11px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  line-height: 1.4;
}

.sentence-input::placeholder {
  color: #97a0a8;
}

.sentence-input:focus {
  border-color: var(--teal);
}

.practice-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.character-count {
  color: var(--muted);
  font-size: 12px;
}

.check-button {
  min-height: 38px;
  padding: 7px 11px 7px 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--teal);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.check-button:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.check-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.check-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.feedback {
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
}

.feedback[data-status="correct"] {
  color: var(--success);
  background: var(--success-soft);
}

.feedback[data-status="almost"] {
  color: var(--warning);
  background: var(--warning-soft);
}

.feedback[data-status="try_again"] {
  color: var(--error);
  background: var(--error-soft);
}

.feedback[data-status="offline"] {
  color: #3f5f75;
  background: #eaf3f8;
}


.feedback-title {
  display: block;
  margin-bottom: 2px;
}

.feedback p {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
}

.feedback-correction::before {
  content: "Correction: ";
  color: currentColor;
  font-weight: 800;
}

.feedback-tip::before {
  content: "Tip: ";
  color: currentColor;
  font-weight: 800;
}

.empty-state {
  margin: 0 auto 70px;
  padding: 54px 20px;
  border: 1px dashed #bec8c9;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 20px;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(24, 34, 45, 0.25);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.site-footer {
  padding: 28px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: white;
  text-align: center;
  font-size: 12px;
}

.site-footer p {
  max-width: 850px;
  margin: 0 auto;
}


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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .hero-card {
    width: min(100%, 320px);
  }

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

  .toolbar {
    flex-wrap: wrap;
  }

  .search-box {
    flex-basis: 100%;
  }

  .results-count {
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  .header-inner,
  main {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    min-height: 68px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .menu-button {
    display: inline-flex;
  }

  .level-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 11px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: white;
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  }

  .level-nav.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .hero {
    padding-top: 45px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .toolbar {
    top: 69px;
  }

  .unfinished-toggle {
    white-space: normal;
  }

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

  .card-content {
    padding: 18px;
  }

  .word-title {
    font-size: 31px;
  }


  .practice-actions {
    align-items: flex-end;
  }

  .check-button span {
    max-width: 116px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.image-source {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(24, 34, 45, 0.72);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  backdrop-filter: blur(7px);
  transition: transform 0.15s ease, background 0.15s ease;
}

.image-source svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.image-source:hover,
.image-source:focus-visible {
  background: rgba(24, 34, 45, 0.92);
  transform: translateY(-2px);
}

.image-wrap.image-unavailable::after {
  content: 'Image unavailable — open the image search link';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 70px 24px 24px;
  color: #40515a;
  background: linear-gradient(135deg, #edf3f1, #dce8e4);
  text-align: center;
  font-weight: 700;
}

.image-wrap.image-unavailable .image-source,
.image-wrap.image-unavailable .word-number,
.image-wrap.image-unavailable .listen-button {
  z-index: 3;
}


/* NGSL page additions */
.word-image {
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.image-wrap {
  isolation: isolate;
  background: #e7efec;
}

.image-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -22px;
  background-image: var(--image-url);
  background-size: cover;
  background-position: center;
  filter: blur(22px);
  opacity: 0.20;
  transform: scale(1.08);
}

.image-wrap.illustration-image::before {
  display: none;
}

.list-tag {
  position: absolute;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.90);
  border-radius: 50%;
  color: white;
  box-shadow: 0 7px 20px rgba(0,0,0,.20);
  font-weight: 900;
  cursor: help;
  backdrop-filter: blur(8px);
}

.tag-ngsl { top: 12px; left: 12px; background: rgba(14,111,114,.92); }
.tag-longman { top: 12px; right: 12px; background: rgba(154,90,0,.92); }
.tag-oxford { bottom: 12px; left: 12px; background: rgba(51,72,145,.92); }

.tag-popover {
  position: absolute;
  width: max-content;
  max-width: 230px;
  padding: 9px 11px;
  border-radius: 10px;
  color: white;
  background: rgba(24,34,45,.96);
  box-shadow: 0 10px 28px rgba(0,0,0,.26);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.tag-popover strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.tag-ngsl .tag-popover { top: 46px; left: 0; }
.tag-longman .tag-popover { top: 46px; right: 0; }
.tag-oxford .tag-popover { bottom: 46px; left: 0; }

.list-tag:hover .tag-popover,
.list-tag:focus .tag-popover,
.list-tag:focus-visible .tag-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.image-source {
  top: 50%;
  right: 12px;
  left: auto;
  bottom: auto;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
}

.image-source:hover,
.image-source:focus-visible {
  transform: translateY(calc(-50% - 2px));
}

.image-source svg { width: 17px; height: 17px; }

.word-number { display: none; }

.hero p strong {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-size: 13px;
}

@media (max-width: 520px) {
  .list-tag { width: 34px; height: 34px; }
  .tag-ngsl { top: 9px; left: 9px; }
  .tag-longman { top: 9px; right: 9px; }
  .tag-oxford { bottom: 9px; left: 9px; }
  .listen-button { right: 9px; bottom: 9px; width: 35px; height: 35px; }
  .image-source { right: 9px; width: 29px; height: 29px; }
}


/* Single list marker, genuine audio prompt and conservative photo placement */
.version-badge {
  display: inline-flex;
  width: max-content;
  margin-top: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(14, 111, 114, 0.22);
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.word-image {
  object-fit: contain;
  object-position: center center;
}

.image-wrap::before {
  background-position: var(--image-position, center center);
}

/* Suppress the obsolete three-marker controls if an old cached template is used. */
.tag-ngsl,
.tag-longman,
.tag-oxford {
  display: none !important;
}

.list-info-button {
  position: absolute;
  z-index: 7;
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 50%;
  color: white;
  background: rgba(14,111,114,.94);
  box-shadow: 0 7px 20px rgba(0,0,0,.22);
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.question-mark {
  font-size: 18px;
  line-height: 1;
}

.list-popover {
  position: absolute;
  top: 46px;
  left: 0;
  width: max-content;
  min-width: 205px;
  max-width: 250px;
  padding: 11px 12px;
  border-radius: 11px;
  color: white;
  background: rgba(24,34,45,.97);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.list-popover > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.membership-list,
.membership-item {
  display: grid;
}

.membership-list {
  gap: 6px;
}

.membership-item {
  grid-template-columns: 9px 1fr;
  align-items: center;
  gap: 7px;
}

.membership-item::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7fd3c7;
}

.membership-oxford::before { background: #8fa5ff; }
.membership-longman::before { background: #f2b84b; }

.list-info-button:hover .list-popover,
.list-info-button:focus-visible .list-popover,
.list-info-button.open .list-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.listen-button {
  z-index: 7;
  top: 12px;
  right: 12px;
  bottom: auto;
  width: auto;
  min-width: 84px;
  height: 38px;
  padding: 0 12px 0 10px;
  grid-template-columns: 20px auto;
  gap: 6px;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.listen-button svg {
  width: 19px;
  height: 19px;
}

.listen-button.playing {
  color: white;
  background: var(--teal);
}

.image-source {
  top: auto;
  right: auto;
  bottom: 12px;
  left: 12px;
  transform: none;
}

.image-source:hover,
.image-source:focus-visible {
  transform: translateY(-2px);
}

@media (max-width: 520px) {
  .list-info-button { top: 9px; left: 9px; width: 35px; height: 35px; }
  .listen-button { top: 9px; right: 9px; min-width: 78px; width: auto; height: 35px; }
  .image-source { bottom: 9px; left: 9px; }
}

/* Spark Vocab Version 1.3 */
:root {
  --ink: #102d63;
  --muted: #657287;
  --line: #dbe4eb;
  --background: #f3f9fb;
  --teal: #079bab;
  --teal-dark: #087b8a;
  --teal-soft: #e8f8fa;
  --gold: #ffb000;
  --success: #15794e;
  --success-soft: #e8f7ef;
  --shadow: 0 15px 45px rgba(16, 45, 99, 0.10);
}

.site-header {
  border-bottom-color: rgba(16, 45, 99, 0.12);
}

.header-inner {
  min-height: 78px;
}

.brand {
  gap: 11px;
}

.brand-logo {
  width: auto;
  height: 48px;
  display: block;
  object-fit: contain;
}

.version-badge {
  margin: 0;
  padding: 3px 8px;
  border-color: rgba(7, 155, 171, 0.28);
  color: var(--teal-dark);
  background: var(--teal-soft);
  white-space: nowrap;
}

.level-pill.active,
.check-button,
.spark-ai-mark {
  background: var(--teal);
}

.level-pill.active {
  border-color: var(--teal);
}

.hero {
  padding-top: 58px;
}

.hero h1,
.word-title,
.hero-card strong {
  color: var(--ink);
}

.eyebrow,
.word-example .highlight {
  color: var(--teal-dark);
}

.toolbar {
  top: 79px;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  min-width: 220px;
}

.search-box input {
  min-height: 44px;
  border-color: #d6e1e7;
  background: #fbfdfe;
}

.unfinished-toggle {
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdfe;
  color: #4f6076;
  font-weight: 650;
}

.count-badge {
  min-width: 28px;
  height: 25px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--teal);
  font-size: 12px;
  line-height: 1;
}

.progress-summary {
  min-width: 245px;
  display: grid;
  gap: 2px;
  color: #58677b;
  font-size: 12px;
  line-height: 1.35;
}

.progress-summary span {
  display: block;
}

.progress-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.results-count {
  min-width: 58px;
  font-weight: 700;
}

.word-heading-copy {
  min-width: 0;
}

.word-and-audio {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.listen-button {
  position: static !important;
  z-index: auto;
  width: auto !important;
  min-width: 0 !important;
  height: 29px !important;
  padding: 0 9px 0 7px !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(7, 155, 171, 0.28) !important;
  border-radius: 999px !important;
  color: var(--teal-dark);
  background: var(--teal-soft);
  box-shadow: none !important;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.listen-button:hover,
.listen-button:focus-visible {
  color: white;
  background: var(--teal);
  transform: none;
}

.listen-button svg {
  width: 15px !important;
  height: 15px !important;
}

.listen-button.playing {
  color: white;
  background: var(--teal);
}

.word-pos {
  margin-top: 5px;
}

.spark-ai-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
}

.practice-heading {
  color: var(--ink);
}

.practice-box {
  border-color: rgba(7, 155, 171, 0.22);
  background: linear-gradient(145deg, #f1fbfc, #ffffff);
}

.list-info-button {
  background: rgba(7, 155, 171, 0.95);
}

.membership-item::before {
  background: var(--teal);
}

.membership-longman::before {
  background: var(--gold);
}

.progress-toast {
  position: fixed;
  z-index: 300;
  right: 24px;
  bottom: 24px;
  width: min(370px, calc(100% - 32px));
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(7, 155, 171, 0.30);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 55px rgba(16, 45, 99, 0.24);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.progress-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.progress-toast > div:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.progress-toast strong {
  color: var(--teal-dark);
  font-size: 16px;
}

.progress-toast span:not(.spark-core):not(.spark-ray) {
  color: #5d6c7f;
  font-size: 12px;
}

.spark-burst {
  position: relative;
  width: 55px;
  height: 55px;
  flex: 0 0 55px;
  display: grid;
  place-items: center;
}

.spark-core {
  color: var(--gold);
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(255, 176, 0, 0.30));
}

.spark-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: var(--gold);
  transform-origin: 50% 27px;
  opacity: 0;
}

.progress-toast.show .spark-core {
  animation: spark-pop 0.65s ease both;
}

.progress-toast.show .spark-ray {
  animation: spark-ray 0.72s ease both;
}

.ray-1 { transform: translate(-50%, -27px) rotate(0deg); }
.ray-2 { transform: translate(-50%, -27px) rotate(60deg); }
.ray-3 { transform: translate(-50%, -27px) rotate(120deg); }
.ray-4 { transform: translate(-50%, -27px) rotate(180deg); }
.ray-5 { transform: translate(-50%, -27px) rotate(240deg); }
.ray-6 { transform: translate(-50%, -27px) rotate(300deg); }

@keyframes spark-pop {
  0% { transform: scale(0.35) rotate(-18deg); opacity: 0; }
  55% { transform: scale(1.22) rotate(7deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes spark-ray {
  0% { opacity: 0; height: 3px; }
  35% { opacity: 1; height: 13px; }
  100% { opacity: 0; height: 5px; }
}

@media (max-width: 1020px) {
  .progress-summary {
    order: 4;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 620px) {
  .brand-logo {
    height: 39px;
  }

  .version-badge {
    padding: 2px 6px;
    font-size: 9px;
  }

  .toolbar {
    top: 69px;
  }

  .search-box,
  .unfinished-toggle,
  .progress-summary {
    width: 100%;
    min-width: 0;
  }

  .progress-summary {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .results-count {
    margin-left: 0;
  }

  .listen-button {
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    height: 29px !important;
  }

  .progress-toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-toast.show .spark-core,
  .progress-toast.show .spark-ray {
    animation: none !important;
  }
}

.progress-summary {
  min-width: 285px;
}

.progress-summary span {
  white-space: nowrap;
}

@media (max-width: 620px) {
  .progress-summary span {
    white-space: normal;
  }
}


/* Spark Vocab Version 1.4 */
.header-inner {
  min-height: 78px;
}

.brand {
  gap: 8px;
  min-height: 78px;
  align-items: center;
}

.brand-logo {
  height: 58px;
  max-width: min(430px, 43vw);
}

.version-badge {
  flex: 0 0 auto;
}

.level-status {
  min-width: 38px;
  flex: 0 0 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.learned-tick {
  width: 26px;
  height: 26px;
  margin-top: 7px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #20a05a;
  box-shadow: 0 5px 14px rgba(32, 160, 90, 0.24);
  opacity: 0;
  transform: scale(0.62);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(.2,.85,.3,1.25);
}

.learned-tick svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.word-card.is-learned .learned-tick {
  opacity: 1;
  transform: scale(1);
}

/* Reserve feedback space so cards never resize after checking an answer. */
.feedback {
  height: 132px;
  min-height: 132px;
  overflow: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.feedback.has-feedback {
  visibility: visible;
  opacity: 1;
}

.progress-summary {
  min-width: 340px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
}

.progress-lines {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inline-progress-spark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}

.inline-spark-core {
  color: var(--gold);
  font-size: 25px;
  line-height: 1;
  transform: scale(0.4) rotate(-14deg);
  filter: drop-shadow(0 3px 6px rgba(255, 176, 0, 0.30));
}

.inline-spark-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.5px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  transform-origin: 50% 19px;
  opacity: 0;
}

.inline-progress-spark.celebrate {
  opacity: 1;
}

.inline-progress-spark.celebrate .inline-spark-core {
  animation: inline-spark-pop 0.78s ease both;
}

.inline-progress-spark.celebrate .inline-spark-ray {
  animation: inline-spark-ray 0.82s ease both;
}

.inline-ray-1 { transform: translate(-50%, -19px) rotate(0deg); }
.inline-ray-2 { transform: translate(-50%, -19px) rotate(60deg); }
.inline-ray-3 { transform: translate(-50%, -19px) rotate(120deg); }
.inline-ray-4 { transform: translate(-50%, -19px) rotate(180deg); }
.inline-ray-5 { transform: translate(-50%, -19px) rotate(240deg); }
.inline-ray-6 { transform: translate(-50%, -19px) rotate(300deg); }

.progress-summary.progress-incremented #page-practiced,
.progress-summary.progress-incremented #global-practiced {
  animation: progress-number-pop 0.62s ease both;
}

@keyframes inline-spark-pop {
  0% { transform: scale(0.35) rotate(-18deg); opacity: 0; }
  48% { transform: scale(1.26) rotate(8deg); opacity: 1; }
  100% { transform: scale(0.96) rotate(0); opacity: 0; }
}

@keyframes inline-spark-ray {
  0% { opacity: 0; height: 2px; }
  35% { opacity: 1; height: 9px; }
  100% { opacity: 0; height: 3px; }
}

@keyframes progress-number-pop {
  0% { color: var(--ink); transform: scale(1); }
  45% { color: #20a05a; transform: scale(1.16); }
  100% { color: var(--ink); transform: scale(1); }
}

@media (max-width: 1020px) {
  .progress-summary {
    width: 100%;
    display: flex;
    grid-template-columns: none;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .brand {
    min-height: 68px;
  }

  .brand-logo {
    height: 47px;
    max-width: min(335px, 67vw);
  }

  .progress-summary {
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  .progress-lines {
    flex: 1 1 auto;
  }

  .feedback {
    height: 142px;
    min-height: 142px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inline-progress-spark.celebrate {
    opacity: 1;
  }

  .inline-progress-spark.celebrate .inline-spark-core {
    opacity: 1;
    transform: scale(1);
  }

  .inline-progress-spark.celebrate .inline-spark-ray,
  .progress-summary.progress-incremented #page-practiced,
  .progress-summary.progress-incremented #global-practiced {
    animation: none !important;
  }
}

/* Spark Vocab Version 1.5 */
.level-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.level-control-label {
  color: #516078;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.character-count {
  min-width: 46px;
  font-variant-numeric: tabular-nums;
  transition: color 0.16s ease, font-weight 0.16s ease;
}

.character-count.near-limit {
  color: #a86700;
  font-weight: 800;
}

.character-count.at-limit {
  color: var(--error);
  font-weight: 900;
}

/* Keep the field at two lines; longer text scrolls inside rather than resizing the card. */
.sentence-input {
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  overflow-y: auto;
}

/* A newly increased total flashes the entire sticky controls bar. */
.toolbar.progress-flash {
  animation: toolbar-progress-flash 2.4s ease-out both;
}

@keyframes toolbar-progress-flash {
  0% {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 28px rgba(31, 49, 48, 0.07);
  }
  12% {
    background: rgba(255, 246, 184, 0.99);
    box-shadow: 0 10px 34px rgba(255, 176, 0, 0.22);
  }
  38% {
    background: rgba(255, 249, 210, 0.99);
  }
  100% {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 28px rgba(31, 49, 48, 0.07);
  }
}

/* Make the inline celebration last roughly twice as long as Version 1.4. */
.inline-progress-spark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.inline-spark-core {
  font-size: 28px;
}

.inline-progress-spark.celebrate .inline-spark-core {
  animation: inline-spark-pop-v15 2.2s ease-out both;
}

.inline-progress-spark.celebrate .inline-spark-ray {
  animation: inline-spark-ray-v15 2.2s ease-out both;
}

.progress-summary.progress-incremented #page-practiced,
.progress-summary.progress-incremented #global-practiced {
  animation: progress-number-pop-v15 1.25s ease both;
}

@keyframes inline-spark-pop-v15 {
  0% { transform: scale(0.30) rotate(-20deg); opacity: 0; }
  16% { transform: scale(1.28) rotate(8deg); opacity: 1; }
  34% { transform: scale(0.98) rotate(0); opacity: 1; }
  72% { transform: scale(1.04) rotate(3deg); opacity: 1; }
  100% { transform: scale(0.82) rotate(0); opacity: 0; }
}

@keyframes inline-spark-ray-v15 {
  0% { opacity: 0; height: 2px; }
  14% { opacity: 1; height: 10px; }
  34% { opacity: 0.35; height: 7px; }
  52% { opacity: 1; height: 10px; }
  76% { opacity: 0.45; height: 6px; }
  100% { opacity: 0; height: 2px; }
}

@keyframes progress-number-pop-v15 {
  0% { color: var(--ink); transform: scale(1); }
  32% { color: #20a05a; transform: scale(1.17); }
  68% { color: #20a05a; transform: scale(1.08); }
  100% { color: var(--ink); transform: scale(1); }
}

@media (max-width: 620px) {
  .header-inner,
  main {
    width: min(calc(100% - 24px), 1180px);
  }

  .level-control {
    display: contents;
  }

  .level-control-label {
    display: none;
  }

  .menu-button {
    max-width: 155px;
    justify-content: flex-end;
    text-align: right;
    line-height: 1.15;
  }

  .word-grid {
    justify-items: center;
  }

  /* Standard mobile card dimensions: width follows the viewport up to 408px; height never changes. */
  .word-card {
    width: 100%;
    max-width: 408px;
    height: 820px;
    min-height: 820px;
    max-height: 820px;
  }

  .image-wrap {
    aspect-ratio: auto;
    flex: 0 0 220px;
    height: 220px;
  }

  .card-content {
    min-height: 0;
    padding: 16px;
    overflow: hidden;
  }

  .word-heading-row {
    min-height: 58px;
    flex: 0 0 58px;
  }

  .word-details {
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    margin: 12px 0;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .word-details > div {
    min-height: 0;
    overflow: hidden;
  }

  .word-details dd {
    max-height: 42px;
    overflow-y: auto;
  }

  .practice-box {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .feedback {
    height: 125px;
    min-height: 125px;
    max-height: 125px;
  }
}

@media (max-width: 360px) {
  .brand-logo {
    height: 42px;
    max-width: 58vw;
  }

  .version-badge {
    display: none;
  }

  .menu-button {
    max-width: 132px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toolbar.progress-flash {
    animation: none !important;
    background: rgba(255, 249, 210, 0.99);
  }

  .inline-progress-spark.celebrate .inline-spark-core,
  .inline-progress-spark.celebrate .inline-spark-ray,
  .progress-summary.progress-incremented #page-practiced,
  .progress-summary.progress-incremented #global-practiced {
    animation: none !important;
  }
}

/* Version 1.5 mobile header fit correction */
@media (max-width: 620px) {
  .header-inner {
    gap: 8px;
  }

  .brand {
    position: relative;
    min-width: 0;
    flex: 0 1 auto;
    gap: 0;
  }

  .brand-logo {
    height: 44px;
    max-width: 52vw;
    transform: translateY(-4px);
  }

  .version-badge {
    position: absolute;
    right: 0;
    bottom: 2px;
    display: inline-flex !important;
    padding: 1px 4px;
    font-size: 7px;
    line-height: 1.15;
  }

  .menu-button {
    flex: 0 0 118px;
    max-width: 118px;
    padding: 0;
    font-size: 12px;
  }
}

@media (max-width: 340px) {
  .brand-logo {
    height: 41px;
    max-width: 50vw;
  }

  .menu-button {
    flex-basis: 112px;
    max-width: 112px;
    font-size: 11.5px;
  }
}

/* Version 1.5 responsive header refinements */
@media (max-width: 820px) {
  .level-control-label {
    display: none;
  }

  .header-inner {
    gap: 12px;
  }
}

@media (max-width: 620px) {
  .header-inner {
    gap: 6px;
  }

  .brand {
    min-width: 0;
    gap: 5px;
  }

  .brand-logo {
    height: 42px;
    max-width: calc(100vw - 170px);
  }

  .version-badge {
    padding: 2px 5px;
    font-size: 8px;
  }

  .menu-button {
    flex: 0 0 80px;
    max-width: 80px;
    padding: 0;
    gap: 4px;
    justify-content: flex-end;
    font-size: 11px;
    line-height: 1.05;
  }
}

@media (max-width: 360px) {
  .brand-logo {
    height: 38px;
    max-width: 56vw;
  }
}

/* Spark Vocab Version 1.6 */
.inline-question-mark { display:inline-grid; width:23px; height:23px; place-items:center; border-radius:50%; color:white; background:var(--teal); font-size:13px; font-weight:800; }
.hero p .coverage-emphasis { display:inline !important; width:auto !important; height:auto !important; place-items:initial !important; border-radius:0 !important; color:var(--ink) !important; background:transparent !important; font-size:inherit !important; font-weight:900; }
.coverage-note { margin-top:13px !important; max-width:760px !important; color:#475a70 !important; font-size:clamp(15px,1.7vw,18px) !important; }
.chooser-panel { display:flex; align-items:center; gap:16px; }
.level-chooser,.word-set-chooser { display:flex; align-items:center; gap:9px; }
.chooser-label { color:#516078; font-size:12px; font-weight:800; white-space:nowrap; }
.word-set-chooser select { min-height:40px; max-width:205px; padding:7px 34px 7px 11px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:white; font-weight:750; cursor:pointer; }
.word-set-chooser select:focus-visible { border-color:var(--teal); }
.learned-tick { padding:0; border:0; cursor:default; pointer-events:none; }
.word-card.is-learned .learned-tick { cursor:pointer; pointer-events:auto; }
.word-card.is-learned .learned-tick:hover,.word-card.is-learned .learned-tick:focus-visible { background:#137040; transform:scale(1.08); }
.unlearn-toast { position:fixed; z-index:320; right:22px; bottom:22px; min-width:260px; max-width:calc(100% - 32px); padding:12px 13px 12px 15px; display:flex; align-items:center; justify-content:space-between; gap:16px; border:1px solid #cfd8df; border-radius:14px; color:var(--ink); background:rgba(255,255,255,.98); box-shadow:0 16px 40px rgba(16,45,99,.20); opacity:0; transform:translateY(12px); pointer-events:none; transition:opacity .18s ease,transform .18s ease; }
.unlearn-toast.show { opacity:1; transform:translateY(0); pointer-events:auto; }
.unlearn-toast button { padding:5px 8px; border:0; border-radius:8px; color:var(--teal-dark); background:var(--teal-soft); font-weight:850; cursor:pointer; }
@media (max-width:1050px){ .chooser-label{display:none;} }
@media (max-width:900px){
  .menu-button{display:inline-flex;}
  .chooser-panel{position:absolute;top:calc(100% + 1px);right:16px;width:min(430px,calc(100% - 32px));padding:15px;display:grid;gap:14px;border:1px solid var(--line);border-radius:14px;background:white;box-shadow:var(--shadow);visibility:hidden;opacity:0;transform:translateY(-6px);transition:opacity .16s ease,transform .16s ease,visibility .16s ease;}
  .chooser-panel.open{visibility:visible;opacity:1;transform:translateY(0);}
  .level-chooser,.word-set-chooser{display:grid;gap:7px;}
  .chooser-label{display:block;}
  .chooser-panel .level-nav{position:static;padding:0;display:flex;border:0;border-radius:0;background:transparent;box-shadow:none;visibility:visible;opacity:1;transform:none;}
  .word-set-chooser select{width:100%;max-width:none;}
}
@media (max-width:620px){
  .word-card{height:720px;min-height:720px;max-height:720px;}
  .image-wrap{flex-basis:190px;height:190px;}
  .card-content{padding:14px;}
  .word-heading-row{min-height:54px;flex-basis:54px;}
  .word-details{height:102px;min-height:102px;max-height:102px;margin:10px 0;}
  .word-details dd{max-height:37px;}
  .practice-box{padding:11px;}
  .sentence-label{margin-top:7px;}
  .practice-actions{margin-top:8px;}
  .feedback{height:92px;min-height:92px;max-height:92px;margin-top:10px;padding:10px;}
  .feedback p{font-size:12.5px;}
  .chooser-panel{right:11px;width:min(390px,calc(100% - 22px));}
  .unlearn-toast{right:16px;bottom:16px;left:16px;min-width:0;max-width:none;}
}
@media (max-width:359px){ .word-card{height:750px;min-height:750px;max-height:750px;} }

/* Spark Vocab Version 1.7 */
.hero {
  align-items: center;
  padding-top: 54px;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 5.4vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero-set-title {
  margin: 12px 0 22px !important;
  color: var(--teal-dark) !important;
  font-size: clamp(22px, 2.5vw, 31px) !important;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.hero-intro {
  max-width: 780px;
  display: grid;
  gap: 10px;
}

.hero-intro p {
  max-width: none;
  margin: 0 !important;
  color: #52647a !important;
  font-family: inherit;
  font-size: clamp(16px, 1.55vw, 18px) !important;
  font-weight: 400;
  line-height: 1.55;
}

.hero-intro .coverage-emphasis {
  color: var(--ink) !important;
  font-weight: 900;
}

/* The entry form and its feedback share one fixed stage, so checking never changes card height. */
.practice-stage {
  position: relative;
  height: 174px;
  min-height: 174px;
  margin-top: 8px;
  overflow: hidden;
}

.practice-input-state,
.practice-feedback-state {
  position: absolute;
  inset: 0;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.practice-input-state {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.practice-input-state.is-hidden {
  opacity: 0;
  transform: translateY(-5px);
  visibility: hidden;
  pointer-events: none;
}

.practice-stage .sentence-label {
  margin-top: 0;
}

.practice-feedback-state.feedback {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 13px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(5px);
}

.practice-feedback-state.feedback.has-feedback {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.feedback-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.feedback-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: 9px;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.feedback-button:hover,
.feedback-button:focus-visible {
  background: white;
}

.feedback-another {
  color: var(--success);
}

@media (max-width: 620px) {
  .hero {
    padding: 46px 0 34px;
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 1.02;
  }

  .hero-set-title {
    margin: 9px 0 18px !important;
    font-size: 22px !important;
  }

  .hero-intro {
    gap: 9px;
  }

  .hero-intro p {
    font-size: 16px !important;
    line-height: 1.52;
  }

  .word-card {
    height: 650px;
    min-height: 650px;
    max-height: 650px;
  }

  .practice-stage {
    height: 160px;
    min-height: 160px;
    margin-top: 7px;
  }

  .practice-feedback-state.feedback {
    padding: 10px;
  }

  .feedback-title {
    font-size: 14px;
  }

  .feedback p {
    font-size: 12.5px;
    line-height: 1.35;
  }

  .feedback-actions {
    margin-top: 8px;
  }

  .feedback-button {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 11.5px;
  }
}

@media (max-width: 359px) {
  .word-card {
    height: 680px;
    min-height: 680px;
    max-height: 680px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .practice-input-state,
  .practice-feedback-state {
    transition: none;
  }
}

/* Version 1.7 final card-space refinement */
.practice-box {
  display: flex;
  flex-direction: column;
}

.practice-stage {
  flex: 1 1 auto;
  height: auto;
}

@media (max-width: 620px) {
  .word-card {
    height: 620px;
    min-height: 620px;
    max-height: 620px;
  }

  .practice-stage {
    height: auto;
    min-height: 160px;
  }
}

@media (max-width: 359px) {
  .word-card {
    height: 650px;
    min-height: 650px;
    max-height: 650px;
  }
}

/* Spark Vocab Version 1.8 */
/* Preserve the original hero hierarchy while making the list/set line easier to notice. */
.hero {
  align-items: end;
  padding-top: 58px;
}

.hero .eyebrow {
  margin: 0 0 15px;
  color: #007f86;
  font-size: clamp(15px, 1.35vw, 17px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 800px;
  margin: 0 0 24px;
  color: var(--ink);
  font-size: clamp(44px, 5.4vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero-intro {
  max-width: 780px;
  gap: 10px;
}

/* The entire practice panel changes state, including its heading. */
.practice-box {
  position: relative;
  min-height: 215px;
  padding: 0;
  overflow: hidden;
}

.practice-input-state,
.practice-feedback-state {
  position: absolute;
  inset: 13px;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.practice-input-state {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.practice-input-state.is-hidden {
  opacity: 0;
  transform: translateY(-5px);
  visibility: hidden;
  pointer-events: none;
}

.practice-feedback-state.feedback {
  inset: 13px;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 15px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(5px);
}

.practice-feedback-state.feedback.has-feedback {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.practice-heading {
  min-height: 28px;
}

/* Keep feedback visually balanced now that it owns the complete panel. */
.practice-feedback-state .feedback-title {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
}

.practice-feedback-state .feedback-actions {
  margin-top: 14px;
}

@media (max-width: 620px) {
  .hero {
    padding: 46px 0 34px;
  }

  .hero .eyebrow {
    margin-bottom: 12px;
    font-size: 15px;
    letter-spacing: 0.075em;
  }

  .hero h1 {
    margin-bottom: 20px;
  }

  .practice-box {
    min-height: 198px;
  }

  .practice-input-state,
  .practice-feedback-state.feedback {
    inset: 11px;
  }

  .practice-feedback-state.feedback {
    padding: 13px;
  }

  .practice-feedback-state .feedback-title {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .practice-input-state,
  .practice-feedback-state {
    transition: none;
  }
}

/* Spark Vocab Version 1.9 */
.header-practice-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid #d99500;
  border-radius: 999px;
  color: #102d63;
  background: linear-gradient(180deg, #ffc43b 0%, #ffb000 100%);
  box-shadow: 0 5px 14px rgba(217, 149, 0, 0.22);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.header-practice-button:hover,
.header-practice-button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffd15f 0%, #ffb713 100%);
  box-shadow: 0 7px 18px rgba(217, 149, 0, 0.28);
}

.header-practice-button:active { transform: translateY(0); }
.header-practice-spark { color: #102d63; font-size: 17px; line-height: 1; }

.hero-intro strong { color: inherit; font-weight: 850; }
.hero-intro .coverage-emphasis { color: var(--ink) !important; font-weight: 900; }

.practice-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.practice-modal-shell[hidden] { display: none; }
.practice-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 28, 61, 0.66);
  backdrop-filter: blur(5px);
}
.practice-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(16, 45, 99, 0.14);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(4, 20, 52, 0.35);
}
.practice-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid #dbe4eb;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.practice-dialog-header {
  padding: 30px 72px 22px 30px;
  border-bottom: 1px solid #e1e9ef;
  background: linear-gradient(135deg, #fff9e7 0%, #eefbfc 100%);
}
.practice-dialog-kicker {
  color: #087b8a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.practice-dialog-header h2 {
  margin: 5px 0 6px;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1;
}
.practice-dialog-header p { margin: 0; color: #5b6c80; }
.practice-app { padding: 26px 30px 30px; }
.practice-empty,
.practice-complete { text-align: center; padding: 36px 12px 28px; }
.practice-empty-icon,
.practice-complete-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 17px;
  border-radius: 50%;
  color: #102d63;
  background: #fff1bd;
  font-size: 34px;
}
.practice-empty h3,
.practice-complete h3 { margin: 0 0 9px; color: var(--ink); font-size: 26px; }
.practice-empty p,
.practice-complete p { max-width: 520px; margin: 0 auto 20px; color: #647386; line-height: 1.55; }
.practice-primary,
.practice-secondary,
.practice-choice,
.practice-next,
.practice-skip {
  min-height: 42px;
  border-radius: 12px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.practice-primary,
.practice-next {
  border: 1px solid #007d89;
  color: white;
  background: #079bab;
  padding: 9px 18px;
}
.practice-secondary,
.practice-skip {
  border: 1px solid #cad7e1;
  color: var(--ink);
  background: white;
  padding: 9px 15px;
}
.practice-session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.practice-session-top strong { color: var(--ink); }
.practice-session-top span { color: #66768a; font-size: 14px; }
.practice-meter {
  height: 8px;
  margin-bottom: 25px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef3;
}
.practice-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #079bab, #ffb000);
  transition: width .25s ease;
}
.practice-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #087b8a;
  background: #e8f8fa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.practice-question h3 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.12;
}
.practice-question-copy { margin: 0 0 20px; color: #5d6d80; line-height: 1.55; }
.practice-target-word { color: #079bab; }
.practice-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.practice-choice {
  padding: 12px 14px;
  border: 1px solid #cfdae3;
  color: #203c6d;
  background: white;
  text-align: left;
}
.practice-choice:hover,
.practice-choice:focus-visible { border-color: #079bab; background: #f0fbfc; }
.practice-choice.correct { border-color: #2c9467; background: #e8f7ef; }
.practice-choice.incorrect { border-color: #ce6f68; background: #fff0ef; }
.practice-answer-label { display: grid; gap: 8px; color: #344c6d; font-weight: 800; }
.practice-text-input,
.practice-sentence-input {
  width: 100%;
  border: 1px solid #c8d6e1;
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 17px;
  outline: none;
}
.practice-text-input { min-height: 50px; padding: 10px 13px; }
.practice-sentence-input { min-height: 105px; padding: 12px 13px; resize: vertical; }
.practice-text-input:focus,
.practice-sentence-input:focus { border-color: #079bab; box-shadow: 0 0 0 3px rgba(7,155,171,.13); }
.practice-question-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.practice-feedback-banner {
  margin-top: 17px;
  padding: 13px 15px;
  border-radius: 13px;
  color: #3a4d65;
  background: #f0f5f8;
  line-height: 1.45;
}
.practice-feedback-banner.correct { color: #126541; background: #e8f7ef; }
.practice-feedback-banner.incorrect { color: #91403a; background: #fff0ef; }
.practice-feedback-banner strong { display: block; margin-bottom: 3px; }
.practice-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 420px; margin: 20px auto; }
.practice-result-grid div { padding: 14px; border: 1px solid #dbe4eb; border-radius: 14px; background: #f7fafc; }
.practice-result-grid strong { display: block; color: var(--ink); font-size: 26px; }
.practice-result-grid span { color: #66768a; font-size: 13px; }
body.practice-modal-open { overflow: hidden; }
.site-footer .footer-version { font-weight: 850; }

@media (max-width: 840px) {
  .header-inner { gap: 10px; }
  .header-practice-button { margin-left: auto; }
}
@media (max-width: 620px) {
  .header-practice-button { min-height: 37px; padding: 7px 12px; font-size: 13px; }
  .header-practice-spark { font-size: 15px; }
  .practice-modal-shell { align-items: end; padding: 0; }
  .practice-dialog { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
  .practice-dialog-header { padding: 25px 62px 18px 20px; }
  .practice-app { padding: 20px; }
  .practice-choices { grid-template-columns: 1fr; }
  .practice-question-actions { align-items: stretch; flex-direction: column-reverse; }
  .practice-question-actions button { width: 100%; }
}
@media (max-width: 430px) {
  .header-practice-button span:last-child { display: none; }
  .header-practice-button { width: 38px; padding: 0; border-radius: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .header-practice-button,
  .practice-meter > span { transition: none; }
}

/* Keep instructional emphasis as ordinary bold text, not the legacy circular marker style. */
.hero-intro p strong:not(.coverage-emphasis) {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  place-items: initial !important;
  border-radius: 0 !important;
  color: inherit !important;
  background: transparent !important;
  font-size: inherit !important;
  font-weight: 850 !important;
}

/* Spark Vocab Version 2.0 */
.secondary-nav {
  border-top: 1px solid rgba(223, 229, 232, 0.78);
  border-bottom: 1px solid rgba(223, 229, 232, 0.95);
  background: rgba(248, 251, 252, 0.96);
}

.secondary-nav-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 40px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.secondary-nav-inner::-webkit-scrollbar { display: none; }

.secondary-nav a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: #50647c;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.secondary-nav a:hover,
.secondary-nav a:focus-visible {
  color: #087b8a;
  background: #edf8f9;
}

.secondary-nav a.active {
  border-bottom-color: #079bab;
  color: #102d63;
  background: white;
}

.toolbar { top: 119px; }
.header-practice-button { text-decoration: none; }
.simple-header .header-inner { justify-content: space-between; }
.simple-header .header-practice-button { margin-left: auto; }

/* Gold fully-practiced marker beside the learned marker. */
.level-status {
  min-width: 66px;
  flex-basis: 66px;
}

.status-ticks {
  width: 60px;
  min-height: 26px;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.learned-tick,
.practice-complete-tick {
  width: 26px;
  height: 26px;
  margin: 0;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  opacity: 0;
  transform: scale(0.62);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(.2,.85,.3,1.25);
}

.practice-complete-tick {
  color: #102d63;
  background: #ffbf24;
  box-shadow: 0 5px 14px rgba(217, 149, 0, 0.25);
  pointer-events: none;
}

.practice-complete-tick svg,
.learned-tick svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.word-card.is-practice-complete .practice-complete-tick,
.word-card.is-learned .learned-tick {
  opacity: 1;
  transform: scale(1);
}

/* Reserve the gold marker's position so the green marker never shifts. */
.word-card:not(.is-practice-complete) .practice-complete-tick { visibility: hidden; }

.hero-intro .ngsl-emphasis,
.hero-intro .coverage-emphasis {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  place-items: initial !important;
  border-radius: 0 !important;
  color: inherit !important;
  background: transparent !important;
  font-size: inherit !important;
  font-weight: 900 !important;
}

/* Practice dimensions remain stable across all three question types. */
.practice-dialog {
  height: min(780px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.practice-dialog-header { flex: 0 0 auto; }

.practice-app {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.practice-question {
  min-height: 430px;
  display: flex;
  flex-direction: column;
}

#practice-question-body { min-height: 250px; }
.practice-question-actions { margin-top: auto; }
.practice-feedback-banner { min-height: 66px; box-sizing: border-box; }

.practice-sentence-input {
  height: 96px;
  min-height: 96px;
  max-height: 96px;
  padding: 12px 13px;
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;
}

.practice-context-sentence {
  margin: 18px 0 12px;
  padding: 17px 18px;
  border: 1px solid #d6e2e8;
  border-radius: 14px;
  color: #102d63;
  background: #f7fafc;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.5;
}

.practice-word-choice {
  text-align: center;
  font-size: 17px;
}

.practice-level-track {
  margin: -4px 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.practice-level-step {
  min-height: 42px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d9e3ea;
  border-radius: 12px;
  color: #65768a;
  background: #f8fafb;
  font-size: 12px;
  font-weight: 800;
}

.practice-level-step b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #607186;
  background: #e7edf2;
  font-size: 11px;
}

.practice-level-step.complete {
  border-color: #eed082;
  color: #665011;
  background: #fff8df;
}

.practice-level-step.complete b {
  color: #102d63;
  background: #ffbf24;
}

.practice-level-step.current {
  border-color: #079bab;
  box-shadow: 0 0 0 2px rgba(7,155,171,.1);
}

.practice-landing-stats {
  max-width: 420px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.practice-landing-stats div {
  padding: 13px;
  border: 1px solid #dbe4eb;
  border-radius: 14px;
  background: #f7fafc;
}

.practice-landing-stats strong,
.practice-landing-stats span { display: block; }
.practice-landing-stats strong { color: #102d63; font-size: 25px; }
.practice-landing-stats span { color: #68798c; font-size: 13px; }

/* Content pages */
.content-page { background: #fbfcfd; }
.page-main { padding-bottom: 70px; }
.page-hero {
  padding: 76px 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 380px);
  align-items: center;
  gap: 56px;
}

.compact-page-hero {
  grid-template-columns: minmax(0, 850px);
  padding-bottom: 38px;
}

.page-hero h1 {
  max-width: 850px;
  margin: 12px 0 18px;
  color: #102d63;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.page-lead {
  max-width: 760px;
  margin: 0;
  color: #5d6d80;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.58;
}

.page-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  min-height: 46px;
  padding: 11px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  border: 1px solid #007d89;
  color: white;
  background: #079bab;
}

.secondary-action {
  border: 1px solid #c9d7e0;
  color: #102d63;
  background: white;
}

.home-stat-card {
  padding: 27px;
  border: 1px solid #d9e7e9;
  border-radius: 22px;
  background: linear-gradient(145deg, #eefbfc, #fff8e5);
  box-shadow: 0 18px 45px rgba(16,45,99,.09);
}

.home-stat-card span,
.home-stat-card strong { display: block; }
.home-stat-card span { color: #087b8a; font-size: 12px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.home-stat-card strong { margin: 8px 0; color: #102d63; font-family: Georgia, serif; font-size: 56px; line-height: 1; }
.home-stat-card p { margin: 0; color: #53667b; line-height: 1.55; }

.content-section {
  margin-top: 24px;
  padding: 38px;
  border: 1px solid #e0e7ec;
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 35px rgba(16,45,99,.055);
}

.soft-section { background: linear-gradient(135deg, #f3fbfc, #fffaf0); }
.section-heading { max-width: 760px; margin-bottom: 25px; }
.section-kicker { margin: 0 0 7px; color: #087b8a; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.content-section h2 { margin: 0 0 12px; color: #102d63; font-size: clamp(25px, 3vw, 36px); line-height: 1.15; }
.content-section h3 { color: #102d63; }
.content-section p { color: #5c6e82; line-height: 1.65; }

.feature-grid,
.prose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card,
.prose-grid article {
  padding: 23px;
  border: 1px solid #e0e7ec;
  border-radius: 17px;
  background: #fcfdfe;
}

.feature-card h3 { margin: 13px 0 8px; font-size: 22px; }
.feature-card p,
.prose-grid p { margin: 0; }
.feature-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #102d63; background: #ffbf24; font-weight: 900; }
.prose-grid { grid-template-columns: 1fr 1fr; }
.prose-grid h2 { font-size: 25px; }

.split-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  align-items: center;
  gap: 42px;
}

.tick-explainer { display: grid; gap: 12px; }
.tick-explainer.horizontal { grid-template-columns: 1fr 1fr; }
.tick-explainer > div {
  padding: 14px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 12px;
  border: 1px solid #dce5eb;
  border-radius: 15px;
  background: white;
}
.tick-explainer strong,
.tick-explainer small { grid-column: 2; }
.tick-explainer small { color: #6b7b8c; }
.demo-tick { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-weight: 1000; }
.demo-tick.gold { color: #102d63; background: #ffbf24; }
.demo-tick.green { color: white; background: #20a05a; }

.process-list { display: grid; gap: 0; }
.process-list article { padding: 25px 0; display: grid; grid-template-columns: 64px 1fr; gap: 20px; border-bottom: 1px solid #e3e9ee; }
.process-list article:last-child { border-bottom: 0; }
.process-list article > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #102d63; background: #fff1bd; font-weight: 900; }
.process-list h2 { font-size: 27px; }
.process-list p { margin: 0; }

.account-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.account-stat-grid div { padding: 22px; border: 1px solid #dfe7ed; border-radius: 16px; background: #f8fafc; text-align: center; }
.account-stat-grid strong,
.account-stat-grid span { display: block; }
.account-stat-grid strong { color: #102d63; font-size: 34px; }
.account-stat-grid span { color: #68798c; }
.clean-list { margin: 18px 0 0; padding-left: 20px; color: #53667b; line-height: 1.8; }
.account-placeholder { padding: 28px; border: 1px solid #e3d08a; border-radius: 20px; background: #fff9e5; text-align: center; }
.account-placeholder > span { display: block; color: #d99500; font-size: 36px; }
.account-placeholder h3 { margin: 8px 0; }

.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 42px; }
.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 7px; color: #344c6d; font-weight: 800; }
.contact-form input,
.contact-form select,
.contact-form textarea { width: 100%; padding: 11px 12px; border: 1px solid #cbd8e1; border-radius: 11px; color: #102d63; background: white; font: inherit; box-sizing: border-box; }
.contact-form textarea { resize: vertical; }
.contact-form .primary-action { justify-self: start; }
.form-note,
#contact-status { font-size: 14px; }

.legal-copy { max-width: 900px; }
.legal-copy h2 { margin-top: 27px; font-size: 25px; }
.legal-copy h2:first-child { margin-top: 0; }

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 24px;
}
.site-footer nav { justify-self: end; display: flex; gap: 16px; }
.site-footer a { color: #50647c; font-weight: 750; text-decoration: none; }
.site-footer a:hover { color: #087b8a; }
.footer-disclaimer { grid-column: 1 / -1; max-width: 900px; }

@media (max-width: 900px) {
  .page-hero,
  .split-content,
  .contact-layout { grid-template-columns: 1fr; }
  .home-stat-card { max-width: 520px; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .toolbar { top: 119px; }
  .secondary-nav-inner { width: 100%; padding: 0 10px; }
  .secondary-nav a { padding: 0 11px; }
  .page-hero { padding: 48px 0 34px; gap: 28px; }
  .page-hero h1 { font-size: clamp(38px, 11vw, 52px); }
  .content-section { padding: 24px 20px; border-radius: 18px; }
  .prose-grid,
  .account-stat-grid,
  .tick-explainer.horizontal { grid-template-columns: 1fr; }
  .process-list article { grid-template-columns: 50px 1fr; gap: 13px; }
  .practice-dialog { height: 92vh; max-height: 92vh; }
  .practice-question { min-height: 480px; }
  #practice-question-body { min-height: 285px; }
  .practice-level-step { gap: 4px; padding: 6px 4px; font-size: 10px; }
  .footer-inner { grid-template-columns: 1fr; }
  .site-footer nav { justify-self: start; }
  .footer-disclaimer { grid-column: 1; }
}

@media (max-width: 430px) {
  .simple-header .brand-logo { max-width: 68vw; }
  .practice-level-track { gap: 5px; }
  .practice-level-step b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .learned-tick,
  .practice-complete-tick { transition: none; }
}


/* Version 2.2 Firebase account and Nano sentence-checking integration */
.auth-loading { text-align: center; color: #637589; }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.auth-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid #dce6ed; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(14, 45, 91, .07); }
.auth-card h2 { margin: 0 0 4px; color: #102d63; font-size: 28px; }
.auth-card label { display: flex; flex-direction: column; gap: 7px; color: #334a63; font-weight: 750; }
.auth-card input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd8e2; border-radius: 11px; background: #fff; color: #102d63; font: inherit; box-sizing: border-box; }
.auth-card input:focus { outline: 3px solid rgba(0, 156, 174, .18); border-color: #009cae; }
.auth-submit { border: 0; cursor: pointer; text-align: center; }
.auth-submit:disabled { opacity: .58; cursor: wait; }
.auth-text-button { align-self: flex-start; padding: 0; border: 0; background: transparent; color: #087f92; font: inherit; font-weight: 800; cursor: pointer; }
.auth-small-print { margin: 0; color: #6d7c8d; font-size: 14px; line-height: 1.5; }
.auth-message { margin-top: 18px; padding: 13px 16px; border-radius: 12px; background: #eef7fa; color: #153a52; font-weight: 700; }
.auth-message[data-type="error"] { background: #fff0ef; color: #9e2f25; }
.auth-message[data-type="success"] { background: #ebf8ef; color: #21693b; }
.signed-in-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 26px; border: 1px solid #dce6ed; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(14, 45, 91, .07); }
.signed-in-card h2 { margin: 2px 0 6px; color: #102d63; }
.signed-in-card p { margin: 0; }
.signed-in-spark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #fff4c7; color: #d99500; font-size: 28px; }
.auth-sign-out { border: 1px solid #cbd8e2; cursor: pointer; }
.cloud-account-stats { margin-top: 22px; }
.account-actions-row { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.account-actions-row .secondary-action { cursor: pointer; }

@media (max-width: 760px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; }
  .signed-in-card { grid-template-columns: auto 1fr; }
  .signed-in-card .auth-sign-out { grid-column: 1 / -1; width: 100%; }
  .account-actions-row { flex-direction: column; align-items: stretch; }
  .account-actions-row > * { width: 100%; text-align: center; box-sizing: border-box; }
}

/* Spark Vocab Version 2.3: full information-panel feedback */
.card-state-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 350px;
  overflow: hidden;
}

.card-study-state,
.card-feedback-state {
  position: absolute;
  inset: 0;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.card-study-state {
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.card-study-state.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  pointer-events: none;
}

.card-study-state .word-details {
  flex: 0 0 auto;
}

.card-study-state .practice-box {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 13px;
  overflow: hidden;
}

.card-study-state .practice-input-state {
  position: static;
  inset: auto;
  height: 100%;
  opacity: 1;
  visibility: visible;
  transform: none;
}

.card-feedback-state.feedback {
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 19px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 16px;
  visibility: hidden;
  opacity: 0;
  transform: translateX(8px);
}

.card-feedback-state.feedback.has-feedback {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.feedback-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-feedback-state .feedback-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.feedback-copy {
  margin-top: 17px;
  display: grid;
  gap: 12px;
}

.card-feedback-state.feedback p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.card-feedback-state .feedback-correction,
.card-feedback-state .feedback-tip {
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .68);
}

.card-feedback-state .feedback-actions {
  margin-top: auto;
  padding-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.card-feedback-state .feedback-button {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 12.5px;
}

.card-feedback-state .feedback-back {
  color: var(--teal-dark);
  border-color: rgba(7, 155, 171, .38);
}

@media (max-width: 620px) {
  .card-state-stage {
    min-height: 0;
  }

  .card-feedback-state.feedback {
    padding: 15px;
  }

  .card-feedback-state .feedback-title {
    font-size: 18px;
  }

  .feedback-copy {
    margin-top: 13px;
    gap: 9px;
  }

  .card-feedback-state.feedback p {
    font-size: 12.8px;
    line-height: 1.38;
  }

  .card-feedback-state .feedback-correction,
  .card-feedback-state .feedback-tip {
    padding: 8px 9px;
  }

  .card-feedback-state .feedback-actions {
    padding-top: 12px;
    gap: 7px;
  }

  .card-feedback-state .feedback-button {
    min-height: 34px;
    padding: 6px 7px;
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-study-state,
  .card-feedback-state {
    transition: none;
  }
}
