@font-face {
  font-family: "Outfit";
  src: url("/static/fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #1c2320;
  --muted: #5b6560;
  --line: #dfe3df;
  --paper: #fdfdfb;
  --surface: #ffffff;
  --accent: #1f5c46;
  --accent-dark: #163f30;
  --accent-soft: #e7f1ec;
  --warn-bg: #fdf1e7;
  --warn-ink: #7a4a12;
  --error-bg: #fbe9e9;
  --error-ink: #8a2323;
  --voice-male: #1d63c9;
  --voice-female: #d6338a;
  --radius: 10px;
  --max-width: 68rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #8fbfa9;
  outline-offset: 2px;
}

img { max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
p { margin: 0 0 1rem; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem 0.35rem 0.5rem;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: #bfe0d1;
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.brand b { font-weight: 700; color: #fff; }
.brand img { display: block; border-radius: 7px; object-fit: cover; }
@media (max-width: 420px) { .brand-by { display: none; } }
nav.main-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
nav.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}
nav.main-nav a.button, .button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.button:hover { background: var(--accent-dark); }
.button.secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
}
.button.secondary:hover { background: var(--accent-soft); }
.button.danger { background: #9c2b2b; }
.button.danger:hover { background: #7a1f1f; }
.button-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

main { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem 1rem 4rem; }
main.narrow { max-width: 36rem; }

.hero {
  background: linear-gradient(160deg, var(--accent-soft), var(--paper));
  padding: 3rem 1rem;
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.flash {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.flash.success { background: var(--accent-soft); color: var(--accent-dark); }
.flash.error { background: var(--error-bg); color: var(--error-ink); }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); }

form.stacked { display: flex; flex-direction: column; gap: 1rem; max-width: 26rem; }
label { font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 0.3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 6rem; }
.field-hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row input { width: auto; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; }

.progress-bar { background: var(--line); border-radius: 999px; height: 0.6rem; overflow: hidden; margin: 0.4rem 0 0.8rem; }
.progress-bar-fill { background: var(--accent); height: 100%; }

.stat-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0; }
.stat { min-width: 8rem; }
.stat .value { font-size: 1.6rem; font-weight: 700; color: var(--accent-dark); }
.stat .label { color: var(--muted); font-size: 0.85rem; }

.lesson-content { font-size: 1.05rem; }
.lesson-content h3 { margin-top: 1.4rem; color: var(--accent-dark); }
.lesson-content pre { background: var(--accent-soft); padding: 0.8rem; border-radius: 8px; overflow-x: auto; }

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b1512;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-consent {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.6rem; color: #fff; text-align: center; padding: 1rem;
}
.video-consent button { cursor: pointer; }

.watermark-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  user-select: none;
}
.watermark-layer span {
  display: block;
  color: rgba(31, 92, 70, 0.08);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: rotate(-26deg);
  white-space: nowrap;
  padding: 2.4rem 0;
}
.content-page { position: relative; z-index: 1; }

@media print {
  .watermark-layer, .site-header, .site-footer, .no-print { display: none !important; }
  main::after {
    content: "This lesson is personal and cannot be printed or shared.";
    display: block;
    padding: 2rem 0;
    font-weight: 600;
  }
  .lesson-content, .content-page { display: none !important; }
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }

.cookie-notice {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: var(--accent-dark); color: #fff; padding: 0.9rem 1rem;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between;
}
.cookie-notice p { margin: 0; font-size: 0.9rem; max-width: 40rem; }
.cookie-notice[hidden] { display: none; }

.qr-box { text-align: center; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }
.pricing-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--surface); }
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pricing-card .price { font-size: 2rem; font-weight: 700; margin: 0.5rem 0; }

.streak-flame { font-size: 1.4rem; }

@media (max-width: 30rem) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  nav.main-nav { width: 100%; justify-content: space-between; }
}

.syllabus { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.syllabus li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.syllabus li:last-child { border-bottom: 0; }
.syllabus li.locked { color: var(--muted); }
.syllabus-day { flex: 0 0 3.6rem; font-weight: 600; color: var(--accent-dark); font-size: 0.9rem; }
.syllabus li.locked .syllabus-day { color: var(--muted); }
.syllabus-status { margin-left: auto; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.course-syllabus { margin-top: 1.5rem; }
.course-block summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.course-block summary::-webkit-details-marker { display: none; }
.course-block summary h2 { margin: 0; }
.course-block summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.course-block:not([open]) summary::after { content: "▸"; }
.course-meta { color: var(--muted); font-size: 0.9rem; }

.exam-module { margin-top: 2rem; }
.exam-part h3 { margin-top: 0; }
.exam-text { background: var(--accent-soft); border-radius: 8px; padding: 0.8rem 1rem; margin: 0.6rem 0; }
.exam-text p { margin: 0.35rem 0; }
.exam-item { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; margin: 0.6rem 0; }
.exam-item legend { font-weight: 600; padding: 0 0.3rem; }
.exam-item.right { border-color: #2e7d32; }
.exam-item.wrong { border-color: #c62828; }
.exam-mark { margin: 0.4rem 0 0; font-size: 0.92rem; }
.exam-part details { margin: 0.6rem 0; }
.exam-part summary { cursor: pointer; color: var(--accent-dark); font-weight: 600; }

/* Registration */
.phone-row { display: flex; gap: .5rem; }
.phone-row select { flex: 0 0 9.5rem; min-width: 0; }
.phone-row input { flex: 1; min-width: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Official exam papers */
.exam-pages img { display: block; width: 100%; height: auto; margin: 0 0 1rem; border: 1px solid #ddd; border-radius: 4px; }

/* Optional "more on this topic" material on lesson pages */
.more-block { margin: 0.8rem 0 1.2rem; border: 1px solid var(--line); border-radius: 8px; background: var(--accent-soft); }
.more-block > summary { cursor: pointer; padding: 0.6rem 0.9rem; font-weight: 600; color: var(--accent-dark); }
.more-block[open] > summary { border-bottom: 1px solid var(--line); }
.more-item { margin: 0; padding: 0.5rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.more-item:last-child { border-bottom: 0; border-radius: 0 0 8px 8px; }
.more-item > summary { cursor: pointer; font-weight: 600; }
.more-item table { margin-top: 0.4rem; }
.more-answers summary { cursor: pointer; color: var(--accent-dark); font-size: 0.92rem; }

/* "Get the app & daily alerts" card on the dashboard */
.app-card { border-left: 4px solid var(--accent); background: var(--accent-soft); }
.app-card h2 { margin-top: 0; }
.app-card .button-row { margin: 0.75rem 0; }
.app-card-note { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 0; }
.app-card-note:empty { display: none; }

/* Last day of a level: how to move up */
.level-card { border-left: 4px solid var(--accent); }
.level-card h2 { margin-top: 0; }
.level-up .button-row { margin-top: 0.75rem; }

/* Vocabulary pronunciation button (lesson page) */
.say-btn { border: 0; background: none; padding: 0 0.25rem; margin-left: 0.15rem; font-size: 0.95em; line-height: 1; cursor: pointer; opacity: 0.7; vertical-align: baseline; }
.say-btn:hover, .say-btn:focus-visible { opacity: 1; }
.say-btn.playing { opacity: 1; animation: say-pulse 0.8s ease-in-out infinite alternate; }
@keyframes say-pulse { from { transform: scale(1); } to { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .say-btn.playing { animation: none; } }
.listen { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.75rem 0; }
.listen span { font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }
.voice-icon { vertical-align: -0.15em; flex-shrink: 0; }
.voice-male { color: var(--voice-male); }
.voice-female { color: var(--voice-female); }
.voice-label { font-weight: 400; font-size: 0.8em; }
.voice-note { font-size: 0.85rem; color: var(--muted); margin: -0.5rem 0 1rem; }
.voice-note .voice-icon { vertical-align: -0.2em; }
/* "Easy" (standard German) or "Difficult" (Austrian/Swiss) clips. */
[data-audio-quality="easy"] .aq-difficult, [data-audio-quality="difficult"] .aq-easy { display: none; }
.accent-tag { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); vertical-align: super; margin-left: 0.05rem; }
.listen audio { width: 100%; max-width: 28rem; }
.speed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.5rem 0 1rem; font-size: 0.9rem; }
.speed-btn { border: 1px solid currentColor; background: none; color: inherit; border-radius: 999px; padding: 0.2rem 0.7rem; cursor: pointer; opacity: 0.65; font: inherit; }
.speed-btn[aria-pressed="true"] { opacity: 1; font-weight: 600; }
.model-answer { margin: 0.75rem 0; }
.model-answer summary { cursor: pointer; font-weight: 600; }
.model-answer-item h4 { margin: 0.75rem 0 0.25rem; }

/* Reviews */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.star-picker { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.15rem; }
.star-picker legend { font-weight: 600; margin-bottom: 0.3rem; }
.star-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-picker label { font-size: 2.2rem; line-height: 1; color: #c9cec9; cursor: pointer; margin: 0; }
.star-picker input:checked ~ label,
.star-picker label:hover, .star-picker label:hover ~ label { color: #e8a317; }
.star-picker input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.review-card { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.review-card blockquote { margin: 0; font-style: italic; overflow-wrap: anywhere; white-space: pre-line; }
.review-card figcaption { color: var(--muted, #5b665f); font-size: 0.92rem; margin-top: auto; }
.review-stars { font-size: 1.2rem; letter-spacing: 0.1rem; }
.review-stars .on { color: #e8a317; }
.review-stars .off { color: #c9cec9; }

/* Check lists: writing feedback and the speaking simulator */
.feedback-list { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.feedback-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem 0; }
.fb-icon { flex: 0 0 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.fb-ok .fb-icon { background: var(--accent-soft); color: var(--accent-dark); }
.fb-warn .fb-icon { background: var(--warn-bg); color: var(--warn-ink); }
.fb-fail .fb-icon { background: var(--error-bg); color: var(--error-ink); }
.grammar-list { padding-left: 1.2rem; margin: .3rem 0 1rem; }
.grammar-list li { margin: .35rem 0; overflow-wrap: anywhere; }
.grammar-list mark { background: var(--error-bg); color: var(--error-ink); padding: 0 .15rem; border-radius: .2rem; }
.teacher-card { display: flex; gap: 1rem; align-items: flex-start; }
.teacher-card img { border-radius: 50%; object-fit: cover; flex: 0 0 96px; }
.results-public-list { list-style: none; padding: 0; } .results-public-list li { padding: .25rem 0; }
@media (max-width: 480px) { .teacher-card { flex-direction: column; } }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin: .8rem 0 1rem; }
.offer-tile { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.offer-tile span:last-child { color: var(--muted); font-size: .92rem; }
