:root {
  --bg: #f8f9f6;
  --paper: #fff;
  --ink: #203b40;
  --muted: #718184;
  --line: #e3e8e4;
  --brand: #174e5a;
  --soft: #eaf2f1;
  --yellow: #f4d77b;
  --red: #b45545;
  --shadow: 0 6px 25px #183c4006;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Manrope", "Noto Sans", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
body.dark {
  --bg: #15262b;
  --paper: #1d3238;
  --ink: #e6efeb;
  --muted: #adbfbc;
  --line: #355058;
  --brand: #a9d6d4;
  --soft: #29474d;
  --yellow: #80692c;
  --red: #ffab9e;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 11px 17px;
  min-height: 46px;
  font-weight: 600;
  transition:
    background 0.16s,
    transform 0.16s;
}
button:hover {
  border-color: #7d9c9f;
  background: var(--soft);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d29c35;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -1.2px;
  font-weight: 800;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
}
small {
  font-size: 12px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.7px;
  color: var(--muted);
  text-transform: uppercase;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  padding: 32px 25px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 33px;
  font-weight: 800;
  letter-spacing: -1.8px;
  line-height: 1.2;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.9px;
  margin-top: 8px;
  font-weight: 700;
}
.brand-icon {
  position: relative;
  width: 43px;
  height: 49px;
  line-height: 42px;
  background: #174e5a;
  border-radius: 14px;
  color: white;
  text-align: center;
  font-family: Georgia;
  font-size: 47px;
  font-weight: 400;
}
.brand-icon span {
  position: absolute;
  right: 3px;
  top: -4px;
  font: 18px sans-serif;
  color: #f4d77b;
}
.side-caption {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin: 48px 0 18px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  border-radius: 10px;
  margin: 5px 0;
  color: var(--muted);
  font-weight: 650;
}
.nav-item .ni {
  font-size: 21px;
  width: 23px;
  text-align: center;
}
.nav-item.active {
  background: var(--soft);
  color: var(--brand);
}
.nav-item small {
  font-size: 10px;
  display: block;
  line-height: 1.25;
  font-weight: 400;
}
.side-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.side-bottom p {
  font-size: 16px;
  font-weight: 650;
  margin: 16px 0 5px;
}
.bridge-flags {
  display: flex;
  align-items: center;
  gap: 12px;
}
.flag {
  display: inline-block;
  width: 28px;
  height: 19px;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.flag.mn {
  background: linear-gradient(90deg, #b85247 33%, #42778b 33% 67%, #b85247 67%);
}
.flag.mn:before {
  content: "♧";
  position: absolute;
  left: 2px;
  color: #f8d879;
  font-size: 11px;
  top: 0;
}
.flag.sv {
  background:
    linear-gradient(90deg, transparent 30%, #f2d470 30% 42%, transparent 42%),
    linear-gradient(transparent 39%, #f2d470 39% 58%, transparent 58%), #46768b;
}
.dots {
  color: #a5b5b0;
}
.shell {
  margin-left: 238px;
}
header {
  height: 90px;
  border-bottom: 1px solid var(--line);
  padding: 0 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb span {
  margin: 0 12px;
  color: #bac4c1;
}
.breadcrumb b {
  color: var(--ink);
  font-weight: 600;
}
.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.level {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 1px;
}
.xp {
  font-size: 12px;
  font-weight: 750;
}
.icon-btn {
  padding: 7px;
  min-width: 43px;
  background: transparent;
  border: 0;
  font-size: 20px;
}
.shell main {
  max-width: 1280px;
  margin: auto;
  padding: 36px 46px 20px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 26px;
}
.page-heading p {
  color: var(--muted);
  margin-top: 9px;
}
.pill {
  font-size: 11px;
  border-radius: 30px;
  padding: 5px 12px;
  background: var(--soft);
  display: inline-block;
  font-weight: 650;
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: #eaf0ec;
  border: 1px solid #dee7df;
  border-radius: 20px;
  overflow: hidden;
  min-height: 270px;
  position: relative;
}
.hero-copy {
  padding: 32px 35px;
  z-index: 1;
  color: #203b40;
}
.hero .eyebrow {
  color: #59736d;
  font-size: 10px;
}
.hero h2 {
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -1px;
  margin: 12px 0;
}
.hero p {
  font-size: 13px;
  color: #607670;
  max-width: 350px;
  margin-bottom: 24px;
}
.primary {
  background: #174e5a !important;
  border-color: #174e5a !important;
  color: #fff !important;
}
.primary:hover {
  background: #236371 !important;
}
.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 240px;
  overflow: hidden;
}
.hero-art svg {
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
}
.hero-art .stamp {
  position: absolute;
  right: 22px;
  top: 24px;
  font-size: 10px;
  color: #59736d;
  letter-spacing: 2px;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0 35px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 21px;
}
.stat strong {
  font-size: 23px;
  line-height: 1.2;
}
.stat small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
.blue {
  background: #e9f1f7;
  color: #43667f;
}
.pink {
  background: #f6eeea;
  color: #a46f5f;
}
.yellow {
  background: #faf2da;
  color: #927a3a;
}
.green {
  background: #eaf2e8;
  color: #6c855d;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 26px 0 17px;
}
.section-heading h2 {
  font-size: 20px;
}
.text-btn {
  border: 0;
  background: transparent;
  padding: 5px;
  min-height: 40px;
  color: var(--brand);
  font-size: 12px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.category {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 21px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: left;
  min-height: 172px;
  position: relative;
}
.category:hover {
  transform: translateY(-3px);
  background: var(--paper);
}
.category .cat-icon {
  height: 43px;
  width: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 24px;
  margin-bottom: 17px;
}
.category h3 {
  font-size: 14px;
}
.category p {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 14px;
}
.category .arrow {
  position: absolute;
  right: 20px;
  top: 28px;
  color: #a0b0ac;
}
.category-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
.track {
  height: 4px;
  background: var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.track span {
  display: block;
  height: 100%;
  background: #77a391;
  border-radius: 10px;
}
.category .track {
  margin-top: 10px;
}
.bottom-note {
  padding: 22px 26px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  background: var(--paper);
}
.bottom-note .quote {
  font-family: Georgia;
  font-size: 35px;
  color: #b89e62;
}
.bottom-note p {
  font-size: 13px;
}
.bottom-note small {
  display: block;
}
.bottom-note .text-btn {
  margin-left: auto;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  padding: 28px;
}
.mobile-nav {
  display: none;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.search {
  flex: 1;
  min-width: 180px;
}
input,
select,
textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  color: var(--ink);
  min-height: 47px;
  max-width: 100%;
}
input::placeholder {
  color: var(--muted);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 2px 10px;
  margin-bottom: 14px;
}
.chip {
  white-space: nowrap;
  font-size: 12px;
  border-radius: 30px;
  min-height: 39px;
  padding: 8px 15px;
}
.chip.active {
  background: var(--soft);
  border-color: #89aaa7;
  color: var(--brand);
}
.word-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.word {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  padding: 17px 19px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.word .content {
  flex: 1;
  min-width: 0;
}
.word strong {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.word p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.word .icon-btn {
  font-size: 18px;
  min-width: 37px;
}
.word-actions {
  display: flex;
  gap: 3px;
}
.star.on {
  color: #ad8124;
}
.more {
  display: block;
  margin: 25px auto;
}
.panel {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mode-card {
  text-align: left;
  min-height: 160px;
  padding: 23px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.mode-card b {
  display: block;
  font-size: 16px;
  margin: 12px 0 6px;
}
.mode-card p {
  font-size: 12px;
  color: var(--muted);
}
.mode-card .mode-icon {
  font-size: 24px;
  color: var(--brand);
}
.practice-config {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.practice-config label {
  font-size: 12px;
  color: var(--muted);
}
.practice-config select {
  max-width: 260px;
}
.practice-wrap {
  max-width: 760px;
  margin: auto;
}
.session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}
.session-top small {
  font-size: 11px;
}
.practice-wrap > .track {
  margin-bottom: 25px;
}
.exercise {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 35px;
  border-radius: 20px;
  min-height: 360px;
  text-align: center;
}
.exercise h2 {
  font-size: 28px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  margin: 20px 0;
}
.exercise .question-mn {
  font-size: 21px;
}
.flash-card {
  width: 100%;
  border: 0;
  min-height: 210px;
  background: transparent !important;
  padding: 20px;
}
.flash-card strong {
  display: block;
  font-size: 32px;
  line-height: 1.4;
}
.flash-card small {
  display: block;
  margin-top: 20px;
}
.flash-card .answer {
  font-size: 21px;
  color: var(--brand);
  margin-top: 15px;
}
.exercise-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
  margin: 23px 0;
}
.option {
  padding: 18px;
  text-align: left;
  min-height: 64px;
  font-size: 16px;
}
.option.correct {
  border-color: #458771;
  background: #e6f3ec;
  color: #285e4d;
  opacity: 1;
}
.option.wrong {
  border-color: #b45545;
  background: #f9e9e5;
  color: #893e30;
  opacity: 1;
}
.feedback {
  padding: 16px 20px;
  text-align: left;
  border-radius: 12px;
  background: var(--soft);
  margin-top: 22px;
  font-size: 13px;
}
.feedback.good {
  background: #e6f3ec;
  color: #285e4d;
}
.feedback.bad {
  background: #f9e9e5;
  color: #893e30;
}
.feedback strong {
  display: block;
  margin-bottom: 4px;
}
.feedback p {
  margin-top: 5px;
}
.answer-input {
  width: 100%;
  font-size: 19px;
  text-align: center;
  margin-top: 20px;
}
.keyboard {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.keyboard button {
  min-width: 45px;
}
.sentence-answer {
  min-height: 90px;
  border: 1px dashed #9eb6b1;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  margin: 20px 0;
}
.tokens {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.token {
  font-size: 15px;
}
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.match-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-col button {
  min-height: 65px;
  font-size: 13px;
}
.match-col .selected {
  background: var(--soft);
  border-color: #174e5a;
}
.match-col .matched {
  background: #e6f3ec;
  color: #285e4d;
  opacity: 0.6;
}
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.grammar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grammar-card h3 {
  margin: 5px 0 12px;
}
.grammar-card p {
  font-size: 13px;
  color: var(--muted);
}
.example {
  background: var(--soft);
  padding: 12px 15px;
  border-radius: 9px;
  margin-top: 16px;
  font-size: 14px;
}
.sub-nav {
  margin: 20px 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
td,
th {
  text-align: left;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-size: 11px;
}
td button {
  border: 0;
  padding: 5px;
  background: transparent;
}
.alphabet {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.alphabet button {
  font-size: 23px;
  min-height: 65px;
}
.notice {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0;
}
.progress-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.progress-layout h3 {
  margin-bottom: 16px;
}
.bar-row {
  margin: 20px 0;
}
.bar-row .line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}
.own-form {
  display: grid;
  gap: 12px;
}
.own-form label {
  font-size: 12px;
}
.own-form input {
  width: 100%;
  margin-top: 4px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #174e5a;
  color: white;
  padding: 12px 22px;
  border-radius: 12px;
  z-index: 100;
  max-width: 90vw;
  font-size: 13px;
  display: none;
  box-shadow: 0 5px 25px #0002;
}
.skip {
  position: fixed;
  left: 20px;
  top: -80px;
  z-index: 101;
  background: var(--paper);
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.completion {
  padding: 25px 0;
}
.completion .medal {
  font-size: 65px;
  color: #c6a44c;
}
.completion h2 {
  margin-bottom: 10px;
}
.hidden {
  display: none !important;
}
body.dark .hero {
  background: #dce7df;
}
body.dark .blue,
body.dark .pink,
body.dark .green,
body.dark .yellow {
  filter: brightness(0.8);
}
@media (min-width: 1500px) {
  .shell main {
    padding-top: 45px;
  }
  .hero {
    min-height: 300px;
  }
  .category {
    min-height: 190px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
    padding: 28px 18px;
  }
  .shell {
    margin-left: 200px;
  }
  header {
    padding: 0 28px;
  }
  .shell main {
    padding: 30px 28px;
  }
  .hero-copy {
    padding: 28px;
  }
  .hero h2 {
    font-size: 28px;
  }
  .category-grid {
    gap: 12px;
  }
  .category {
    padding: 17px;
  }
  .stat {
    padding: 16px 12px;
    gap: 10px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 175px;
    padding: 25px 12px;
  }
  .brand {
    font-size: 28px;
  }
  .brand-icon {
    width: 37px;
  }
  .brand small {
    font-size: 7px;
  }
  .shell {
    margin-left: 175px;
  }
  .shell main {
    padding: 25px 20px;
  }
  header {
    height: 72px;
    padding: 0 20px;
  }
  .hero {
    grid-template-columns: 1.3fr 1fr;
  }
  .hero-copy {
    padding: 23px;
  }
  .hero h2 {
    font-size: 25px;
  }
  .hero-art {
    min-height: 260px;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-row {
    gap: 9px;
  }
  .stat {
    display: block;
  }
  .stat-icon {
    display: none;
  }
  .word-list,
  .grammar-grid {
    grid-template-columns: 1fr;
  }
  .mode-grid {
    grid-template-columns: 1fr 1fr;
  }
  h1 {
    font-size: 30px;
  }
  .progress-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 14px;
  }
  .sidebar {
    display: none;
  }
  .shell {
    margin-left: 0;
  }
  header {
    height: 65px;
    padding: 0 20px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .breadcrumb span,
  .breadcrumb b {
    display: none;
  }
  .breadcrumb:before {
    content: "HejSan";
    font-size: 24px;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: -1px;
    margin-right: 12px;
  }
  .header-actions {
    gap: 10px;
  }
  .level {
    display: none;
  }
  .xp {
    font-size: 11px;
  }
  .shell main {
    padding: 25px 18px 20px;
  }
  h1 {
    font-size: 28px;
    letter-spacing: -0.8px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  .page-heading p {
    font-size: 12px;
    margin-top: 7px;
  }
  .page-heading .pill {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: 315px;
  }
  .hero-copy {
    padding: 24px;
    max-width: 85%;
  }
  .hero h2 {
    font-size: 26px;
    max-width: 240px;
  }
  .hero p {
    max-width: 220px;
    font-size: 12px;
  }
  .hero-art {
    position: absolute;
    inset: auto 0 0 auto;
    width: 175px;
    height: 180px;
    min-height: 0;
    opacity: 0.8;
  }
  .hero-art .stamp {
    display: none;
  }
  .hero-copy .primary {
    position: relative;
    z-index: 2;
  }
  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .stat-row {
    margin: 14px 0 26px;
    gap: 8px;
  }
  .stat {
    padding: 13px 10px;
    border-radius: 12px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat small {
    font-size: 9px;
    line-height: 1.5;
  }
  .section-heading h2 {
    font-size: 18px;
  }
  .category-grid {
    gap: 11px;
  }
  .category {
    padding: 17px 14px;
    min-height: 178px;
  }
  .category h3 {
    font-size: 13px;
    line-height: 1.5;
  }
  .category p {
    font-size: 10px;
  }
  .category .cat-icon {
    width: 36px;
    height: 36px;
    font-size: 21px;
    margin-bottom: 14px;
  }
  .category .arrow {
    top: 22px;
    right: 15px;
  }
  .category-foot {
    font-size: 9px;
  }
  .bottom-note {
    padding: 17px;
    gap: 12px;
  }
  .bottom-note p {
    font-size: 12px;
  }
  .bottom-note .text-btn {
    display: none;
  }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    z-index: 40;
    padding: 6px 8px calc(7px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 10px;
    min-height: 49px;
    color: var(--muted);
    border-radius: 11px;
  }
  .mobile-nav a .ni {
    font-size: 22px;
    line-height: 1.4;
  }
  .mobile-nav a.active {
    color: var(--brand);
    background: var(--soft);
    font-weight: 800;
  }
  footer {
    padding: 18px 10px 100px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar input {
    width: 100%;
    flex-basis: 100%;
  }
  .toolbar select {
    flex: 1;
    min-width: 0;
    font-size: 12px;
  }
  .toolbar button {
    font-size: 12px;
  }
  .word {
    padding: 14px;
  }
  .word strong {
    font-size: 15px;
  }
  .word p {
    font-size: 12px;
  }
  .mode-grid {
    gap: 10px;
  }
  .mode-card {
    padding: 17px;
    min-height: 165px;
  }
  .mode-card b {
    font-size: 14px;
  }
  .mode-card p {
    font-size: 11px;
  }
  .exercise {
    padding: 23px 17px;
    min-height: 350px;
  }
  .exercise h2 {
    font-size: 23px;
  }
  .exercise .question-mn {
    font-size: 19px;
  }
  .flash-card strong {
    font-size: 27px;
  }
  .options {
    gap: 9px;
  }
  .option {
    font-size: 14px;
    padding: 14px;
  }
  .match-grid {
    gap: 10px;
  }
  .match-col button {
    padding: 10px;
    font-size: 12px;
    min-height: 72px;
  }
  .session-top {
    font-size: 12px;
  }
  .session-top button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .exercise-actions button {
    flex: 1;
    font-size: 13px;
  }
  .alphabet {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  .alphabet button {
    font-size: 20px;
    padding: 8px;
  }
  .panel {
    padding: 20px;
  }
  .practice-config {
    gap: 8px;
  }
  .practice-config select {
    width: 100%;
    max-width: none;
  }
  .practice-config label {
    width: 100%;
  }
  .practice-config .chip {
    flex: 1;
  }
  .grammar-grid {
    gap: 12px;
  }
  #toast {
    bottom: 95px;
  }
  .feedback {
    padding: 14px;
  }
  .progress-layout {
    gap: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.conversation-banner {
  background: var(--soft);
  padding: 23px 26px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 20px 0 28px;
}
.conversation-banner h2 {
  font-size: 23px;
  margin: 5px 0;
}
.conversation-banner p {
  font-size: 12px;
  color: var(--muted);
}
.conversation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.conversation-title {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.conversation-title h2 {
  font-size: 19px;
}
.scenario {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 16px;
  margin-top: 10px;
}
.scenario small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
}
.bubble {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 3px;
  padding: 19px 23px;
  margin: 17px 65px 17px 0;
}
.bubble.you {
  background: var(--soft);
  border-color: transparent;
  border-radius: 18px 18px 3px 18px;
  margin: 17px 0 17px 65px;
}
.bubble > p {
  font-size: 17px;
  line-height: 1.6;
  margin-top: 7px;
}
.bubble > p.translation {
  font-size: 13px;
  color: var(--muted);
}
.bubble-actions {
  display: flex;
  gap: 15px;
  margin-top: 6px;
}
.bubble-actions button {
  font-size: 11px;
}
.translation-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.translation-toggle input {
  min-height: 22px;
  width: 19px;
}
.dialogue-reply {
  margin-top: 25px;
}
.dialogue-reply .section-heading {
  margin-top: 0;
}
.dialogue-reply .option {
  font-size: 14px;
}
.dialogue-reply .options {
  grid-template-columns: 1fr;
}
.dialogue-reply textarea {
  width: 100%;
  resize: vertical;
}
.mobile-nav {
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 600px) {
  .conversation-grid {
    grid-template-columns: 1fr;
  }
  .conversation-banner {
    padding: 20px;
    display: block;
  }
  .conversation-banner button {
    margin-top: 15px;
  }
  .conversation-banner h2 {
    font-size: 22px;
  }
  .bubble {
    padding: 15px 17px;
    margin-right: 24px;
  }
  .bubble.you {
    margin-left: 24px;
  }
  .bubble > p {
    font-size: 16px;
  }
  .bubble > p.translation {
    font-size: 12px;
  }
  .mobile-nav a {
    font-size: 9px;
  }
  .dialogue-reply {
    padding: 18px;
  }
  .dialogue-reply h3 {
    font-size: 15px;
  }
}
#audio-dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  padding: 25px;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 85dvh;
  overflow: auto;
  box-shadow: 0 20px 80px #0004;
}
#audio-dialog::backdrop {
  background: #13292dcc;
}
.audio-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
#audio-dialog select {
  width: 100%;
  margin-top: 9px;
}
#audio-dialog label {
  font-size: 13px;
}
.audio-title h2 {
  font-size: 23px;
}
@media (max-width: 600px) {
  .header-actions {
    gap: 2px;
  }
  .header-actions .icon-btn {
    min-width: 38px;
  }
  .breadcrumb:before {
    margin-right: 6px;
  }
  .breadcrumb {
    font-size: 9px;
  }
}
.word-guide,
.reply-guide {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  text-align: left;
}
.word-guide summary,
.reply-guide summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
}
.word-guide summary span {
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
  margin-left: 8px;
}
.word-guide dl {
  margin: 10px 0;
}
.word-guide dl > div {
  display: grid;
  grid-template-columns: minmax(65px, 1fr) 3fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.word-guide dt {
  font-weight: 750;
  overflow-wrap: anywhere;
}
.word-guide dd {
  margin: 0;
  color: var(--muted);
}
.chunk-note {
  font-size: 12px !important;
  padding: 10px;
  background: var(--bg);
  border-radius: 8px;
  margin: 8px 0 !important;
}
.reply-guide p {
  font-size: 13px;
  margin: 10px 0;
}
.reply-guide {
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 10px;
}
.feedback .reply-guide,
.feedback .word-guide {
  color: var(--ink);
}
.word-guide > small,
.reply-guide > small {
  display: block;
  font-size: 11px;
}
button[hidden] {
  display: none !important;
}
/* Hej Sverige: quiet typography and practical, editorial navigation. */
:root {
  --bg: #faf9f6;
  --paper: #fff;
  --ink: #283b47;
  --muted: #697579;
  --line: #dfdfd8;
  --brand: #263f50;
  --soft: #f0f2ed;
  --shadow: none;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}
h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.4px;
}
h1 {
  font-size: 33px;
}
h2 {
  font-size: 22px;
}
button {
  font-weight: 500;
  border-radius: 7px;
}
.primary {
  background: #263f50 !important;
  border-color: #263f50 !important;
}
.primary:hover {
  background: #38596a !important;
}
.sidebar {
  width: 224px;
  background: var(--bg);
  padding: 32px 24px;
}
.shell {
  margin-left: 224px;
}
.brand-word {
  font-size: 49px;
  font-weight: 650;
  letter-spacing: -3px;
  line-height: 0.9;
}
.brand-dot {
  color: #b9694c;
}
.brand-word small {
  font-size: 10px;
  letter-spacing: 3px;
  margin-top: 13px;
  font-weight: 500;
}
.side-caption {
  letter-spacing: 1px;
  font-size: 9px;
  margin-top: 46px;
}
.nav-item {
  padding: 12px 9px;
  border-radius: 5px;
  font-weight: 500;
}
.nav-item.active {
  background: #e9edeb;
}
.nav-item .ni {
  font-size: 18px;
}
.nav-item small {
  font-size: 11px;
}
.side-bottom p {
  font-size: 14px;
  font-weight: 500;
}
.flag.mn:before {
  content: "";
}
header {
  height: 74px;
}
.shell main {
  max-width: 1160px;
  padding-top: 40px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 500;
}
.page-heading {
  margin-bottom: 27px;
}
.page-heading p {
  font-size: 14px;
}
.home-intro {
  margin: 0 0 35px;
}
.home-intro h1 {
  font-size: 42px;
  font-weight: 550;
  line-height: 1.2;
  margin: 15px 0 17px;
  letter-spacing: -1.2px;
}
.home-intro-question {
  display: block;
  margin-top: 12px;
  font-size: 0.65em;
  line-height: 1.4;
  letter-spacing: -0.3px;
}
.home-intro > p {
  color: var(--muted);
  font-size: 15px;
}
.home-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid #dddccf;
  border-radius: 8px;
  overflow: hidden;
  background: #f0eee4;
}
.feature-copy {
  padding: 30px 34px;
}
.feature-copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin: 17px 0 12px;
}
.feature-copy > p {
  font-size: 14px;
  margin-bottom: 24px;
  color: #6a7069;
}
.feature-note {
  margin: 28px 0;
  padding: 4px 33px;
  border-left: 1px solid #d6d5c8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}
.note-number {
  font-size: 10px;
  letter-spacing: 1px;
  color: #7b7d70;
}
.feature-note > p {
  font-size: 22px;
  line-height: 1.5;
  margin: 14px 0;
}
.note-phrase {
  margin: 12px 0;
}
.note-phrase b {
  font-size: 16px;
  font-weight: 550;
  display: block;
}
.note-phrase span {
  font-size: 13px;
  color: #697579;
}
.home-summary {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 32px;
}
.home-summary b {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  margin-right: 4px;
}
.home-summary button {
  margin-left: auto;
}
.category-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
}
.category {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 22px 0;
  min-height: 99px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: none;
  background: transparent;
}
.category:hover {
  transform: none;
  background: var(--soft);
}
.category-number {
  font-size: 11px;
  color: #8c918a;
  align-self: flex-start;
  padding-top: 4px;
}
.category h3 {
  font-size: 16px;
  font-weight: 500;
}
.category p {
  margin: 3px 0 0;
  font-size: 12px;
}
.category .arrow {
  position: static;
  margin-left: auto;
  font-size: 18px;
  margin-right: 5px;
}
.conversation-banner {
  border-radius: 7px;
  background: #f0eee4;
  padding: 23px;
  margin: 20px 0 28px;
}
.conversation-banner p {
  font-size: 13px;
}
.panel {
  border-radius: 8px;
  box-shadow: none;
}
.conversation-grid {
  gap: 22px;
}
.conversation-title .stat-icon {
  display: none;
}
.conversation-title h2 {
  font-size: 19px;
  font-weight: 550;
}
.scenario {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 17px 0;
  margin: 0;
  background: transparent;
}
.scenario b {
  font-weight: 550;
  font-size: 15px;
}
.scenario small {
  font-size: 12px;
}
.mode-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.mode-card {
  min-height: 124px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 3px;
  background: transparent;
}
.mode-card .mode-icon {
  display: none;
}
.mode-card b {
  font-weight: 550;
  font-size: 17px;
  margin: 0 0 8px;
}
.mode-card p {
  font-size: 13px;
}
.word {
  border-radius: 6px;
  box-shadow: none;
}
.word strong {
  font-weight: 550;
}
.bubble {
  border-radius: 10px 10px 10px 0;
}
.bubble.you {
  border-radius: 10px 10px 0 10px;
}
.chips .chip {
  border-radius: 6px;
  font-size: 12px;
}
.letter-tile {
  padding: 13px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 22px;
}
.health-words {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.health-words article {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.health-words b {
  font-weight: 600;
  font-size: 16px;
}
.health-words article > div span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.health-words article > p {
  margin-top: 8px;
  font-size: 14px;
}
.pain-builder label {
  display: block;
  font-size: 13px;
  margin: 20px 0;
}
.pain-builder select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.pain-result {
  padding: 20px;
  background: var(--soft);
  border-left: 3px solid #b9694c;
  margin: 20px 0;
}
.pain-result strong {
  font-size: 22px;
  font-weight: 500;
}
.pain-result p {
  font-size: 14px;
  margin-top: 12px;
  color: var(--muted);
}
body.dark .home-feature,
body.dark .conversation-banner {
  background: #293b3e;
  border-color: var(--line);
}
body.dark .feature-note,
body.dark .feature-copy > p,
body.dark .note-phrase span {
  color: var(--muted);
}
body.dark .nav-item.active {
  background: var(--soft);
}
@media (max-width: 900px) {
  .sidebar {
    width: 190px;
    padding: 28px 18px;
  }
  .shell {
    margin-left: 190px;
  }
  .home-intro h1 {
    font-size: 36px;
  }
  .home-feature {
    grid-template-columns: 1fr;
  }
  .feature-note {
    margin: 0 26px 20px;
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid #d6d5c8;
  }
  .feature-note > p br {
    display: none;
  }
  .feature-note > p {
    font-size: 19px;
  }
  .home-summary {
    gap: 15px;
    flex-wrap: wrap;
  }
  .home-summary button {
    margin-left: 0;
  }
}
@media (max-width: 600px) {
  .shell {
    margin-left: 0;
  }
  .shell main {
    padding: 29px 21px 20px;
  }
  .breadcrumb:before {
    content: "HejSan.";
    font-family:
      -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing: -1px;
    font-size: 29px;
    font-weight: 650;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .header-actions {
    gap: 10px;
  }
  header {
    height: 66px;
  }
  .home-intro {
    margin-bottom: 27px;
  }
  .home-intro h1 {
    font-size: 34px;
    line-height: 1.25;
    letter-spacing: -0.7px;
  }
  .home-intro > p {
    font-size: 14px;
  }
  .desktop-break {
    display: none;
  }
  .home-feature {
    display: block;
    border-radius: 6px;
  }
  .feature-copy {
    padding: 25px;
  }
  .feature-copy h2 {
    font-size: 29px;
  }
  .feature-note {
    margin: 0 25px 20px;
  }
  .feature-note > p {
    margin: 12px 0 0;
  }
  .note-phrase {
    margin: 9px 0;
  }
  .home-summary {
    font-size: 11px;
    margin-bottom: 23px;
    gap: 12px 25px;
  }
  .home-summary button {
    width: 100%;
    text-align: left;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  .category {
    min-height: 86px;
    padding: 18px 0;
  }
  .category h3 {
    font-size: 16px;
  }
  .category p {
    font-size: 12px;
  }
  .category-number {
    font-size: 11px;
  }
  .category .arrow {
    position: static;
  }
  .category-grid {
    gap: 0;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .mode-card {
    padding: 18px 0;
    min-height: 138px;
  }
  .mode-card b {
    font-size: 15px;
  }
  .mode-card p {
    font-size: 12px;
  }
  .mode-grid {
    gap: 0 18px;
  }
  .mobile-nav a {
    font-size: 10px;
    font-weight: 400;
  }
  .mobile-nav a.active {
    font-weight: 600;
  }
  .health-words {
    grid-template-columns: 1fr;
  }
  .health-words article {
    padding: 17px 0;
  }
  .pain-result strong {
    font-size: 19px;
  }
  .conversation-title h2 {
    font-size: 20px;
  }
  .scenario small {
    font-size: 12px;
  }
  .conversation-banner {
    padding: 21px;
  }
  .conversation-banner h3 {
    font-size: 18px;
  }
  .conversation-title .stat-icon {
    display: none;
  }
}

.brand-word {
  font-size: 39px;
  letter-spacing: -2px;
}
.brand-word small {
  font-size: 8px;
  letter-spacing: 1.5px;
}
.breadcrumb:before {
  font-size: 27px;
}
@media (max-width: 600px) {
  .breadcrumb {
    font-size: 0;
  }
  .breadcrumb:before {
    font-size: 27px;
  }
}

.exercise-help {
  margin: 16px 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.exercise-help summary {
  cursor: pointer;
  font-weight: 600;
}
.exercise-help p {
  margin: 10px 0 0;
  line-height: 1.65;
  font-size: 14px;
  max-width: 65ch;
}
