/* Atay — step-by-step screens: welcome, onboarding, account, exercises.
   Tokens live in tokens.css (linked before this file). */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "lnum" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */

.ob-shell {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 460px;
  margin: 0 auto;
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ob-topbar { display: flex; align-items: center; gap: 14px; }

.ob-back {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-sunken); text-decoration: none;
  transition: background-color .15s, transform .15s var(--ease);
}
@media (hover: hover) { .ob-back:hover { background: var(--line-strong); } }
.ob-back:active { transform: scale(.92); }

.ob-progress {
  flex: 1; height: 8px; border-radius: 100px;
  background: var(--line-strong); overflow: hidden;
}
.ob-progress-fill {
  width: 0; height: 100%; border-radius: inherit; background: var(--green);
  transition: width .5s var(--ease);
}

.ob-main { flex: 1; display: flex; flex-direction: column; gap: 32px; }

.ob-footer { display: flex; flex-direction: column; align-items: center; gap: 14px; }

@media (min-width: 720px) {
  .ob-shell { max-width: 520px; padding-top: 48px; padding-bottom: 48px; }
}

/* ---------- Typography (same scale as the app screens) ---------- */

.ob-heading { display: flex; flex-direction: column; gap: 10px; }

.ob-eyebrow {
  margin: 0; font-size: var(--fs-label); font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3);
}

.ob-title {
  margin: 0; font-family: var(--serif); font-size: var(--fs-title); font-weight: 600;
  line-height: 1.1; letter-spacing: -.01em; color: var(--ink); text-wrap: balance;
}

.ob-sub { margin: 0; font-size: var(--fs-body); line-height: 1.55; color: var(--ink-2); }

.ob-text { margin: 0; font-size: var(--fs-body); line-height: 1.6; color: var(--ink-2); }

/* ---------- Choices ---------- */

.ob-options { display: flex; flex-direction: column; gap: 12px; }

.ob-option {
  all: unset; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 18px;
  border-radius: 16px; background: var(--surface-raised); box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s;
}
@media (hover: hover) {
  .ob-option:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
}
.ob-option:active { transform: scale(.985); box-shadow: var(--shadow-1); }
.ob-option[aria-checked="true"], .ob-option[aria-pressed="true"] {
  box-shadow: var(--ring), var(--shadow-2);
}

.ob-option-text { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.ob-option-title { font-family: var(--serif); font-size: var(--fs-item); font-weight: 700; line-height: 1.2; color: var(--ink); }
.ob-option-sub { font-size: var(--fs-small); line-height: 1.4; color: var(--ink-2); }

/* Empty ring = "you can pick this"; fills with a check when picked */
.ob-check {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: transparent;
  transition: background-color .15s, border-color .15s;
}
.ob-check svg { opacity: 0; transform: scale(.4); transition: opacity .15s, transform .25s cubic-bezier(.2, .7, .2, 1.5); }
[aria-checked="true"] > .ob-check, [aria-pressed="true"] > .ob-check { background: var(--green); border-color: var(--green); }
[aria-checked="true"] > .ob-check svg, [aria-pressed="true"] > .ob-check svg { opacity: 1; transform: none; }

.ob-badge {
  display: inline-flex; align-self: flex-start; margin-top: 4px;
  padding: 3px 9px; border-radius: 100px;
  background: var(--green-tint); color: var(--green);
  font-size: var(--fs-label); font-weight: 700;
}

.ob-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ob-chip {
  all: unset; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 6px; border-radius: 14px;
  background: var(--surface-raised); box-shadow: var(--shadow-1);
  cursor: pointer; text-align: center;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
@media (hover: hover) { .ob-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); } }
.ob-chip:active { transform: scale(.96); }
.ob-chip[aria-checked="true"] { box-shadow: var(--ring), var(--shadow-2); }
.ob-chip-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.ob-chip-sub { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.ob-chip[aria-checked="true"] .ob-chip-sub { color: var(--green); }

/* ---------- Inputs: sunken wells ---------- */

.ob-input {
  appearance: none; -webkit-appearance: none; margin: 0; outline: none; border: 0;
  width: 100%; min-height: 60px; padding: 0 18px;
  background: var(--surface-sunken); border-radius: 16px; box-shadow: var(--shadow-inset);
  font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink);
  transition: box-shadow .15s, background-color .15s;
}
.ob-input::placeholder { color: var(--ink-3); opacity: .7; }
.ob-input:focus { background: var(--surface-raised); box-shadow: var(--ring); }

/* ---------- Buttons ---------- */

.ob-cta {
  all: unset; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; border-radius: 16px;
  background: var(--green); color: var(--cream); box-shadow: var(--shadow-cta);
  font-family: var(--sans); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity .2s, transform .15s var(--ease), background-color .15s, box-shadow .15s;
}
@media (hover: hover) { .ob-cta:hover { background: #10483F; } }
.ob-cta:active { transform: scale(.98); }
.ob-cta[aria-disabled="true"] { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }

.ob-link {
  all: unset; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background-color .15s, color .15s;
}
@media (hover: hover) { .ob-link:hover { background: var(--green-tint); color: var(--green); } }
.ob-link:disabled { cursor: default; background: none; color: var(--ink-3); }

.ob-option:focus-visible, .ob-chip:focus-visible, .ob-cta:focus-visible,
.ob-link:focus-visible, .ob-back:focus-visible {
  outline: 2px solid var(--green); outline-offset: 3px;
}

/* ---------- Cards ---------- */

.ob-card {
  padding: 20px; border-radius: var(--radius-card);
  background: var(--surface-raised); box-shadow: var(--shadow-1);
}
.ob-quote {
  margin: 0; font-family: var(--serif); font-size: var(--fs-heading); font-weight: 600;
  line-height: 1.3; color: var(--ink);
}

/* ---------- Method timeline ---------- */

.ob-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ob-day {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.ob-day:last-child { border-bottom: 0; }
.ob-day--key {
  margin-top: 10px; padding: 14px 16px; border-bottom: 0;
  background: var(--surface-raised); border-radius: 16px; box-shadow: var(--shadow-2);
}
.ob-day-num {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: var(--cream);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
}
.ob-day-body { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.ob-day-title { font-family: var(--serif); font-size: var(--fs-item); font-weight: 700; color: var(--ink); }
.ob-day-sub { font-size: var(--fs-small); line-height: 1.45; color: var(--ink-2); }

/* ---------- Projection chart ---------- */

.ob-chart { display: flex; flex-direction: column; gap: 6px; }
.ob-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ob-chart-grid { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.ob-chart-area { fill: rgba(20, 87, 79, .07); }
.ob-chart-curve { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; }
.ob-chart-guide { stroke: var(--green); stroke-width: 1; stroke-dasharray: 2 4; opacity: .5; }
.ob-chart-dot { fill: var(--surface-base); stroke: var(--green); stroke-width: 2.5; }
.ob-chart-marker { fill: var(--green); }
.ob-chart-halo { fill: rgba(20, 87, 79, .14); }
.ob-chart-label { font-family: var(--mono); font-size: 11px; font-weight: 600; fill: var(--green); }
.ob-chart-late { opacity: 0; transition: opacity .4s ease .9s; }
.ob-chart.is-drawn .ob-chart-late { opacity: 1; }
.ob-chart-axis {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}

.ob-milestones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ob-milestone { display: flex; gap: 14px; align-items: baseline; padding: 10px 4px; }
.ob-milestone--key {
  padding: 14px 16px; border-radius: 16px;
  background: var(--surface-raised); box-shadow: var(--shadow-2);
}
.ob-milestone-week {
  flex-shrink: 0; min-width: 74px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
}
.ob-milestone--key .ob-milestone-week { color: var(--green); font-weight: 600; }
.ob-milestone-title { font-family: var(--serif); font-size: var(--fs-item); font-weight: 700; color: var(--ink); }
.ob-milestone-sub { font-size: var(--fs-small); line-height: 1.45; color: var(--ink-2); }

.ob-footnote { margin: 0; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ---------- Notification preview ---------- */

.ob-notif {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 20px;
  background: var(--surface-raised); box-shadow: var(--shadow-2);
}
.ob-notif-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 10px; background: var(--surface-base);
}
.ob-notif-icon img { width: 28px; height: auto; }
.ob-notif-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ob-notif-head {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--ink);
}
.ob-notif-head span:last-child { font-weight: 500; color: var(--ink-3); }
.ob-notif-text { font-size: 14px; line-height: 1.4; color: var(--ink-2); }

/* ---------- Preparation ---------- */

.ob-center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 32px; }

.ob-brew { align-self: center; height: 56px; width: auto; animation: ob-brew 1.8s ease-in-out infinite; }
@keyframes ob-brew { 50% { opacity: .45; transform: translateY(-3px); } }

.ob-steps {
  list-style: none; margin: 0; padding: 20px; display: flex; flex-direction: column; gap: 14px;
  background: var(--surface-raised); border-radius: var(--radius-card); box-shadow: var(--shadow-1);
}
.ob-step {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-body); color: var(--ink-3); transition: color .3s;
}
.ob-step-check {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); transition: background-color .3s, border-color .3s;
}
.ob-step-check svg { opacity: 0; transition: opacity .3s; }
.ob-step.is-done { color: var(--ink); }
.ob-step.is-done .ob-step-check { background: var(--green); border-color: var(--green); }
.ob-step.is-done .ob-step-check svg { opacity: 1; }

/* ---------- Revelation (dark) ---------- */

.ob-reveal { background: var(--surface-hero); color: var(--cream); }
.ob-reveal .ob-eyebrow { color: var(--cream-2); }

.ob-mark-cream {
  width: 48px; height: 36px; background: var(--cream);
  -webkit-mask: url(../assets/logo.png) center / contain no-repeat;
  mask: url(../assets/logo.png) center / contain no-repeat;
}

.ob-greeting { margin: 0; font-family: var(--serif); font-size: var(--fs-heading); font-weight: 600; color: var(--cream-2); }
.ob-vision { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.12; color: var(--cream); text-wrap: balance; }

.ob-plan {
  padding: 6px 20px; border-radius: var(--radius-card); background: var(--surface-hero-deep);
  box-shadow: inset 0 1px 0 rgba(251, 246, 236, .06), 0 14px 30px -14px rgba(0, 0, 0, .45);
}
.ob-plan-title {
  margin: 14px 0 4px; font-size: var(--fs-label); font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--cream-2);
}
.ob-plan dl { margin: 0; }
.ob-plan-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-top: 1px solid rgba(251, 246, 236, .12);
}
.ob-plan-row:first-child { border-top: 0; }
.ob-plan dt { font-size: 14px; color: var(--cream-2); }
.ob-plan dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--cream); text-align: right; }

.ob-cta--light { background: var(--cream); color: var(--green); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); }
@media (hover: hover) { .ob-cta--light:hover { background: #fff; } }
.ob-reveal .ob-cta:focus-visible { outline-color: var(--cream); }
.ob-reveal .ob-footnote { color: var(--cream-2); }

@media (min-width: 720px) {
  .ob-vision { font-size: 40px; }
}

/* ---------- Exercises ---------- */

.ex-listen {
  all: unset; box-sizing: border-box; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 100px; background: var(--green-tint); color: var(--green);
  font-size: var(--fs-small); font-weight: 700; cursor: pointer;
  transition: background-color .15s, transform .15s var(--ease);
}
@media (hover: hover) { .ex-listen:hover { background: #D5E3DA; } }
.ex-listen:active { transform: scale(.95); }

.ex-answer { font-size: 16px; font-weight: 600; color: var(--ink); }

.ex-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ex-tile {
  all: unset; box-sizing: border-box; position: relative;
  display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 14px;
  border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow-1);
  font-size: var(--fs-body); font-weight: 600; color: var(--ink); text-align: center;
  cursor: pointer; overflow-wrap: anywhere;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
@media (hover: hover) { .ex-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); } }
.ex-tile:active { transform: scale(.97); }
.ex-tile[aria-pressed="true"] { box-shadow: var(--ring), var(--shadow-2); }
.ex-tile .ob-check { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border: 0; }
.ex-tile[aria-pressed="false"] .ob-check { display: none; }

.ex-sentence { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.ex-sentence-line {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
  font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink);
}
.ex-blank {
  appearance: none; margin: 0; outline: none; border: 0; border-bottom: 2px solid var(--green);
  width: 96px; padding: 6px 10px; border-radius: 6px 6px 2px 2px;
  background: var(--surface-sunken); box-shadow: var(--shadow-inset);
  font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); text-align: center;
}
.ex-blank:focus { background: var(--green-tint); }
.ex-hint { font-size: var(--fs-small); color: var(--ink-3); }

.ex-section-label { margin: 0; font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
.ex-bank { display: flex; flex-wrap: wrap; gap: 10px; }
.ex-word {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 12px; background: var(--surface-raised); box-shadow: var(--shadow-1);
  font-size: var(--fs-body); font-weight: 600; color: var(--ink);
}

.ex-drop {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 60px; padding: 14px 16px;
  border-radius: 16px; background: var(--surface-sunken); box-shadow: var(--shadow-inset);
  outline: 1.5px dashed var(--line-strong); outline-offset: -6px;
  font-size: 14px; color: var(--ink-3);
}

.ex-textarea {
  appearance: none; display: block; margin: 0; outline: none; border: 0; resize: none;
  width: 100%; padding: 16px; border-radius: 16px;
  background: var(--surface-sunken); box-shadow: var(--shadow-inset);
  font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink);
  transition: box-shadow .15s, background-color .15s;
}
.ex-textarea::placeholder { color: var(--ink-3); }
.ex-textarea:focus { background: var(--surface-raised); box-shadow: var(--ring); }

/* Chat (day 7) */
.ex-chat { gap: 20px; }
.ex-badge {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; background: var(--saffron);
  box-shadow: 0 4px 10px -4px rgba(200, 144, 46, .8);
}
.ex-thread { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.ex-bubble {
  max-width: 82%; padding: 12px 16px; font-size: var(--fs-body); line-height: 1.45;
}
.ex-bubble--them {
  align-self: flex-start; border-radius: 18px 18px 18px 6px;
  background: var(--surface-raised); box-shadow: var(--shadow-1); color: var(--ink);
}
.ex-bubble--me {
  align-self: flex-end; border-radius: 18px 18px 6px 18px;
  background: var(--green); color: var(--cream); box-shadow: var(--shadow-cta);
}
.ex-composer {
  position: sticky; bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px;
  border-radius: 100px; background: var(--surface-raised); box-shadow: var(--shadow-2);
}
.ex-composer input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 0; outline: none;
  background: transparent; font-family: var(--sans); font-size: 16px; color: var(--ink);
}
.ex-composer input::placeholder { color: var(--ink-3); }
.ex-composer:focus-within { box-shadow: var(--ring), var(--shadow-2); }
.ex-send {
  all: unset; box-sizing: border-box; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 50%; background: var(--green); box-shadow: var(--shadow-cta); cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s;
}
@media (hover: hover) { .ex-send:hover { background: #10483F; } }
.ex-send:active { transform: scale(.92); }

.ex-listen:focus-visible, .ex-tile:focus-visible, .ex-send:focus-visible {
  outline: 2px solid var(--green); outline-offset: 3px;
}

@media (min-width: 720px) {
  .ex-bubble { max-width: 70%; }
}

/* ---------- Legal pages ---------- */

.lg-shell {
  max-width: 720px; margin: 0 auto;
  padding: 24px 20px calc(48px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 28px;
}
@media (min-width: 720px) { .lg-shell { padding-top: 48px; } }

.lg-tabs { display: inline-flex; margin-left: auto; padding: 3px; gap: 2px; border-radius: 100px; background: var(--surface-sunken); }
.lg-tabs a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 100px;
  font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); text-decoration: none;
  transition: background-color .2s var(--ease), color .2s;
}
.lg-tabs a[aria-current="page"] { background: var(--surface-raised); color: var(--green); box-shadow: var(--shadow-1); }
.lg-tabs a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.lg-updated { margin: 0; font-size: var(--fs-small); color: var(--ink-3); }

.lg-draft {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 16px;
  background: var(--saffron-tint); color: #5C3E0A; box-shadow: inset 0 0 0 1px rgba(200, 144, 46, .35);
}
.lg-draft svg { flex-shrink: 0; margin-top: 1px; }
.lg-draft strong { font-size: var(--fs-body); }
.lg-draft p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }

.lg-todo { background: rgba(200, 144, 46, .22); color: inherit; padding: 0 3px; border-radius: 4px; }

.lg-toc {
  padding: 18px 20px; border-radius: var(--radius-card);
  background: var(--surface-raised); box-shadow: var(--shadow-1);
}
.lg-toc ol { margin: 6px 0 0; padding-left: 20px; display: grid; }
@media (min-width: 720px) { .lg-toc ol { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.lg-toc li { font-size: 14px; color: var(--ink-3); }
.lg-toc a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); font-weight: 600; text-decoration: none; }
.lg-toc a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.lg-toc a:hover { text-decoration: underline; }

.lg-article {
  padding: 8px 24px; border-radius: var(--radius-card);
  background: var(--surface-raised); box-shadow: var(--shadow-1);
}
.lg-article section { padding: 20px 0; scroll-margin-top: 20px; }
.lg-article section + section { border-top: 1px solid var(--line); }
.lg-article h2 { margin: 0 0 10px; font-family: var(--serif); font-size: var(--fs-heading); font-weight: 600; line-height: 1.25; color: var(--ink); }
.lg-article p, .lg-article li { margin: 0; max-width: 65ch; font-size: var(--fs-body); line-height: 1.7; color: var(--ink-2); }
.lg-article p + p { margin-top: 10px; }
.lg-article ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.lg-article strong { color: var(--ink); }

.lg-contact { margin: 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.lg-contact a { color: var(--green); font-weight: 700; }

@media (max-width: 420px) {
  .lg-article { padding: 4px 18px; }
}

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

/* QCM: after the server has corrected the answer */
.ob-option[aria-disabled="true"] { cursor: default; transform: none; }
.ob-option[data-state="correct"] { background: var(--green-tint); box-shadow: var(--ring), var(--shadow-1); }
.ob-option[data-state="correct"] > .ob-check { background: var(--green); border-color: var(--green); }
.ob-option[data-state="correct"] > .ob-check svg { opacity: 1; transform: none; }
.ob-option[data-state="wrong"] { background: rgba(180, 83, 42, .08); box-shadow: inset 0 0 0 2px var(--terracotta), var(--shadow-1); }
.ob-option[data-state="wrong"] > .ob-check { background: var(--terracotta); border-color: var(--terracotta); }
.ob-option[data-state="wrong"] > .ob-check svg { display: none; }
.ob-option[data-state="wrong"] > .ob-check::after { content: "\00d7"; color: var(--cream); font-size: 18px; line-height: 1; }

.ex-feedback {
  margin: 0; padding: 14px 16px; border-radius: 14px;
  font-size: var(--fs-body); font-weight: 600; line-height: 1.4;
  background: var(--surface-sunken); color: var(--ink-2);
}
.ex-feedback[data-state="correct"] { background: var(--green-tint); color: var(--green); }
.ex-feedback[data-state="wrong"], .ex-feedback[data-state="error"] { background: rgba(180, 83, 42, .1); color: var(--terracotta); }

/* Exercises wired to the server: association, completion, reconstruction, translation */
.ex-feedback { white-space: pre-line; }

.ex-tile[aria-disabled="true"] { cursor: default; transform: none; }
.ex-tile[data-state="correct"] { background: var(--green-tint); color: var(--green); box-shadow: var(--ring), var(--shadow-1); }
.ex-tile[data-state="correct"] .ob-check { display: flex; background: var(--green); }
.ex-tile[data-state="correct"] .ob-check svg { opacity: 1; transform: none; }
.ex-tile[data-state="wrong"] { box-shadow: inset 0 0 0 2px var(--terracotta), var(--shadow-1); animation: ex-shake .35s var(--ease); }
@keyframes ex-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

button.ex-word {
  all: unset; box-sizing: border-box;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 12px; background: var(--surface-raised); box-shadow: var(--shadow-1);
  font-size: var(--fs-body); font-weight: 600; color: var(--ink); cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
@media (hover: hover) { button.ex-word:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); } }
button.ex-word:active { transform: scale(.96); }
button.ex-word:focus-visible { box-shadow: var(--ring), var(--shadow-1); }
button.ex-word[aria-pressed="true"] { box-shadow: var(--ring), var(--shadow-2); }
button.ex-word[data-used] { background: var(--surface-sunken); box-shadow: var(--shadow-inset); color: transparent; cursor: default; transform: none; }
button.ex-word[aria-disabled="true"] { cursor: default; transform: none; }
button.ex-word[data-state="correct"] { background: var(--green-tint); color: var(--green); box-shadow: var(--ring); }
button.ex-word[data-state="wrong"] { background: rgba(180, 83, 42, .08); color: var(--terracotta); box-shadow: inset 0 0 0 2px var(--terracotta); }

span.ex-blank { display: inline-block; min-width: 96px; line-height: 1.3; }
.ex-blank[data-state="correct"] { background: var(--green-tint); border-bottom-color: var(--green); color: var(--green); }
.ex-blank[data-state="wrong"] { background: rgba(180, 83, 42, .1); border-bottom-color: var(--terracotta); color: var(--terracotta); }

.ex-drop[data-state="correct"] { background: var(--green-tint); outline-color: var(--green); }
.ex-drop[data-state="wrong"] { background: rgba(180, 83, 42, .08); outline-color: var(--terracotta); }

.ex-hint-btn {
  all: unset; align-self: flex-start; cursor: pointer;
  font-size: var(--fs-small); font-weight: 600; color: var(--green);
  text-decoration: underline; text-underline-offset: 3px;
}
.ex-hint-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.ex-hint-btn[hidden] { display: none; }
.ex-textarea[readonly] { background: var(--surface-raised); }
.ex-textarea:disabled { opacity: .5; }
