:root {
  --lp-ink:#1f3938;
  --lp-muted:#5d706d;
  --lp-line:#e2e8df;
  --lp-paper:#fffefa;
  --lp-bg:#f7f7f1;
  --lp-green:#286b5c;
  --lp-green-dark:#1d574c;
  --lp-lime:#dce88a;
  --lp-shadow:0 8px 24px rgba(28,65,54,.06);
  --ink:var(--lp-ink);
  --muted:var(--lp-muted);
  --line:var(--lp-line);
  --paper:var(--lp-paper);
  --bg:var(--lp-bg);
  --purple:var(--lp-green);
  --purple-dark:var(--lp-green-dark);
  --lav:#eef3e9;
  --peach:#fff2e8;
  --mint:#eaf3ec;
  --shadow:var(--lp-shadow);
  color-scheme:light;
}
*,*::before,*::after {box-sizing:border-box;}
html {scroll-behavior:smooth;scroll-padding-top:96px;}
body.lingua-body {min-width:320px;margin:0;background:var(--lp-bg);color:var(--lp-ink);font:400 16px/1.6 Inter,"Segoe UI",Arial,sans-serif;}
body.lingua-body :where(h1,h2,h3,h4,h5,h6,.brand,.stat-card strong,.panel-heading h2,.content-card h2,.practice-start h1,.auth-card h1,.empty-state h2,.empty-state b) {font-family:Inter,"Segoe UI",Arial,sans-serif;}
body.lingua-body :where(p,li,dd,dt,label,legend,input,select,textarea,button) {font-family:Inter,"Segoe UI",Arial,sans-serif;}
body.lingua-body :where(p,li) {line-height:1.65;}
body.lingua-body :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible {outline:3px solid #91a833;outline-offset:3px;}
.skip-link {position:fixed;top:8px;left:8px;z-index:1000;transform:translateY(-160%);padding:10px 14px;border-radius:9px;background:#183b43;color:#fff;font-size:14px;font-weight:700;}
.skip-link:focus {transform:translateY(0);}
.topbar {position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:68px;height:auto;padding:10px clamp(16px,4vw,48px);border-bottom:1px solid var(--lp-line);background:rgba(255,254,250,.97);box-shadow:0 2px 12px rgba(28,65,54,.035);backdrop-filter:blur(12px);}
.brand {display:inline-flex;align-items:center;gap:10px;min-width:0;color:var(--lp-ink);font-size:19px;font-weight:800;letter-spacing:-.55px;white-space:nowrap;}
.brand-icon {display:grid;flex:none;width:34px;height:34px;place-items:center;border:1px solid #d5dfb1;border-radius:11px;background:var(--lp-lime);color:#29483d;font-size:17px;font-weight:800;}
.account {display:flex;align-items:center;justify-content:flex-end;gap:15px;min-width:0;color:var(--lp-muted);font-size:14px;}
.account form {flex:none;margin:0;}
.account-name {max-width:min(26vw,230px);overflow:hidden;color:#36544d;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}
.text-button {display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 10px;border:0;border-radius:9px;background:transparent;color:var(--lp-green-dark);font-size:14px;font-weight:700;cursor:pointer;}
.text-button:hover {background:#eef3e9;}
.guest-nav {display:flex;align-items:center;gap:clamp(12px,2.5vw,28px);}
.guest-nav>a:not(.button) {color:#49635e;font-size:14px;font-weight:600;}
.guest-nav>a:not(.button):hover {color:var(--lp-green);}
.guest-nav .header-cta {min-height:42px;padding:9px 15px;}
.lingua-shell {display:grid;grid-template-columns:248px minmax(0,1fr);align-items:start;max-width:1600px;min-height:calc(100vh - 68px);margin:0 auto;}
.lingua-shell.is-guest {display:block;max-width:none;}
.app-sidebar {position:sticky;top:68px;display:flex;flex-direction:column;gap:12px;height:calc(100vh - 68px);min-height:540px;overflow-y:auto;padding:25px 15px 20px 22px;border-right:1px solid var(--lp-line);background:#fbfbf6;}
.sidebar-caption {padding:4px 11px;color:#6a7e72;font-size:11px;font-weight:800;letter-spacing:.9px;}
.app-sidebar__nav {display:grid;gap:4px;}
.app-sidebar__link {display:flex;align-items:center;gap:11px;min-height:46px;padding:8px 11px;border:1px solid transparent;border-radius:10px;color:#526a65;font-size:14px;font-weight:600;transition:background-color .15s ease,color .15s ease,border-color .15s ease;}
.app-sidebar__link:hover {border-color:#e1e9dc;background:#f3f6ed;color:var(--lp-green-dark);}
.app-sidebar__link.is-active {border-color:#d7e3d2;background:#eaf1e6;color:#1d584c;font-weight:700;}
.app-sidebar__link[aria-current="page"] .nav-mark {background:#dce88a;color:#254c3e;}
.nav-mark {display:grid;flex:none;width:29px;height:29px;place-items:center;border-radius:9px;background:#f0f2e9;color:#567367;font-size:12px;font-weight:800;}
.sidebar-divider {height:1px;margin:4px 10px;background:#e6ebe3;}
.sidebar-note {display:grid;gap:3px;margin:auto 4px 0;padding:13px;border:1px solid #e2e8d4;border-radius:12px;background:#f3f5e9;color:#3d5b4c;}
.sidebar-note strong {font-size:13px;}
.sidebar-note span {color:#607268;font-size:12px;line-height:1.5;}
.lingua-workspace {display:flex;flex-direction:column;min-width:0;min-height:calc(100vh - 68px);}
.page.app-main {width:100%;max-width:1440px;min-height:calc(100vh - 132px);margin:0 auto;padding:34px clamp(20px,3vw,48px) 56px;}
.is-guest .page.app-main {max-width:1240px;padding-top:38px;}
.footer {display:flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:12px 20px;border-top:1px solid var(--lp-line);color:#657771;font-size:13px;}
.footer span:first-child {color:#395a4e;font-weight:700;}
.mobile-nav {display:none;}
.page-heading {margin:0 0 23px;}
.page-heading .eyebrow,.practice-head>.eyebrow,.eyebrow {color:#527d63;}
body.lingua-body .eyebrow {font-size:12px;letter-spacing:.7px;}
.page-heading h1,.practice-head h1 {color:var(--lp-ink);font-size:clamp(30px,3.8vw,42px);font-weight:800;letter-spacing:-1.35px;line-height:1.15;}
.page-heading p,.practice-head p,.welcome p {max-width:820px;color:#566b68;font-size:16px;line-height:1.7;}
.panel,.stat-card,.content-card,.question-card,.explanation-card,.tutor-card,.auth-card,.flash-card,.mistake-result-card,.mistake-retry-panel {border-color:var(--lp-line);box-shadow:var(--lp-shadow);}
.panel {border-radius:16px;background:var(--lp-paper);}
.panel-heading h2 {color:var(--lp-ink);font-weight:700;letter-spacing:-.35px;}
.button {min-height:44px;padding:10px 17px;border-radius:10px;font-size:14px;font-weight:700;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease;}
.button:hover {transform:translateY(-1px);}
.button.primary,.primary {background:var(--lp-green);color:#fff;box-shadow:0 5px 14px rgba(40,107,92,.16);}
.button.primary:hover,.primary:hover {background:var(--lp-green-dark);}
.button.secondary,.secondary {border:1px solid #dbe4db;background:#fff;color:#35584f;}
.button.secondary:hover,.secondary:hover {border-color:#b8cbb5;background:#f5f8f2;}
.button:disabled {cursor:not-allowed;opacity:.7;}
.subtle-link {color:var(--lp-green-dark);font-weight:700;}
.subtle-link:hover {color:#184b41;}
.hero {border:1px solid #e0e8d1;border-radius:24px;background:linear-gradient(120deg,#eff3e5,#f6f6e9 60%,#eaf2e9);}
.hero h1,.welcome h1 {color:var(--lp-ink);font-family:Inter,"Segoe UI",Arial,sans-serif;letter-spacing:-1.8px;}
.hero h1 em {color:var(--lp-green);}
.hero-copy>p {color:#526965;}
.orb {background:#e4ebd2;}
.book-card {box-shadow:0 15px 35px rgba(38,82,65,.13);}
.book-label,.eyebrow {color:#547c63;}
.book-card h2 {font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--lp-ink);}
.hero-note,.muted,.field-help {color:#657771;}
.feature-row article {border-color:var(--lp-line);background:#fffefa;}
.feature-row article>span {color:var(--lp-green);}
.feature-row article p {color:#5b706b;}
.form-stack label,.tutor-form>label,.form-stack legend {color:#354f49;font-size:14px;font-weight:700;}
body.lingua-body :where(.form-stack input,.form-stack select,.form-stack textarea,.mistake-review-form select,.mistake-review-form textarea,.level-filter select,.practice-list-filter input,.practice-list-filter select,.tutor-form textarea) {max-width:100%;border:1px solid #d6e0d8;border-radius:10px;background:#fffefa;color:#233d3a;font-size:15px;}
body.lingua-body :where(.form-stack input,.form-stack select,.mistake-review-form select,.level-filter select,.practice-list-filter input,.practice-list-filter select) {min-height:44px;padding:9px 12px;}
body.lingua-body :where(.form-stack textarea,.mistake-review-form textarea,.tutor-form textarea) {padding:12px;}
body.lingua-body :where(input,select,textarea)::placeholder {color:#71817b;opacity:1;}
body.lingua-body :where(input,select,textarea):focus-visible {border-color:#588b78;box-shadow:0 0 0 3px rgba(40,107,92,.12);}
.auth-wrap {min-height:62vh;}
.auth-card {border-color:var(--lp-line);border-radius:18px;background:var(--lp-paper);box-shadow:var(--lp-shadow);}
.auth-card h1 {color:var(--lp-ink);font-family:Inter,"Segoe UI",Arial,sans-serif;}
.auth-foot a {color:var(--lp-green-dark);font-weight:700;}
.messages {display:grid;gap:8px;margin:0 0 18px;}
.message {padding:12px 15px;border:1px solid #d9e6d5;border-radius:10px;background:#f0f6eb;color:#315942;font-size:14px;}
.message.error,.message.warning {border-color:#ead4bc;background:#fff5e8;color:#744c30;}
.message.success {border-color:#cce0ca;background:#edf7eb;color:#2d6543;}
.noscript-note {position:fixed;right:12px;bottom:12px;z-index:30;max-width:min(440px,calc(100% - 24px));padding:12px 16px;border-radius:10px;background:#183b43;color:#fff;font-size:14px;}
.lingua-body .rate {display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;width:100%;padding:9px 8px;border:1px solid rgba(47,80,63,.1);font-size:13px;line-height:1.35;text-align:center;white-space:normal;}
.lingua-body .rating-row {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));gap:8px;}
.lingua-body .task-link {display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:9px 12px;color:var(--lp-green-dark);font-size:14px;line-height:1.35;white-space:normal;}
.lingua-body .activity-helper {font-size:13px;line-height:1.55;}
body.lingua-body .activity-count-key,body.lingua-body .activity-day-label,body.lingua-body .activity-day-count {font-size:12px;line-height:1.35;white-space:normal;}
body.lingua-body .activity-totals span,body.lingua-body .activity-streak>span {font-size:12px;}
.lingua-body .skill-table th,.lingua-body .skill-table td {font-size:13px;}
.lingua-body .skill-table thead th {font-size:12px;}
.lingua-body .skill-table tbody th {font-size:14px;}
.lingua-body .skill-insufficient {font-size:12px;}
.lingua-body .skill-practice-link {display:inline-flex;align-items:center;min-height:44px;padding:7px 4px;font-size:13px;}
.lingua-body .library-exam,.lingua-body .skill-tag,.lingua-body .level-tag {font-size:12px;}
.lingua-body .library-description {font-size:14px;}
.lingua-body .library-card-meta {font-size:13px;}
.lingua-body .library-card-cta {min-height:44px;font-size:14px;}
@media(max-width:1050px) {
  .lingua-shell {grid-template-columns:218px minmax(0,1fr);}
  .app-sidebar {padding-right:11px;padding-left:15px;}
  .page.app-main {padding-right:25px;padding-left:25px;}
}
@media(max-width:860px) {
  .lingua-shell {display:block;min-height:calc(100vh - 68px);}
  .app-sidebar {display:none;}
  .lingua-workspace {min-height:calc(100vh - 68px);}
  .mobile-nav {position:relative;z-index:10;display:block;margin:12px 16px 0;border:1px solid var(--lp-line);border-radius:12px;background:#fffefa;box-shadow:0 3px 12px rgba(28,65,54,.04);}
  .mobile-nav summary {display:flex;align-items:center;gap:10px;min-height:48px;padding:9px 13px;color:#35584f;font-size:14px;font-weight:700;list-style:none;cursor:pointer;}
  .mobile-nav summary::-webkit-details-marker {display:none;}
  .mobile-nav-summary-icon {font-size:18px;}
  .mobile-nav-chevron {margin-left:auto;color:#5d766b;transition:transform .15s ease;}
  .mobile-nav[open] .mobile-nav-chevron {transform:rotate(180deg);}
  .mobile-nav__links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:0 10px 10px;border-top:1px solid #edf0e9;}
  .mobile-nav__links a {display:flex;align-items:center;min-height:42px;padding:8px 10px;border-radius:8px;color:#526a65;font-size:14px;font-weight:600;}
  .mobile-nav__links a[aria-current="page"] {background:#eaf1e6;color:#1d584c;font-weight:700;}
}
@media(max-width:620px) {
  .topbar {min-height:60px;padding:8px 13px;gap:10px;}
  .brand {gap:7px;font-size:17px;}
  .brand-icon {width:31px;height:31px;}
  .account {gap:4px;font-size:13px;}
  .account-name {max-width:28vw;font-size:13px;}
  .account .text-button {min-height:40px;padding:7px 8px;font-size:13px;}
  .guest-nav {gap:8px;}
  .guest-nav>a:not(.button) {font-size:13px;}
  .guest-nav .header-cta {min-height:40px;padding:8px 10px;font-size:13px;}
  .page.app-main,.is-guest .page.app-main {min-height:calc(100vh - 112px);padding:24px 16px 42px;}
  .mobile-nav {margin:10px 12px 0;}
  .page-heading h1,.practice-head h1 {font-size:clamp(28px,8vw,36px);letter-spacing:-1px;}
  .page-heading p,.practice-head p,.welcome p {font-size:15px;}
  .button {min-height:44px;}
  .footer {flex-wrap:wrap;text-align:center;font-size:12px;}
  .hero {grid-template-columns:1fr;min-height:0;padding:38px 23px;border-radius:19px;}
  .hero-art {min-height:310px;}
}
@media(max-width:390px) {
  .topbar {padding-right:9px;padding-left:9px;}
  .brand {font-size:16px;}
  .account-name {display:none;}
  .topbar.guest-topbar {display:grid;grid-template-columns:1fr;gap:5px;padding-top:8px;padding-bottom:8px;}
  .guest-nav {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);width:100%;gap:7px;}
  .guest-nav>a[href*="#how-it-works"] {display:none;}
  .guest-nav>a[href*="login"] {display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 9px;border:1px solid var(--lp-line);border-radius:9px;font-size:13px;}
  .guest-nav .header-cta {width:100%;padding:7px 8px;font-size:13px;}
  .mobile-nav__links {grid-template-columns:1fr;}
}
@media(prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto;}
  *,*::before,*::after {scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important;}
}

/* Secondary tools stay reachable without crowding the first visit. */
.header-help {display:inline-flex;align-items:center;min-height:44px;color:#5269ac;font-size:12px;font-weight:650;white-space:nowrap;}
.sidebar-discovery {margin-top:6px;}
.sidebar-discovery>summary {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:10px 11px;border:1px solid #e1e8f7;border-radius:10px;background:#f8faff;color:#526b9e;font-size:12px;font-weight:650;list-style:none;cursor:pointer;}
.sidebar-discovery>summary::-webkit-details-marker {display:none;}
.sidebar-discovery[open]>summary {margin-bottom:10px;}
.sidebar-discovery[open]>summary>span:last-child {transform:rotate(45deg);}
.sidebar-discovery .sidebar-divider {margin-top:15px;}
.sidebar-help {min-height:68px;}
.lingua-body .sidebar-help {background:linear-gradient(125deg,#f0f5ff,#fff8ed);border-color:#e0e8fa;}
.lingua-body .sidebar-help strong {color:#4b6198;}
.lingua-body .sidebar-help span {color:#62718a;}
.mobile-nav__links>.mobile-discovery {grid-column:1/-1;min-width:0;}
.mobile-discovery>summary {display:flex;justify-content:space-between;align-items:center;min-height:44px;padding:10px 12px;border:1px solid #e0e8f7;border-radius:9px;background:#f7faff;color:#52699d;font-size:13px;font-weight:650;cursor:pointer;list-style:none;}
.mobile-discovery>summary::-webkit-details-marker {display:none;}
.mobile-discovery>div {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px;}
@media(max-width:900px) {.header-help {display:none;}}
@media(max-width:400px) {.mobile-discovery>div {grid-template-columns:1fr;}}
