:root {
  color-scheme: light;
  --paper: #f7f2e8;
  --card: #fffdf5;
  --ink: #1f332e;
  --muted: #546359;
  --forest: #123b30;
  --leaf: #33614a;
  --mint: #dbe5c9;
  --saffron: #f7c259;
  --line: #e0dbc9;
  --clay: #963b26;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.bar, main {
  width: min(1160px, 100%);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 44px);
}
.bar, .brand, .row, .fieldrow, .lesson, .actions, .meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bar, .row, .lesson { justify-content: space-between; }
.bar { min-height: 76px; }
.brand { gap: 9px; }
.brand b { font: 600 26px/1 var(--serif); }
.mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: var(--forest);
  color: var(--saffron);
  border-radius: 11px;
  font: 23px/1 sans-serif;
}
.symbols { position: absolute; width: 0; height: 0; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 15px 10px;
  background: var(--forest);
  color: white;
  border-radius: 27px;
}
.hero-background, .hero-watermark {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.hero-background {
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-watermark {
  right: 0;
  bottom: 0;
  height: min(94%, 285px);
  width: auto;
  aspect-ratio: 1;
  transform: translate(35%, 37%) rotate(17deg);
  color: var(--mint);
}
.forest-stop { stop-color: var(--forest); }
.leaf-stop { stop-color: var(--leaf); }
.hero-emblem {
  width: 57px;
  height: 57px;
  justify-self: end;
  color: var(--saffron);
}
#brand-star text { font: 52px/1 sans-serif; }
.top {
  padding: clamp(19px, 3vw, 32px);
}
.top > p { align-self: center; }
.top .primary { justify-self: end; }
.hero p { color: var(--mint); }
.hero .caption {
  margin-bottom: 8px;
  font: 650 .73rem/1.45 var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--saffron);
}
h1 {
  font: 500 clamp(2.25rem, 5vw, 3.65rem)/1.08 var(--serif);
  letter-spacing: -.035em;
}
h2 { font: 600 1.55rem/1.2 var(--serif); letter-spacing: -.025em; }
h3 { font: 600 1.25rem/1.25 var(--serif); margin-top: 24px; }
button, input, select { font: inherit; }
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}
button:disabled { cursor: default; opacity: .55; }
:where(button, input, select):focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
}
.hero button:focus-visible { outline-color: var(--card); }
.primary, .secondary, .quiet, .close {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 14px;
  font-size: .875rem;
  font-weight: 650;
}
.primary { color: white; background: var(--forest); }
.primary:hover { background: var(--leaf); }
.hero .primary, .login .primary {
  min-height: 50px;
  padding-inline: 20px;
  border-radius: 16px;
  font-size: 1rem;
  color: var(--forest);
  background: var(--saffron);
}
.hero .primary:hover, .login .primary:hover { background: color-mix(in srgb, var(--saffron) 85%, var(--card)); }
.primary span { font-size: 1.1rem; }
.secondary, .quiet, .close {
  color: var(--forest);
  background: var(--card);
  border: 1px solid var(--line);
}
.secondary:hover, .quiet:hover, .close:hover { background: var(--mint); }
.quiet { border-radius: 999px; }
nav {
  display: inline-flex;
  margin-block: 22px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
}
nav button {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
}
nav button[aria-pressed="true"] { background: var(--mint); color: var(--ink); }
#journal {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 2fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 40px;
}
aside, article, .sheet, .login, dialog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow-wrap: anywhere;
}
aside, article, .sheet, dialog { padding: clamp(18px, 2.3vw, 28px); }
article { min-height: 325px; }
.count, .pill {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--mint);
  color: var(--forest);
}
.count, .code, .seg small { font-family: var(--mono); }
.pill.pending { background: color-mix(in srgb, var(--saffron) 40%, var(--card)); color: var(--ink); }
input, select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
}
input::placeholder { color: var(--muted); }
input[type="search"] { margin: 18px 0 10px; }
.student {
  width: 100%;
  display: flex;
  gap: 11px;
  align-items: center;
  text-align: left;
  border-radius: 14px;
  padding: 11px;
}
.student:hover { background: var(--paper); }
.student.on { background: var(--mint); }
.avatar, .glyph {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: var(--mint);
  border-radius: 11px;
  width: 39px;
  height: 39px;
  font: 500 1.25rem/1 var(--serif);
}
.student.on .avatar, .glyph { background: var(--forest); color: var(--saffron); }
.student small, .lesson small, .seg small { display: block; color: var(--muted); font-size: .78rem; }
.empty {
  max-width: 370px;
  margin: 24px auto;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
}
.glyph { width: 54px; height: 54px; border-radius: 16px; font-size: 2rem; }
.meta, .actions, .row { flex-wrap: wrap; }
.meta output { max-width: 100%; overflow-wrap: anywhere; }
.meta { gap: 8px 12px; margin: 15px 0; }
.link {
  padding: 6px 0;
  font-size: .835rem;
  font-weight: 600;
  color: var(--leaf);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.code { letter-spacing: .03em; }
article hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.study-activity { margin: 8px 0 14px; color: var(--muted); }
.study table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.study th, .study td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.study th:first-child { text-align: left; padding-right: 6px; }
.study thead th { color: var(--muted); font-size: .82rem; }
.study tbody th { font-weight: 400; }
.study th:not(:first-child), .study td { text-align: right; white-space: nowrap; padding-left: 5px; }
.study-gain { color: var(--leaf); margin-left: .15em; font-weight: 650; }
.study small { display: block; margin-top: 6px; }
.study-notes { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; }
.study-notes b { font: 600 1.3rem var(--serif); }
.study-notes + .study-notes { margin-top: 2px; color: var(--muted); }
@media (max-width: 520px) {
  .study th:not(:first-child), .study td { white-space: normal; }
  .study-gain { display: inline-block; }
}
.lesson { padding: 14px 0; border-bottom: 1px solid var(--line); }
.lesson:last-child { border: 0; padding-bottom: 0; }
.lesson > div:first-child { min-width: 0; }
.lesson b { font-weight: 600; }
.actions { gap: 8px 12px; }
.sheet { max-width: 790px; margin-bottom: 40px; }
.sheet p, dialog p, .empty p, .muted, small { color: var(--muted); }
.sheet p, dialog p, .row + .muted { margin-block: 12px; }
label { display: block; font-size: .875rem; font-weight: 600; }
label + label, .sheet form, .sheet label, dialog label { margin-top: 16px; }
label input, label select, .fieldrow { margin-top: 6px; }
.fieldrow > input { margin-top: 0; }
small { font-weight: 400; }
code { font: .85rem var(--mono); }
.login { max-width: 450px; margin: clamp(12px, 6vh, 68px) auto 24px; border-radius: 27px; }
.login-heading { padding: 28px; border-radius: 26px 26px 0 0; }
.login-heading h1 { font-size: clamp(1.7rem, 7.8vw, 2.45rem); }
.login-heading > p { grid-column: 1 / -1; }
.login form { padding: 24px 28px 28px; }
.login .primary { width: 100%; margin-top: 16px; }
.notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 92vw;
  background: var(--forest);
  color: white;
  border-radius: 15px;
  padding: 12px 18px;
  z-index: 3;
}
.formError, #loginError { color: var(--clay); }
.quota-warning {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 4px solid var(--clay);
  background: var(--card);
  color: var(--clay);
}
.formError:empty, #loginError:empty { display: none; }
#loginError { margin-top: 12px; }
dialog { width: min(550px, 94vw); max-height: 84vh; color: var(--ink); }
dialog::backdrop { background: rgb(18 59 48 / .48); }
dialog .row { flex-wrap: nowrap; }
.close { border-radius: 50%; width: 44px; flex: none; font-size: 1.45rem; line-height: 1; padding: 0; }
.seg { padding: 12px 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; }
.seg small { margin-bottom: 4px; }
.sheet form { margin-bottom: 24px; }
.sheet .primary, dialog .primary { margin-top: 14px; }
@media (max-width: 740px) {
  .bar { min-height: 62px; }
  .bar, main { padding-inline: 20px; }
  .lesson { align-items: flex-start; flex-direction: column; }
  .top, .login-heading { padding: 19px; }
  .top > p, .top .primary { grid-column: 1 / -1; }
  .top .primary { width: 100%; }
  #journal { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  nav { margin-block: 16px; max-width: 100%; }
  nav button { padding-inline: 12px; }
  #journal article { min-height: 220px; }
  .fieldrow { align-items: stretch; flex-direction: column; }
  .login form { padding: 20px; }
}
@media (max-width: 359px) {
  .hero-emblem { width: 46px; height: 46px; }
}

#overviewDialog[open] { display: flex; flex-direction: column; width: min(680px, 94vw); overflow: hidden; }
#overviewBody { overflow-y: auto; overscroll-behavior: contain; }
.overview-period { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 14px 0; }
.overview-period label { flex: 1 1 130px; margin: 0; }
.overview select { max-width: 100%; }
.overview > p, .overview-result, .overview-topic p { margin-top: 10px; }
.overview-topic { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 14px; }
.overview-topic summary { color: var(--leaf); cursor: pointer; font-size: .875rem; padding: 6px 0; }
.overview-source { border-inline-start: 2px solid var(--line); padding: 4px 12px; margin-block: 6px; }
.overview-source small, .overview-source b { display: block; }
.overview-source p { margin-top: 2px; }
.overview-exercise { background: var(--mint); border-radius: 12px; padding: 12px; }

.bar-actions { display: flex; align-items: center; gap: 8px; }
.language-switcher { position: relative; color: var(--forest); }
.language-switcher summary {
  display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); list-style: none;
}
.language-switcher summary::-webkit-details-marker { display: none; }
.language-switcher summary:hover, .language-switcher[open] summary { background: var(--mint); }
.language-switcher summary:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.language-options {
  position: absolute; z-index: 5; inset-block-start: calc(100% + 6px); inset-inline-end: 0;
  min-width: 10rem; padding: 5px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 5px 18px rgb(18 59 48 / .12);
}
.language-options button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 44px; padding: 6px 12px; border-radius: 9px;
}
.language-options button:hover { background: var(--paper); }
.language-options [aria-pressed="true"] { background: var(--mint); font-weight: 600; }
.language-options [aria-pressed="false"] .language-check { visibility: hidden; }
[dir="rtl"] th, [dir="rtl"] td { text-align:start; }
