:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #64708a;
  --paper: #fffdf9;
  --background: #f3f6fb;
  --line: #dce3ef;
  --blue: #3158d8;
  --blue-dark: #2343ad;
  --green: #16835d;
  --red: #c54a4a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, #e4ecff 0, transparent 32rem),
    var(--background);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 700px) minmax(120px, 160px);
  align-items: start;
  justify-content: center;
  gap: clamp(1rem, 3vw, 3rem);
  width: min(100% - 2rem, 1180px);
  margin: 0 auto;
}

.app-shell {
  width: min(100% - 2rem, 700px);
  padding: 4.5rem 0 2rem;
}

.ad-slot {
  position: sticky;
  top: 2rem;
  margin-top: 8rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 250px;
  margin-top: 0.6rem;
  border: 1px dashed #b9c4d7;
  border-radius: 0.75rem;
  color: #8995aa;
  background: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.app-header {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.2rem, 7vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.subtitle {
  max-width: 37rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.trainer-card {
  padding: clamp(1.25rem, 5vw, 2.5rem);
  border: 1px solid rgba(220, 227, 239, 0.9);
  border-radius: 1.5rem;
  background: var(--paper);
  box-shadow: 0 1.5rem 4rem rgba(39, 57, 91, 0.1);
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.word-panel {
  margin: 2.4rem 0 2rem;
  padding: 2.4rem 1rem;
  border-radius: 1rem;
  background: #edf2ff;
  text-align: center;
}

.word-label {
  margin-bottom: 0.65rem;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.3rem, 10vw, 4.5rem);
  letter-spacing: -0.06em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.answer-form label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  font-weight: 750;
}

.input-row {
  display: flex;
  gap: 0.65rem;
}

input {
  width: 100%;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 88, 216, 0.15);
}

button {
  border: 0;
  border-radius: 0.7rem;
  font-weight: 750;
  transition: background 160ms ease, transform 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button,
.next-button {
  color: white;
  background: var(--blue);
}

.primary-button {
  flex: 0 0 auto;
  padding: 0.85rem 1.15rem;
}

.primary-button:hover,
.next-button:hover {
  background: var(--blue-dark);
}

.feedback {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-weight: 750;
}

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

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

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.secondary-button,
.next-button {
  min-height: 3rem;
  padding: 0.75rem 1rem;
}

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

.secondary-button:hover {
  background: #e2e7f1;
}

.next-button {
  grid-column: 1 / -1;
}

.hint {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--ink);
  background: #f0f4ff;
  line-height: 1.5;
}

.hint-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.82rem;
}

.site-nav a,
.page-link {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover,
.page-link:hover {
  text-decoration: underline;
}

.simple-page {
  max-width: 700px;
}

.simple-page h1 {
  margin-bottom: 1rem;
}

.simple-page p {
  color: var(--muted);
  line-height: 1.7;
}

.simple-page .page-link {
  display: inline-block;
  margin-top: 1rem;
}

.page-heading {
  margin: 2rem 0 0.6rem;
  font-size: 1.35rem;
}

@media (max-width: 560px) {
  .page-layout {
    display: block;
    width: 100%;
  }

  .app-shell {
    width: min(100% - 2rem, 700px);
    margin: 0 auto;
    padding-top: 2.5rem;
  }

  .ad-slot {
    display: none;
  }

  .input-row {
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}
