.language-workspace { max-width: 72rem; margin: 0 auto; color: #e2e8f0; }
.language-workspace h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; }
.language-workspace h2 { font-size: 1.25rem; font-weight: 650; }
.language-workspace h3, .language-workspace h4 { font-weight: 650; line-height: 1.5; }
.language-workspace h3 { font-size: 1.1rem; }
.language-review-steps { list-style: decimal; padding-left: 1.4rem; line-height: 1.65; }
.language-review-steps li { padding-left: .2rem; margin: .5rem 0; }
.language-workspace p { max-width: 70ch; margin: .6rem 0; line-height: 1.65; }
.language-workspace a { color: #67e8f9; text-decoration: underline; text-underline-offset: .2em; }
.language-course-links { display: flex; flex-wrap: wrap; gap: .65rem 1rem; padding: 1rem 0; }
.language-course-links [aria-current] { font-weight: 750; text-decoration-thickness: 3px; }
.language-panel { background: var(--reading-surface, var(--space-void)); border: 1px solid #64748b; border-radius: .9rem; padding: 1.2rem; margin: 1rem 0; }
.language-workspace summary { cursor: pointer; font-weight: 650; min-height: 2rem; }
.language-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 1rem 0; }
.language-fields label { display: grid; gap: .35rem; }
.language-workspace input, .language-workspace select, .language-workspace button { background: var(--reading-surface, var(--space-void)); color: inherit; border: 1px solid #64748b; border-radius: .4rem; padding: .6rem; min-height: 44px; max-width: 100%; }
.language-workspace button { cursor: pointer; }
.language-workspace :focus-visible { outline: 3px solid #22d3ee; outline-offset: 3px; }
.language-units { list-style: decimal inside; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.language-units .language-panel { margin: 0; overflow-wrap: anywhere; }
html[data-theme="light"] .language-workspace { color: #172033; }
html[data-theme="light"] .language-workspace a { color: #075985; }
html[data-theme="light"] .language-panel,
html[data-theme="light"] .language-workspace input,
html[data-theme="light"] .language-workspace select,
html[data-theme="light"] .language-workspace button { background: #fff; border-color: #64748b; }
.language-panel[hidden], .language-workspace [hidden] { display: none !important; }

.language-workspace textarea { display: block; width: 100%; min-height: 7rem; background: var(--reading-surface, var(--space-void)); color: inherit; border: 1px solid #64748b; border-radius: .4rem; padding: .6rem; font-size: 1rem; }
html[data-theme="light"] .language-workspace textarea { background: #fff; }

/* ── .lw: the site look for /languages and /english/review-saved (glass panels, pill
   buttons, accent tabs). Scoped `.language-workspace.lw` so it outranks the plain rules
   above, which /languages/quality and /languages/teacher still use. ── */
.language-workspace.lw { --lw-rgb: 56,189,248; max-width: 64rem; }
.language-workspace.lw a { text-decoration: none; color: rgb(var(--lw-rgb)); }
.language-workspace.lw a:hover { text-decoration: underline; text-underline-offset: .2em; }
.language-workspace.lw p { margin: .35rem 0; }
.lw .lw-back { font-size: .875rem; margin-bottom: 1rem; }
.lw .site-hero { margin-bottom: 1.5rem; }

.language-workspace.lw .lw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.5rem; padding: .45rem 1.1rem; border-radius: 9999px; cursor: pointer;
  font-weight: 600; font-size: .9rem; text-decoration: none;
  color: #e0f2fe; background: rgba(var(--lw-rgb), .22); border: 1px solid rgba(var(--lw-rgb), .5);
  transition: background .15s, transform .15s;
}
.language-workspace.lw .lw-btn:hover { background: rgba(var(--lw-rgb), .34); text-decoration: none; transform: translateY(-1px); }
.language-workspace.lw .lw-btn:disabled { opacity: .45; cursor: default; transform: none; }
.language-workspace.lw .lw-btn-ghost { background: rgba(148, 163, 184, .08); border-color: rgba(148, 163, 184, .3); color: #cbd5e1; }
.language-workspace.lw .lw-btn-ghost:hover { background: rgba(148, 163, 184, .16); }
.language-workspace.lw .lw-btn-danger { background: rgba(244, 63, 94, .08); border-color: rgba(244, 63, 94, .35); color: #fda4af; }

.language-workspace.lw input, .language-workspace.lw select, .language-workspace.lw textarea {
  background: rgba(2, 6, 23, .55); border: 1px solid rgba(148, 163, 184, .28); border-radius: .7rem;
  padding: .5rem .75rem; min-height: 2.5rem; color: inherit; font: inherit; font-size: .95rem;
}
.language-workspace.lw input:focus, .language-workspace.lw select:focus, .language-workspace.lw textarea:focus { border-color: rgba(var(--lw-rgb), .7); outline: none; box-shadow: 0 0 0 3px rgba(var(--lw-rgb), .18); }

.lw .lw-panel, .lw .lw-card {
  background: linear-gradient(160deg, rgba(var(--lw-rgb), .07), rgba(255, 255, 255, .02) 60%);
  border: 1px solid rgba(148, 163, 184, .16); border-radius: 1.25rem; padding: 1.25rem;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .10), 0 12px 30px -20px rgba(0, 0, 0, .8);
  margin: 1rem 0;
}
.lw .lw-kicker { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--lw-rgb)); }
.lw .lw-muted { color: #94a3b8; }
.lw .lw-small { font-size: .82rem; }
.lw .lw-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .75rem; }
.lw .lw-select { display: inline-flex; align-items: center; gap: .5rem; color: #94a3b8; font-size: .875rem; }
.lw .lw-details > summary { cursor: pointer; font-weight: 650; color: #e2e8f0; list-style-position: inside; }
.lw .lw-details[open] > summary { margin-bottom: .6rem; }

/* course tabs */
.lw .lw-tabs { display: flex; flex-direction: column; gap: .6rem; margin: 0 0 1.25rem; }
.lw .lw-tab-group { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.lw .lw-tab-label { min-width: 4.5rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #64748b; }
.language-workspace.lw .lw-tab { padding: .3rem .8rem; border-radius: 9999px; font-size: .85rem; color: #cbd5e1; border: 1px solid rgba(148, 163, 184, .22); background: rgba(148, 163, 184, .05); }
.language-workspace.lw .lw-tab:hover { text-decoration: none; border-color: rgba(var(--lw-rgb), .5); color: #f1f5f9; }
.language-workspace.lw .lw-tab[aria-current] { color: #e0f2fe; background: rgba(var(--lw-rgb), .22); border-color: rgba(var(--lw-rgb), .6); font-weight: 650; }
.lw .lw-note-line { color: #94a3b8; font-size: .85rem; max-width: 70ch; }

.lw .lw-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.lw .lw-grid > .lw-panel { margin: 0; }
.lw .lw-today { --lw-rgb: 52,211,153; }
.lw .lw-today-unit { font-family: var(--font-display, inherit); font-size: 1.15rem; font-weight: 650; color: #f1f5f9; line-height: 1.45; }
.lw .lw-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.lw .lw-fields label { display: grid; gap: .3rem; font-size: .8rem; color: #94a3b8; }
.lw .lw-fields input, .lw .lw-fields select { width: 100%; min-width: 0; box-sizing: border-box; }
.lw .lw-fields label { min-width: 0; }

/* units */
.lw .lw-units-wrap { margin-top: 2rem; }
.lw .lw-units-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.lw .lw-units-head h2 { font-family: var(--font-display, inherit); font-size: 1.35rem; }
.lw .lw-units { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.lw .lw-unit { display: flex; gap: .8rem; padding: .9rem 1rem; border-radius: 1rem; border: 1px solid rgba(148, 163, 184, .16); background: rgba(255, 255, 255, .025); overflow-wrap: anywhere; transition: border-color .15s; }
.lw .lw-unit:hover { border-color: rgba(var(--lw-rgb), .45); }
.lw .lw-unit[hidden] { display: none !important; }
.lw .lw-unit-n { flex-shrink: 0; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .6rem; font-size: .8rem; font-weight: 700; color: rgb(var(--lw-rgb)); background: rgba(var(--lw-rgb), .14); }
.lw .lw-unit-body { min-width: 0; flex: 1; }
.language-workspace.lw .lw-unit-title { color: #f1f5f9; font-weight: 650; line-height: 1.4; }
.lw .lw-unit-meta { color: #94a3b8; font-size: .78rem; margin: .2rem 0; }
.lw .lw-unit-obj { color: #cbd5e1; font-size: .82rem; line-height: 1.5; }
.lw .lw-unit-status { color: #6ee7b7; font-size: .78rem; }
.lw .lw-unit-status:empty { display: none; }
.lw .lw-unit-actions { display: flex; gap: .9rem; align-items: center; font-size: .78rem; margin-top: .4rem; }
.language-workspace.lw .lw-unit-actions button { min-height: 0; padding: 0; border: 0; background: none; color: #94a3b8; font-size: .78rem; cursor: pointer; }
.language-workspace.lw .lw-unit-actions button:hover { color: #f1f5f9; }
.lw .lw-footer-links { margin-top: 2rem; font-size: .82rem; color: #64748b; }

/* saved-card review */
.lw .lw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.lw .lw-status { color: #94a3b8; font-size: .9rem; margin-top: .75rem; }
.lw .lw-cards { display: grid; gap: 1rem; margin-top: .5rem; }
.lw .lw-cards .lw-card { margin: 0; }
.lw .lw-cards:not(:empty) ~ .lw-empty { display: none; }
.lw .lw-empty { max-width: 46rem; }
.lw .lw-words { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.language-workspace.lw .lw-words a { display: inline-flex; align-items: baseline; gap: .35rem; padding: .3rem .8rem; border-radius: 9999px; border: 1px solid rgba(var(--lw-rgb), .3); background: rgba(var(--lw-rgb), .08); font-weight: 600; }
.language-workspace.lw .lw-words a:hover { background: rgba(var(--lw-rgb), .18); text-decoration: none; }
.lw .lw-words small { color: #cbd5e1; font-weight: 400; }
.lw .lw-card-kicker { margin: 0; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; }
.lw .lw-card-meaning { font-size: 1.6rem; font-weight: 700; color: rgb(var(--lw-rgb)); margin: .2rem 0 .8rem; }
.lw .lw-answer { display: flex; flex-wrap: wrap; gap: .5rem; }
.lw .lw-answer input { flex: 1 1 14rem; }
.lw .lw-feedback { font-size: .9rem; color: #cbd5e1; }
.lw .lw-feedback:empty { display: none; }
.lw .lw-model { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgba(148, 163, 184, .16); }
.lw .lw-expression { font-family: var(--font-display, inherit); font-size: 1.3rem; font-weight: 700; color: #f1f5f9; }
.lw .lw-example { font-size: 1.02rem; color: #e2e8f0; }
.lw .lw-translation { color: #cbd5e1; }
.lw .lw-meta { color: #94a3b8; font-size: .85rem; }
.lw .lw-meta:empty { display: none; }
.lw .lw-produce { display: grid; gap: .35rem; margin-top: .9rem; font-size: .85rem; color: #94a3b8; }
.lw .lw-hint { color: #94a3b8; font-size: .82rem; }
.lw .lw-pager { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; color: #94a3b8; font-size: .85rem; }
.lw .lw-pager[hidden] { display: none; }
.lw .lw-note { margin-top: 2rem; color: #94a3b8; font-size: .875rem; max-width: 46rem; }
.lw .lw-note > summary { cursor: pointer; color: #cbd5e1; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .language-workspace.lw .lw-btn { transition: none; } }

/* ▼▼ LIGHT THEME — GENERATED by scripts/build_light_theme.py from the rules above. Do not edit by hand: run the builder. Hand tuning goes in 36-theme-light.css. ▼▼ */
html[data-theme="light"] .language-workspace{color:rgb(44 63 88)}
html[data-theme="light"] .language-workspace a{color:rgb(2 111 126)}
html[data-theme="light"] .language-panel{border-color:rgb(116 132 155)}
html[data-theme="light"] .language-workspace input,html[data-theme="light"] .language-workspace select,html[data-theme="light"] .language-workspace button{border-color:rgb(116 132 155)}
html[data-theme="light"] .language-workspace textarea{border-color:rgb(116 132 155)}
html[data-theme="light"] .language-workspace.lw a{color:color-mix(in srgb,rgb(var(--lw-rgb)) 44%,#0f172a)}
html[data-theme="light"] .language-workspace.lw .lw-btn{color:rgb(1 79 132)}
html[data-theme="light"] .language-workspace.lw .lw-btn-ghost{color:rgb(48 65 85)}
html[data-theme="light"] .language-workspace.lw .lw-btn-danger{color:rgb(133 0 16)}
html[data-theme="light"] .language-workspace.lw input,html[data-theme="light"] .language-workspace.lw select,html[data-theme="light"] .language-workspace.lw textarea{background-color:rgb(250 251 252/0.55)}
html[data-theme="light"] .language-workspace.lw input:focus,html[data-theme="light"] .language-workspace.lw select:focus,html[data-theme="light"] .language-workspace.lw textarea:focus{box-shadow:0px 0px 0px 3px color-mix(in srgb,rgba(var(--lw-rgb), .18) 62%,#0f172a)}
html[data-theme="light"] .lw .lw-panel,html[data-theme="light"] .lw .lw-card{background-image:linear-gradient(160deg, rgba(var(--lw-rgb), .07), rgb(15 23 42/0.02) 60%);box-shadow:0px 12px 30px -20px rgb(15 23 42/0.2)}
html[data-theme="light"] .lw .lw-kicker{color:color-mix(in srgb,rgb(var(--lw-rgb)) 44%,#0f172a)}
html[data-theme="light"] .lw .lw-muted{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-select{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-details > summary{color:rgb(44 63 88)}
html[data-theme="light"] .lw .lw-tab-label{color:rgb(87 101 122)}
html[data-theme="light"] .language-workspace.lw .lw-tab{color:rgb(48 65 85)}
html[data-theme="light"] .language-workspace.lw .lw-tab:hover{color:rgb(38 66 94)}
html[data-theme="light"] .language-workspace.lw .lw-tab[aria-current]{color:rgb(1 79 132)}
html[data-theme="light"] .lw .lw-note-line{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-today-unit{color:rgb(38 66 94)}
html[data-theme="light"] .lw .lw-fields label{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-unit{background-color:rgb(15 23 42/0.025)}
html[data-theme="light"] .lw .lw-unit-n{color:color-mix(in srgb,rgb(var(--lw-rgb)) 44%,#0f172a)}
html[data-theme="light"] .language-workspace.lw .lw-unit-title{color:rgb(38 66 94)}
html[data-theme="light"] .lw .lw-unit-meta{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-unit-obj{color:rgb(48 65 85)}
html[data-theme="light"] .lw .lw-unit-status{color:rgb(16 111 73)}
html[data-theme="light"] .language-workspace.lw .lw-unit-actions button{color:rgb(61 75 94)}
html[data-theme="light"] .language-workspace.lw .lw-unit-actions button:hover{color:rgb(38 66 94)}
html[data-theme="light"] .lw .lw-footer-links{color:rgb(87 101 122)}
html[data-theme="light"] .lw .lw-status{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-words small{color:rgb(48 65 85)}
html[data-theme="light"] .lw .lw-card-kicker{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-card-meaning{color:color-mix(in srgb,rgb(var(--lw-rgb)) 44%,#0f172a)}
html[data-theme="light"] .lw .lw-feedback{color:rgb(48 65 85)}
html[data-theme="light"] .lw .lw-expression{color:rgb(38 66 94)}
html[data-theme="light"] .lw .lw-example{color:rgb(44 63 88)}
html[data-theme="light"] .lw .lw-translation{color:rgb(48 65 85)}
html[data-theme="light"] .lw .lw-meta{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-produce{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-hint{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-pager{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-note{color:rgb(61 75 94)}
html[data-theme="light"] .lw .lw-note > summary{color:rgb(48 65 85)}
/* ▲▲ LIGHT THEME END ▲▲ */
