@charset "utf-8";
:root {
  color-scheme: light;
  --base: #f8f8f4;
  --paper: #fff;
  --ink: #1d3029;
  --muted: #536760;
  --line: #dfe7df;
  --green: #236653;
  --deep: #194c3d;
  --mint: #e9f2e6;
  --warm: #fbf0de;
  --radius: 16px;
  font: 16px/1.55 "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--base);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1.25em; height: 1.25em; flex: none; }
h1, h2, h3, p { margin: 0; }
a, button, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #397e69; outline-offset: 4px; }
main:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.header-tools { display: flex; align-items: center; justify-self: end; gap: 12px; }
#auto-speech {
  min-height: 44px; border: 0; padding: 4px 6px; border-radius: 8px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 650;
}
#auto-speech:hover { background: #eff4ed; }
#auto-speech[aria-checked="true"] { color: var(--deep); }
#auto-speech:disabled { cursor: default; opacity: .63; }
.switch-track { display: inline-flex; align-items: center; width: 32px; height: 19px; padding: 2px; border: 1px solid #73887c; border-radius: 20px; background: #f4f6f1; }
.switch-track::before { content: ""; width: 13px; height: 13px; border-radius: 50%; background: #65786d; }
[aria-checked="true"] .switch-track { background: var(--green); border-color: var(--green); }
[aria-checked="true"] .switch-track::before { margin-left: auto; background: white; }
.shell { width: min(1064px, calc(100% - 72px)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.topbar { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; width: max-content; font-weight: 750; font-size: 1.32rem; letter-spacing: -.05em; }
.brand img { display: block; }
.main-nav { display: flex; align-items: stretch; gap: 12px; }
.main-nav a {
  min-height: 43px; display: inline-flex; gap: 7px; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 650; padding: 0 16px; border-radius: 9px; font-size: .94rem;
}
.main-nav a:hover, .main-nav a[aria-current] { background: var(--mint); color: var(--deep); }
#review-count { min-width: 24px; text-align: center; border-radius: 20px; padding: 1px 5px; font-size: .73rem; color: var(--deep); background: #d5e9dc; }
.profile-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; justify-self: end;
  min-height: 43px; padding: 0 13px; font-size: .9rem; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; font-weight: 650; max-width: 190px; min-width: 0;
}
.profile-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button:hover { background: var(--mint); }
.profile-icon { position: relative; display: inline-block; width: 17px; height: 17px; flex: none; }
.profile-icon::before, .profile-icon::after { content: ""; position: absolute; border: 1.5px solid var(--green); }
.profile-icon::before { width: 7px; height: 7px; border-radius: 50%; top: 0; left: 5px; }
.profile-icon::after { width: 15px; height: 7px; border-radius: 9px 9px 3px 3px; bottom: 1px; left: 1px; }
.signed-in .profile-icon::before, .signed-in .profile-icon::after { background: #afd7bd; }
main.shell { min-height: calc(100vh - 75px); padding-block: 40px 52px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.hero {
  min-height: 405px; display: grid; grid-template-columns: 51% 49%; align-items: center;
  padding: 39px 46px 42px; background: var(--mint); border: 1px solid #dbe8da;
  border-radius: 24px; position: relative; isolation: isolate; overflow: hidden;
}
.hero-content { max-width: 460px; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(3.1rem, 5.15vw, 4.75rem); line-height: .99; font-weight: 760; letter-spacing: -.074em; }
.hero-description { max-width: 29rem; color: #41594f; font-size: 1.07rem; line-height: 1.55; margin-top: 20px; }
.button {
  min-height: 48px; padding: 11px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent; border-radius: 9px; font-weight: 680; text-align: center; line-height: 1.35;
}
.button.primary { color: #fff; background: var(--green); }
.button.primary:hover { background: var(--deep); }
.button.secondary { color: var(--deep); background: #fff; border-color: #cbd9ce; }
.button.secondary:hover { background: #eef5eb; }
.button.full { width: 100%; }
.hero-action { margin-top: 24px; padding-inline: 17px 14px; }
.hero-action svg { margin-left: 9px; }
.resume { font-size: .88rem; color: var(--muted); margin-top: 12px; }
.hero-art {
  position: relative; width: 100%; height: 312px; display: grid; place-items: center;
  --card-width: clamp(180px, 22vw, 286px);
}
.hero-art::before {
  content: ""; position: absolute; inset: 4% -4% 4% 1%; pointer-events: none; z-index: -1;
  background-image: radial-gradient(#6a9c82 1px, transparent 1px);
  background-size: 13px 13px; opacity: .36;
  mask-image: radial-gradient(ellipse at center, #000 27%, transparent 74%);
}
.sample-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 13px; position: absolute;
  width: var(--card-width); min-height: 161px; padding: 20px 22px;
  border: 1px solid #b7d1c2; border-radius: 18px;
  box-shadow: 0 14px 22px -21px #173c2a80;
}
.sample-back { background: #d1e6d9; transform: translate(-43px, -63px) rotate(-10deg); }
.sample-front { background: #fffefa; transform: translate(37px, 39px) rotate(8deg); }
.sample-back .sample-line { padding-block: 0 28px; }
.card-tag { font-weight: 650; font-size: .82rem; display: inline-flex; align-items: center; gap: 8px; color: #4b6459; }
.card-tag b { font-size: .69rem; background: #e5efe6; color: #2d604e; border-radius: 5px; padding: 3px 6px 4px; font-weight: 750; letter-spacing: .02em; }
.sample-back .card-tag b { background: #f1f7ee; }
.sample-line { font-size: clamp(1.55rem, 3.05vw, 2.75rem); font-weight: 740; line-height: 1.05; letter-spacing: -.056em; white-space: nowrap; }
.sample-front .sample-line span { background: #dcefe1; color: #1e674f; border-radius: 6px; padding: 0 4px 3px; }
.sample-formula { width: max-content; font: .83rem/1.2 ui-monospace, Consolas, monospace; color: #52695d; border-top: 1px solid #dfe8e0; padding-top: 10px; }
.course-list { margin-top: 42px; }
.section-head { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-head h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.15; letter-spacing: -.045em; }
.section-head p { color: var(--muted); font-size: .92rem; margin-top: 5px; }
.days, .topic-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.day-row, .topic-row {
  min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 18px;
}
.day-row { min-height: 89px; padding: 13px 19px; }
.day-row + .day-row, .topic-row + .topic-row { border-top: 1px solid var(--line); }
.day-row:first-child, .topic-row:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.day-row:last-child, .topic-row:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.day-row:hover, .topic-row:hover { background: #f2f7ef; }
.day-number {
  width: 53px; height: 53px; border-radius: 11px; display: grid; place-items: center;
  font-size: 1.12rem; font-weight: 750; font-variant-numeric: tabular-nums;
}
.ink-1 { background: #e3efe2; color: #2d6149; }
.ink-2 { background: #edf0df; color: #585d2f; }
.ink-3 { background: #e7eef2; color: #3f5e71; }
.ink-4 { background: #f6ecdf; color: #754d33; }
.ink-5 { background: #eee9f3; color: #624e78; }
.day-info h3 { font-size: 1.11rem; line-height: 1.25; letter-spacing: -.024em; }
.day-info p { color: var(--muted); font-size: .91rem; margin-top: 4px; line-height: 1.4; }
.day-count { display: grid; justify-items: end; font-size: .83rem; color: var(--muted); line-height: 1.4; white-space: nowrap; }
.day-count strong { color: #344941; font-weight: 670; }
.row-arrow { color: #658577; display: grid; place-items: center; }
.row-arrow svg { width: 19px; height: 19px; }
.course-footer { color: var(--muted); font-size: .84rem; padding: 20px 0 0; }
progress { height: 8px; width: 100%; accent-color: var(--green); border: 0; border-radius: 8px; background: #e1e9dd; overflow: hidden; }
progress::-webkit-progress-bar { border-radius: 8px; background: #e1e9dd; }
progress::-webkit-progress-value { border-radius: 8px; background: var(--green); }
progress::-moz-progress-bar { border-radius: 8px; background: var(--green); }
.course-progress { width: min(34%, 204px); margin-bottom: 5px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: .88rem; }
.crumbs a, .back-link { color: var(--deep); font-weight: 650; }
.crumbs a:hover, .back-link:hover { text-decoration: underline; }
.crumbs svg { width: 14px; height: 14px; }
.page-heading { display: flex; align-items: start; gap: 17px; padding-block: 27px 32px; }
.page-heading .day-number { margin-top: 5px; }
.page-heading h1 { font-size: clamp(2rem, 5vw, 3.55rem); line-height: 1.06; font-weight: 750; letter-spacing: -.064em; overflow-wrap: anywhere; }
.page-heading p { margin-top: 10px; color: var(--muted); }
.simple-heading { padding-top: 12px; }
.topic-list > .section-head { padding: 15px 18px 14px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.topic-list > .section-head h2 { font-size: 1.31rem; }
.topic-row { min-height: 61px; padding: 10px 18px; gap: 15px; }
.topic-row h3 { font-size: 1.02rem; line-height: 1.26; overflow-wrap: anywhere; }
.topic-number { min-width: 32px; color: #557468; font-size: .85rem; font-variant-numeric: tabular-nums; display: flex; }
.topic-count { font-size: .83rem; color: var(--muted); text-align: right; }
.lecture { max-width: 760px; }
.theory { background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.theory > summary { min-height: 57px; padding: 12px 17px; display: flex; align-items: center; gap: 10px; font-weight: 700; list-style: none; cursor: pointer; }
.theory summary::-webkit-details-marker { display: none; }
.theory > summary svg:first-child { color: var(--green); }
.theory > summary svg:last-child { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }
.theory[open] > summary svg:last-child { transform: rotate(90deg); }
.theory-body { padding: 0 19px 20px; }
.theory-body .formula { background: #eef4ea; color: var(--deep); padding: 12px 14px; border-radius: 8px; font: 650 .94rem/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.theory-body > p + p { margin-top: 13px; }
.worked-example { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.example-ru { color: var(--muted); }
.example-en { margin-top: 3px; font-weight: 700; font-size: 1.09rem; color: var(--deep); }
.example-why { margin-top: 9px; }
.source-notes { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.source-notes summary { color: var(--deep); font-weight: 650; cursor: pointer; }
.source-notes ul { margin: 8px 0 0; padding-left: 21px; }
.source-notes li + li { margin-top: 5px; }
.course-map img { display: block; width: 100%; height: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.lecture-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.review-list { margin-top: 20px; }
.empty, .finish { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 28px; }
.empty h2, .finish h2 { margin-block: 8px 12px; font-size: 1.65rem; letter-spacing: -.04em; }
.empty > span, .finish-icon { display: inline-grid; width: 42px; height: 42px; place-items: center; color: var(--green); background: var(--mint); border-radius: 12px; }
.empty .button { margin-top: 5px; }
.load-error p { margin: 6px 0 12px; color: var(--muted); }
.practice { width: min(100%, 760px); margin: 0 auto; }
body.is-studying { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.is-studying .site-header { flex: none; }
.is-studying main.shell { flex: 1; display: flex; min-height: 0; padding-block: clamp(8px, 3vh, 30px) max(14px, env(safe-area-inset-bottom)); }
.practice-session { display: flex; flex-direction: column; min-height: 0; max-height: 640px; }
.study-reader { flex: 1; min-height: 0; padding: 4px 5px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #aabcb1 transparent; }
.study-reader:focus-visible { outline-offset: -3px; border-radius: 6px; }
.study-theory { margin-top: 14px; }
.practice-heading { display: flex; flex-direction: column; gap: 13px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; width: max-content; font-size: .88rem; }
.back-link svg { width: 14px; height: 14px; }
.practice h1 { font-size: clamp(1.62rem, 4vw, 2.47rem); line-height: 1.12; font-weight: 750; letter-spacing: -.052em; overflow-wrap: anywhere; }
.session-progress { display: grid; gap: 8px; margin: 17px 0; color: var(--muted); font-size: .86rem; font-weight: 600; }
.flashcard { background: #fff; border: 1px solid #d6e3d7; border-radius: 19px; overflow: hidden; }
.flash-prompt, .flash-answer { padding: 22px 26px; }
.flash-prompt { min-height: 199px; display: flex; flex-direction: column; gap: 18px; }
.flash-meta { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; min-height: 33px; }
.card-group { color: var(--muted); font-size: .78rem; }
.prompt-text { font-size: clamp(1.58rem, 4vw, 2.75rem); font-weight: 710; line-height: 1.19; letter-spacing: -.039em; white-space: pre-line; overflow-wrap: anywhere; margin-block: auto; }
.flash-answer { background: #eef5eb; }
.flash-source { display: flex; align-items: baseline; gap: 10px; padding: 15px 26px; border-top: 1px solid #d6e3d7; }
.flash-source p { font-size: 1.06rem; font-weight: 600; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.answer-text { font-size: clamp(1.49rem, 3.9vw, 2.5rem); font-weight: 710; line-height: 1.22; letter-spacing: -.037em; white-space: pre-line; overflow-wrap: anywhere; margin: 12px 0 3px; }
.answer-note { border-top: 1px solid var(--line); padding: 12px 26px 15px; color: #435d51; font-size: .92rem; white-space: pre-line; overflow-wrap: anywhere; }
.verb-forms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 10px; }
.verb-forms > div { background: #fff; padding: 10px 12px; border-radius: 8px; display: grid; align-content: start; gap: 3px; }
.verb-forms span { font-size: .74rem; color: var(--muted); }
.verb-forms strong { overflow-wrap: anywhere; }
.practice-actions { flex: none; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px; padding: 12px 5px 0; border-top: 1px solid var(--line); }
.practice-actions .button { min-height: 53px; }
.study-primary { grid-column: 2; }
.practice-actions kbd { border: 1px solid currentColor; border-radius: 5px; font: inherit; font-weight: 500; font-size: .71rem; padding: 2px 5px; }
.practice-actions .button:active { filter: brightness(.92); }
.repeat-button { color: #704c25; border-color: #ead8b8; background: var(--warm); }
.repeat-button:hover { background: #f7e5c6; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; color: var(--green); padding: 0; }
.icon-button:hover { background: #dfeee0; }
.finish { margin-top: 20px; }
.results { display: flex; gap: 7px; flex-wrap: wrap; color: var(--muted); }
.results span { display: inline-block; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; }
.results b { color: var(--ink); }
dialog { width: min(438px, calc(100% - 28px)); background: var(--paper); border: 1px solid #c7d8cb; border-radius: 17px; padding: 22px; color: var(--ink); box-shadow: 0 20px 55px #162f2530; }
dialog::backdrop { background: #162e25a0; }
.dialog-top { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.dialog-top h2 { font-size: 1.6rem; letter-spacing: -.04em; line-height: 1.2; }
dialog p { margin-top: 9px; color: var(--muted); }
dialog button.full { margin-top: 13px; }
dialog form { margin-top: 15px; }
dialog label { display: block; margin-top: 13px; color: #40594d; font-size: .86rem; font-weight: 680; }
dialog input { display: block; width: 100%; margin-top: 5px; min-height: 46px; border: 1px solid #bccfc3; border-radius: 8px; padding: 9px 10px; background: #fbfcf9; }
dialog .profile-full-name { color: var(--ink); font-size: 1.45rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
dialog .profile-sync { font-size: .94rem; }
dialog input[aria-invalid="true"] { border-color: #a94435; }
button:disabled { cursor: wait; opacity: .65; }
.form-message { font-size: .86rem; }
.form-message:empty { display: none; }
.toast { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); z-index: 10; padding: 12px 16px; border-radius: 10px; color: white; background: var(--deep); font-size: .91rem; }
.practice-session .toast { position: static; flex: none; align-self: center; transform: none; max-width: calc(100% - 10px); margin-bottom: 6px; }
@media (max-width: 820px) {
  .shell { width: calc(100% - 44px); }
  main.shell { padding-top: 28px; }
  .hero { padding: 30px 28px; min-height: 365px; grid-template-columns: 53% 47%; }
  .hero-art { --card-width: min(26vw, 214px); }
  .sample-card { min-height: 138px; padding: 14px; border-radius: 13px; }
  .sample-back { transform: translate(-31px, -52px) rotate(-10deg); }
  .sample-front { transform: translate(27px, 27px) rotate(8deg); }
}
@media (max-width: 880px) {
  .topbar { min-height: 94px; grid-template-columns: minmax(0,1fr) auto; gap: 0 4px; padding-top: 4px; }
  .brand { font-size: 1.18rem; }
  .brand img { width: 32px; height: 32px; }
  .header-tools { display: contents; }
  #auto-speech { grid-column: 2; grid-row: 1; justify-self: end; font-size: .83rem; padding-inline: 3px; gap: 6px; }
  .profile-button { grid-column: 2; grid-row: 2; min-height: 42px; padding-inline: 8px; gap: 6px; max-width: clamp(82px, calc(100vw - 238px), 180px); }
  .main-nav { grid-column: 1; grid-row: 2; gap: 1px; }
  .main-nav a { min-height: 42px; border-radius: 7px; padding-inline: 7px; font-size: .88rem; }
  .practice-session { max-height: none; }
}
@media (max-width: 580px) {
  .shell { width: calc(100% - 28px); }
  main.shell { min-height: calc(100dvh - 100px); padding-top: 15px; padding-bottom: 28px; }
  .hero { padding: 21px 18px 25px; min-height: 0; grid-template-columns: 1fr; border-radius: 17px; }
  .hero h1 { font-size: clamp(2.8rem, 11.2vw, 4.08rem); }
  .hero-description { font-size: 1rem; margin-top: 13px; max-width: 320px; }
  .hero-action { margin-top: 15px; }
  .hero-art { height: 139px; --card-width: 152px; margin: 14px auto 0; }
  .sample-card { min-height: 88px; padding: 7px 10px; gap: 4px; border-radius: 10px; }
  .sample-back { transform: translate(-53px,-22px) rotate(-9deg); }
  .sample-front { transform: translate(46px,13px) rotate(7deg); }
  .sample-back .sample-line { padding-bottom: 16px; }
  .sample-line { font-size: 1.37rem; }
  .sample-formula { font-size: .62rem; padding-top: 4px; }
  .sample-card .card-tag { font-size: .65rem; }
  .sample-card .card-tag b { font-size: .57rem; padding: 2px 4px; }
  .course-list { margin-top: 27px; }
  .section-head { margin-bottom: 11px; }
  .section-head p { font-size: .84rem; }
  .day-row { min-height: 80px; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px 11px; padding: 11px 10px; }
  .day-number { width: 40px; height: 43px; border-radius: 8px; font-size: .94rem; grid-row: span 2; }
  .day-info h3 { font-size: 1rem; }
  .day-info p { font-size: .8rem; }
  .day-count { grid-row: 2; grid-column: 2; display: flex; gap: 8px; justify-items: start; font-size: .74rem; }
  .day-row .row-arrow { grid-column: 3; grid-row: 1 / 3; }
  .day-row .row-arrow svg { width: 15px; }
  .page-heading { padding-block: 18px 21px; gap: 11px; }
  .page-heading p { font-size: .91rem; }
  .topic-row { padding: 10px; gap: 7px; }
  .topic-number { min-width: 22px; font-size: .77rem; }
  .topic-row h3 { font-size: .94rem; }
  .topic-count { font-size: .75rem; }
  .topic-row .row-arrow svg { width: 15px; }
  .practice-heading { gap: 7px; }
  .session-progress { margin: 12px 0; }
  .flash-prompt, .flash-answer { padding: 14px; }
  .flash-source, .answer-note { padding: 12px 14px; }
  .flash-prompt { min-height: 175px; }
  .study-reader { padding-inline: 3px; }
  .practice-actions { padding: 8px 2px 0; gap: 7px; }
  .practice-actions .button { padding-inline: 8px; min-height: 49px; font-size: .95rem; gap: 5px; }
  .practice-actions kbd { display: none; }
  .verb-forms { gap: 5px; }
  .verb-forms > div { padding: 6px; }
  .verb-forms strong { font-size: .89rem; }
  .theory-body { padding: 0 13px 15px; }
  .empty, .finish { padding: 16px; }
}
@media (max-width: 374px) {
  .main-nav a { padding-inline: 5px; gap: 4px; }
  #review-count { min-width: 19px; padding-inline: 4px; }
}
@media (hover: none) {
  .practice-actions kbd { display: none; }
  .practice-session { max-height: none; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .is-studying main.shell { padding-block: 4px max(4px, env(safe-area-inset-bottom)); }
  .is-studying .topbar { min-height: 45px; }
  .is-studying .practice-actions { padding-top: 4px; }
}
