:root {
  --bg: #f7f9fb;
  --paper: #ffffff;
  --ink: #152331;
  --muted: #667786;
  --line: #dde7ef;
  --green: #2eb872;
  --green-dark: #168653;
  --blue: #2d78d6;
  --blue-dark: #174f93;
  --red: #d84b35;
  --shadow: 0 18px 42px rgba(25, 42, 60, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(247, 249, 251, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.nav,
.section-buttons,
.toolbar,
.trainer-top,
.trainer-actions,
.sound-group,
.dialog-forms {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.nav {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.language-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.language-switcher a {
  display: grid;
  width: 42px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.language-switcher img {
  display: block;
  width: 28px;
  height: 20px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(21, 35, 49, 0.1);
  object-fit: cover;
}

.language-switcher a:hover {
  background: white;
  border-color: var(--line);
  transform: translateY(-1px);
}

.language-switcher a.active {
  background: white;
  border-color: #b9ccd9;
  box-shadow: 0 6px 16px rgba(25, 42, 60, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(330px, 0.7fr) minmax(560px, 1fr);
  gap: clamp(20px, 4vw, 52px);
  align-items: start;
  min-height: 0;
  padding: clamp(22px, 3.4vw, 36px) clamp(18px, 5vw, 72px) clamp(14px, 2.2vw, 24px);
}

.hero-copy {
  max-width: 560px;
}

.hero > div:first-child {
  display: grid;
  align-content: start;
  grid-template-rows: auto 1fr;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 54px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.hero p,
.section-heading p,
.feedback,
.catalog-count,
.phrasal-section p,
.dialog-translation,
.transcription {
  color: var(--muted);
  line-height: 1.65;
}

.hero p {
  max-width: 720px;
  margin-bottom: 26px;
  font-size: 19px;
}

.section-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 12px;
  flex-wrap: wrap;
  align-content: end;
  align-items: stretch;
  max-width: 500px;
}

.section-button {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(25, 42, 60, 0.07);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.section-button:hover {
  transform: translateY(-2px);
  border-color: #b9ccd9;
}

.section-button span {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.section-button small {
  display: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.section-button.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
  box-shadow: 0 14px 30px rgba(46, 184, 114, 0.24);
}

.section-button.active small {
  color: rgba(255, 255, 255, 0.78);
}

[hidden] {
  display: none !important;
}

.hero-preview {
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  align-self: start;
  box-shadow: none;
}

.sample-card {
  display: grid;
  grid-template-columns: minmax(340px, 1.35fr) minmax(260px, 0.9fr);
  align-items: stretch;
  min-height: 214px;
  gap: 7px;
  padding: 0;
}

.sample-image-wrap {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  order: initial;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 34px rgba(25, 42, 60, 0.08);
}

.sample-image {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sample-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 34px rgba(25, 42, 60, 0.08);
  order: initial;
}

.sample-small-logo {
  display: none;
  width: 52px;
  height: 52px;
  margin-bottom: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(25, 42, 60, 0.12);
}

.sample-number {
  width: fit-content;
  border-radius: 999px;
  background: #e7f8ef;
  color: var(--green-dark);
  display: none;
  font-size: 14px;
  font-weight: 900;
  padding: 6px 10px;
}

.sample-body h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 36px);
  line-height: 1;
}

.sample-body p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.25;
}

.sample-forms {
  display: grid;
  gap: 9px;
}

.sample-forms div {
  display: grid;
  grid-template-columns: 94px minmax(95px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f8fb;
}

.sample-forms span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.sample-forms strong {
  font-size: 14px;
}

.sample-forms small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.sample-example-row {
  grid-template-columns: 94px 1fr;
}

.sample-example-row strong {
  overflow-wrap: break-word;
  line-height: 1.25;
}

.section {
  position: relative;
  padding: clamp(34px, 5vw, 58px) clamp(18px, 5vw, 72px);
}

.anchor-target {
  position: absolute;
  top: -86px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 24px;
}

.practice-section {
  background: white;
  padding-top: clamp(10px, 1.8vw, 20px);
}

.practice-section .section-heading {
  max-width: none;
  margin-bottom: 10px;
}

.practice-section .section-heading h2 {
  white-space: nowrap;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.trainer {
  display: grid;
  grid-template-rows: 28px 350px auto minmax(28px, auto);
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 28px rgba(25, 42, 60, 0.07);
}

.practice-grid .trainer {
  height: 620px;
  min-height: 0;
}

.letters-trainer {
  grid-template-rows: 28px 350px auto minmax(28px, 1fr) minmax(24px, auto);
}

.letters-trainer .letters-favorite-hint {
  align-self: end;
}

.trainer h3 {
  margin-bottom: 0;
}

.letters-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: center;
  justify-items: center;
  align-content: center;
  min-height: 350px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.letters-image {
  display: block;
  width: min(100%, 360px);
  max-height: 255px;
  aspect-ratio: 1.3;
  object-fit: contain;
  border-radius: 8px;
}

.letters-task {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.letters-translation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.letters-translation {
  margin: 0;
  color: var(--ink);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.refresh-button {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4f8;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.refresh-button:hover {
  border-color: var(--blue);
  background: white;
}

.letters-help {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  white-space: nowrap;
}

.letters-favorite-hint {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.hint-star {
  display: inline-block;
  margin-left: 6px;
  color: #111820;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  vertical-align: -5px;
}

.letters-input-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-self: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.letter-bank-zone {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.letter-bank-zone > span {
  display: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.trainer-top {
  min-height: 28px;
  align-self: start;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.trainer-top strong {
  color: var(--ink);
}

.prompt {
  min-height: 58px;
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.55;
}

.sentence-workspace {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  min-height: 350px;
  padding: 0 18px;
}

.sentence-task-group {
  display: contents;
}

.sentence-text {
  margin: 0;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 900;
  line-height: 1.25;
}

.sentence-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sentence-blank {
  display: inline-block;
  min-width: 72px;
  border-bottom: 3px solid var(--ink);
  text-align: center;
}

.sentence-blank.filled {
  min-width: 0;
  border-bottom-color: transparent;
  color: var(--green-dark);
}

.sentence-translation {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.sentence-feedback {
  min-height: 26px;
  margin-top: 2px;
}

.sentence-input-panel {
  display: grid;
  gap: 10px;
  align-self: start;
  padding: 0 18px;
}

.sentence-help {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.letter-slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 38px;
}

.letter-answer-row {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 10px;
  width: min(100%, 548px);
}

.speaker-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4f8;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.speaker-toggle.active {
  border-color: #cfe0ee;
  background: white;
}

.speaker-toggle:hover {
  border-color: var(--blue);
}

.slot,
.form-slot {
  display: grid;
  width: 146px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.slot.blank,
.form-slot:empty {
  color: transparent;
}

.slot.correct,
.form-slot.correct,
.form-slot.complete {
  border-color: var(--green);
  background: #e8f8f0;
  color: var(--green-dark);
}

.form-slot.active {
  border-color: #7d9be8;
  background: white;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(45, 120, 214, 0.18);
}

.letter-bank {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 12px;
  max-width: none;
  justify-self: center;
}

.letter-tile {
  display: grid;
  width: 54px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfc;
  color: var(--ink);
  cursor: pointer;
  font-size: 21px;
  font-weight: 900;
  box-shadow: 0 2px 0 rgba(25, 42, 60, 0.05);
}

.letter-tile:hover {
  border-color: #9fb5e8;
}

.letter-tile.used {
  opacity: 0.35;
}

.letter-tile.shake {
  border-color: var(--red);
  color: var(--red);
  animation: shake-letter 260ms ease;
}

@keyframes shake-letter {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-4px);
  }
}

.trainer input,
.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
  padding: 0 13px;
}

.trainer input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 120, 214, 0.12);
}

.trainer-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 2px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  padding: 0 16px;
}

.primary {
  background: var(--green);
  color: white;
}

.secondary {
  background: #eef4f8;
  color: var(--ink);
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.choice {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  padding: 0 26px;
  box-shadow: 0 2px 0 rgba(25, 42, 60, 0.04);
}

.choice-fly {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  margin: 0;
}

.choice.correct {
  border-color: var(--green);
  background: #e8f8f0;
  color: var(--green-dark);
}

.choice.wrong {
  border-color: var(--red);
  background: #fff0ec;
  color: var(--red);
}

.feedback {
  min-height: 28px;
  margin: 0;
  font-weight: 800;
}

.feedback.good {
  color: var(--green-dark);
}

.feedback.bad {
  color: var(--red);
}

.toolbar {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.toolbar label {
  display: grid;
  flex: 1;
  min-width: 210px;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
}

.toolbar label:first-child {
  flex: 2;
  min-width: min(100%, 320px);
}

.catalog-count {
  margin-bottom: 16px;
  font-weight: 800;
}

.table-wrap {
  max-height: 680px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 28px rgba(25, 42, 60, 0.06);
}

.verbs-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.verbs-table th,
.verbs-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.verbs-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f7fa;
  color: #314454;
  font-size: 13px;
  text-transform: uppercase;
  box-shadow: 0 1px 0 var(--line);
}

.verbs-table .favorite-col,
.verbs-table td.favorite-cell {
  width: 56px;
  padding-left: 12px;
  padding-right: 8px;
  text-align: center;
}

.verbs-table th:nth-child(3),
.verbs-table th:nth-child(4),
.verbs-table th:nth-child(5) {
  width: 21%;
}

.verbs-table th:nth-child(2),
.verbs-table td.level-cell {
  width: 96px;
  color: #63778a;
  font-weight: 800;
}

.verbs-table th:nth-child(7),
.verbs-table td:nth-child(7) {
  width: 104px;
  text-align: right;
}

.verbs-table tr {
  cursor: pointer;
}

.verbs-table tbody tr {
  transition: transform 0.42s ease, opacity 0.42s ease, background 0.2s ease;
}

.verbs-table tbody tr:hover {
  background: #f7fbfd;
}

.verbs-table tbody tr:focus-within {
  background: #f2faf6;
}

.verbs-table tbody tr:focus {
  outline: 3px solid rgba(46, 184, 114, 0.28);
  outline-offset: -3px;
}

.verbs-table tr:last-child td {
  border-bottom: 0;
}

.favorite-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #111820;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: background 0.16s ease, transform 0.16s ease;
}

.favorite-button:hover {
  background: #eef5fb;
  transform: scale(1.06);
}

.favorite-button.active {
  color: #111820;
}

.favorite-button.install-required {
  color: #8a98a6;
}

.favorite-button:focus-visible {
  outline: 3px solid rgba(46, 184, 114, 0.28);
  outline-offset: 2px;
}

.favorite-button.favorite-fill {
  animation: favorite-fill 0.42s ease both;
}

.favorite-button.favorite-unfill {
  animation: favorite-unfill 0.22s ease both;
}

.verbs-table tbody tr.favorite-row-lift {
  background: #f2faf6;
  animation: favorite-row-lift 0.52s ease both;
}

@keyframes favorite-fill {
  0% {
    color: #111820;
    transform: scale(1);
  }
  45% {
    color: #050607;
    transform: scale(1.34);
  }
  100% {
    color: #050607;
    transform: scale(1.08);
  }
}

@keyframes favorite-unfill {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes favorite-row-lift {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  68% {
    transform: translateY(-10px);
    opacity: 1;
  }
  100% {
    transform: translateY(-24px);
    opacity: 0;
  }
}

.verb-form-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  min-width: 0;
}

.verb-form-inline strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.form-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.transcription {
  font-size: 13px;
  white-space: nowrap;
}

.sound-group {
  gap: 8px;
  margin-top: 6px;
}

.sound-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.sound-button:hover {
  border-color: var(--blue);
}

.open-card {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
  padding: 0 10px;
  white-space: nowrap;
}

.phrasal-practice-grid {
  margin-bottom: 34px;
}

.phrasal-list-heading {
  margin-top: 20px;
}

.phrasal-answer-row {
  width: min(100%, 620px);
}

.phrasal-answer-row .letter-slots {
  gap: 7px;
  min-height: 38px;
}

.phrasal-answer-row .form-slot {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.phrase-space {
  width: 14px;
  height: 1px;
}

.phrasal-letters-trainer .letter-bank {
  flex-wrap: wrap;
  max-width: 720px;
}

.phrasal-example-translation {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.phrasal-table {
  min-width: 1040px;
}

.phrasal-table th:nth-child(1),
.phrasal-table td:nth-child(1) {
  width: 56px;
  text-align: center;
}

.phrasal-table th:nth-child(2),
.phrasal-table td:nth-child(2) {
  width: 20%;
}

.phrasal-table th:nth-child(3),
.phrasal-table td:nth-child(3) {
  width: 13%;
}

.phrasal-table th:nth-child(4),
.phrasal-table td:nth-child(4) {
  width: 28%;
}

.phrasal-table th:nth-child(5),
.phrasal-table td:nth-child(5) {
  width: 30%;
}

.phrasal-table th:nth-child(6),
.phrasal-table td:nth-child(6) {
  width: 96px;
  text-align: right;
}

.phrasal-section {
  background: #eef5f9;
}

.articles-section {
  padding-top: 28px;
  background: #f7f9fb;
}

.article-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.article-link {
  display: grid;
  min-width: 0;
  min-height: 96px;
  align-items: center;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 18px 16px;
  text-decoration: none;
  text-align: center;
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 0 10px 24px rgba(25, 42, 60, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.article-link:hover {
  border-color: #b9ccd9;
  transform: translateY(-1px);
}

.app-cta-section {
  padding-top: 34px;
  background: #f7f9fb;
}

.app-cta {
  display: grid;
  justify-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(25, 42, 60, 0.06);
}

.app-cta h2 {
  max-width: 780px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
}

.seo-page main {
  padding-top: 24px;
}

.verb-seo-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 28px;
  box-shadow: 0 12px 28px rgba(25, 42, 60, 0.06);
}

.verb-seo-image {
  display: grid;
  place-items: center;
}

.verb-seo-image img {
  width: min(100%, 520px);
  max-height: 430px;
  object-fit: contain;
}

.verb-seo-content {
  display: grid;
  gap: 14px;
}

.verb-seo-content h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}

.verb-seo-section audio {
  width: 148px;
  height: 34px;
}

.verb-examples-section h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
}

.verb-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.example-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(25, 42, 60, 0.05);
}

.example-card p {
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.45;
}

.example-card p + p,
.example-card small {
  color: var(--muted);
}

.article-page {
  background: #f7f9fb;
}

.article-shell {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: clamp(24px, 5vw, 56px);
  box-shadow: 0 12px 28px rgba(25, 42, 60, 0.06);
}

.article-shell h1 {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.12;
}

.article-shell h2 {
  margin: 34px 0 14px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.14;
}

.article-shell p,
.article-shell li {
  color: #314454;
  font-size: 18px;
  line-height: 1.72;
}

.article-shell p {
  margin: 0 0 16px;
  text-align: justify;
  text-justify: inter-word;
}

.article-shell ul {
  margin: 0 0 20px;
  padding-left: 24px;
}

.article-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin: 0 0 30px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.article-toc strong {
  color: var(--ink);
  font-size: 16px;
  margin-right: 4px;
}

.article-toc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
}

.article-toc a {
  display: inline-flex;
  align-items: center;
  color: #314454;
  padding: 0;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.article-toc a:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin: 0 10px;
  border-radius: 999px;
  background: #b9ccd9;
}

.article-toc a:hover {
  color: var(--blue-dark);
}

.article-example {
  display: grid;
  gap: 6px;
  margin: 16px 0 22px;
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: #f2faf6;
  padding: 14px 18px;
}

.article-example p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.article-nav-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(25, 42, 60, 0.06);
}

.article-nav-link.next {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.article-nav-link:hover {
  transform: translateY(-1px);
}

.verb-dialog {
  width: min(1080px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  overflow-x: hidden;
  box-shadow: var(--shadow);
}

.verb-dialog::backdrop,
.install-dialog::backdrop {
  background: rgba(11, 22, 32, 0.52);
}

.install-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.install-card {
  display: grid;
  gap: 18px;
  padding: 30px;
}

.install-head {
  display: grid;
  grid-template-columns: 86px 1fr 54px;
  align-items: center;
  min-height: 86px;
}

.install-icon {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(25, 42, 60, 0.14);
}

.install-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
  text-align: center;
}

.install-card p {
  margin: 0;
  color: #5d7082;
  font-size: 16px;
  line-height: 1.55;
}

.store-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.store-link {
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  text-decoration: none;
}

.store-link:hover {
  transform: translateY(-1px);
}

.store-badge {
  display: block;
  width: auto;
  height: 54px;
  object-fit: contain;
}

.google-badge {
  height: 78px;
  transform: translateY(-1px);
}

.app-store-badge {
  height: 54px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-card {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(0, 1.05fr);
  gap: 22px;
  padding: 22px;
  align-items: center;
}

.phrasal-dialog-card {
  align-items: stretch;
  grid-template-columns: minmax(500px, 0.95fr) minmax(0, 1.05fr);
}

.dialog-image-wrap {
  display: grid;
  min-height: 500px;
  place-items: center;
  align-self: stretch;
}

.dialog-image-frame {
  position: relative;
  width: min(100%, 520px);
}

.dialog-verb-image {
  display: block;
  width: 100%;
  max-height: 470px;
  aspect-ratio: 1.48;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}

.image-watermark {
  position: absolute;
  top: 10px;
  left: 10px;
  transform: none;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 22px rgba(11, 22, 32, 0.22);
}

.dialog-meta {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 34px;
}

.dialog-number {
  width: fit-content;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
}

.dialog-translation {
  margin-bottom: 0;
  font-size: 18px;
}

.dialog-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-title-row h2 {
  margin: 0;
  line-height: 1;
}

.dialog-title-block {
  display: grid;
  gap: 6px;
}

.dialog-title-transcription {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
}

.dialog-forms {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

.phrasal-dialog-card .dialog-image-wrap {
  min-height: 0;
  place-items: stretch;
}

.phrasal-dialog-card .dialog-image-frame {
  width: 100%;
  height: clamp(390px, 38vw, 450px);
  overflow: hidden;
  border-radius: 8px;
}

.phrasal-dialog-card .dialog-verb-image {
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.phrasal-dialog-card .dialog-meta {
  grid-template-rows: auto auto 1fr;
  align-content: stretch;
  height: clamp(390px, 38vw, 450px);
  padding-right: 0;
}

.phrasal-dialog-card .dialog-title-row .sound-button {
  transform: translateY(6px);
}

.phrasal-dialog-card .dialog-forms {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

.phrasal-dialog-card .dialog-form-row {
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  padding: 16px 14px;
}

.phrasal-dialog-card .dialog-form-row strong {
  font-size: 18px;
  line-height: 1.28;
}

.dialog-form-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #f5f8fb;
}

.dialog-form-row > div {
  min-width: 0;
}

.dialog-form-row strong,
.dialog-form-row .transcription,
.dialog-translation {
  overflow-wrap: break-word;
  white-space: normal;
}

.dialog-form-row span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 820px) {
  .hero,
  .practice-grid,
  .dialog-card,
  .verb-seo-card,
  .verb-examples {
    grid-template-columns: 1fr;
  }

  .practice-grid .trainer {
    height: auto;
    min-height: 0;
  }

  .dialog-meta {
    padding-right: 0;
  }

  .dialog-image-wrap {
    min-height: auto;
  }

  .phrasal-dialog-card .dialog-image-frame,
  .phrasal-dialog-card .dialog-meta {
    height: auto;
  }

  .phrasal-dialog-card .dialog-verb-image {
    height: auto;
    max-height: 360px;
    object-fit: contain;
  }

  .sample-card {
    grid-template-columns: 1fr;
  }

  .sample-image-wrap {
    order: initial;
  }

  .sample-image {
    min-height: auto;
    aspect-ratio: 1.48;
  }

  .sample-body {
    order: initial;
  }

  .letters-workspace {
    grid-template-columns: 1fr;
  }

  .letters-task,
  .letter-bank,
  .letter-slots {
    justify-items: center;
    justify-content: center;
  }

  .letters-translation {
    text-align: center;
  }

  .letters-input-panel {
    grid-template-columns: 1fr;
  }

  .letters-help {
    white-space: normal;
  }

  .letters-favorite-hint {
    text-align: left;
  }
}

@media (max-width: 1160px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero > div:first-child {
    grid-template-rows: auto;
  }

  .hero-copy {
    max-width: 860px;
  }

  .hero-preview {
    max-width: 760px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .nav,
  .language-switcher,
  .toolbar,
  .trainer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    gap: 10px;
  }

  .language-switcher {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
  }

  .choices {
    justify-content: center;
    gap: 10px;
  }

  .choice {
    flex: 1 1 138px;
    min-width: 0;
    padding: 0 14px;
    font-size: 18px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .section-button,
  .button {
    width: 100%;
  }

  .section-buttons {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .practice-section .section-heading h2 {
    white-space: normal;
  }

  .dialog-form-row {
    grid-template-columns: 82px 1fr 42px;
  }

  .article-toc-grid {
    grid-template-columns: 1fr;
  }

  .letters-image {
    width: min(100%, 310px);
    justify-self: center;
  }

  .letter-answer-row {
    grid-template-columns: minmax(0, 1fr) 36px;
    width: 100%;
  }

  .sentence-workspace,
  .sentence-input-panel {
    padding-inline: 0;
  }

  .sentence-title-row {
    align-items: flex-start;
  }

  .sentence-text {
    overflow-wrap: break-word;
  }

  .slot,
  .letter-tile {
    width: 50px;
    height: 44px;
  }

  .letter-bank {
    flex-wrap: wrap;
    max-width: 270px;
  }

  .slot {
    width: 72px;
  }

  .form-slot {
    width: 94px;
    height: 36px;
  }
}
