/* TOEFL Smart Suite — Sprint visual system v28 */
:root {
  --paper: #f5f2eb;
  --card: #fffdfa;
  --surface-soft: #faf8f3;
  --ink: #17263f;
  --ink-soft: #526077;
  --line: #dcd8cf;
  --navy: #213b63;
  --navy-dark: #172d4d;
  --navy-pale: #e7edf5;
  --orange: #ea7655;
  --orange-pale: #f9e1d9;
  --green: #397769;
  --green-pale: #dfece8;
  --blue: #426a86;
  --blue-pale: #e5eef3;
  --red: #bc5443;
  --bg: var(--paper);
  --surface: var(--card);
  --surface-raised: rgba(255, 253, 250, .92);
  --surface-tint: var(--navy-pale);
  --accent: var(--navy);
  --accent-dark: var(--navy-dark);
  --accent-pale: var(--navy-pale);
  --warm: var(--orange);
  --warm-pale: var(--orange-pale);
  --focus-ring: rgba(234, 118, 85, .28);
  --shadow: 0 24px 70px rgba(30, 42, 61, .09);
  --shadow-small: 0 9px 26px rgba(30, 42, 61, .07);
  --radius: 22px;
  --radius-small: 12px;
  --sidebar-width: 0px;
  --content-max: 1320px;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

html {
  min-width: 320px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background: var(--paper);
}

html.dark {
  color-scheme: dark;
  background: #172033;
}

body,
body.study-active {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 4%, rgba(234, 118, 85, .08), transparent 24rem),
    radial-gradient(circle at 95% 8%, rgba(57, 119, 105, .07), transparent 28rem),
    var(--paper);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  background: rgba(234, 118, 85, .06);
}

body::after {
  background: rgba(57, 119, 105, .05);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.sidebar,
.suite-header {
  position: sticky;
  z-index: 60;
  inset: 0 auto auto;
  display: grid;
  grid-template-columns: minmax(165px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 20px;
  width: 100%;
  height: 84px;
  padding: 0 clamp(18px, 4.5vw, 72px);
  border: 0;
  border-bottom: 1px solid rgba(23, 38, 63, .14);
  background: rgba(245, 242, 235, .92);
  box-shadow: none;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-block:hover .brand-mark {
  border-color: var(--navy-dark);
  background: var(--navy-dark);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--navy);
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  box-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
}

.brand-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-subtitle {
  max-width: 170px;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 3px;
  width: auto;
  max-width: min(760px, 60vw);
  margin: 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(23, 38, 63, .14);
  border-radius: 999px;
  background: rgba(255, 253, 250, .72);
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-group-label {
  display: none;
}

.nav-item,
a.nav-item {
  position: relative;
  display: flex;
  min-width: max-content;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition:
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.nav-item:hover,
a.nav-item:hover {
  color: var(--navy);
  background: rgba(33, 59, 99, .07);
}

.nav-item.active,
.nav-item[data-nav-view="study"].active {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(23, 45, 77, .18);
}

.nav-item.active::before {
  display: none;
}

.nav-icon {
  display: none;
}

.nav-pill {
  min-width: 19px;
  margin: 0 0 0 1px;
  padding: 3px 5px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--navy-pale);
  font-size: 8px;
  line-height: 1;
}

.nav-item.active .nav-pill {
  color: #fff;
  background: rgba(255, 255, 255, .2);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  width: auto;
  margin: 0;
}

.suite-streak {
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.suite-streak b {
  color: var(--green);
  font-size: 13px;
}

.theme-mode-button {
  display: inline-flex;
  min-width: 88px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 253, 250, .72);
  box-shadow: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.theme-mode-button:hover {
  border-color: rgba(33, 59, 99, .3);
  color: var(--navy);
  background: var(--card);
  transform: translateY(-1px);
}

.theme-mode-icon {
  width: 16px;
  font-size: 17px;
  line-height: 1;
  text-align: center;
}

.theme-mode-label {
  white-space: nowrap;
}

.main-content,
.study-active .main-content {
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 25px clamp(18px, 4.5vw, 72px) 60px;
  overflow: visible;
}

.main-content > .view,
.topbar {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

.topbar {
  min-height: 42px;
  margin-bottom: 28px;
}

.study-active .topbar {
  display: flex;
}

.topbar-context #topbar-section,
.topbar-divider,
.eyebrow {
  color: var(--ink-soft);
}

.eyebrow {
  font-size: 9px;
  letter-spacing: .16em;
}

.eyebrow.accent {
  color: var(--orange);
}

.topbar-title {
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
}

.icon-button {
  border: 1px solid var(--line);
  color: var(--navy);
  background: var(--card);
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading h1,
.login-visual h1,
.home-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.045em;
}

.page-heading h1 {
  color: var(--ink);
  font-size: clamp(34px, 4vw, 52px);
}

.page-heading p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.primary-button,
.path-start-button,
.account-login-button {
  border: 1px solid var(--navy);
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 7px 18px rgba(23, 45, 77, .16);
}

.primary-button:hover,
.path-start-button:hover {
  background: var(--navy-dark);
}

.secondary-button,
.outline-button,
.small-link,
.back-button {
  color: var(--navy);
}

.secondary-button,
.outline-button {
  border-color: var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, .68);
}

.outline-button:hover,
.secondary-button:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--navy-pale);
}

.panel,
.path-card,
.overview-panel,
.today-strip,
.word-list,
.settings-panel,
.tip-card,
.source-card {
  border-color: var(--line);
  background: var(--card);
  box-shadow: var(--shadow-small);
}

.home-hero {
  min-height: 300px;
  padding: clamp(32px, 4.5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 83% 10%, rgba(57, 119, 105, .11), transparent 23rem),
    radial-gradient(circle at 7% 100%, rgba(234, 118, 85, .09), transparent 20rem),
    var(--card);
  box-shadow: var(--shadow);
}

.hero-kicker {
  border-color: rgba(57, 119, 105, .24);
  color: var(--green);
  background: var(--green-pale);
}

.hero-live-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(57, 119, 105, .13);
}

.hero-copy h1 {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(40px, 5.2vw, 70px);
  line-height: .98;
}

.hero-copy h1 span {
  color: var(--navy);
}

.hero-copy > p {
  color: var(--ink-soft);
}

.hero-primary {
  min-height: 49px;
}

.secondary-button {
  min-height: 49px;
}

.hero-microcopy span {
  border-color: var(--line);
  color: var(--ink-soft);
  background: rgba(250, 248, 243, .78);
}

.progress-ring {
  background: conic-gradient(var(--green) var(--progress), #e5e1d9 0);
  box-shadow: 0 14px 35px rgba(30, 42, 61, .09);
}

.progress-ring-inner {
  background: var(--card);
}

.progress-ring-number {
  color: var(--ink);
}

.today-strip {
  border-radius: 16px;
}

.today-strip-item {
  border-color: var(--line);
}

.today-strip-item.priority {
  background: var(--green-pale);
}

.today-icon {
  color: var(--green);
  background: var(--card);
}

.learning-paths {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.vocabulary-path {
  grid-column: 1 / -1;
}

.path-card {
  border-radius: 18px;
}

.path-card h2,
.section-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.mode-grid {
  display: flex;
  gap: 3px;
  padding: 5px;
  border: 1px solid rgba(23, 38, 63, .14);
  border-radius: 999px;
  background: var(--surface-soft);
}

.mode-card,
.path-card .mode-card {
  min-height: 55px;
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.mode-card:hover {
  color: var(--navy);
  background: var(--navy-pale);
}

.mode-card.selected {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(23, 45, 77, .16);
}

.mode-card.selected strong,
.mode-card.selected small {
  color: #fff;
}

.mode-icon {
  color: currentColor !important;
  background: transparent !important;
}

.mode-check {
  color: currentColor;
  background: transparent;
}

.speaking-path,
.writing-path {
  display: block;
  min-height: 360px;
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 253, 250, .96), rgba(250, 248, 243, .96));
}

.speaking-mark,
.writing-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
}

.writing-mark {
  color: var(--navy);
  background: var(--orange-pale);
}

.practice-launch {
  position: relative;
  display: grid;
  min-height: 300px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px 46px;
  margin-top: 16px;
  padding: clamp(30px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid var(--navy);
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(234, 118, 85, .22), transparent 22rem),
    linear-gradient(145deg, var(--navy-dark), #223f68);
  box-shadow: var(--shadow);
}

.practice-launch::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.practice-launch-index {
  position: absolute;
  top: 28px;
  right: 34px;
  color: rgba(255, 255, 255, .18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  letter-spacing: -.04em;
}

.practice-launch-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.practice-launch-copy .eyebrow {
  color: #f4a98f;
}

.practice-launch-copy h2 {
  margin: 12px 0 15px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.3vw, 56px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.practice-launch-copy p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  line-height: 1.7;
}

.practice-launch-modes {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: center;
  gap: 8px;
}

.practice-launch-modes span {
  display: grid;
  min-width: 96px;
  gap: 4px;
  padding: 15px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
}

.practice-launch-modes b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.practice-launch-modes small {
  color: rgba(255, 255, 255, .62);
  font-size: 8px;
}

.practice-launch-button {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 50px;
  min-width: 210px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  justify-self: end;
  padding: 0 20px;
  border: 1px solid #fff;
  border-radius: 999px;
  color: var(--navy-dark);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.practice-launch-button:hover {
  color: var(--navy-dark);
  background: #f5f2eb;
}

.speaking-path p,
.writing-path p {
  color: var(--ink-soft);
  line-height: 1.65;
}

.speaking-summary,
.writing-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 22px 0;
}

.speaking-summary div,
.writing-summary div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 11px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
}

.speaking-summary strong,
.writing-summary strong {
  color: var(--ink);
}

.speaking-summary span,
.writing-summary span {
  color: var(--ink-soft);
  font-size: 8px;
}

.path-start-button {
  display: flex;
  text-decoration: none;
}

.path-start-button.warm,
.path-start-button.writing {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.overview-panel {
  border-radius: 18px;
}

.week-bar span {
  background: linear-gradient(180deg, var(--orange), #c95c40);
}

.study-progress-row {
  border-color: var(--line);
  background: var(--card);
}

.study-progress-track,
.mini-progress {
  background: #e7e3db;
}

.study-progress-track span,
.mini-progress span {
  background: var(--green);
}

.study-layout,
.study-active .study-layout {
  width: 100%;
  max-width: none;
}

.word-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 253, 250, .96), rgba(255, 253, 250, .96)),
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(23, 38, 63, .06) 31px, rgba(23, 38, 63, .06) 32px);
  box-shadow: var(--shadow);
}

.card-word {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.card-phonetic {
  color: var(--green);
}

.card-meaning,
.card-example {
  color: var(--ink-soft);
}

.answer-button,
.definition-action,
.flashcard-self-button,
.choice-option,
.check-spelling,
.next-word {
  border-color: var(--line);
  border-radius: 14px;
}

.answer-button.again,
.flashcard-self-button.again {
  color: var(--orange);
  background: var(--orange-pale);
}

.answer-button.know,
.flashcard-self-button.know,
.next-word {
  color: #fff;
  background: var(--green);
}

.study-mode-badge {
  border-radius: 999px;
  color: var(--navy);
  background: var(--navy-pale);
}

.retell-deck-bar {
  border: 1px solid var(--line);
  background: var(--card);
}

.retell-live-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(57, 119, 105, .14);
}

.retell-layout {
  border-color: var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.retell-card-shell {
  background:
    radial-gradient(circle at 84% 12%, rgba(57, 119, 105, .08), transparent 22rem),
    rgba(255, 253, 250, .6);
}

.retell-play {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 0 0 12px var(--navy-pale);
}

.retell-status,
.retell-context {
  color: var(--green);
}

.retell-recording,
.retell-countdown {
  color: var(--orange);
}

.retell-timer span,
.retell-dimension > i {
  background: #e7e3db;
}

.retell-timer i,
.retell-dimension > i b {
  background: var(--green);
}

.retell-result h2,
.retell-phase h2 {
  color: var(--ink);
}

.retell-word-line {
  font-family: Georgia, "Times New Roman", serif;
}

.retell-word-line .target,
.retell-legend i.target {
  color: var(--green);
  background: var(--green-pale);
}

.retell-word-line .wrong,
.retell-legend i.wrong {
  color: var(--orange);
  background: var(--orange-pale);
}

.library-kind-tabs {
  display: inline-flex;
  grid-template-columns: none;
  gap: 3px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid rgba(23, 38, 63, .14);
  border-radius: 999px;
  background: rgba(255, 253, 250, .72);
}

.library-kind-tab {
  min-width: 210px;
  min-height: 52px;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.library-kind-tab.active {
  border: 0;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(23, 45, 77, .16);
}

.library-kind-tab.active span,
.library-kind-tab.active small {
  color: #fff;
}

.library-toolbar {
  border-color: var(--line);
  background: rgba(245, 242, 235, .9);
}

.search-box {
  border-color: var(--line);
  background: var(--card);
}

.filter-tab:hover,
.filter-tab.active {
  color: var(--green);
  background: var(--green-pale);
}

.word-row {
  border-color: #ebe7df;
}

.word-row:hover {
  background: var(--surface-soft);
}

.word-row-main strong {
  color: var(--ink);
}

.word-phonetic,
.word-row-main small {
  color: var(--green);
}

.word-meaning {
  color: var(--ink-soft);
}

.word-status.new {
  color: var(--ink-soft);
  background: #ece9e2;
}

.word-status.learning {
  color: #b65034;
  background: var(--orange-pale);
}

.word-status.mastered {
  color: var(--green);
  background: var(--green-pale);
}

.page-button:hover,
.page-button.active {
  color: #fff;
  background: var(--navy);
}

.stats-highlight,
.settings-panel,
.tip-card,
.source-card {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--card);
}

.stats-highlight.warm,
.stats-highlight.speaking {
  color: var(--orange);
  background: var(--orange-pale);
}

.stats-highlight.cool {
  color: var(--green);
  background: var(--green-pale);
}

.donut {
  background: conic-gradient(var(--green) var(--mastered-deg), var(--orange) 0 var(--learning-deg), #e4e0d8 0);
}

.goal-options {
  display: inline-flex;
  gap: 3px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.goal-options button {
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.goal-options button.selected {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(23, 45, 77, .15);
}

.switch:checked {
  background: var(--green);
}

.login-shell {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.login-visual {
  border-color: var(--line);
  background:
    radial-gradient(circle at 20% 10%, rgba(234, 118, 85, .11), transparent 19rem),
    var(--surface-soft);
}

.login-orb,
.account-avatar {
  color: #fff;
  background: var(--navy);
}

.toast {
  border-color: var(--line);
  background: var(--card);
}

body.dark {
  --paper: #172033;
  --card: #202b40;
  --surface-soft: #263248;
  --ink: #f2efe8;
  --ink-soft: #b7c0ce;
  --line: #39465a;
  --navy: #7895be;
  --navy-dark: #92acd0;
  --navy-pale: #2d3c55;
  --orange: #f09372;
  --orange-pale: #4b342f;
  --green: #70ad9e;
  --green-pale: #28463f;
  --bg: var(--paper);
  --surface: var(--card);
  --surface-raised: rgba(32, 43, 64, .94);
  --surface-tint: var(--navy-pale);
  --focus-ring: #f3a080;
  color-scheme: dark;
}

body.dark,
body.dark.study-active {
  background:
    radial-gradient(circle at 6% 4%, rgba(240, 147, 114, .08), transparent 24rem),
    radial-gradient(circle at 95% 8%, rgba(112, 173, 158, .08), transparent 28rem),
    var(--paper);
}

body.dark .sidebar,
body.dark .suite-header {
  border-color: var(--line);
  background: rgba(23, 32, 51, .92);
}

body.dark .main-nav,
body.dark .library-kind-tabs,
body.dark .goal-options {
  border-color: var(--line);
  background: rgba(32, 43, 64, .74);
}

body.dark .theme-mode-button {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(32, 43, 64, .78);
}

body.dark .theme-mode-button:hover {
  border-color: rgba(146, 172, 208, .55);
  color: #fff;
  background: var(--surface-soft);
}

body.dark .nav-item.active,
body.dark .nav-item[data-nav-view="study"].active,
body.dark .primary-button,
body.dark .path-start-button,
body.dark .account-login-button,
body.dark .mode-card.selected,
body.dark .library-kind-tab.active,
body.dark .page-button.active,
body.dark .goal-options button.selected,
body.dark .custom-plan-option.selected {
  border-color: #48678f;
  color: #fff;
  background: #48678f;
}

body.dark .home-hero,
body.dark .path-card,
body.dark .overview-panel,
body.dark .today-strip,
body.dark .today-strip-item,
body.dark .word-card,
body.dark .retell-deck-bar,
body.dark .retell-layout,
body.dark .library-toolbar,
body.dark .word-list,
body.dark .stats-highlight,
body.dark .settings-panel,
body.dark .tip-card,
body.dark .source-card,
body.dark .login-shell {
  border-color: var(--line);
  background-color: var(--card);
}

@media (max-width: 1180px) {
  .sidebar,
  .suite-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .main-nav {
    max-width: 100%;
    justify-self: stretch;
  }

  .nav-item,
  a.nav-item {
    padding-inline: 12px;
  }

  .suite-streak {
    display: none;
  }
}

@media (max-width: 820px) {
  body,
  body.study-active {
    padding: 0;
  }

  .sidebar,
  .suite-header {
    position: sticky;
    inset: 0 auto auto;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    width: 100%;
    height: auto;
    min-height: 76px;
    padding: 11px 14px 10px;
    border-top: 0;
    border-bottom: 1px solid rgba(23, 38, 63, .14);
    background: rgba(245, 242, 235, .94);
    box-shadow: 0 10px 28px rgba(30, 42, 61, .06);
  }

  .brand-block,
  .sidebar-footer {
    display: flex;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .brand-subtitle {
    display: none;
  }

  .sidebar-footer {
    grid-column: 2;
    grid-row: 1;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    grid-template-columns: none;
    justify-self: stretch;
    gap: 3px;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid rgba(23, 38, 63, .14);
    border-radius: 999px;
    background: rgba(255, 253, 250, .72);
  }

  .nav-item,
  a.nav-item {
    min-width: 78px;
    min-height: 40px;
    flex-direction: row;
    gap: 5px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 10px;
  }

  .nav-icon {
    display: none;
  }

  .nav-pill {
    position: static;
    min-width: 17px;
    padding: 3px 4px;
  }

  .main-content,
  .study-active .main-content {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 18px 14px 38px;
    overflow: visible;
  }

  .study-active .topbar {
    display: flex;
  }

  .topbar {
    margin-bottom: 20px;
  }

  .home-hero {
    padding: 30px 24px;
  }

  .learning-paths {
    grid-template-columns: 1fr;
  }

  .vocabulary-path {
    grid-column: auto;
  }

  .mode-grid {
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px;
  }

  .mode-card,
  .path-card .mode-card {
    min-height: 60px;
    border-radius: 14px;
  }

  .speaking-path,
  .writing-path {
    min-height: 0;
  }

  .library-kind-tabs {
    display: flex;
    width: 100%;
  }

  .library-kind-tab {
    min-width: 0;
    flex: 1;
  }

  .retell-card-shell {
    padding-inline: 18px;
  }
}

@media (max-width: 600px) {
  .main-content,
  .study-active .main-content {
    padding-inline: 12px;
  }

  .brand-name {
    font-size: 13px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-primary,
  .secondary-button {
    width: 100%;
  }

  .today-strip {
    grid-template-columns: 1fr 1fr;
  }

  .path-card {
    padding: 20px;
  }

  .speaking-summary,
  .writing-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-kind-tab {
    padding-inline: 10px;
  }

  .library-kind-tab small {
    display: none;
  }

  .goal-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    border-radius: 18px;
  }

  .goal-options button {
    border-radius: 13px;
  }
}

/* v27 usability refinement: one horizontal shell, one scroll model, less copy */
:root {
  --suite-header-height: 72px;
}

html {
  height: auto;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-padding-top: calc(var(--suite-header-height) + 16px);
}

body,
body.study-active {
  height: auto !important;
  min-height: 100dvh;
  overflow: visible !important;
}

.app-shell,
.main-content,
.study-active .main-content,
.main-content > .view.active,
.study-active #view-study.active {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.app-shell {
  min-height: 100dvh;
}

.sidebar,
.suite-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex !important;
  width: 100%;
  height: var(--suite-header-height);
  min-height: var(--suite-header-height);
  flex-direction: row !important;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
  padding: 0 clamp(14px, 3.2vw, 52px);
}

.suite-header .brand-block {
  min-width: max-content;
  flex: 0 0 auto;
}

.suite-header .main-nav {
  display: flex !important;
  width: auto;
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center;
  justify-self: auto;
  grid-column: auto;
  grid-row: auto;
  margin: 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline proximity;
  touch-action: pan-x;
}

.suite-header .nav-item,
.suite-header a.nav-item {
  min-width: max-content;
  min-height: 44px;
  flex: 0 0 auto;
  flex-direction: row !important;
  scroll-snap-align: center;
}

.suite-header .sidebar-footer {
  display: flex;
  min-width: max-content;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
}

.main-content,
.study-active .main-content {
  min-height: calc(100dvh - var(--suite-header-height));
  padding-top: clamp(22px, 3vw, 40px);
}

.topbar {
  display: none !important;
}

.page-heading {
  margin-bottom: 22px;
}

.page-heading h1 {
  margin-bottom: 0;
}

.page-heading p:not(#library-subtitle),
.page-heading .eyebrow,
.section-heading .eyebrow,
.brand-subtitle,
.hero-kicker,
.path-card-heading p,
.mode-card small,
.speaking-path > p,
.retell-page-heading p,
.retell-footnote,
.library-kind-tab small,
.library-summary .muted,
.settings-section-title .muted,
.setting-row small,
.settings-aside,
.rail-note,
.keyboard-hint {
  display: none !important;
}

.hero-copy > p {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 700;
}

.hero-microcopy {
  display: none !important;
}

.path-card-heading {
  align-items: center;
}

.mode-grid,
.path-card .mode-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
}

.mode-card,
.path-card .mode-card {
  min-width: 128px;
  min-height: 56px;
}

.mode-copy {
  justify-content: center;
}

.speaking-path,
.writing-path {
  min-height: 320px;
}

.speaking-path > .path-start-button,
.writing-path > .path-start-button {
  margin-top: 20px;
}

.today-strip-item small,
.speaking-summary span,
.writing-summary span,
.stats-highlight-foot,
.chart-legend,
.donut-legend,
.library-summary {
  font-size: 11px;
}

.study-active #view-study.active {
  display: block !important;
  min-height: 0 !important;
}

.study-active .study-layout,
.study-active .study-main {
  height: auto !important;
  min-height: 0 !important;
  flex: none !important;
  overflow: visible !important;
}

.study-active .word-card {
  height: min(680px, calc(100dvh - 220px));
  min-height: 560px;
  max-height: none;
}

.study-active .study-progress-row {
  position: relative;
  top: auto;
}

.word-list {
  overflow: hidden;
}

button.word-row {
  width: 100%;
  grid-template-columns: 50px minmax(120px, 1.15fr) minmax(130px, .85fr) minmax(220px, 2fr) 70px 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
}

button.word-row:last-child {
  border-bottom: 0;
}

button.word-row:focus-visible {
  position: relative;
  z-index: 1;
  outline-offset: -3px;
}

.library-toolbar {
  top: var(--suite-header-height) !important;
}

.library-summary:has(#library-result-count[hidden]) {
  display: none;
}

.filter-tab,
.library-kind-tab,
.page-button {
  min-height: 44px;
}

.page-button {
  min-width: 44px;
}

.settings-layout {
  display: block;
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
}

.plan-section {
  padding-block: 28px;
}

.plan-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.plan-setting-copy {
  min-width: 220px;
}

.plan-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-title-line h2 {
  margin: 0;
  font-size: 16px;
}

.account-scope-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-pale);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.plan-summary,
.plan-summary.compact {
  display: block;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 13px;
  line-height: 1.45;
}

.goal-options {
  display: flex !important;
  width: min(100%, 420px);
  max-width: 420px;
  min-width: 360px;
  flex: 0 1 420px;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 3px;
  margin: 0;
  padding: 5px;
  overflow-x: auto;
  border-radius: 999px !important;
}

.goal-options button,
.custom-plan-option {
  display: inline-flex;
  min-width: 78px;
  min-height: 44px;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px !important;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.custom-plan-option {
  overflow: hidden;
  padding: 0;
  color: var(--ink);
  border-radius: 999px;
  background: transparent;
}

.custom-plan-option.selected {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(23, 45, 77, .15);
}

.custom-plan-option > button {
  width: 100%;
  min-width: 100%;
  min-height: 44px;
  flex: 1 1 auto;
  color: inherit;
  background: transparent !important;
  box-shadow: none !important;
}

.custom-plan-editor {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 10px;
  color: inherit;
}

.custom-plan-editor[hidden],
#custom-plan-trigger[hidden] {
  display: none !important;
}

.custom-plan-editor input {
  width: 4.5ch;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  appearance: textfield;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-align: right;
}

.custom-plan-editor input::-webkit-inner-spin-button,
.custom-plan-editor input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.custom-plan-editor input:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .92);
  outline-offset: 2px;
}

.custom-plan-unit {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 750;
}

.setting-row {
  min-height: 58px;
}

.setting-row strong {
  font-size: 14px;
}

.data-actions .outline-button {
  min-height: 44px;
}

.modal-backdrop {
  z-index: 200;
}

#toast-root,
.toast {
  z-index: 220;
}

@media (max-width: 980px) {
  .suite-header .main-nav {
    justify-content: flex-start;
  }

  .suite-header .nav-item,
  .suite-header a.nav-item {
    padding-inline: 13px;
  }
}

@media (max-width: 820px) {
  :root {
    --suite-header-height: 64px;
  }

  .sidebar,
  .suite-header {
    display: flex !important;
    height: var(--suite-header-height);
    min-height: var(--suite-header-height);
    grid-template-columns: none;
    gap: 8px;
    padding: 8px 10px;
  }

  .suite-header .brand-block,
  .suite-header .sidebar-footer,
  .suite-header .main-nav {
    grid-column: auto;
    grid-row: auto;
  }

  .suite-header .brand-copy {
    display: none;
  }

  .suite-header .brand-mark {
    width: 40px;
    height: 40px;
  }

  .suite-header .main-nav {
    width: 0;
    padding: 3px;
  }

  .suite-header .nav-item,
  .suite-header a.nav-item {
    min-width: 66px;
    min-height: 44px;
    padding-inline: 11px;
    font-size: 11px;
  }

  .suite-header .nav-icon {
    display: none;
  }

  button.word-row {
    grid-template-columns: 35px minmax(0, 1fr) auto;
  }

  .suite-streak {
    display: none;
  }

  .suite-header .sidebar-footer {
    display: flex;
    min-width: 44px;
  }

  .suite-header .theme-mode-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .suite-header .theme-mode-label {
    display: none;
  }

  .main-content,
  .study-active .main-content {
    padding-top: 20px;
  }

  .plan-setting-row {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .goal-options {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .goal-options button,
  .custom-plan-option {
    min-width: 72px;
    padding-inline: 10px;
  }

  .custom-plan-option {
    padding-inline: 0;
  }

  .study-active .word-card {
    height: auto;
    min-height: 620px;
  }
}

@media (max-width: 520px) {
  .suite-header .brand-block {
    display: flex !important;
  }

  .mode-card,
  .path-card .mode-card {
    min-width: 108px;
  }

  .goal-options button,
  .custom-plan-option {
    min-width: 66px;
    padding-inline: 8px;
    font-size: 12px;
  }

  .custom-plan-option {
    padding-inline: 0;
  }

  .page-heading h1 {
    font-size: 34px;
  }
}

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

.vocabulary-path {
  grid-column: auto;
}

.learning-paths .path-card,
.learning-paths .speaking-path,
.learning-paths .writing-path {
  display: flex;
  min-height: 430px;
  flex-direction: column;
}

.module-mark,
.vocabulary-mark,
.speaking-mark,
.writing-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.vocabulary-mark {
  color: var(--green);
  background: var(--green-pale);
  font-style: italic;
}

.writing-mark {
  color: var(--navy);
  background: var(--orange-pale);
}

.learning-paths .path-card > p,
.learning-paths .speaking-path > p,
.learning-paths .writing-path > p {
  display: block !important;
  min-height: 48px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.learning-paths .path-card h2 {
  margin: 9px 0 0;
  font-size: clamp(24px, 2vw, 31px);
  line-height: 1.14;
}

.learning-paths .mode-grid,
.learning-paths .speaking-summary,
.learning-paths .writing-summary {
  margin: 24px 0 20px;
}

.learning-paths .mode-grid {
  width: 100%;
  overflow: visible;
}

.learning-paths .mode-card,
.learning-paths .path-card .mode-card {
  min-width: 0;
  min-height: 48px;
  padding-inline: 7px;
}

.learning-paths .path-start-button {
  width: 100%;
  margin-top: auto;
  cursor: pointer;
  font: inherit;
}

.diagnostic-active .topbar,
.writing-active .topbar,
.practice-active .topbar {
  display: none;
}

.diagnostic-active .main-content,
.diagnostic-active .study-active .main-content,
.writing-active .main-content,
.writing-active .study-active .main-content,
.practice-active .main-content,
.practice-active .study-active .main-content {
  padding: 0;
}

.diagnostic-active .main-content > .view,
.writing-active .main-content > .view,
.practice-active .main-content > .view {
  max-width: none;
}

.diagnostic-view-host,
.writing-view-host,
.practice-view-host {
  min-height: calc(100dvh - var(--suite-header-height));
}

.diagnostic-workspace-frame,
.writing-workspace-frame,
.practice-workspace-frame {
  display: block;
  width: 100%;
  height: calc(100dvh - var(--suite-header-height));
  min-height: 680px;
  border: 0;
  background: var(--paper);
}

.diagnostic-launch {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
  margin: 16px 0 20px;
  padding: clamp(24px, 3.2vw, 38px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 0, rgba(57, 119, 105, .12), transparent 19rem),
    linear-gradient(120deg, #fffdfa, #f4f1e9);
  box-shadow: var(--shadow-small);
}

.diagnostic-launch::after {
  position: absolute;
  right: -55px;
  bottom: -85px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(33, 59, 99, .08);
  border-radius: 50%;
  content: "";
}

.diagnostic-launch-mark {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-family: Georgia, serif;
  font-size: 32px;
}

.diagnostic-launch-copy h2 {
  margin: 7px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2.7vw, 36px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.diagnostic-launch-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.68;
}

.diagnostic-launch-stats {
  display: flex;
  gap: 8px;
}

.diagnostic-launch-stats span {
  display: flex;
  min-width: 68px;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .64);
}

.diagnostic-launch-stats b {
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 500;
}

.diagnostic-launch-stats small {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 750;
}

.diagnostic-launch-button {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 166px;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.diagnostic-launch-button:hover { background: #172d4d; }

body.dark .diagnostic-launch {
  background:
    radial-gradient(circle at 82% 0, rgba(91, 163, 146, .12), transparent 19rem),
    var(--card);
}

body.dark .diagnostic-launch-stats span { background: rgba(255, 255, 255, .04); }

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

  .learning-paths .path-card,
  .learning-paths .speaking-path,
  .learning-paths .writing-path {
    min-height: 0;
  }

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

  .diagnostic-launch {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .diagnostic-launch-button {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .practice-launch-modes {
    align-self: auto;
  }

  .practice-launch-button {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .diagnostic-workspace-frame,
  .writing-workspace-frame,
  .practice-workspace-frame {
    min-height: calc(100dvh - var(--suite-header-height));
  }

  .practice-launch {
    gap: 24px;
    padding: 28px 22px;
  }

  .practice-launch-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .practice-launch-modes span {
    min-width: 0;
    padding: 12px 9px;
  }

  .practice-launch-button {
    width: 100%;
  }

  .diagnostic-launch {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 22px;
  }

  .diagnostic-launch-mark { width: 62px; height: 62px; }

  .diagnostic-launch-stats { width: 100%; }

  .diagnostic-launch-stats span { flex: 1; }

  .diagnostic-launch-button {
    grid-column: auto;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .goal-options {
    gap: 2px;
    padding: 4px;
    overflow-x: visible;
  }

  .goal-options button,
  .custom-plan-option {
    min-width: 58px;
    padding-inline: 4px;
    font-size: 11px;
  }

  .custom-plan-option {
    padding-inline: 0;
  }

  .custom-plan-editor {
    padding-inline: 6px;
  }
}

/* v33 — open-source-inspired daily plan, weakness queue, and focus mode. */
.unified-daily-plan {
  overflow: hidden;
}

button.today-strip-item {
  position: relative;
  width: 100%;
  appearance: none;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

button.today-strip-item:hover {
  color: var(--navy);
  background: var(--navy-pale);
}

.module-plan-item .plan-arrow {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 13px;
}

.weakness-queue {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
  margin-top: 16px;
  padding: clamp(24px, 3.2vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 10%, rgba(234, 118, 85, .1), transparent 17rem),
    var(--card);
  box-shadow: var(--shadow-small);
}

.weakness-copy h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.5vw, 35px);
  font-weight: 500;
  letter-spacing: -.03em;
}

.weakness-copy p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.weakness-preview {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.weakness-preview > span {
  display: flex;
  min-width: 92px;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.weakness-preview strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weakness-preview small {
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
}

.weakness-preview .weakness-empty {
  min-width: 190px;
}

.weakness-preview .weakness-empty small {
  color: var(--ink-soft);
}

.weakness-action {
  display: flex;
  min-width: 170px;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--navy);
  border-radius: 16px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.weakness-action > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.weakness-action small {
  color: rgba(255, 255, 255, .7);
  font-size: 8px;
  letter-spacing: .12em;
}

.weakness-action strong {
  font-size: 17px;
}

.weakness-action:disabled {
  border-color: var(--line);
  color: var(--ink-soft);
  background: var(--surface-soft);
  cursor: not-allowed;
}

.study-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.focus-mode-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--card);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.focus-mode-button:hover,
.focus-mode-button[aria-pressed="true"] {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

body.study-focus .suite-header,
body.study-focus .topbar,
body.study-focus .study-rail,
body.study-focus .keyboard-hint,
body.study-focus .study-feedback,
body.study-focus .study-topline > .back-button,
body.study-focus .study-topline > .study-mode-badge,
body.study-focus #study-end-button {
  display: none !important;
}

body.study-focus .main-content,
body.study-focus.study-active .main-content {
  min-height: 100dvh;
  padding: 16px clamp(16px, 4vw, 56px) 22px !important;
}

body.study-focus .main-content > .view,
body.study-focus .study-layout,
body.study-focus .study-progress-row,
body.study-focus .study-topline {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
}

body.study-focus .study-topline {
  min-height: 40px;
  justify-content: flex-end;
}

body.study-focus .study-layout,
body.study-focus.study-active .study-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.study-focus .word-card {
  min-height: min(720px, calc(100dvh - 132px));
}

body.dark .weakness-queue,
body.dark button.today-strip-item,
body.dark .focus-mode-button {
  border-color: var(--line);
  background-color: var(--card);
}

@media (max-width: 1040px) {
  .weakness-queue {
    grid-template-columns: 1fr auto;
  }

  .weakness-preview {
    grid-column: 1;
  }

  .weakness-action {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

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

  .weakness-preview,
  .weakness-action {
    grid-column: 1;
    grid-row: auto;
  }

  .weakness-action {
    width: 100%;
    min-height: 64px;
  }

  .study-top-actions {
    gap: 7px;
  }

  .focus-mode-button {
    padding-inline: 11px;
  }

  body.study-focus .word-card {
    min-height: calc(100dvh - 150px);
  }
}

.learning-paths .path-card h2 {
  text-wrap: balance;
  word-break: keep-all;
}

.learning-paths .path-card h2 > span {
  display: block;
  white-space: nowrap;
}

.learning-paths .mode-grid,
.learning-paths .path-card .mode-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
}

.learning-paths .mode-card,
.learning-paths .path-card .mode-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding-inline: 8px;
  text-align: center;
}

.learning-paths .mode-copy {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.learning-paths .mode-copy strong {
  line-height: 1.2;
}

.learning-paths .path-start-button {
  position: relative;
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding-inline: 56px;
  text-align: center;
}

.learning-paths .path-start-button > span:last-child {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.library-kind-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 720px);
}

.library-kind-tab {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.library-kind-tab > span {
  display: block;
  width: 100%;
  text-align: center;
}

.weakness-scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 330px);
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.weakness-scope button {
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.weakness-scope button.active {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 4px 12px rgba(23, 45, 77, .14);
}

body.dark .weakness-scope {
  border-color: var(--line);
}

@media (max-width: 600px) {
  .learning-paths .path-card h2 {
    font-size: 28px;
    line-height: 1.18;
  }

  .learning-paths .mode-card,
  .learning-paths .path-card .mode-card {
    min-height: 52px;
    font-size: 12px;
  }

  .library-kind-tab {
    min-height: 50px;
    padding-inline: 8px;
  }
}

@media (max-width: 380px) {
  .learning-paths .path-card h2 {
    font-size: 25px;
  }

  .learning-paths .mode-card,
  .learning-paths .path-card .mode-card {
    padding-inline: 4px;
    font-size: 11px;
  }

  .weakness-scope button {
    padding-inline: 4px;
    font-size: 8px;
  }
}
