/* Galilea brand tokens (rendered values of the site's oklch tokens). */
:root {
  --ink: #0a140f;
  --ink-soft: #44524d;
  --muted: #6b7a74;
  --bg: #f6f9f7;
  --surface: #ffffff;
  --line: #e3eae6;
  --green: #277539;
  --green-bright: #4c9a58;
  --green-soft: #e2f4e3;
  --gold: #f0c04e;
  --gold-soft: #feedc9;
  --red: #d9302e;
  --shadow: 0 1px 2px rgb(10 20 15 / 0.06), 0 8px 24px rgb(10 20 15 / 0.06);
  --radius: 18px;
  --font-heading: 'Manrope', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9f0ec;
    --ink-soft: #c2cec8;
    --muted: #93a39c;
    --bg: #0b130f;
    --surface: #131d18;
    --line: #24322b;
    --green: #5fb26c;
    --green-bright: #6fc27c;
    --green-soft: #17301f;
    --gold-soft: #3a3016;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: var(--green);
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

#app:focus {
  outline: none;
}

.muted {
  color: var(--muted);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand img {
  border-radius: 50%;
  flex: none;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand strong {
  font-family: var(--font-heading);
  font-weight: 800;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-link {
  flex: none;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Home ---------- */
.hero {
  padding: 36px 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(32px, 7vw, 52px);
  font-weight: 800;
  max-width: 14ch;
}

.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 14px 0 22px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.progress-bar {
  flex: 1 1 180px;
  max-width: 320px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.progress-label {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--green) 88%, black);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin: 34px 0 14px;
}

.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition:
    transform 0.15s ease,
    border-color 0.2s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--green) 40%, var(--line));
}

.card-num {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  background: var(--green-soft);
  color: var(--green);
}

.card.done .card-num {
  background: var(--green);
  color: #fff;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
}

.card p {
  margin: 4px 0 8px;
  color: var(--ink-soft);
  font-size: 15px;
}

.card .meta {
  font-size: 13px;
  color: var(--muted);
}

.card .meta .ok {
  color: var(--green);
  font-weight: 600;
}

/* ---------- Home: intro, roles, modules ---------- */
.intro {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.roles {
  width: 100%;
  max-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}

.roles th,
.roles td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

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

.roles th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: color-mix(in srgb, var(--green-soft) 45%, var(--surface));
}

.roles td:first-child {
  font-weight: 600;
  width: 34%;
}

.roles a {
  font-weight: 600;
  white-space: nowrap;
}

.modules {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 760px) {
  .modules {
    grid-template-columns: repeat(3, 1fr);
  }
}

.module {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition:
    transform 0.15s ease,
    border-color 0.2s ease;
}

.module:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--green) 40%, var(--line));
}

.module .who {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

.module h3 {
  font-size: 22px;
  font-weight: 800;
}

.module p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  flex: 1;
}

.module .progress-bar {
  max-width: none;
  flex: none;
  height: 8px;
}

.module .meta {
  font-size: 13px;
  color: var(--muted);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 15px;
  margin-bottom: 8px;
}

.crumbs a {
  font-weight: 600;
  text-decoration: none;
}

.crumbs span {
  color: var(--muted);
}

.module-head {
  padding: 22px 0 6px;
}

.module-head h1 {
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 800;
}

.module-head .lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 10px 0 18px;
}

.panel .text a {
  font-weight: 600;
}

/* ---------- FAQ ---------- */
.faq-search {
  width: 100%;
  max-width: 520px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  margin-bottom: 12px;
}

.faq {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--green);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '–';
}

.faq details p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

.faq-empty {
  color: var(--muted);
}

/* ---------- Lesson ---------- */
.lesson {
  padding-top: 16px;
  padding-bottom: 8px;
}

.back {
  display: block;
  width: fit-content;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 8px;
}

.lesson .eyebrow {
  display: block;
  margin-bottom: 4px;
}

.lesson h1 {
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 800;
}

.lesson-grid {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}

@media (min-width: 860px) {
  .lesson-grid {
    grid-template-columns: auto 1fr;
    gap: 40px;
  }
}

/* The phone: a frame whose screen shows one screenshot (or a mock-up),
   moved so the active spot sits in view. */
.phone {
  justify-self: center;
  width: min(330px, 27vh, 80vw);
  padding: 9px;
  border-radius: 38px;
  background: #0a140f;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.06) inset,
    0 20px 50px rgb(10 20 15 / 0.22);
}

@media (min-width: 860px) {
  .phone {
    width: 330px;
    position: sticky;
    top: 84px;
  }
}

.screen {
  position: relative;
  aspect-ratio: 390 / 740;
  border-radius: 30px;
  overflow: hidden;
  background: #f6f9f7;
}

/* The same frame as a laptop, for computer screenshots (1280 × 800). */
.phone.laptop {
  width: min(100%, 600px);
  padding: 10px 10px 16px;
  border-radius: 16px;
}

.laptop .screen {
  aspect-ratio: 1280 / 800;
  border-radius: 6px;
}

@media (min-width: 860px) {
  .phone.laptop {
    width: 560px;
  }
}

.canvas {
  position: absolute;
  inset: 0 0 auto 0;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.canvas img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* A spot never covers what it points at: inactive = a small dot, active = a
   gold ring around the target with its number as a badge on the rim. */
.spot {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.spot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #277539;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgb(10 20 15 / 0.35);
  opacity: 0.6;
  transition: all 0.25s ease;
}

.spot span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #277539;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 1px 4px rgb(10 20 15 / 0.35);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s ease;
}

.spot.active {
  z-index: 2;
}

.spot.active::before {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  background: rgb(240 192 78 / 0.14);
  border: 3px solid #f0c04e;
  box-shadow:
    0 0 0 3px rgb(255 255 255 / 0.7),
    0 2px 10px rgb(10 20 15 / 0.25);
  opacity: 1;
}

.spot.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #f0c04e;
  animation: pulse 1.6s ease-out infinite;
}

.spot.active span {
  opacity: 1;
  transform: scale(1);
}

/* A section being explained gets an outline instead of a ring. */
.area {
  position: absolute;
  border: 3px solid #f0c04e;
  border-radius: 12px;
  background: rgb(240 192 78 / 0.1);
  box-shadow:
    0 0 0 3px rgb(255 255 255 / 0.75),
    0 4px 16px rgb(10 20 15 / 0.22);
  opacity: 0;
  transform: scale(0.98);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  pointer-events: none;
}

.area.active {
  opacity: 1;
  transform: none;
  animation: glow 1.8s ease-in-out infinite;
}

.area span {
  position: absolute;
  top: -12px;
  right: -10px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #277539;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 1px 4px rgb(10 20 15 / 0.35);
}

@keyframes glow {
  50% {
    box-shadow:
      0 0 0 3px rgb(255 255 255 / 0.75),
      0 0 0 9px rgb(240 192 78 / 0.28),
      0 4px 16px rgb(10 20 15 / 0.22);
  }
}

/* Laptop screenshots are scaled down further, so their rings are smaller. */
.laptop .spot,
.laptop .spot.active::before {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
}

/* Near the right edge the badge sits on the left so it isn't clipped. */
.spot.badge-left span {
  right: auto;
  left: -6px;
}

@media (max-width: 859px) {
  .spot,
  .spot.active::before {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
  }

  .spot::before {
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* Mock-up screens (email, «Про вас», Telegram chat): laid out at the
   screenshots' own 390 px phone width, then scaled with them (--k). */
.mock {
  position: absolute;
  left: 0;
  top: 0;
  width: 390px;
  height: 740px;
  transform: scale(var(--k, 1));
  transform-origin: top left;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.45;
  color: #0a140f;
  background: #f6f9f7;
  display: flex;
  flex-direction: column;
}

.mock [data-focus] {
  position: relative;
  border-radius: 10px;
  transition:
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.mock [data-focus].active {
  box-shadow:
    0 0 0 3px var(--gold),
    0 0 0 7px rgb(240 192 78 / 0.3);
}

.mail-head {
  background: #fff;
  padding: 48px 20px 14px;
  border-bottom: 1px solid #e3eae6;
}

.mail-head .subj {
  font-weight: 700;
  font-size: 19px;
}

.mail-head .from {
  color: #6b7a74;
  font-size: 14px;
}

.mail-body {
  margin: 18px;
  background: #fff;
  border: 1px solid #e3eae6;
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
}

.mail-body img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.mail-body h4 {
  margin: 10px 0 8px;
  font-family: var(--font-heading);
  font-size: 22px;
}

.mail-body p {
  margin: 0 0 16px;
  color: #44524d;
}

.mail-btn {
  display: inline-block;
  background: #277539;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  padding: 12px 36px;
  border-radius: 12px;
}

.mail-code {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 18px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 24px;
  letter-spacing: 0.18em;
  background: #f1f5f3;
  border-radius: 12px;
}

.mail-note {
  margin: 16px 0 0 !important;
  font-size: 13px;
  color: #6b7a74 !important;
}

.about {
  padding: 64px 20px 20px;
}

.about h4 {
  font-family: var(--font-heading);
  font-size: 28px;
  margin: 0 0 6px;
}

.about .sub {
  color: #6b7a74;
  margin: 0 0 20px;
}

.about .fields {
  display: grid;
  gap: 14px;
  padding: 6px;
}

.about label {
  font-weight: 600;
  font-size: 15px;
  display: grid;
  gap: 6px;
}

.about .input {
  height: 48px;
  border: 1px solid #e3eae6;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  font-weight: 400;
  color: #0a140f;
}

.about .check {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #44524d;
  margin: 18px 6px;
}

.about .check i {
  width: 20px;
  height: 20px;
  border: 1.5px solid #b9c6bf;
  border-radius: 5px;
  display: inline-block;
}

.about .submit {
  display: block;
  text-align: center;
  background: #277539;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  padding: 14px;
  border-radius: 12px;
}

.chat {
  background: #dfe9e3;
}

.chat-head {
  background: #fff;
  padding: 46px 18px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #d5e0da;
}

.chat-head img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.chat-head b {
  display: block;
  font-size: 17px;
}

.chat-head small {
  color: #6b7a74;
  font-size: 14px;
}

.chat-body {
  flex: 1;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 1px rgb(10 20 15 / 0.08);
}

.bubble.me {
  align-self: flex-end;
  background: #d8f5c8;
}

.bubble .line {
  display: block;
  padding: 3px 6px;
  margin: 2px -6px 0;
}

.start-btn {
  margin-top: auto;
  background: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  color: #2a8bd6;
  padding: 16px;
  border-top: 1px solid #d5e0da;
  border-radius: 0;
}

.chat-choice {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef4f0;
  color: #2a8bd6;
  font-weight: 600;
  text-align: center;
}

.chat-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.chat-buttons.col {
  grid-template-columns: 1fr;
}

.chat-buttons span {
  padding: 8px 6px;
  border-radius: 10px;
  background: #eef4f0;
  color: #2a8bd6;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

/* Browser and phone-system mock-ups for «Встановити на телефон» */
.browser-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: #44524d;
}

.browser-page img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.browser-page b {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #0a140f;
}

.browser-bar {
  background: #f1f3f2;
  border-top: 1px solid #dfe5e2;
  padding: 12px 16px 28px;
}

.url {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  color: #44524d;
  font-size: 15px;
}

.browser-tools {
  display: flex;
  justify-content: space-around;
  margin-top: 12px;
  font-style: normal;
}

.browser-tools i {
  font-style: normal;
  font-size: 26px;
  color: #2a7be4;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.sheet-bg {
  background: rgb(10 20 15 / 0.35);
  justify-content: flex-end;
}

.sheet {
  background: #f4f5f5;
  border-radius: 20px 20px 0 0;
  padding: 14px 14px 34px;
}

.sheet-row {
  background: #fff;
  padding: 15px 16px;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e7ebe9;
}

.sheet-row:first-child {
  border-radius: 12px 12px 0 0;
}

.sheet-row:last-child {
  border-radius: 0 0 12px 12px;
  border-bottom: 0;
}

.browser-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 44px 12px 10px;
  background: #f1f3f2;
}

.browser-top .url {
  flex: 1;
}

.browser-top i {
  font-style: normal;
  font-size: 26px;
  color: #44524d;
  width: 30px;
  text-align: center;
}

.chrome-menu {
  margin: 0 12px 0 auto;
  width: 250px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(10 20 15 / 0.18);
  padding: 6px 0;
}

.chrome-menu .sheet-row {
  border: 0;
  border-radius: 0;
  font-size: 16px;
  padding: 13px 18px;
}

.home-screen {
  background: linear-gradient(160deg, #3f7a56, #1d3b2b 70%);
  padding: 70px 22px;
}

.apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 10px;
}

.apps span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  padding: 4px 0;
}

.apps i,
.apps img {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  background: rgb(255 255 255 / 0.22);
}

.apps img {
  background: #fff;
  object-fit: cover;
}

/* Step panel */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

@media (min-width: 860px) {
  .panel {
    padding: 26px;
    max-width: 560px;
  }
}

.step-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.dot {
  width: 28px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: var(--line);
  cursor: pointer;
}

.dot.seen {
  background: color-mix(in srgb, var(--green) 45%, var(--line));
}

.dot.active {
  background: var(--green);
}

.dot.quiz-dot {
  width: 14px;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
}

.dot.quiz-dot.active {
  background: var(--gold);
}

.panel h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.panel .text {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
}

.panel .text b {
  color: var(--ink);
}

.nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.nav .btn {
  flex: 1 1 0;
  max-width: 200px;
}

/* On a phone the step buttons stay at the bottom of the screen. */
@media (max-width: 859px) {
  .nav {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 16px -18px -18px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .nav .btn {
    max-width: none;
  }
}

.kbd-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

@media (hover: none) {
  .kbd-hint {
    display: none;
  }
}

/* Quiz */
.options {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.option {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.option:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
}

.option.right {
  border-color: var(--green);
  background: var(--green-soft);
}

.option.wrong {
  border-color: var(--red);
  animation: shake 0.35s ease;
}

@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.feedback {
  margin-top: 12px;
  font-weight: 600;
}

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

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

.done-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: var(--green-soft);
}

.done-box p {
  margin: 0 0 12px;
}

/* ---------- Footer ---------- */
.footer {
  max-width: 1080px;
  margin: 40px auto 0;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
}

.footer p {
  margin: 0 0 6px;
}

.noscript {
  text-align: center;
  padding: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    animation: none !important;
    transition: none !important;
  }
}
