: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: #111; 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.4: 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;
  }
}

/* Spark Vocab Version 2.4 */
.secondary-nav a.sign-in-link {
  margin-left: auto;
  min-height: 32px;
  align-self: center;
  padding: 0 16px;
  border: 1px solid #079bab;
  border-radius: 999px;
  color: #fff;
  background: #079bab;
}
.secondary-nav a.sign-in-link:hover,
.secondary-nav a.sign-in-link:focus-visible {
  color: #fff;
  background: #087b8a;
}
.secondary-nav a.sign-in-link.active {
  color: #fff;
  background: #079bab;
  border-bottom-color: #079bab;
}

.status-ticks {
  width: 30px;
  min-height: 58px;
  margin: 7px auto 0;
  flex-direction: column;
  gap: 6px;
}
.status-marker {
  position: relative;
  border: 0;
}
.practice-complete-tick {
  color: #111;
  cursor: pointer;
  pointer-events: auto;
}
.practice-star {
  color: #111;
  font-size: 15px;
  line-height: 1;
}
.word-card:not(.is-practice-complete) .practice-complete-tick {
  visibility: hidden;
  pointer-events: none;
}
.word-card.is-practice-complete .practice-complete-tick:hover,
.word-card.is-practice-complete .practice-complete-tick:focus-visible {
  background: #e8a900;
  transform: scale(1.08);
}
.status-tooltip {
  position: absolute;
  right: calc(100% + 9px);
  top: 50%;
  width: max-content;
  max-width: 190px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #fff;
  background: #142f55;
  box-shadow: 0 8px 20px rgba(15, 35, 65, .22);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(-50%) translateX(4px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 12;
}
.status-marker:hover .status-tooltip,
.status-marker:focus-visible .status-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.checking-message {
  margin: 8px 0 0;
  color: #587086;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}
.feedback-primary { border-color: #c84e43; color: #a3352d; }
.feedback-secondary { color: var(--teal-dark); border-color: rgba(7, 155, 171, .38); }
.card-feedback-state[data-status="correct"] .feedback-primary {
  color: #176e42;
  border-color: #26965d;
}
.card-feedback-state[data-status="correct"] .feedback-secondary {
  color: var(--teal-dark);
  border-color: rgba(7, 155, 171, .38);
}
.practice-feedback-banner.checking {
  color: #315a6f;
  background: #eef8fa;
}
.practice-sentence-input { resize: none; }

.auth-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-modal-shell[hidden] { display: none; }
.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 34, 67, .58);
  backdrop-filter: blur(3px);
}
.auth-modal {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(9, 30, 60, .32);
}
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid #d8e2ea;
  border-radius: 50%;
  color: #173861;
  background: #fff;
  font-size: 25px;
  cursor: pointer;
}
.auth-modal-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 36px;
  margin-bottom: 20px;
}
.auth-modal-heading h2 {
  margin: 0;
  color: #102d63;
  font-size: 26px;
  line-height: 1.15;
}
.auth-modal-heading p {
  margin: 7px 0 0;
  color: #5d6f82;
  line-height: 1.5;
}
.auth-modal-form {
  display: grid;
  gap: 14px;
}
.auth-modal-form label {
  display: grid;
  gap: 7px;
  color: #334a63;
  font-weight: 800;
}
.auth-modal-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd8e2;
  border-radius: 11px;
  color: #102d63;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}
.auth-modal-form input:focus {
  outline: 3px solid rgba(0, 156, 174, .18);
  border-color: #009cae;
}
.auth-modal-primary {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #079bab;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.auth-modal-primary:disabled { opacity: .6; cursor: wait; }
.auth-modal-links {
  display: grid;
  gap: 9px;
  justify-items: start;
}
.auth-modal-links button {
  padding: 0;
  border: 0;
  color: #087f92;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.auth-modal-message {
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 11px;
  color: #153a52;
  background: #eef7fa;
  font-weight: 750;
}
.auth-modal-message[data-type="error"] { color: #9e2f25; background: #fff0ef; }
.auth-modal-message[data-type="success"] { color: #21693b; background: #ebf8ef; }
body.auth-modal-open { overflow: hidden; }

@media (max-width: 620px) {
  .secondary-nav a.sign-in-link { margin-left: 0; padding: 0 12px; }
  .auth-modal { padding: 22px 18px; border-radius: 18px; }
  .auth-modal-heading h2 { font-size: 22px; }
  .status-tooltip { right: auto; left: calc(100% + 9px); }
}

/* Spark Vocab Version 2.6 */
.secondary-nav-inner {
  align-items: center;
}

.secondary-nav a.sign-in-link,
.secondary-nav a.account-link {
  margin-left: auto;
  min-height: 32px;
  align-self: center;
  padding: 0 17px;
  border-radius: 999px;
  border-bottom-width: 1px;
}

.secondary-nav a.sign-in-link {
  color: #fff;
  border: 1px solid #25885c;
  background: #2f9d69;
  box-shadow: 0 4px 12px rgba(34, 126, 80, .18);
}

.secondary-nav a.sign-in-link:hover,
.secondary-nav a.sign-in-link:focus-visible,
.secondary-nav a.sign-in-link.active {
  color: #fff;
  border-color: #1f754e;
  background: #257e56;
}

.secondary-nav a.account-link {
  color: #176e42;
  border: 1px solid rgba(38, 150, 93, .48);
  background: #eff9f3;
}

.secondary-nav a.account-link:hover,
.secondary-nav a.account-link:focus-visible,
.secondary-nav a.account-link.active {
  color: #125b36;
  border-color: #26965d;
  background: #e3f5ea;
}

/* Learned and practiced markers sit on one line so the content starts higher. */
.level-status {
  min-width: 76px;
  flex-basis: 76px;
}

.status-ticks {
  width: 66px;
  min-height: 28px;
  margin: 7px auto 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.status-tooltip {
  right: 50%;
  top: calc(100% + 8px);
  transform: translateX(50%) translateY(-4px);
}

.status-marker:hover .status-tooltip,
.status-marker:focus-visible .status-tooltip {
  transform: translateX(50%) translateY(0);
}

.card-state-stage {
  min-height: 326px;
}

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

.card-feedback-state .feedback-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card-feedback-state .feedback-button {
  height: 40px;
  min-height: 40px;
  padding: 7px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
}

.free-checks-label {
  margin-left: auto;
  color: #5b6d82;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.practice-heading .saved-label + .free-checks-label {
  margin-left: 6px;
}

/* Admin editor */
.admin-page {
  background: #f3f7f8;
}

.admin-main {
  width: min(1500px, calc(100% - 28px));
  margin: 24px auto 50px;
}

.admin-gate {
  max-width: 720px;
  margin: 70px auto;
  padding: 34px;
  border: 1px solid #dce7e9;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(21, 51, 77, .09);
  text-align: center;
}

.admin-gate h1 { margin: 8px 0 12px; }
.admin-gate p { color: #5b6d82; }

.admin-shell {
  display: grid;
  grid-template-columns: 250px minmax(420px, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.admin-panel {
  border: 1px solid #dbe6e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(21, 51, 77, .07);
  overflow: hidden;
}

.admin-panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid #e3ecee;
  background: #f8fbfc;
}

.admin-panel-header h1,
.admin-panel-header h2 { margin: 0; }
.admin-panel-header p { margin: 5px 0 0; color: #63758a; font-size: 12px; }

.admin-sidebar-controls { padding: 14px; }
.admin-search {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cad9dd;
  border-radius: 10px;
  font: inherit;
}

.admin-entry-list {
  max-height: calc(100vh - 245px);
  overflow: auto;
  border-top: 1px solid #edf2f3;
}

.admin-entry-button {
  width: 100%;
  padding: 11px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #edf2f3;
  color: #173151;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.admin-entry-button:hover { background: #f1f8f9; }
.admin-entry-button.active { color: #075f6c; background: #e8f6f7; }
.admin-entry-button small { color: #718196; }

.admin-form {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: #445a72;
  font-size: 12px;
  font-weight: 800;
}

.admin-form .admin-wide { grid-column: 1 / -1; }
.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid #cad9dd;
  border-radius: 10px;
  color: #142f55;
  background: #fff;
  font: inherit;
}

.admin-form textarea { min-height: 82px; resize: vertical; }
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.admin-search:focus {
  outline: 3px solid rgba(7, 155, 171, .14);
  border-color: #079bab;
}

.admin-check-grid {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 13px 20px;
}

.admin-check-grid label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
}
.admin-check-grid input { width: auto; }

.admin-image-actions,
.admin-publish-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.admin-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #079bab;
  border-radius: 999px;
  color: #087b8a;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.admin-button:hover { background: #ecf8f9; }
.admin-button.primary { color: #fff; background: #079bab; }
.admin-button.publish { color: #fff; border-color: #25885c; background: #2f9d69; }
.admin-button:disabled { opacity: .55; cursor: wait; }

.admin-status {
  grid-column: 1 / -1;
  min-height: 22px;
  margin: 0;
  color: #50647c;
  font-size: 12px;
  font-weight: 750;
}
.admin-status.error { color: #a3352d; }
.admin-status.success { color: #176e42; }

.admin-preview-wrap { padding: 16px; }
.admin-preview-card {
  overflow: hidden;
  border: 1px solid #dce7e9;
  border-radius: 17px;
  background: #fff;
}
.admin-preview-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: #eaf1f3;
}
.admin-preview-content { padding: 15px; }
.admin-preview-content h2 { margin: 0; font-size: 29px; color: #102d63; }
.admin-preview-content .preview-meta { color: #697c91; font-weight: 750; }
.admin-preview-content dt { margin-top: 13px; color: #087b8a; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.admin-preview-content dd { margin: 4px 0 0; color: #263f5f; line-height: 1.45; }

.admin-library-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 33, 56, .55);
}
.admin-library-shell[hidden] { display: none; }
.admin-library {
  width: min(900px, 96vw);
  max-height: 86vh;
  overflow: auto;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
}
.admin-library-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.admin-library-item {
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #eef4f5;
  cursor: pointer;
}
.admin-library-item:hover { border-color: #079bab; }
.admin-library-item img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.admin-library-item span { display: block; padding: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }

@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 220px 1fr; }
  .admin-preview-panel { grid-column: 1 / -1; }
  .admin-preview-wrap { max-width: 430px; }
}

@media (max-width: 720px) {
  .secondary-nav a.sign-in-link,
  .secondary-nav a.account-link { margin-left: auto; padding: 0 12px; }
  .free-checks-label { flex-basis: 100%; margin: 3px 0 0; text-align: right; }
  .admin-main { width: min(100% - 16px, 1500px); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-entry-list { max-height: 260px; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-form .admin-wide { grid-column: 1; }
}
.practice-free-checks-label {
  margin: -4px 0 12px;
  color: #5b6d82;
  text-align: left;
}

/* Spark Vocab Version 2.10.2: Google sign-in and mobile card-height correction */
.auth-google-button {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid #c8d4df;
  border-radius: 12px;
  color: #173861;
  background: #fff;
  box-shadow: 0 3px 10px rgba(16, 45, 99, .06);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.auth-google-button:hover,
.auth-google-button:focus-visible {
  border-color: #9eb1c2;
  background: #f8fbfd;
}

.auth-google-button:focus-visible {
  outline: 3px solid rgba(0, 156, 174, .18);
}

.auth-google-button:disabled {
  opacity: .62;
  cursor: wait;
}

.google-mark {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.auth-divider {
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #718295;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #dce5eb;
}

.auth-divider span {
  white-space: nowrap;
}

.account-google-auth {
  width: min(560px, 100%);
  margin: 0 auto 24px;
}

@media (max-width: 620px) {
  /* Fixed-height mobile cards could clip longer definitions and the AI panel. */
  .word-card {
    height: auto;
    min-height: 620px;
    max-height: none;
  }

  .card-content {
    overflow: visible;
  }

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

  .card-state-stage {
    min-height: 380px;
    flex: 0 0 380px;
  }

  .word-details {
    margin-top: 8px;
    margin-bottom: 10px;
  }
}

@media (max-width: 359px) {
  .card-state-stage {
    min-height: 400px;
    flex-basis: 400px;
  }
}


/* Spark Vocab Version 2.10.2: card capacity, compact Practice, colored tiles and account menu */

/* Reserve room for a two-line definition and a two-line example on every card. */
.word-card {
  min-height: 760px;
  overflow: visible;
}
.word-details {
  min-height: 126px;
  grid-template-rows: repeat(2, minmax(52px, auto));
  align-content: start;
}
.word-details > div { min-height: 52px; }
.word-details dd {
  min-height: 2.9em;
  max-height: none;
  overflow: visible;
  line-height: 1.45;
}
.card-state-stage {
  min-height: 374px;
  overflow: visible;
}
.card-study-state .practice-box { overflow: visible; }

/* Guest AI allowance sits below the title rather than squeezing it. */
.practice-heading {
  flex-wrap: wrap;
  align-items: center;
}
.practice-heading .free-checks-label {
  flex: 0 0 100%;
  margin: 5px 0 0 27px;
  text-align: left;
  white-space: normal;
  font-size: 11px;
}

/* Account control and dropdown. */
.account-menu-shell {
  position: relative;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}
.account-menu-shell .account-link { margin-left: 0 !important; }
.account-dropdown {
  position: absolute;
  z-index: 1400;
  top: calc(100% + 9px);
  right: 0;
  width: 190px;
  padding: 7px;
  display: none;
  border: 1px solid #d9e3e9;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(16,45,99,.18);
}
.account-menu-shell.open .account-dropdown { display: grid; }
.account-dropdown a,
.account-dropdown button {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  color: #173861;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.account-dropdown a:hover,
.account-dropdown a:focus-visible,
.account-dropdown button:hover,
.account-dropdown button:focus-visible { background: #eef8f3; color: #176e42; }
.account-dropdown button { border-top: 1px solid #e4eaee; border-radius: 0 0 9px 9px; }

/* Compact the active Practice session. */
.practice-dialog.session-active .practice-dialog-header { display: none; }
.practice-dialog.session-active .practice-app { padding-top: 20px; }
.practice-dialog.session-active { overflow: hidden; }
.practice-session-top {
  padding-right: 48px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.practice-session-top strong { font-size: 24px; }
.practice-session-top span { white-space: nowrap; }
.practice-level-track { margin-top: 12px; }
.practice-question {
  min-height: 0;
  padding: 18px 0 0;
  display: flex;
  flex-direction: column;
}
.practice-question h3 { margin-top: 0; }
.practice-question-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 16px;
  padding-top: 12px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 18px);
}
.practice-feedback-banner { margin-top: 13px; }

/* Bright but non-semantic tile colors; correctness still uses icons and borders. */
.practice-tile-grid { gap: 12px; }
.practice-tile {
  position: relative;
  border-width: 2px;
  box-shadow: 0 5px 13px rgba(20,48,82,.08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.practice-tile:hover,
.practice-tile:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20,48,82,.13); }
.practice-tile.tile-gold { background: #fff3c6; border-color: #e6bb39; }
.practice-tile.tile-teal { background: #dff7f5; border-color: #57bdb5; }
.practice-tile.tile-blue { background: #e7efff; border-color: #7f9ee4; }
.practice-tile.tile-coral { background: #ffe8e2; border-color: #e99a86; }
.practice-choice.correct {
  border-color: #278a5d !important;
  background: #e4f7ec !important;
  box-shadow: inset 0 0 0 2px #278a5d;
}
.practice-choice.correct::after { content: '✓'; position: absolute; right: 10px; top: 8px; font-weight: 1000; color: #176e42; }
.practice-choice.incorrect {
  border-color: #c75a51 !important;
  background: #fff0ef !important;
}
.practice-choice.incorrect::after { content: '×'; position: absolute; right: 10px; top: 6px; font-size: 19px; font-weight: 1000; color: #a33d35; }

/* Tap-to-build Level 3 activity. */
.sentence-builder-answer {
  min-height: 78px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 8px;
  border: 2px dashed #aab9c8;
  border-radius: 15px;
  background: #f8fafc;
}
.sentence-builder-answer.correct { border-style: solid; border-color: #2c9467; background: #eef9f2; }
.sentence-builder-answer.incorrect { border-style: solid; border-color: #c96b62; background: #fff5f3; }
.sentence-builder-placeholder { color: #718195; font-size: 13px; font-weight: 750; }
.sentence-builder-bank {
  margin-top: 14px;
  min-height: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.sentence-builder-tile {
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 12px;
  color: #173861;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.sentence-builder-tile.selected { box-shadow: inset 0 0 0 1px rgba(23,56,97,.16); }

@media (max-width: 620px) {
  .word-card {
    height: auto;
    min-height: 850px;
    max-height: none;
    overflow: visible;
  }
  .image-wrap { flex-basis: 210px; height: 210px; }
  .card-content { overflow: visible; }
  .word-heading-row { min-height: 52px; flex-basis: 52px; }
  .word-details {
    height: auto;
    min-height: 126px;
    max-height: none;
    margin: 8px 0 10px;
    overflow: visible;
  }
  .word-details dd { min-height: 2.9em; max-height: none; overflow: visible; }
  .card-state-stage { min-height: 410px; flex: 0 0 410px; overflow: visible; }
  .practice-box { overflow: visible; }
  .practice-dialog {
    max-height: 100dvh;
    border-radius: 20px 20px 0 0;
  }
  .practice-dialog.session-active .practice-app { padding: 18px 16px 16px; }
  .practice-session-top { padding-right: 42px; align-items: flex-start; flex-direction: column; gap: 2px; }
  .practice-session-top strong { font-size: 21px; }
  .practice-session-top span { font-size: 12.5px; }
  .practice-level-track { margin-top: 10px; }
  .practice-question { padding-top: 14px; }
  .practice-choices { grid-template-columns: 1fr; }
  .practice-choice { min-height: 52px; }
  .practice-question-actions { flex-direction: row; align-items: center; }
  .practice-question-actions button { width: auto; flex: 1; }
  .sentence-builder-answer { min-height: 82px; }
  .sentence-builder-tile { min-height: 42px; padding: 8px 11px; }
  .account-dropdown { position: fixed; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; }
}

/* Final v2.6 capacity adjustment after adding the guest allowance line. */
.word-card { min-height: 795px; }
.card-state-stage { min-height: 410px; }
@media (max-width: 620px) {
  .word-card { min-height: 900px; }
  .card-state-stage { min-height: 440px; flex-basis: 440px; }
}


/* Spark Vocab Version 2.10.2 */
.secondary-nav-frame {
  width: min(1180px, calc(100% - 32px));
  min-height: 40px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: visible;
}
.secondary-nav-frame .secondary-nav-inner {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.secondary-auth-slot {
  position: relative;
  z-index: 1500;
  flex: 0 0 auto;
  overflow: visible;
}
.secondary-auth-slot > .sign-in-link,
.secondary-auth-slot > .account-link,
.secondary-auth-slot .account-link {
  margin-left: 0 !important;
}
.account-menu-shell { overflow: visible; }
.account-dropdown { top: calc(100% + 7px); }

/* Content-sized active Practice modal. */
.practice-dialog,
.practice-dialog.session-active {
  height: auto;
  max-height: calc(100dvh - 48px);
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}
.practice-app {
  min-height: 0;
  overflow: visible;
}
.practice-dialog.session-active .practice-app { padding: 18px 30px 22px; }
.practice-question,
#practice-question-body {
  min-height: 0;
}
.practice-question { padding-top: 15px; }
.practice-question-actions {
  position: static;
  margin-top: 14px;
  padding-top: 0;
  background: none;
}
.practice-feedback-banner { min-height: 0; }

/* Only the active stage is gold; inactive and completed stages stay white. */
.practice-level-step,
.practice-level-step.complete {
  border-color: #d7e1e8;
  color: #52667d;
  background: #fff;
  box-shadow: none;
}
.practice-level-step b {
  color: #607186;
  background: #e9eef2;
}
.practice-level-step.complete b {
  color: #fff;
  background: #2f9d69;
}
.practice-level-step.current,
.practice-level-step.complete.current {
  border-color: #e4b42d;
  color: #634b08;
  background: #fff3c6;
  box-shadow: none;
}
.practice-level-step.current b,
.practice-level-step.complete.current b {
  color: #102d63;
  background: #ffbf24;
}

.practice-review-badge,
.practice-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.practice-review-badge {
  margin-left: 7px;
  color: #102d63;
  background: #ffbf24;
  vertical-align: middle;
}
.practice-mode-landing { padding: 4px 0 2px; }
.practice-mode-intro { text-align: center; }
.practice-mode-intro .practice-empty-icon { width: 58px; height: 58px; margin-bottom: 11px; font-size: 27px; }
.practice-mode-intro h3 { margin: 0 0 6px; color: var(--ink); font-size: 25px; }
.practice-mode-intro p { margin: 0 auto 18px; max-width: 540px; color: #647386; }
.practice-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.practice-mode-card {
  min-height: 176px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  border: 2px solid;
  border-radius: 17px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.practice-mode-card:hover:not(:disabled),
.practice-mode-card:focus-visible:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,48,82,.13); }
.practice-mode-card strong { color: #102d63; font-size: 20px; line-height: 1.2; }
.practice-mode-card > span:not(.practice-mode-badge) { color: #405875; font-weight: 760; }
.practice-mode-card small { margin-top: auto; font-weight: 850; }
.practice-mode-card-green { border-color: #39a873; background: #edf9f2; }
.practice-mode-card-green .practice-mode-badge { color: #fff; background: #2f9d69; }
.practice-mode-card-green small { color: #176e42; }
.practice-mode-card-gold { border-color: #e2ad22; background: #fff8df; }
.practice-mode-card-gold .practice-mode-badge { color: #102d63; background: #ffbf24; }
.practice-mode-card-gold small { color: #73580c; }
.practice-mode-card:disabled { opacity: .52; cursor: not-allowed; filter: grayscale(.2); }
.practice-review-complete .practice-complete-icon { background: #ffdc72; }

/* More substantial 4–7 tile sentence construction. */
.sentence-builder-bank { min-height: 100px; }
.sentence-builder-tile { flex: 0 0 auto; }

@media (max-width: 700px) {
  .secondary-nav-frame { width: 100%; padding: 0 10px; }
  .practice-dialog,
  .practice-dialog.session-active { height: auto; max-height: 96dvh; }
  .practice-dialog.session-active .practice-app { padding: 16px; }
  .practice-mode-grid { grid-template-columns: 1fr; }
  .practice-mode-card { min-height: 145px; }
  .account-dropdown { position: absolute; top: calc(100% + 7px); right: 0; bottom: auto; left: auto; width: min(190px, calc(100vw - 24px)); }
}

/* Spark Vocab Version 2.10.2: stable Practice sessions and compact AI cards */

/* The normal AI input panel should fit its content rather than stretching to
   fill the card's reserved feedback area. */
.card-study-state .practice-box {
  flex: 0 0 auto;
  min-height: 0;
}
.card-study-state .practice-input-state { height: auto; }
.word-card { min-height: 720px; }
.card-state-stage { min-height: 350px; }

/* Keep one consistent window size after a Practice or Review session starts. */
.practice-dialog.session-active {
  height: min(520px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.practice-dialog.session-active .practice-app {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}
.practice-dialog.session-active .practice-question {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.practice-dialog.session-active #practice-question-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.practice-dialog.session-active .practice-question-actions {
  flex: 0 0 auto;
}

/* Sentence-builder source tiles never move. A selected source remains in its
   original place, fades slightly, and displays its position in the answer. */
.sentence-builder-bank {
  align-content: flex-start;
}
.sentence-builder-source-tile {
  position: relative;
  transition: opacity .14s ease, filter .14s ease, box-shadow .14s ease;
}
.sentence-builder-source-tile.is-used {
  opacity: .48;
  filter: saturate(.55);
  cursor: default;
  transform: none !important;
}
.sentence-builder-source-tile.is-used::after {
  content: attr(data-selection-order);
  position: absolute;
  top: -7px;
  right: -7px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #173861;
  box-shadow: 0 2px 7px rgba(20,48,82,.22);
  font-size: 10px;
  font-weight: 950;
}

@media (max-width: 620px) {
  .word-card { min-height: 700px; }
  .card-state-stage { min-height: 350px; flex-basis: 350px; }
  .practice-dialog.session-active {
    height: min(680px, 96dvh);
    max-height: 96dvh;
  }
}


/* Spark Vocab Version 2.10.2: reliable card capacity, stable Practice layout,
   validated cloze questions, tile-slot sentence building, and timed success. */

/* Cards grow with their content while retaining a consistent minimum size.
   This keeps the entire guest AI panel inside the rounded card. */
.word-card {
  height: auto;
  min-height: 790px;
  max-height: none;
  overflow: hidden;
}
.card-state-stage {
  min-height: 390px;
  flex: 0 0 390px;
  overflow: hidden;
}
.word-card.has-free-checks {
  min-height: 825px;
}
.word-card.has-free-checks .card-state-stage {
  min-height: 420px;
  flex-basis: 420px;
}

/* Correct feedback fades before returning to the input state. */
.card-feedback-state {
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}
.card-feedback-state.is-auto-dismissing {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}

/* Keep the Practice window stable, but recover enough room for four answer
   tiles without routine scrolling on standard laptop screens. */
.practice-dialog.session-active {
  height: min(570px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
}
.practice-dialog.session-active .practice-app {
  padding: 14px 24px 14px;
}
.practice-session-top {
  margin-bottom: 10px;
}
.practice-meter {
  margin-bottom: 13px;
}
.practice-level-track {
  margin: 0 0 10px;
}
.practice-level-step {
  min-height: 38px;
  padding: 6px 8px;
}
.practice-question {
  padding-top: 8px;
}
.practice-question h3 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 31px);
  line-height: 1.1;
}
.practice-context-sentence {
  margin: 8px 0 9px;
  padding: 13px 15px;
  font-size: 18px;
  line-height: 1.38;
}
.practice-tile-grid {
  gap: 8px;
}
.practice-choice {
  min-height: 46px;
  padding: 9px 12px;
}
.practice-feedback-banner {
  min-height: 0;
  margin-top: 8px;
  padding: 9px 12px;
}
.practice-question-actions {
  margin-top: 9px;
  padding-top: 0;
}
.practice-dialog.session-active #practice-question-body {
  padding-right: 2px;
}

/* Selected sentence tiles move into the answer. Their original source slots
   remain visible and keep every other tile in exactly the same place. */
.sentence-builder-bank {
  min-height: 92px;
  align-items: flex-start;
  align-content: flex-start;
}
.sentence-builder-slot {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: stretch;
  justify-content: stretch;
  border-radius: 12px;
}
.sentence-builder-slot.is-empty {
  border: 2px dashed #c5d0da;
  background: #f6f8fa;
}
.sentence-builder-slot.is-empty::after {
  content: '';
  width: 100%;
  height: 100%;
}
.sentence-builder-source-tile.is-used,
.sentence-builder-source-tile.is-used::after {
  display: none !important;
}
.sentence-builder-answer .sentence-builder-tile {
  flex: 0 0 auto;
}

@media (max-width: 620px) {
  .word-card {
    height: auto;
    min-height: 790px;
    max-height: none;
  }
  .word-card.has-free-checks {
    min-height: 835px;
  }
  .card-state-stage {
    min-height: 390px;
    flex-basis: 390px;
  }
  .word-card.has-free-checks .card-state-stage {
    min-height: 425px;
    flex-basis: 425px;
  }
  .practice-dialog.session-active {
    height: min(700px, 96dvh);
    max-height: 96dvh;
  }
  .practice-dialog.session-active .practice-app {
    padding: 14px 15px;
  }
}

/* Spark Vocab Version 2.10.2: compact cards, unclipped status tips,
   shorter Practice sessions, and a non-sticky page header. */

/* The navigation belongs only at the top of the document. */
.site-header {
  position: relative;
  top: auto;
}
.toolbar {
  position: static;
  top: auto;
}

/* Cards size themselves to their visible content. The image wrapper alone
   clips the photograph to the rounded top corners, while progress tooltips
   are allowed to extend beyond the card. */
.word-grid {
  align-items: start;
}
.word-card,
.word-card.has-free-checks {
  position: relative;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
.word-card:hover,
.word-card:focus-within {
  z-index: 20;
}
.image-wrap {
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-content,
.word-heading-row,
.level-status,
.status-ticks,
.status-marker {
  overflow: visible;
}

/* Reduce the gap above the AI panel. The card-content padding then provides
   an equal left, right, and bottom margin around the panel. */
.word-details {
  margin-bottom: 10px;
}
.card-state-stage,
.word-card.has-free-checks .card-state-stage {
  min-height: 0;
  flex: 0 0 auto;
  overflow: visible;
}
.card-study-state {
  position: relative;
  inset: auto;
}
.card-feedback-state.feedback {
  position: absolute;
  inset: 0;
}
.card-state-stage.showing-feedback .card-study-state {
  position: absolute;
  inset: 0;
}
.card-state-stage.showing-feedback .card-feedback-state.feedback {
  position: relative;
  inset: auto;
}

/* Open the learned/practiced tips to the left and align their right edge with
   the marker so they cannot run beyond the card's right edge. */
.status-tooltip {
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  z-index: 100;
  transform: translateY(-4px);
}
.status-marker:hover .status-tooltip,
.status-marker:focus-visible .status-tooltip {
  transform: translateY(0);
}

/* Reduce the former answer-to-Skip space by roughly 40%, while adding a small
   six-pixel breathing space between a question and its answer tiles. */
.practice-dialog.session-active {
  height: min(520px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
}
.practice-question h3 {
  margin-bottom: 14px;
}

@media (max-width: 620px) {
  .word-card,
  .word-card.has-free-checks {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .card-state-stage,
  .word-card.has-free-checks .card-state-stage {
    min-height: 0;
    flex-basis: auto;
  }
  .word-details {
    margin-bottom: 10px;
  }
  .practice-dialog.session-active {
    height: min(650px, 96dvh);
    max-height: 96dvh;
  }
}


/* Spark Vocab Version 2.10.2: sticky compact controls, stable AI feedback,
   review suppression, and clearer interactive affordances. */

/* Only the compact learner-control bar stays visible while cards scroll. */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 180;
  flex-wrap: nowrap;
}
.toolbar-practice-button {
  margin: 0;
  flex: 0 0 auto;
}
.toolbar .header-practice-button span:last-child { display: inline; }

/* The removed search field no longer reserves space. */
.search-box { display: none !important; }

/* Keep a 45 px bottom margin under the AI panel: 2.5 times the former 18 px. */
.card-content {
  padding-right: 18px;
  padding-bottom: 45px;
  padding-left: 18px;
}

/* Measure the normal study state once, then use that same stage for every
   feedback state so checking never changes the vocabulary-card height. */
.card-state-stage.stage-height-locked {
  height: var(--card-stage-height);
  min-height: var(--card-stage-height);
  flex: 0 0 var(--card-stage-height);
  overflow: visible;
}
.card-state-stage.stage-height-locked .card-study-state,
.card-state-stage.stage-height-locked .card-feedback-state.feedback {
  position: absolute;
  inset: 0;
}
.card-state-stage.is-measuring {
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
}
.card-state-stage.is-measuring .card-study-state {
  position: relative !important;
  inset: auto !important;
}
.card-state-stage.is-measuring .card-feedback-state.feedback {
  position: absolute !important;
  inset: 0 !important;
}

/* Review words can be excluded after a correct answer. */
.practice-review-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.practice-review-dismiss {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #c7d4de;
  border-radius: 12px;
  color: #40536d;
  background: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.practice-review-dismiss:hover,
.practice-review-dismiss:focus-visible {
  border-color: #8ea4b5;
  background: #f4f7f9;
}

/* Explicitly show the hand cursor for every account-state control. */
.secondary-auth-slot,
.secondary-auth-slot a,
.secondary-nav a.account-link,
.secondary-nav a.sign-in-link,
[data-auth-nav],
[data-account-trigger] {
  cursor: pointer;
}

@media (max-width: 1020px) {
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar-practice-button { order: 1; }
  .unfinished-toggle { order: 2; }
  .results-count { order: 3; margin-left: auto; }
  .progress-summary { order: 4; width: 100%; }
}

@media (max-width: 620px) {
  .toolbar {
    top: 0;
    gap: 9px;
    padding: 10px;
  }
  .toolbar .header-practice-button {
    width: auto;
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13px;
  }
  .toolbar .header-practice-button span:last-child { display: inline; }
  .unfinished-toggle {
    width: auto;
    flex: 1 1 210px;
  }
  .progress-summary { min-width: 0; }
  .practice-review-actions {
    width: 100%;
    flex-direction: column;
  }
  .practice-review-actions button { width: 100%; }
  .card-content { padding-bottom: 45px; }
}

/* Keep review-suppression Undo above the open Practice modal. */
.unlearn-toast { z-index: 1300; }

/* Spark Vocab Version 2.10.2: inflected target forms, original-sentence checks,
   and safer AI feedback. */
.checking-message.is-validation-error {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(200, 78, 67, .35);
  border-radius: 9px;
  color: #a3352d;
  background: rgba(255, 240, 238, .92);
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
}

.sentence-input[aria-invalid="true"] {
  border-color: #c84e43;
  box-shadow: 0 0 0 3px rgba(200, 78, 67, .12);
}

/* Spark Vocab billing */
.billing-section {
  display: grid;
  gap: 24px;
}

.billing-heading h2 {
  margin: 4px 0 8px;
  color: #102d63;
  font-size: clamp(28px, 4vw, 40px);
}

.billing-heading p:last-child {
  margin: 0;
  color: #5f7184;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 26px;
  border: 1px solid #dce6ed;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(14, 45, 91, .07);
}

.pricing-card-featured {
  border-color: #9bd8df;
  background: linear-gradient(180deg, #f4fcfd 0%, #fff 44%);
}

.pricing-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e2f7f9;
  color: #087f92;
  font-size: 12px;
  font-weight: 850;
}

.pricing-name {
  margin: 0 0 10px;
  color: #102d63;
  font-size: 21px;
  font-weight: 850;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 18px;
}

.pricing-price strong {
  color: #102d63;
  font-size: 38px;
  line-height: 1;
}

.pricing-price span {
  color: #6a7c8f;
  font-weight: 700;
}

.pricing-card ul {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding-left: 21px;
  color: #40566e;
  line-height: 1.5;
}

.pricing-action {
  width: 100%;
  margin-top: auto;
  box-sizing: border-box;
  border: 0;
  cursor: pointer;
  text-align: center;
}

.pricing-action:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.billing-small-print {
  margin: -4px 0 0;
  color: #6d7c8d;
  font-size: 14px;
  line-height: 1.55;
}

.billing-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid #cfe2e8;
  border-radius: 18px;
  background: #f8fbfc;
}

.billing-status-card h3 {
  margin: 3px 0 6px;
  color: #102d63;
  font-size: 25px;
}

.billing-status-card p {
  margin: 0;
}

.billing-status-allowance {
  min-width: 170px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: inset 0 0 0 1px #dce6ed;
}

.billing-status-allowance strong,
.billing-status-allowance span {
  display: block;
}

.billing-status-allowance strong {
  color: #087f92;
  font-size: 30px;
}

.billing-status-allowance span {
  margin-top: 3px;
  color: #65778a;
  font-size: 13px;
  line-height: 1.35;
}

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

  .pricing-card {
    min-height: 0;
  }

  .billing-status-card {
    grid-template-columns: 1fr auto;
  }

  .billing-status-card > button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .pricing-card {
    padding: 22px;
  }

  .pricing-badge {
    position: static;
    align-self: flex-start;
    margin-bottom: 10px;
  }

  .billing-status-card {
    grid-template-columns: 1fr;
  }

  .billing-status-allowance {
    width: 100%;
    box-sizing: border-box;
  }
}

.pricing-action[aria-disabled="true"] {
  cursor: default;
  opacity: 0.72;
  pointer-events: none;
}


/* Spark Vocab Version 2.10.2: balanced controls, compact account pricing,
   and a connected contact form. */
@media (min-width: 1021px) {
  .toolbar {
    display: grid;
    grid-template-columns: auto minmax(300px, auto) minmax(330px, 1fr) auto;
    align-items: center;
    column-gap: clamp(24px, 4.2vw, 76px);
  }
  .toolbar-practice-button,
  .unfinished-toggle,
  .progress-summary,
  .results-count { margin: 0; }
  .progress-summary { justify-self: center; }
  .results-count { justify-self: end; min-width: 92px; text-align: right; }
}

.account-page .page-main { padding-top: 0; }
.account-page .page-hero {
  padding-top: 38px;
  padding-bottom: 18px;
  gap: 0;
}
.account-page .page-hero-copy { max-width: 940px; }
.account-page .page-hero h1 {
  max-width: 850px;
  font-size: clamp(44px, 5.2vw, 70px);
  line-height: .98;
}
.account-page .page-lead { max-width: 820px; }
.account-page .billing-section { margin-top: 8px; }
.account-page .billing-heading { margin-bottom: 18px; }
.account-page .pricing-grid { margin-top: 18px; }

.contact-email-link { color: #087f92; font-weight: 850; }
.contact-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}
#contact-status[data-type="success"] { color: #21693b; font-weight: 800; }
#contact-status[data-type="error"] { color: #9e2f25; font-weight: 800; }
.contact-form button[disabled] { opacity: .62; cursor: wait; }

@media (max-width: 700px) {
  .account-page .page-hero { padding-top: 30px; padding-bottom: 12px; }
  .account-page .page-hero h1 { line-height: 1.02; }
  .account-page .billing-section { margin-top: 6px; }
}


/* Spark Vocab Version 2.10.2: live letter-group progress, correct current
   selection, and restored vocabulary search. */
.toolbar-search {
  min-width: 190px;
  max-width: 290px;
}
.toolbar-search input {
  padding-right: 42px;
}
.search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #526278;
  background: transparent;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}
.search-clear:hover,
.search-clear:focus-visible {
  color: var(--ink);
  background: #eaf5f7;
}
.search-clear[hidden] { display: none; }

@media (min-width: 1021px) {
  .toolbar {
    grid-template-columns: auto minmax(270px, auto) minmax(190px, 1fr) minmax(260px, auto) auto;
    column-gap: clamp(14px, 2.2vw, 36px);
  }
  .toolbar-search { justify-self: stretch; width: 100%; }
  .progress-summary { justify-self: center; }
}

@media (max-width: 1020px) {
  .toolbar-search {
    order: 3;
    flex: 1 1 220px;
    width: auto;
    max-width: none;
  }
  .results-count { order: 4; }
  .progress-summary { order: 5; }
}

@media (max-width: 620px) {
  .toolbar-search {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
  .results-count { order: 4; margin-left: auto; }
  .progress-summary { order: 5; }
}
.toolbar-search input::-webkit-search-cancel-button { appearance: none; }


/* Expanded vocabulary images: click the card image to open, then click anywhere to close. */
.word-image[role="button"] {
  cursor: zoom-in;
}
.word-image[role="button"]:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.96);
  outline-offset: -6px;
}
body.image-lightbox-open {
  overflow: hidden;
}
.image-lightbox-shell[hidden] {
  display: none;
}
.image-lightbox-shell {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 36px);
  background: rgba(8, 14, 20, 0.9);
  cursor: zoom-out;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.image-lightbox-shell:focus {
  outline: none;
}
.image-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1500px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 14px;
  background: #101820;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  cursor: zoom-out;
}

/* Image migration console */
.migration-progress { margin: 24px 0; }
.migration-progress progress { width: min(100%, 680px); height: 22px; }
.migration-progress p { margin: 8px 0; }
.footer-photo-credit { margin: 8px 0; }


/* Spark Vocab v2.10.11 visual polish */
.hero-title {
  display: block;
  max-width: 980px !important;
}
.hero-title-main,
.hero-title-sub {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
}
.hero-title-main {
  font-size: clamp(56px, 8vw, 96px);
  line-height: 0.9;
  font-weight: 800;
}
.hero-title-sub {
  margin-top: 0.24em;
  max-width: 980px;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.04;
  font-weight: 600;
}
.word-and-audio {
  align-items: center;
  flex-wrap: nowrap;
}
.word-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.word-and-audio .listen-button {
  flex: 0 0 auto;
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center;
  border-radius: 999px !important;
}
.word-and-audio .listen-button svg {
  width: 16px !important;
  height: 16px !important;
}
@media (max-width: 620px) {
  .hero-title-main {
    font-size: clamp(44px, 14vw, 64px);
    line-height: 0.92;
  }
  .hero-title-sub {
    margin-top: 0.28em;
    font-size: clamp(25px, 7.8vw, 36px);
    line-height: 1.08;
  }
}


/* v2.10.11: compact non-landing introductions, long-word protection and SEO index */
.compact-hero {
  padding: 22px 0 18px;
  align-items: center;
}
.compact-hero .hero-copy {
  min-width: 0;
}
.page-instruction {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.9vw, 19px);
}
.page-instruction strong,
.hero-intro strong {
  color: #4f5c6a;
  font-weight: 800;
}
.word-heading-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.word-heading-row {
  gap: 12px;
}
.word-and-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: 100%;
}
.word-title {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}
.word-and-audio .listen-button {
  flex: 0 0 30px;
}
.level-status {
  flex: 0 0 auto;
}
.learn-index-page {
  padding: 54px 0 70px;
}
.learn-index-hero {
  max-width: 860px;
  margin-bottom: 28px;
}
.learn-index-hero h1 {
  margin: 12px 0 12px;
  color: #102b5f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5.8vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.learn-index-hero p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}
.learn-index-grid {
  display: grid;
  gap: 24px;
}
.learn-index-level {
  padding: 22px;
  border: 1px solid rgba(14, 111, 114, 0.16);
  border-radius: 20px;
  background: white;
  box-shadow: 0 8px 24px rgba(31, 49, 48, 0.06);
}
.learn-index-level h2 {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.1;
}
.learn-index-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  list-style: none;
}
.learn-index-list a {
  min-height: 74px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  background: #fbfdfc;
  text-decoration: none;
}
.learn-index-list a:hover,
.learn-index-list a:focus-visible {
  border-color: rgba(14, 111, 114, 0.42);
  background: var(--teal-soft);
}
.learn-index-list strong {
  color: #102b5f;
  font-weight: 800;
}
.learn-index-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 620px) {
  .compact-hero {
    padding: 16px 0 12px;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .compact-hero .hero-card {
    display: none;
  }
  .word-heading-row {
    align-items: flex-start;
  }
  .word-title {
    font-size: clamp(25px, 8vw, 31px);
    line-height: 1.06;
  }
}


/* Spark Vocab v2.10.11 fixes: compact non-landing intro, normal instruction emphasis, safer word wrapping */
.compact-hero {
  display: block !important;
  padding: 14px 0 12px !important;
}
.compact-hero .hero-copy {
  max-width: 900px !important;
}
.compact-hero .hero-card {
  display: none !important;
}
.hero .page-instruction {
  max-width: 900px !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: clamp(16px, 1.7vw, 19px) !important;
  line-height: 1.5 !important;
}
.hero .page-instruction strong,
.page-instruction strong,
.hero-intro p strong:not(.coverage-emphasis):not(.ngsl-emphasis),
.hero-intro strong:not(.coverage-emphasis):not(.ngsl-emphasis) {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  place-items: initial !important;
  border-radius: 0 !important;
  color: #4f5c6a !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 850 !important;
  vertical-align: baseline !important;
}
.hero-intro .ngsl-emphasis {
  color: #4f5c6a !important;
  font-weight: 850 !important;
}
.hero-intro .coverage-emphasis {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: var(--ink) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 900 !important;
}
.word-heading-copy,
.word-and-audio {
  min-width: 0 !important;
}
.word-title {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}
.secondary-nav-inner a[href="learn.html"] {
  white-space: nowrap;
}
@media (max-width: 620px) {
  .compact-hero {
    padding: 12px 0 10px !important;
  }
  .hero .page-instruction {
    font-size: 17px !important;
  }
  .word-title {
    font-size: clamp(23px, 7.4vw, 31px) !important;
    line-height: 1.06 !important;
  }
}
@media (max-width: 390px) {
  .word-title {
    font-size: clamp(21px, 7vw, 28px) !important;
  }
}


/* Spark Vocab v2.10.19: SEO content, visible compact page headings and crawlable index improvements */
.compact-page-title {
  margin: 0 0 8px !important;
  color: #102b5f !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(28px, 4.2vw, 42px) !important;
  line-height: 1.06 !important;
  letter-spacing: -0.025em !important;
}
.page-seo-intro {
  max-width: 920px !important;
  margin: 0 0 8px !important;
  color: #42526a !important;
  font-size: clamp(15px, 1.45vw, 17px) !important;
  line-height: 1.5 !important;
}
.compact-hero .page-instruction {
  margin-top: 4px !important;
}
.learn-level-summary {
  margin: 0 0 24px;
}
.learn-level-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.learn-level-summary a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 15px;
  border: 1px solid rgba(14, 111, 114, 0.18);
  border-radius: 16px;
  color: inherit;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(31, 49, 48, 0.05);
  text-decoration: none;
}
.learn-level-summary a:hover,
.learn-level-summary a:focus-visible {
  border-color: rgba(14, 111, 114, 0.42);
  background: var(--teal-soft);
}
.learn-level-summary strong {
  color: #102b5f;
  font-weight: 850;
}
.learn-level-summary span,
.level-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.level-description {
  margin: -6px 0 16px;
}
@media (max-width: 620px) {
  .compact-page-title {
    font-size: clamp(25px, 8vw, 34px) !important;
  }
  .page-seo-intro {
    font-size: 15px !important;
  }
}

/* Spark Vocab v2.10.24: spinning-dot loader and bottom page navigation */
.spark-page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(244, 249, 250, 0.92);
  backdrop-filter: blur(3px);
}

.spark-page-loader[hidden] {
  display: none;
}

.spark-loader {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
}

.spark-dot-ring {
  position: absolute;
  inset: 0;
  display: block;
  animation: spark-loader-spin 1.05s linear infinite;
}

.spark-dot-ring span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 999px;
  background: #111;
  opacity: 0.34;
  transform: rotate(calc(var(--dot-index) * 30deg)) translateY(-38px);
}

.spark-dot-ring span:nth-child(1) { opacity: 1; }
.spark-dot-ring span:nth-child(2) { opacity: 0.92; }
.spark-dot-ring span:nth-child(3) { opacity: 0.84; }
.spark-dot-ring span:nth-child(4) { opacity: 0.76; }
.spark-dot-ring span:nth-child(5) { opacity: 0.68; }
.spark-dot-ring span:nth-child(6) { opacity: 0.60; }
.spark-dot-ring span:nth-child(7) { opacity: 0.52; }
.spark-dot-ring span:nth-child(8) { opacity: 0.46; }
.spark-dot-ring span:nth-child(9) { opacity: 0.40; }
.spark-dot-ring span:nth-child(10) { opacity: 0.34; }
.spark-dot-ring span:nth-child(11) { opacity: 0.28; }
.spark-dot-ring span:nth-child(12) { opacity: 0.22; }

.spark-loading-text {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spark-inline-loader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.spark-inline-loader .spark-dot-ring {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}

.spark-inline-loader .spark-dot-ring span {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  transform: rotate(calc(var(--dot-index) * 30deg)) translateY(-10px);
}

.page-bottom-nav {
  max-width: 1180px;
  margin: 18px auto 70px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.page-bottom-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(26, 40, 68, 0.08);
  cursor: pointer;
}

.page-bottom-next {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.page-bottom-action:hover,
.page-bottom-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(26, 40, 68, 0.14);
}

@keyframes spark-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .page-bottom-nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .page-bottom-action {
    width: 100%;
  }
}


/* Spark Vocab v2.10.25: current page/location status in the learner control bar */
.results-count {
  min-width: 245px;
  margin-left: auto;
  color: #4f6076;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .toolbar { flex-wrap: wrap; }
  .results-count {
    order: 4;
    width: 100%;
    margin-left: 0;
    text-align: left;
    white-space: normal;
  }
}


/* Spark Vocab v2.10.27: show the Words on this page card on every Learn page */
.compact-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 32px !important;
}
.compact-hero .hero-copy {
  max-width: 900px !important;
  min-width: 0 !important;
}
.compact-hero .hero-card {
  display: block !important;
  min-width: 205px !important;
}
@media (max-width: 760px) {
  .compact-hero {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .compact-hero .hero-card {
    display: block !important;
    width: fit-content !important;
    max-width: 100% !important;
  }
}


/* v2.10.27 word-link vocabulary index and direct card target highlight */
.word-index-grid {
  display: grid;
  gap: 1.1rem;
}
.word-index-page-group {
  border: 1px solid rgba(31, 41, 55, 0.10);
  border-radius: 20px;
  background: #fff;
  padding: 1.05rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.word-index-page-group h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}
.word-index-page-group h3 a {
  color: inherit;
  text-decoration: none;
}
.word-index-page-group h3 a:hover {
  text-decoration: underline;
}
.word-index-meta {
  margin: 0 0 0.75rem;
  color: #64748b;
  font-size: 0.92rem;
}
.word-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.word-link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.1;
  text-decoration: none;
}
.word-link-list a:hover,
.word-link-list a:focus-visible {
  background: #fff7ed;
  border-color: rgba(245, 158, 11, 0.55);
  color: #92400e;
  outline: none;
}
.word-card.is-linked-target {
  outline: 4px solid rgba(245, 158, 11, 0.72);
  outline-offset: 4px;
  animation: sparkTargetPulse 1.05s ease-in-out 0s 3;
}
@keyframes sparkTargetPulse {
  0%, 100% { box-shadow: 0 18px 44px rgba(15, 23, 42, 0.10); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.20), 0 24px 60px rgba(245, 158, 11, 0.22); }
}
@media (max-width: 640px) {
  .word-index-page-group { padding: 0.9rem; }
  .word-link-list a { font-size: 0.84rem; }
}

/* How It Works guided card demo v2.10.29 */
.demo-section {
  overflow: visible;
}

.demo-section-copy {
  max-width: 760px;
  margin-bottom: 22px;
}

.demo-section-copy h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.demo-section-copy p:last-child {
  margin-bottom: 0;
}

.card-demo-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(310px, 430px) minmax(280px, 1fr);
  gap: 26px;
  align-items: start;
  padding: 24px;
  border: 1px solid rgba(16, 45, 99, 0.12);
  border-radius: 30px;
  background: linear-gradient(135deg, #f8fbfc, #ffffff 58%, #eefaf7);
  box-shadow: 0 24px 60px rgba(16, 45, 99, 0.12);
}

.demo-card-zone {
  position: relative;
  z-index: 1;
}

.demo-word-card {
  min-height: 0;
  height: auto;
  max-width: 430px;
  overflow: visible;
}

.demo-word-card .image-wrap {
  border-radius: var(--radius) var(--radius) 0 0;
}

.demo-word-card .card-content {
  min-height: 0;
}

.demo-word-card .word-details {
  margin-bottom: 16px;
}

.demo-word-card .sentence-input {
  font-size: 14px;
}

.demo-marker-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px;
  border-radius: 999px;
}

.demo-tick.demo-card-tick {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16, 45, 99, 0.13);
}

.demo-tick.demo-card-tick.green {
  color: white;
  background: var(--success);
}

.demo-tick.demo-card-tick.gold {
  color: #111827;
  background: #f4c95d;
}

.demo-demo-feedback {
  display: none;
  margin-top: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 13.5px;
  line-height: 1.35;
}

.demo-demo-feedback.is-visible {
  display: block;
}

.demo-path-strip {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(244, 201, 93, 0.45);
  border-radius: 16px;
  background: #fff8e6;
}

.demo-path-strip strong {
  color: #102d63;
}

.demo-path-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-mini-button {
  min-height: 36px;
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  color: #102d63;
  background: #f4c95d;
  font-weight: 900;
}

.demo-guide-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
}

.demo-guide-card {
  padding: 22px;
  border: 1px solid rgba(7, 155, 171, 0.16);
  border-radius: 24px;
  background: white;
  box-shadow: 0 16px 42px rgba(16, 45, 99, 0.1);
}

.demo-guide-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 26px;
}

.demo-guide-card p {
  margin: 0;
  color: #5b6c80;
  line-height: 1.55;
}

.demo-step-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 16px;
}

.demo-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9d6df;
}

.demo-step-dot.is-active {
  background: var(--teal);
  transform: scale(1.2);
}

.demo-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.demo-control-row button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.demo-control-row .demo-next {
  border: 0;
  color: white;
  background: var(--teal);
}

.demo-control-row .demo-back,
.demo-control-row .demo-skip {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

.demo-control-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.demo-floating-callout {
  position: absolute;
  z-index: 10;
  width: min(292px, calc(100% - 28px));
  padding: 15px 16px;
  border: 1px solid rgba(16, 45, 99, 0.14);
  border-radius: 18px;
  color: #334155;
  background: white;
  box-shadow: 0 20px 50px rgba(16, 45, 99, 0.2);
  transition: top 0.22s ease, left 0.22s ease, opacity 0.18s ease;
}

.demo-floating-callout::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 24px;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  border-left: 1px solid rgba(16, 45, 99, 0.14);
  border-bottom: 1px solid rgba(16, 45, 99, 0.14);
  background: white;
}

.demo-floating-callout h4 {
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: 16px;
}

.demo-floating-callout p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
}

.demo-target {
  position: relative;
  border-radius: 14px;
  transition: outline-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.demo-target.is-demo-highlight {
  z-index: 6;
  outline: 4px solid #f4c95d;
  outline-offset: 4px;
  box-shadow: 0 0 0 9px rgba(244, 201, 93, 0.24), 0 18px 42px rgba(16, 45, 99, 0.14);
}

.demo-target.is-demo-highlight:not(.image-wrap):not(button) {
  background-color: rgba(255, 248, 230, 0.92);
}

.demo-target.is-demo-pulse {
  animation: demoPulse 1.1s ease-in-out infinite alternate;
}

@keyframes demoPulse {
  from { box-shadow: 0 0 0 7px rgba(244, 201, 93, 0.18), 0 16px 34px rgba(16, 45, 99, 0.1); }
  to { box-shadow: 0 0 0 13px rgba(244, 201, 93, 0.31), 0 20px 44px rgba(16, 45, 99, 0.15); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-target.is-demo-pulse {
    animation: none;
  }

  .demo-floating-callout,
  .demo-target {
    transition: none;
  }
}

@media (max-width: 900px) {
  .card-demo-shell {
    grid-template-columns: 1fr;
  }

  .demo-word-card {
    margin: 0 auto;
  }

  .demo-floating-callout {
    position: static;
    width: auto;
    margin: 16px 0 0;
  }

  .demo-floating-callout::before {
    display: none;
  }
}

@media (max-width: 540px) {
  .card-demo-shell {
    padding: 16px;
    border-radius: 22px;
  }

  .demo-guide-card {
    padding: 18px;
  }

  .demo-control-row button {
    flex: 1 1 120px;
  }
}

/* How It Works guided card demo refinements v2.10.30 */
.demo-guide-panel {
  padding-top: 150px;
}

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

.demo-word-card .word-image {
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

.demo-learning-path,
.demo-next-actions {
  border: 1px solid rgba(16, 45, 99, 0.10);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 36px rgba(16, 45, 99, 0.08);
}

.demo-learning-path {
  padding: 18px;
}

.demo-learning-path h3,
.demo-next-actions h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 20px;
}

.demo-path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-path-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(16, 45, 99, 0.10);
  border-radius: 999px;
  color: #41546a;
  background: #f7fbfc;
  font-weight: 900;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.demo-path-step span {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #102d63;
  background: #e5f4f7;
  font-size: 13px;
}

.demo-path-step strong {
  font-size: 13.5px;
  white-space: nowrap;
}

.demo-path-step.is-complete {
  color: #196143;
  border-color: rgba(32, 160, 90, 0.22);
  background: #edf9f1;
}

.demo-path-step.is-complete span {
  color: #fff;
  background: var(--success);
}

.demo-path-step.is-active {
  color: #102d63;
  border-color: rgba(244, 201, 93, 0.70);
  background: #fff8e6;
  box-shadow: 0 10px 24px rgba(244, 201, 93, 0.22);
  transform: translateY(-1px);
}

.demo-path-step.is-active span {
  color: #102d63;
  background: #f4c95d;
}

.demo-next-actions {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: max-height 0.24s ease, padding 0.24s ease, opacity 0.18s ease, transform 0.18s ease;
}

.demo-next-actions.is-visible {
  max-height: 240px;
  padding: 18px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.demo-next-actions p {
  margin: 0 0 13px;
  color: #5b6c80;
  line-height: 1.45;
}

.demo-next-actions .demo-path-buttons {
  gap: 10px;
}

.demo-next-actions .demo-mini-button {
  min-height: 40px;
  padding: 9px 14px;
}

@media (max-width: 900px) {
  .demo-guide-panel {
    padding-top: 0;
  }

  .demo-learning-path {
    order: 2;
  }

  .demo-next-actions {
    order: 3;
  }
}

@media (max-width: 540px) {
  .demo-path-list {
    gap: 8px;
  }

  .demo-path-step {
    flex: 1 1 135px;
  }
}

/* How It Works guided card demo refinements v2.10.31 */
.demo-section {
  margin-top: 0;
}

.demo-section-copy {
  max-width: none;
  margin-bottom: 20px;
}

.demo-section-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.demo-section-copy .section-kicker,
.demo-section-copy p {
  display: none;
}

.card-demo-shell {
  grid-template-columns: minmax(310px, 390px) minmax(300px, 1fr);
  gap: 32px;
  align-items: start;
}

.demo-card-zone {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.demo-word-card {
  width: min(100%, 380px);
  max-width: 380px;
  border-radius: var(--radius);
}

.demo-word-card .image-wrap {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius) var(--radius) 0 0;
}

.demo-word-card .word-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
}

.demo-word-card .card-content {
  padding: 18px;
}

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

.demo-word-card .word-heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}

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

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

.demo-word-card .word-pos {
  margin: 6px 0 0;
}

.demo-word-card .level-status {
  min-width: 76px;
  flex: 0 0 76px;
}

.demo-word-card .status-ticks {
  width: 66px;
  min-height: 28px;
  margin: 7px auto 0;
}

.demo-word-card .word-details {
  margin: 17px 0 10px;
  gap: 12px;
}

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

.demo-word-card .practice-box {
  margin-top: 0;
}

.demo-word-card .free-checks-label {
  display: inline-flex;
}

.demo-floating-callout,
.demo-floating-callout::before {
  display: none !important;
}

.demo-guide-panel {
  padding-top: clamp(95px, 12vw, 145px);
}

.demo-control-row {
  gap: 12px;
}

.demo-control-row .demo-back,
.demo-control-row .demo-next {
  min-width: 76px;
}

.demo-control-row .demo-skip {
  display: none !important;
}

@media (max-width: 900px) {
  .card-demo-shell {
    grid-template-columns: 1fr;
  }

  .demo-guide-panel {
    padding-top: 0;
  }
}

/* Preserve the moved How It Works hero styling after changing its heading level. */
.page-hero h2 {
  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;
}

@media (max-width: 640px) {
  .page-hero h2 { font-size: clamp(38px, 11vw, 52px); }
}

/* How It Works guided card demo refinements v2.10.32 */
.card-demo-shell {
  grid-template-columns: minmax(310px, 391px) minmax(300px, 1fr);
}

.demo-word-card {
  width: min(100%, 379px);
  max-width: 379px;
  height: 720px;
  min-height: 720px;
  max-height: 720px;
  overflow: hidden;
}

.demo-word-card .card-content {
  min-height: 0;
}

.demo-word-card .word-details {
  margin: 17px 0 18px;
}

.demo-word-card .practice-box {
  margin-top: auto;
}

.demo-word-card .sentence-label {
  display: block;
}

.demo-word-card .sentence-input {
  height: 58px;
  min-height: 58px;
  max-height: 58px;
}

.demo-guide-card {
  height: 260px;
  min-height: 260px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto auto minmax(54px, 1fr) auto;
  align-content: start;
}

.demo-guide-card [data-demo-panel-text] {
  min-height: 54px;
}

.demo-step-dot {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.demo-step-dot:hover,
.demo-step-dot:focus-visible {
  outline: none;
  background: #9fb6c4;
  box-shadow: 0 0 0 4px rgba(7, 155, 171, .14);
}

.demo-step-dot.is-active:hover,
.demo-step-dot.is-active:focus-visible {
  background: var(--teal);
}

.demo-practice-preview {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: max-height 0.24s ease, padding 0.24s ease, opacity 0.18s ease, transform 0.18s ease;
}

.demo-practice-preview.is-visible {
  max-height: 130px;
  padding: 16px 18px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.demo-practice-preview p {
  margin: 0 0 12px;
  color: #5b6c80;
  line-height: 1.45;
}

.demo-practice-button-preview {
  width: max-content;
  min-width: 118px;
  pointer-events: none;
}

.demo-next-actions {
  display: none !important;
}

@media (max-width: 900px) {
  .demo-word-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .demo-guide-card {
    height: auto;
    min-height: 240px;
  }
}

/* How It Works guided card demo refinements v2.10.33 */
.demo-hand-pointer {
  position: absolute;
  z-index: 12;
  right: 40px;
  bottom: 28px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #102d63;
  background: #ffffff;
  border: 1px solid rgba(16, 45, 99, 0.14);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(16, 45, 99, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(48px, 34px) scale(0.9) rotate(-12deg);
  transition: opacity 0.18s ease, transform 0.46s cubic-bezier(.2,.85,.32,1.15);
}

.demo-hand-pointer svg {
  width: 28px;
  height: 28px;
  fill: #102d63;
  stroke: #ffffff;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.demo-hand-pointer.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1) rotate(-12deg);
}

.demo-hand-pointer.is-clicking {
  transform: translate(0, 0) scale(0.86) rotate(-12deg);
}

.demo-word-card .check-button.is-demo-clicked {
  transform: scale(0.96);
  box-shadow: 0 0 0 7px rgba(7, 155, 171, 0.16);
}

.demo-word-card .learned-tick,
.demo-word-card .practice-complete-tick {
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(.2,.85,.3,1.25), visibility 0.2s ease;
}

.demo-word-card.is-learned .learned-tick,
.demo-word-card.is-practice-complete .practice-complete-tick {
  animation: demoProgressPop 0.38s ease both;
}

@keyframes demoProgressPop {
  0% { transform: scale(0.55); opacity: 0; }
  65% { transform: scale(1.17); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.demo-practice-preview.is-visible {
  max-height: 180px;
}

.demo-inline-star {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  margin: 0 2px;
  border-radius: 999px;
  color: #102d63;
  background: #ffbf24;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(217, 149, 0, 0.22);
  vertical-align: -6px;
}

@media (prefers-reduced-motion: reduce) {
  .demo-hand-pointer,
  .demo-word-card .learned-tick,
  .demo-word-card .practice-complete-tick,
  .demo-word-card.is-learned .learned-tick,
  .demo-word-card.is-practice-complete .practice-complete-tick {
    animation: none !important;
    transition: none !important;
  }
}

/* Spark Vocab v2.10.35: landing-page guided onboarding tour */
body.landing-tour-open {
  overflow: hidden;
}

.landing-tour-shell {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.landing-tour-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
}

.landing-tour-modal {
  position: relative;
  width: min(1060px, calc(100vw - 30px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing-tour-heading {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.landing-tour-heading .section-kicker {
  margin: 0;
}

.landing-tour-heading h2 {
  margin: 0;
  color: #102d63;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3.3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 10px rgba(255,255,255,.85);
}

.landing-tour-card-stage {
  position: relative;
  min-height: 740px;
  padding: 54px 18px 20px;
}

.landing-tour-card-mount {
  width: min(var(--landing-card-width, 370px), 100%);
  margin: 0 auto;
}

.landing-tour-card-mount .word-card,
.landing-tour-card.word-card {
  width: 100%;
  min-width: 0;
  margin: 0;
  pointer-events: none;
}

.landing-tour-card .sentence-input {
  cursor: default;
}

.landing-tour-card .card-state-stage {
  min-height: 420px;
  flex-basis: 420px;
}

.landing-tour-card .feedback-actions {
  display: none;
}

.landing-tour-card .feedback-message {
  margin-top: 12px;
}

.landing-tour-card .is-tour-highlight {
  position: relative;
  z-index: 3;
  outline: 4px solid rgba(255, 191, 36, .95);
  outline-offset: 5px;
  border-radius: 14px;
  box-shadow: 0 0 0 9px rgba(255, 191, 36, .20), 0 14px 34px rgba(16, 45, 99, .18);
}

.landing-tour-card .image-wrap.is-tour-highlight {
  border-radius: 22px 22px 14px 14px;
}

.landing-tour-card .status-marker.is-tour-highlight,
.landing-tour-card .learned-tick.is-tour-highlight,
.landing-tour-card .practice-complete-tick.is-tour-highlight {
  border-radius: 50%;
}

.landing-tour-card .check-button.is-tour-clicked {
  transform: translateY(1px) scale(.985);
  box-shadow: inset 0 2px 7px rgba(0,0,0,.14);
}

.landing-tour-bubble {
  position: absolute;
  z-index: 8;
  width: min(286px, calc(100vw - 80px));
  padding: 15px 16px 16px;
  border: 1px solid rgba(7, 155, 171, .28);
  border-radius: 18px;
  color: #102d63;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(16, 45, 99, .23);
  transition: left .24s ease, top .24s ease, opacity .16s ease, transform .24s ease;
}

.landing-tour-bubble::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: inherit;
  border: inherit;
  transform: rotate(45deg);
}

.landing-tour-bubble.is-right::before {
  left: -8px;
  top: calc(50% - 7px);
  border-top: 0;
  border-right: 0;
}

.landing-tour-bubble.is-left::before {
  right: -8px;
  top: calc(50% - 7px);
  border-bottom: 0;
  border-left: 0;
}

.landing-tour-bubble.is-bottom::before {
  top: -8px;
  left: calc(50% - 7px);
  border-right: 0;
  border-bottom: 0;
}

.landing-tour-bubble span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #087b8a;
  background: #e9fbfd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.landing-tour-bubble h3 {
  margin: 10px 0 6px;
  color: #102d63;
  font-size: 20px;
  line-height: 1.18;
}

.landing-tour-bubble p {
  margin: 0;
  color: #52657a;
  font-size: 15px;
  line-height: 1.48;
}

.landing-tour-inline-star {
  display: inline-grid !important;
  place-items: center;
  width: 20px;
  height: 20px;
  min-height: 20px !important;
  margin: 0 2px;
  padding: 0 !important;
  border-radius: 50% !important;
  color: #111 !important;
  background: #ffbf24 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  vertical-align: middle;
}

.landing-tour-practice-preview {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: clamp(22px, 6vw, 92px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.97);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.landing-tour-practice-preview.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.landing-tour-practice-button {
  pointer-events: none;
}

.landing-tour-practice-preview.is-tour-highlight {
  outline: 4px solid rgba(255, 191, 36, .95);
  outline-offset: 6px;
  border-radius: 14px;
  box-shadow: 0 0 0 9px rgba(255, 191, 36, .20), 0 16px 36px rgba(16,45,99,.18);
}

.landing-tour-hand {
  position: absolute;
  z-index: 10;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #102d63;
  filter: drop-shadow(0 7px 12px rgba(16,45,99,.22));
  opacity: 0;
  transform: translate(-16px, -15px) scale(.88);
  transition: opacity .22s ease, transform .28s cubic-bezier(.2,.85,.3,1.25);
  pointer-events: none;
}

.landing-tour-hand svg {
  width: 38px;
  height: 38px;
  fill: #fff7dc;
  stroke: #102d63;
  stroke-width: 1.35;
}

.landing-tour-hand.is-visible {
  opacity: 1;
  transform: translate(-7px, -7px) scale(1);
}

.landing-tour-hand.is-clicking {
  transform: translate(-5px, -4px) scale(.9);
}

.landing-tour-footer {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding-top: 4px;
}

.landing-tour-footer p {
  margin: 0;
  color: #6b7b8d;
  font-size: 13px;
}

.landing-tour-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.landing-tour-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ccdae3;
  cursor: pointer;
}

.landing-tour-dot.is-active {
  width: 27px;
  background: #ffbf24;
}

.landing-tour-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.landing-tour-buttons .demo-back,
.landing-tour-buttons .demo-next {
  min-width: 112px;
}

@media (max-width: 900px) {
  .landing-tour-modal {
    width: min(760px, calc(100vw - 22px));
    padding: 0;
  }

  .landing-tour-card-stage {
    min-height: 790px;
    padding: 58px 8px 18px;
  }

  .landing-tour-practice-preview {
    right: 22px;
  }
}

@media (max-width: 680px) {
  .landing-tour-shell {
    padding: 10px;
  }

  .landing-tour-heading h2 {
    font-size: 25px;
  }

  .landing-tour-card-stage {
    min-height: 870px;
    padding-top: 64px;
  }

  .landing-tour-card .card-state-stage {
    min-height: 430px;
    flex-basis: 430px;
  }

  .landing-tour-bubble {
    width: min(300px, calc(100vw - 46px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-tour-bubble,
  .landing-tour-practice-preview,
  .landing-tour-hand {
    transition: none;
  }
}


/* Spark Vocab v2.10.36: landing tutorial floating title/control boxes */
.landing-tour-modal {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.landing-tour-heading,
.landing-tour-footer {
  position: relative;
  z-index: 30;
  width: min(var(--landing-card-width, 370px), calc(100vw - 52px));
  margin-inline: auto;
  border: 1px solid rgba(7, 155, 171, .22);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(16, 45, 99, .18);
  overflow: hidden;
}

.landing-tour-heading {
  padding: 10px 18px 12px;
  background: linear-gradient(135deg, rgba(233, 251, 253, .97), rgba(255, 253, 244, .98));
}

.landing-tour-heading h2 {
  margin: 0;
  color: #102d63;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-shadow: none;
}

.landing-tour-card-stage {
  width: 100%;
  padding-top: 14px;
  padding-bottom: 10px;
}

.landing-tour-footer {
  gap: 9px;
  padding: 12px 14px 10px;
  border-color: rgba(255, 191, 36, .42);
  background: rgba(255, 250, 232, .97);
}

.landing-tour-footer p {
  color: #586b80;
  font-size: 12px;
  line-height: 1.25;
}

.landing-tour-buttons .demo-back,
.landing-tour-buttons .demo-next {
  min-width: 94px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.landing-tour-buttons .demo-back {
  border: 1px solid rgba(16, 45, 99, .18);
  color: #102d63;
  background: #fff;
}

.landing-tour-buttons .demo-next {
  border: 0;
  color: #fff;
  background: #079bab;
  box-shadow: 0 10px 18px rgba(7, 155, 171, .20);
}

.landing-tour-buttons .demo-next:hover:not(:disabled) {
  background: #068696;
}

.landing-tour-buttons .demo-back:disabled,
.landing-tour-buttons .demo-next:disabled {
  cursor: not-allowed;
  opacity: .5;
}

@media (max-width: 680px) {
  .landing-tour-heading,
  .landing-tour-footer {
    width: min(var(--landing-card-width, 370px), calc(100vw - 32px));
    border-radius: 16px;
  }

  .landing-tour-heading h2 {
    font-size: 22px;
  }

  .landing-tour-footer {
    padding: 10px 12px 9px;
  }
}

/* Spark Vocab v2.10.38: landing tutorial external bubbles and stronger card frame */
.landing-tour-modal {
  display: block;
  width: min(920px, calc(100vw - 30px));
  max-height: calc(100vh - 24px);
  overflow: visible;
}

.landing-tour-heading,
.landing-tour-footer {
  display: none !important;
}

.landing-tour-card-stage {
  min-height: 860px;
  padding: 8px 18px 34px;
}

.landing-tour-card-mount {
  position: relative;
  z-index: 4;
  border-radius: 26px;
}

.landing-tour-card-mount .word-card,
.landing-tour-card.word-card {
  border-width: 2px;
  border-color: rgba(7, 155, 171, .48);
  box-shadow: 0 0 0 3px rgba(7, 155, 171, .18), 0 16px 34px rgba(16, 45, 99, .36), 0 5px 12px rgba(16, 45, 99, .22);
}

.landing-tour-bubble {
  z-index: 12;
  width: min(304px, calc(100vw - 78px));
  padding: 14px 15px 15px;
}

.landing-tour-bubble h3 {
  margin-top: 9px;
}

.landing-tour-bubble p strong {
  color: #102d63;
  font-weight: 900;
}

.landing-tour-bubble-nav {
  display: grid;
  gap: 11px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(16, 45, 99, .10);
}

.landing-tour-bubble .landing-tour-dots {
  justify-content: flex-start;
  gap: 7px;
}

.landing-tour-bubble .landing-tour-dot {
  width: 10px;
  height: 10px;
}

.landing-tour-bubble .landing-tour-dot.is-active {
  width: 24px;
}

.landing-tour-bubble .landing-tour-buttons {
  justify-content: flex-start;
  gap: 9px;
}

.landing-tour-bubble .demo-back,
.landing-tour-bubble .demo-next {
  min-width: 82px;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.landing-tour-bubble .demo-back {
  border: 1px solid rgba(16, 45, 99, .18);
  color: #102d63;
  background: #fff;
}

.landing-tour-bubble .demo-next {
  border: 0;
  color: #fff;
  background: #079bab;
  box-shadow: 0 10px 18px rgba(7, 155, 171, .20);
}

.landing-tour-bubble .demo-next:hover {
  background: #068696;
}

.landing-tour-bubble .demo-back[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .landing-tour-modal {
    width: min(760px, calc(100vw - 22px));
    max-height: calc(100vh - 18px);
    overflow: auto;
  }

  .landing-tour-card-stage {
    min-height: 920px;
    padding: 8px 8px 30px;
  }
}

@media (max-width: 680px) {
  .landing-tour-modal {
    width: calc(100vw - 20px);
  }

  .landing-tour-card-stage {
    min-height: 980px;
    padding-top: 8px;
  }

  .landing-tour-bubble {
    width: min(300px, calc(100vw - 42px));
  }
}


/* Spark Vocab v2.10.39: landing tutorial side-only bubbles */
.landing-tour-modal {
  width: min(920px, calc(100vw - 30px));
  overflow: visible;
}

.landing-tour-card-mount {
  margin-left: 18px;
  margin-right: auto;
}

.landing-tour-bubble {
  max-width: 304px;
}

.landing-tour-bubble.is-bottom::before {
  display: none;
}

@media (max-width: 900px) {
  .landing-tour-modal {
    width: min(760px, calc(100vw - 22px));
    overflow: visible;
  }
}

@media (max-width: 680px) {
  .landing-tour-modal {
    width: calc(100vw - 20px);
    overflow: visible;
  }
}

/* Spark Vocab v2.10.40: Practice Reading page */
.practice-reading-page {
  background: #f5f7fb;
}

.practice-reading-main {
  width: min(1380px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.practice-reading-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.practice-reading-hero .eyebrow {
  margin-bottom: 10px;
}

.practice-reading-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: #102a43;
}

.practice-reading-lead {
  max-width: 740px;
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: #52637a;
}

.reading-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reading-level-pill {
  border: 1px solid #c8d8f8;
  border-radius: 999px;
  background: #ffffff;
  color: #2b5bb9;
  font-weight: 800;
  padding: 9px 14px;
  min-width: 48px;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.08);
}

.reading-level-pill.active {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  border-color: transparent;
  color: #ffffff;
}

.reading-level-pill[disabled] {
  cursor: not-allowed;
  color: #8a9ab2;
  background: #eef3fb;
  border-color: #d7e0ef;
  box-shadow: none;
}

.reading-workspace {
  display: grid;
  grid-template-columns: minmax(600px, 1fr) minmax(390px, 440px);
  gap: 26px;
  align-items: start;
}

.reading-chat-panel,
.reading-card-panel {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.12);
}

.reading-chat-panel {
  padding: 22px;
}

.reading-card-panel {
  position: sticky;
  top: 22px;
  padding: 18px;
  min-height: 560px;
}

.reading-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.reading-panel-heading h2,
.reading-card-panel h2 {
  margin: 0 0 6px;
  color: #102a43;
  line-height: 1.12;
}

.reading-panel-heading p,
.reading-card-panel > p {
  margin: 0;
  color: #5f6f86;
  line-height: 1.5;
}

.reading-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 8px 11px;
  text-transform: uppercase;
}

.reading-phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px;
}

.phone-screen {
  overflow: hidden;
  border: 10px solid #111827;
  border-radius: 38px;
  background: #e7f7ee;
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.16);
}

.phone-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #075e54;
  color: #ffffff;
}

.phone-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #d9f99d;
  color: #166534;
  font-weight: 900;
}

.phone-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.phone-title strong {
  font-size: 15px;
}

.phone-title span {
  font-size: 11px;
  opacity: 0.82;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 478px;
  padding: 16px 12px 18px;
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 52%, rgba(255,255,255,0.45) 0 2px, transparent 3px),
    #e7f7ee;
}

.chat-message {
  max-width: 82%;
  border-radius: 16px;
  padding: 8px 10px 6px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
  font-size: 15px;
  line-height: 1.42;
  color: #14212f;
}

.chat-message.incoming {
  align-self: flex-start;
  background: #ffffff;
  border-top-left-radius: 5px;
}

.chat-message.outgoing {
  align-self: flex-end;
  background: #dcf8c6;
  border-top-right-radius: 5px;
}

.chat-speaker {
  display: block;
  margin-bottom: 3px;
  color: #128c7e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.reading-word {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 1px 2px;
  margin: 0 -1px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(15, 23, 42, 0.18);
  text-underline-offset: 3px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.reading-word:hover,
.reading-word:focus-visible {
  background: #fff176;
  outline: none;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.38);
}

.reading-word.selected {
  background: #fde047;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.52);
}

.reading-word.learned {
  text-decoration-color: rgba(34, 197, 94, 0.55);
}

.reading-card-panel .word-card {
  width: 100%;
  margin: 0;
}

.reading-card-empty {
  display: grid;
  place-items: center;
  min-height: 470px;
  border: 2px dashed #c7d2fe;
  border-radius: 26px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  text-align: center;
  color: #52637a;
  padding: 28px;
}

.reading-card-empty strong {
  display: block;
  margin-bottom: 10px;
  color: #1e3a8a;
  font-size: 22px;
}

.reading-status {
  min-height: 22px;
  margin-top: 12px;
  color: #166534;
  font-size: 14px;
  font-weight: 800;
}

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

  .reading-card-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .practice-reading-main {
    width: min(100% - 18px, 680px);
    padding-top: 18px;
  }

  .practice-reading-hero {
    grid-template-columns: 1fr;
  }

  .reading-levels {
    justify-content: flex-start;
  }

  .reading-chat-panel,
  .reading-card-panel {
    border-radius: 22px;
    padding: 14px;
  }

  .reading-panel-heading {
    flex-direction: column;
  }

  .reading-phones {
    grid-template-columns: 1fr;
  }

  .phone-screen {
    border-width: 8px;
    border-radius: 32px;
  }

  .chat-body {
    min-height: 0;
  }
}


/* Spark Vocab v2.10.41: Try Reading phone/card refinement */
.practice-reading-main {
  width: min(1180px, calc(100vw - 32px));
}

.reading-workspace {
  grid-template-columns: minmax(340px, 390px) minmax(340px, 390px);
  justify-content: center;
  gap: 38px;
  align-items: start;
}

.reading-chat-panel,
.reading-card-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.reading-card-panel {
  position: sticky;
  top: 20px;
  min-height: 0;
  width: min(390px, 100%);
}

.reading-card-mount {
  width: 100%;
}

.reading-card-panel .word-card,
.reading-card-mount .word-card {
  width: 100%;
  margin: 0;
}

.reading-phones {
  display: block;
  width: min(390px, 100%);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 790px;
  min-height: 790px;
  max-height: 790px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 12px solid #111827;
  border-radius: 48px;
  background: #e7f7ee;
  box-shadow: 0 28px 62px rgba(15, 23, 42, 0.24);
}

.phone-screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 4;
  width: 82px;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  transform: translateX(-50%);
}

.phone-topbar {
  flex: 0 0 auto;
  min-height: 76px;
  padding: 24px 16px 13px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  background: #075e54;
  color: #ffffff;
}

.phone-avatar {
  width: 38px;
  height: 38px;
}

.phone-title strong {
  font-size: 16px;
}

.phone-title span {
  font-size: 12px;
}

.conversation-listen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-width: 36px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #075e54;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.conversation-listen-button:hover,
.conversation-listen-button:focus-visible {
  transform: translateY(-1px);
  background: #ffffff;
  outline: none;
}

.conversation-listen-button[aria-pressed="true"] {
  color: #ffffff;
  background: #0ea5a8;
}

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

.chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 18px 14px 24px;
  gap: 10px;
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 52%, rgba(255,255,255,0.45) 0 2px, transparent 3px),
    #e7f7ee;
}

.chat-message {
  max-width: 84%;
  font-size: 16px;
  line-height: 1.45;
  padding: 8px 10px 7px;
}

.chat-speaker {
  font-size: 11px;
}

.reading-card-empty-card {
  min-height: 790px;
}

.reading-empty-image {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(14, 165, 168, 0.18), transparent 32%),
    linear-gradient(135deg, #eff6ff, #e0f2fe 48%, #ecfeff);
}

.reading-empty-image::before {
  display: none;
}

.reading-empty-image::after {
  content: "?";
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  color: #ffffff;
  background: #0ea5a8;
  box-shadow: 0 14px 32px rgba(14, 111, 114, 0.28);
  font-size: 30px;
  font-weight: 950;
}

.reading-card-empty-card .word-title {
  font-family: inherit;
  font-size: 28px;
  color: #102a43;
}

.reading-card-empty-card .word-pos {
  font-style: normal;
}

.reading-card-empty-card .card-state-stage {
  min-height: 390px;
  flex: 0 0 390px;
}

.reading-card-empty-card .word-details dd {
  color: #52637a;
}

.reading-card-empty-note {
  display: grid;
  place-items: center;
  min-height: 186px;
  border: 1px dashed rgba(14, 165, 168, 0.34);
  border-radius: 20px;
  background: #f8fbff;
  color: #52637a;
  text-align: center;
  padding: 22px;
  font-size: 15px;
  line-height: 1.5;
}

.reading-status,
.reading-card-panel > h2,
.reading-card-panel > p,
.reading-panel-heading {
  display: none !important;
}

@media (max-width: 920px) {
  .reading-workspace {
    grid-template-columns: minmax(320px, 390px);
    justify-content: center;
  }

  .reading-card-panel {
    position: static;
  }

  .phone-screen {
    height: min(760px, calc(100vh - 150px));
    min-height: 650px;
  }
}

@media (max-width: 460px) {
  .reading-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .reading-phones,
  .reading-card-panel {
    width: 100%;
  }

  .phone-screen {
    border-width: 9px;
    border-radius: 40px;
    min-height: 640px;
  }

  .phone-topbar {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 22px 12px 12px;
  }

  .conversation-listen-button span:not(.sr-only) {
    display: none;
  }
}

/* Spark Vocab v2.10.42: account progress controls */
.account-progress-manager {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.account-progress-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.account-progress-heading h3 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: #12213f;
}

.account-progress-heading p:last-child {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.account-progress-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.progress-level-group {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(14, 165, 168, 0.18);
  border-radius: 22px;
  background: #f8fafc;
}

.progress-level-group legend {
  padding: 0 6px;
  font-weight: 900;
  color: #12213f;
}

.account-level-checkboxes {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.account-level-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 9px 10px;
  border-radius: 14px;
  background: #ffffff;
  color: #12213f;
  font-weight: 800;
}

.account-level-option input {
  width: 18px;
  height: 18px;
  accent-color: #0ea5a8;
}

.account-level-option:has(input:disabled) {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.58);
}

.progress-manager-message {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef9f8;
  color: #075e54;
  font-weight: 800;
}

.progress-manager-message[data-type="success"] {
  background: #ecfdf5;
  color: #047857;
}

.progress-manager-message[data-type="error"] {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 720px) {
  .account-progress-heading,
  .account-progress-groups {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .account-progress-heading .secondary-action {
    width: 100%;
  }
}


/* Spark Vocab v2.10.43: keep the Saved label from covering the AI heading text. */
.practice-heading {
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.practice-heading > div {
  flex: 1 1 225px;
  min-width: 0;
}

.practice-heading > div strong {
  line-height: 1.25;
}

.practice-heading .saved-label {
  position: static;
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(39, 174, 96, 0.10);
  color: var(--success);
  line-height: 1.15;
  white-space: nowrap;
}

.practice-heading .saved-label[hidden] {
  display: none !important;
}

.practice-heading .free-checks-label {
  flex: 0 0 100%;
  margin: 5px 0 0 27px;
  text-align: left;
  white-space: normal;
  font-size: 11px;
}


/* Version 2.10.44: keep the AI saved state beside the sentence prompt, not over the AI heading. */
.sentence-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.sentence-label-row .saved-label {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.sentence-label-row .saved-label[hidden] {
  display: none !important;
}

.sentence-label-row .sentence-label-text {
  min-width: 0;
}

.practice-heading .saved-label {
  position: static;
}

@media (max-width: 390px) {
  .sentence-label-row {
    align-items: flex-start;
    gap: 6px;
  }
  .sentence-label-row .saved-label {
    font-size: 11px;
  }
}

/* Spark Vocab v2.10.47: Learn by reading modes (chat, news, information). */
.reading-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.reading-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(14, 165, 168, 0.26);
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.reading-mode-tab strong {
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef9f8;
  color: #075e54;
  font-size: 11px;
}

.reading-mode-tab[aria-pressed="true"] {
  border-color: rgba(14, 165, 168, 0.55);
  background: #0ea5a8;
  color: #ffffff;
}

.reading-mode-tab[aria-pressed="true"] strong {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.reading-article-mode {
  grid-template-columns: minmax(520px, 680px) minmax(340px, 390px);
  justify-content: center;
  gap: 34px;
}

.reading-article-mode .reading-phones {
  width: min(680px, 100%);
}

.reading-article-card {
  width: 100%;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.12);
}

.reading-article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.reading-article-kicker,
.reading-article-level {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reading-article-kicker {
  background: #ecfeff;
  color: #0e7490;
}

.reading-article-level {
  background: #eef2ff;
  color: #3730a3;
}

.reading-article-card h2 {
  margin: 0;
  color: #102a43;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.reading-article-byline {
  margin: 10px 0 14px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.reading-article-image {
  display: block;
  width: 100%;
  max-height: 190px;
  margin: 0 0 18px;
  border-radius: 22px;
  object-fit: cover;
  object-position: center center;
  background: #e2e8f0;
}

.reading-article-text {
  color: #1f2937;
  font-size: 18px;
  line-height: 1.76;
}

.reading-article-text p {
  margin: 0 0 15px;
}

.reading-article-text p:last-child {
  margin-bottom: 0;
}

.article-line .reading-word {
  color: #0f172a;
  text-decoration-color: rgba(14, 165, 168, 0.35);
  text-underline-offset: 3px;
}

.article-line .reading-word:hover,
.article-line .reading-word:focus-visible {
  color: #075e54;
  background: #ecfeff;
}

.article-line .reading-word.learned {
  color: #15803d;
  text-decoration-color: rgba(34, 197, 94, 0.55);
}

@media (max-width: 1100px) {
  .reading-article-mode {
    grid-template-columns: minmax(320px, 680px);
  }

  .reading-article-mode .reading-card-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .reading-article-card {
    padding: 18px;
    border-radius: 24px;
  }

  .reading-article-image {
    max-height: 155px;
    border-radius: 18px;
  }

  .reading-article-text {
    font-size: 16.5px;
    line-height: 1.68;
  }

  .reading-mode-tab {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Spark Vocab v2.10.48: Learn by reading level tabs and centered card alignment. */
.practice-reading-page .practice-reading-lead {
  max-width: 760px;
}

.practice-reading-page .reading-levels {
  align-self: end;
  justify-content: flex-end;
  gap: 10px;
}

.practice-reading-page .reading-level-pill {
  min-width: 54px;
  text-align: center;
  cursor: pointer;
}

.practice-reading-page .reading-level-pill[aria-pressed="true"] {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  border-color: transparent;
  color: #ffffff;
}

.practice-reading-page .reading-mode-tabs {
  display: none !important;
}

.practice-reading-page .reading-workspace,
.practice-reading-page .reading-article-mode {
  align-items: center;
}

.practice-reading-page .reading-card-panel {
  align-self: center;
  top: 90px;
}

.practice-reading-page .reading-coming-soon-body {
  margin-top: 18px;
  color: #52637a;
  font-size: 18px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .practice-reading-page .reading-workspace,
  .practice-reading-page .reading-article-mode {
    align-items: start;
  }

  .practice-reading-page .reading-card-panel {
    align-self: stretch;
  }
}

@media (max-width: 760px) {
  .practice-reading-page .reading-levels {
    justify-content: flex-start;
  }

  .practice-reading-page .reading-level-pill {
    min-width: 48px;
  }
}


/* v2.10.51: accepted-forms button and popup on vocabulary cards */
.forms-button {
  flex: 0 0 30px;
  position: relative;
  z-index: 8;
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center;
  border: 1px solid rgba(7, 155, 171, 0.28);
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.forms-button:hover,
.forms-button:focus-visible,
.forms-button.open {
  color: white;
  background: var(--teal);
  outline: none;
}
.forms-icon {
  transform: translateY(-0.5px);
}
.forms-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 20;
  min-width: 218px;
  max-width: min(280px, 82vw);
  padding: 10px 12px;
  border: 1px solid rgba(16, 62, 92, 0.14);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.42;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}
.forms-popover > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}
.forms-list {
  display: block;
  overflow-wrap: anywhere;
}
.forms-button:hover .forms-popover,
.forms-button:focus-visible .forms-popover,
.forms-button.open .forms-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 620px) {
  .forms-popover {
    right: auto;
    left: 50%;
    transform: translate(-50%, -4px);
  }
  .forms-button:hover .forms-popover,
  .forms-button:focus-visible .forms-popover,
  .forms-button.open .forms-popover {
    transform: translate(-50%, 0);
  }
}
