:root {
  --green: #174b3e;
  --ink: #243e35;
  --muted: #788379;
  --line: #e2e8df;
  --paper: #f8f9f5;
  --lime: #e2edb8;
  --white: #fff;
  --orange: #edb16e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #dc9b45;
  outline-offset: 4px;
}
a {
  color: inherit;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 37px 25px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  font-weight: 750;
  font-size: 22px;
  letter-spacing: -1px;
}
.brand-mark {
  display: grid;
  place-items: center;
  position: relative;
  width: 42px;
  height: 45px;
  background: var(--green);
  border-radius: 13px;
  color: #fff;
  font: bold 39px Georgia;
}
.brand-mark span {
  position: absolute;
  bottom: -5px;
  right: 4px;
  color: var(--lime);
}
.brand small {
  display: block;
  font-size: 7px;
  letter-spacing: 1.5px;
  margin-top: 6px;
  color: var(--muted);
}
nav {
  margin-top: 60px;
  display: grid;
  gap: 12px;
}
.nav {
  border: 0;
  background: none;
  padding: 15px 16px;
  color: #738076;
  text-align: left;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 20px;
}
.nav span {
  font-size: 14px;
  font-weight: 600;
}
.nav.active {
  background: #edf3e8;
  color: var(--green);
}
.sidebar-note {
  margin-top: auto;
  padding: 25px 13px;
}
.sidebar-note p {
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-line;
}
.leaf {
  font-size: 35px;
  color: #7f9e62;
}
.sidebar-note small {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #869286;
}
.workspace {
  margin-left: 240px;
  flex: 1;
  min-width: 0;
}
header {
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 5.5%;
  background: #ffffff80;
  gap: 12px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.xp-pill {
  white-space: nowrap;
  color: #95712c;
  font-size: 13px;
}
.xp-pill b {
  color: var(--ink);
  margin-left: 3px;
}
.button {
  border: 0;
  background: var(--green);
  color: white;
  padding: 15px 23px;
  border-radius: 11px;
  font-weight: 650;
  box-shadow: 0 3px 0 #0e3329;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  text-decoration: none;
}
.button:hover {
  background: #225e4d;
}
.button.small {
  font-size: 12px;
  padding: 11px 17px;
  box-shadow: none;
}
.button.light {
  background: #edf3e8;
  color: var(--green);
  box-shadow: none;
}
.button.secondary {
  background: white;
  color: var(--green);
  border: 1px solid var(--line);
  box-shadow: none;
}
.text-button {
  background: none;
  border: 0;
  color: var(--green);
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 13px;
}
main {
  max-width: 1250px;
  margin: 0 auto;
  padding: 40px 5.5% 30px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #6e8376;
}
.welcome {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 27px;
  gap: 20px;
}
.welcome h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 10px 0 9px;
  line-height: 1.3;
}
.welcome p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.date-badge {
  font-size: 10px;
  letter-spacing: 1.1px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 10px 13px;
  white-space: nowrap;
  background: white;
}
.hero {
  background: #eaf0df;
  border: 1px solid #e0e8d4;
  border-radius: 22px;
  padding: 34px 37px;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  position: relative;
  overflow: hidden;
  min-height: 270px;
}
.hero h2 {
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 15px 0;
}
.hero p {
  font-size: 13px;
  line-height: 1.8;
  max-width: 340px;
  color: #5d7160;
  margin-bottom: 23px;
}
.hero .eyebrow {
  color: #54714d;
}
.hero .button {
  font-size: 13px;
}
.hero-art {
  width: 100%;
  height: 230px;
  align-self: center;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 26px;
  margin-top: 31px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}
.section-heading h2 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.3px;
}
.section-heading small {
  font-size: 11px;
  color: var(--muted);
}
.lesson-list {
  display: grid;
  gap: 12px;
}
.lesson-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 19px;
  display: flex;
  gap: 16px;
  align-items: center;
  text-align: left;
  width: 100%;
  color: var(--ink);
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.lesson-card:hover {
  transform: translateY(-2px);
  border-color: #8aaa78;
}
.lesson-icon {
  height: 47px;
  width: 47px;
  border-radius: 13px;
  background: #f2f4e9;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #537947;
  font-weight: 700;
  flex-shrink: 0;
}
.lesson-card:nth-child(2) .lesson-icon {
  background: #fff2df;
  color: #bc8a45;
}
.lesson-card:nth-child(3) .lesson-icon {
  background: #eaf0f8;
  color: #6d8aa0;
}
.lesson-info {
  flex: 1;
  min-width: 0;
}
.lesson-info h3 {
  font-size: 14px;
  margin: 0 0 7px;
}
.lesson-info p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.lesson-status {
  font-size: 11px;
  color: #6d8271;
  white-space: nowrap;
}
.side-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  margin-bottom: 17px;
}
.side-card h3 {
  font-size: 14px;
  margin: 0 0 15px;
}
.side-card p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.goal-track {
  height: 7px;
  background: #edf0e9;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 18px;
}
.goal-track span {
  display: block;
  height: 100%;
  background: #8da56c;
  border-radius: 9px;
}
.goal-count {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}
.word {
  font:
    italic 25px Georgia,
    serif;
  margin: 14px 0 7px;
}
.word-translation {
  font-size: 13px;
  color: #537254;
}
.source-note {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 20px 0;
}
.source-note a {
  text-underline-offset: 3px;
}
.sync-banner {
  font-size: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px dashed #cfdbc7;
  border-radius: 12px;
  margin-top: 23px;
  color: #63745f;
  line-height: 1.7;
}
.sync-banner button {
  flex-shrink: 0;
}
.notice {
  padding: 15px;
  background: #fff2dd;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 15px;
}
.lesson-page {
  max-width: 750px;
  margin: auto;
}
.back {
  border: 0;
  background: none;
  color: #6c7d70;
  padding: 0;
  margin-bottom: 25px;
  font-size: 13px;
}
.lesson-page h1 {
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: -0.8px;
}
.theory {
  background: #edf2e4;
  border-radius: 18px;
  padding: 24px 28px;
  line-height: 1.9;
  margin: 25px 0;
}
.theory h2 {
  font-size: 17px;
  margin-top: 0;
}
.theory p {
  font-size: 15px;
}
.equation {
  font-family: Georgia, serif;
  font-size: 21px;
  text-align: center;
  padding: 20px;
  border: 1px solid #d4dfc5;
  background: #fff8;
  border-radius: 10px;
}
.quiz-progress {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 10px 0 25px;
}
.quiz-progress .goal-track {
  flex: 1;
  margin: 0;
}
.quiz-progress small {
  color: var(--muted);
  white-space: nowrap;
}
.question-card {
  background: white;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.question-card h2 {
  font-size: 23px;
  line-height: 1.6;
  margin: 12px 0 24px;
}
.choices {
  display: grid;
  gap: 12px;
}
.choice {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 14px;
  background: white;
  border: 1.5px solid var(--line);
  padding: 17px;
  border-radius: 12px;
  color: var(--ink);
  line-height: 1.6;
}
.choice span:first-child {
  background: #f1f3ec;
  border: 1px solid var(--line);
  height: 29px;
  width: 29px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
}
.choice.selected {
  border-color: var(--green);
  background: #edf4e8;
}
.choice.correct {
  border-color: #6f9d5a;
  background: #f1f7ec;
}
.choice.wrong {
  border-color: #d89680;
  background: #fff2ec;
}
.choice:disabled {
  opacity: 1;
}
.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 18px;
}
.quiz-actions small {
  font-size: 11px;
  color: var(--muted);
}
.feedback {
  border-radius: 12px;
  padding: 20px;
  background: #edf3e5;
  margin-top: 20px;
  line-height: 1.8;
  font-size: 14px;
}
.feedback.wrong {
  background: #fff0e6;
}
.feedback p {
  margin: 7px 0 0;
}
.result {
  text-align: center;
  padding: 36px 20px;
}
.result-symbol {
  width: 95px;
  height: 95px;
  background: var(--lime);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 45px;
  margin: 0 auto 22px;
}
.result h1 {
  font-size: 30px;
}
.result p {
  color: var(--muted);
  line-height: 1.8;
}
.score-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 27px 0;
}
.score-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 30px;
}
.score-box b {
  display: block;
  font-size: 27px;
  margin-bottom: 7px;
}
.score-box span {
  font-size: 11px;
  color: var(--muted);
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}
.review-list {
  max-width: 750px;
  margin: auto;
}
.review-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin: 16px 0;
  line-height: 1.7;
}
.review-card p {
  color: var(--muted);
  font-size: 14px;
}
.account-box {
  max-width: 600px;
  overflow-wrap: anywhere;
}
.account-box h1 {
  font-size: 30px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1250px;
  margin: 0 auto;
  padding: 20px 5.5% 30px;
  color: #91a08f;
  font-size: 9px;
  letter-spacing: 0.5px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 36px;
  max-width: 440px;
  width: calc(100% - 30px);
  color: var(--ink);
  box-shadow: 0 20px 100px #173c342b;
}
dialog::backdrop {
  background: #142d2677;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 26px;
  margin: 18px 0 10px;
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 27px;
  background: none;
  border: 0;
  color: var(--muted);
}
form {
  display: grid;
  gap: 17px;
  margin-top: 24px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
input {
  padding: 13px;
  border: 1px solid #cfd9cc;
  border-radius: 9px;
  width: 100%;
  background: #fbfcfa;
  color: var(--ink);
}
#auth-message {
  color: var(--green);
  white-space: pre-line;
}
.auth-links {
  display: grid;
  gap: 2px;
  text-align: left;
}
.privacy-note {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 20px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--green);
  color: white;
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 5px 20px #0002;
  font-size: 13px;
  display: none;
  z-index: 10;
  line-height: 1.7;
}
#toast.show {
  display: block;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 1500px) {
  main {
    padding-top: 50px;
  }
  .hero {
    min-height: 310px;
  }
  .hero-art {
    height: 270px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
    padding: 30px 18px;
  }
  .workspace {
    margin-left: 200px;
  }
  .brand {
    font-size: 19px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .side-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .hero {
    padding: 28px;
  }
  .hero h2 {
    font-size: 28px;
  }
  .welcome h1 {
    font-size: 27px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 17px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .shell {
    display: block;
  }
  .workspace {
    margin: 0;
  }
  .brand {
    font-size: 20px;
  }
  .brand-mark {
    width: 35px;
    height: 37px;
    font-size: 33px;
  }
  .brand small {
    font-size: 6px;
  }
  .sidebar-note {
    display: none;
  }
  nav {
    margin: 18px 0 0;
    display: flex;
    gap: 6px;
  }
  .nav {
    padding: 10px 11px;
    gap: 7px;
    flex: 1;
    justify-content: center;
  }
  .nav span {
    font-size: 11px;
  }
  .nav {
    font-size: 16px;
  }
  header {
    height: 70px;
    padding: 0 20px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .header-actions {
    gap: 10px;
  }
  .button.small {
    font-size: 11px;
    padding: 10px 12px;
  }
  .pill {
    padding: 8px;
    font-size: 10px;
  }
  main {
    padding: 26px 20px;
  }
  .welcome {
    align-items: start;
  }
  .welcome h1 {
    font-size: 25px;
    margin-top: 8px;
  }
  .welcome p {
    font-size: 12px;
  }
  .date-badge {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 26px 25px;
  }
  .hero h2 {
    font-size: 28px;
    margin-top: 13px;
  }
  .hero p {
    max-width: none;
  }
  .hero-art {
    height: 195px;
    margin-top: 10px;
  }
  .hero .button {
    width: 100%;
  }
  .hero-copy {
    z-index: 1;
  }
  .content-grid {
    gap: 20px;
    margin-top: 26px;
  }
  .lesson-card {
    padding: 15px 12px;
    gap: 12px;
  }
  .lesson-info h3 {
    font-size: 13px;
  }
  .lesson-status {
    font-size: 10px;
  }
  .lesson-icon {
    width: 39px;
    height: 42px;
    font-size: 13px;
  }
  .side-column {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .side-card {
    padding: 17px;
    margin: 0;
  }
  .side-card h3 {
    font-size: 12px;
  }
  .word {
    font-size: 23px;
  }
  .side-card p {
    font-size: 11px;
  }
  .sync-banner {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }
  footer {
    padding: 10px 20px 25px;
    flex-direction: column;
    gap: 8px;
    font-size: 8px;
  }
  .question-card {
    padding: 22px 18px;
  }
  .question-card h2 {
    font-size: 20px;
  }
  .choice {
    font-size: 13px;
    padding: 14px 12px;
  }
  .quiz-actions .button {
    padding: 14px 20px;
  }
  .quiz-actions small {
    font-size: 10px;
  }
  .lesson-page h1 {
    font-size: 25px;
  }
  .theory {
    padding: 20px;
  }
  .theory p {
    font-size: 14px;
  }
  .equation {
    font-size: 17px;
  }
  .score-box {
    padding: 18px 22px;
  }
  .result {
    padding: 25px 0;
  }
  .result h1 {
    font-size: 26px;
  }
  dialog {
    padding: 30px 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}

progress.goal-track {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  border: 0;
  color: #8da56c;
}
progress.goal-track::-webkit-progress-bar {
  background: #edf0e9;
  border-radius: 9px;
}
progress.goal-track::-webkit-progress-value {
  background: #8da56c;
  border-radius: 9px;
}
progress.goal-track::-moz-progress-bar {
  background: #8da56c;
  border-radius: 9px;
}

.source-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 16px 20px;
  font-size: 12px;
  line-height: 1.9;
}
.source-details summary {
  cursor: pointer;
  font-weight: 600;
}
.source-details p {
  color: var(--muted);
}
.source-details a,
.evidence-note a {
  text-underline-offset: 3px;
}
.evidence-note {
  border-top: 1px solid #cddac1;
  padding-top: 12px;
  margin-top: 13px;
  font-size: 11px;
  line-height: 1.8;
  color: #617357;
}
@media (max-width: 760px) {
  nav {
    flex-wrap: wrap;
  }
  .nav {
    flex: 1 0 40%;
    justify-content: flex-start;
  }
  .source-details {
    padding: 14px;
  }
}
