/* Fala, English school in Braga. White page, indigo ink, cobalt for actions and the level scale,
   yellow only as a flat field behind key data. Young Serif for headings, Atkinson Hyperlegible for text. */
:root {
  --ink: #1B1B3A;
  --cobalt: #2B4EFF;
  --cobalt-deep: #1E38C9;
  --sun: #FFD23F;
  --field: #EEF0FA;
  --tint: #DCE2FF;
  --soft: #54577A;
  --line: #D5D9EE;
  --line-strong: #C3C8E6;
  --pale: #D6D8F0;
  --err: #B4232C;
  --ok: #17663A;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", Verdana, "Segoe UI", system-ui, sans-serif;
  --gap: clamp(32px, 5vw, 72px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 1.125rem/1.6 var(--sans); }
h1, h2, h3, p, ul, ol, dl, dd, figure, table, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.3vw, 3.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 3px; }
[id] { scroll-margin-top: 24px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lead { font-size: 1.25rem; line-height: 1.55; }
.link { color: var(--cobalt); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { color: var(--cobalt-deep); }
.note { margin-top: 20px; padding-left: 14px; border-left: 3px solid var(--line-strong); color: var(--soft); font-size: 1rem; }
.more { margin-top: 28px; }
.ico { flex: none; }

/* the studio's demo bar (not part of the school's design) */
.demobar { background: #000; color: #fff; font: 500 .86rem/1.3 system-ui, sans-serif; }
.demobar__in { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; padding-block: 7px; }
.demobar a { color: #fff; }
.demobar__back:hover { text-decoration: underline; }
.demobar__txt { flex: 1 1 14em; opacity: .75; }
.demobar__cta { padding: 6px 14px; border-radius: 999px; background: #17D878; color: #000 !important; font-weight: 700; white-space: nowrap; }
html.embedded .demobar { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 11px 22px; border: 2px solid var(--cobalt); border-radius: 6px; background: var(--cobalt); color: #fff; font: 700 1.0625rem/1.2 var(--sans); text-align: center; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); }
.btn--line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ink { background: var(--ink); border-color: var(--ink); }
.btn--ink:hover { background: var(--cobalt); border-color: var(--cobalt); }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: 1rem; }

/* header */
.top { position: relative; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; flex: none; gap: 12px; min-height: 44px; }
.brand__mark { padding: 1px 11px 4px; background: var(--sun); color: var(--ink); font: 400 1.75rem/1.2 var(--serif); }
.brand__sub { color: var(--soft); font-size: .95rem; white-space: nowrap; }
.menu { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 1rem; }
.menu a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; }
.menu a:not(.btn):hover { color: var(--cobalt); }
.menu a[aria-current="page"] { border-bottom-color: var(--cobalt); font-weight: 700; }
.top__tools { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 41px; font-size: .95rem; font-weight: 700; }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }
.lang a:not([aria-current]):hover { background: var(--field); }
.lang a:focus-visible { outline-offset: -3px; }
.burger { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; }

/* sections */
.sec { padding-block: clamp(56px, 7vw, 96px); }
.sec--field, .who { background: var(--field); }
.sec__head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 44px); }
.sec__head p { margin-top: 14px; }
.phead { background: var(--field); padding-block: clamp(36px, 5vw, 64px); }
.phead .lead { max-width: 46rem; margin-top: 16px; }

/* home: first screen */
.hero { padding-block: clamp(36px, 4.5vw, 60px) clamp(48px, 6vw, 80px); }
.hero__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.hero__txt { padding-top: 10px; }
.hero__txt .lead { margin-top: 22px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__facts { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--soft); font-size: 1rem; }

/* the level ladder */
.ladder__head h2 { font-size: 1.55rem; }
.ladder__head p { margin-top: 6px; color: var(--soft); font-size: 1rem; line-height: 1.5; }
.ladder__steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-items: end; height: 232px; margin-top: 20px; border-bottom: 3px solid var(--ink); }
.step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; height: calc(var(--h) * 100%); min-height: 44px; padding: 10px 8px 6px; border: 0; border-radius: 5px 5px 0 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); text-align: left; cursor: pointer; overflow: hidden; transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; animation: rise .55s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
.step:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.step.is-below { background: var(--tint); box-shadow: none; }
.step.is-below:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.step[aria-selected="true"] { background: var(--cobalt); color: #fff; box-shadow: none; }
.step:focus-visible { outline-color: var(--ink); outline-offset: 2px; }
.step__code { font: 400 1.6rem/1 var(--serif); }
.step__name { max-width: 100%; font-size: .8rem; line-height: 1.2; hyphens: auto; overflow-wrap: break-word; }
@keyframes rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
html.embedded .step { animation: none; }
.ladder__panels { min-height: 15rem; padding-top: 22px; }
.lvl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 14.5rem); gap: 24px; align-items: start; }
.ladder.is-live .lvl { animation: swap .22s ease both; }
@keyframes swap { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.lvl:focus-visible { outline-offset: 6px; }
.lvl h3 { font-size: 1.4rem; }
.lvl__can > p { margin-top: 8px; color: var(--soft); font-size: 1rem; }
.lvl__can ul { margin-top: 4px; font-size: 1.0625rem; line-height: 1.5; }
.lvl__can li, .ticks li { position: relative; margin-top: 8px; padding-left: 1.5em; }
.lvl__can li::before, .ticks li::before { content: ""; position: absolute; left: 0; top: .72em; width: .8em; height: 3px; background: var(--cobalt); }
.lvl__can .lvl__courses { margin-top: 16px; color: var(--ink); }
.lvl__courses a { color: var(--cobalt); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lvl__next { display: grid; gap: 3px; padding: 16px 18px 18px; border-radius: 6px; background: var(--sun); font-size: .98rem; line-height: 1.4; }
.lvl__next span:first-child { font-weight: 700; }
.lvl__next b { font: 400 1.7rem/1.1 var(--serif); }
.ladder__note { margin-top: 16px; color: var(--soft); font-size: .92rem; }

/* home: course lines */
.lines__head, .line { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1.05fr) minmax(0, 1.1fr) minmax(0, 1.15fr); gap: 20px; align-items: center; }
.lines__head { padding-bottom: 10px; border-bottom: 2px solid var(--ink); color: var(--soft); font-size: .92rem; font-weight: 700; }
.line { padding: 20px 0; border-bottom: 1px solid var(--line-strong); }
.line__name { font: 400 1.5rem/1.2 var(--serif); }
.line:hover .line__name { color: var(--cobalt); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.line__k { display: none; }
.line__lv { display: flex; align-items: center; gap: 10px; }
.line__price { font-weight: 700; }
.scale { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; flex: none; }
.scale i { width: 7px; height: 6px; background: #B9BFE2; }
.scale i:nth-child(2) { height: 8.4px; }
.scale i:nth-child(3) { height: 10.8px; }
.scale i:nth-child(4) { height: 13.2px; }
.scale i:nth-child(5) { height: 15.6px; }
.scale i:nth-child(6) { height: 18px; }
.scale i.on { background: var(--cobalt); }

/* home: the 90-minute lesson */
.lesson { padding-block: clamp(56px, 7vw, 96px); background: var(--ink); color: #fff; }
.lesson :focus-visible, .foot :focus-visible { outline-color: var(--sun); }
.lesson__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.lesson__txt p { margin-top: 16px; color: var(--pale); }
.lesson__txt img { width: 100%; margin-top: 30px; border-radius: 6px; }
.flow__bar { display: flex; gap: 3px; height: 64px; }
.flow__seg { display: flex; align-items: center; justify-content: center; flex: 0 1 0; min-width: 0; border-radius: 4px; background: var(--field); color: var(--ink); font-weight: 700; white-space: nowrap; }
.flow__seg small { font-size: .85rem; font-weight: 400; white-space: pre; }
.flow__seg.is-talk { background: var(--sun); }
.flow__key { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 14px; color: var(--pale); font-size: .98rem; }
.flow__key li::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 2px; background: var(--field); }
.flow__key li.is-talk::before { background: var(--sun); }
.flow__steps { margin-top: 28px; border-top: 1px solid rgba(255, 255, 255, .24); }
.flow__steps li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 18px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .24); }
.flow__time { align-self: start; padding-left: 12px; border-left: 6px solid var(--field); font-weight: 700; font-variant-numeric: tabular-nums; }
.flow__steps li.is-talk .flow__time { border-left-color: var(--sun); }
.flow__steps h3 { font-size: 1.2rem; }
.flow__steps p { margin-top: 4px; color: var(--pale); font-size: 1.0625rem; }

/* home: exam results */
.results__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.results__txt > p:first-of-type { margin-top: 16px; }
.results__big { display: grid; gap: 6px; padding: 26px 28px 28px; border-radius: 6px; background: var(--sun); }
.results__big b { font: 400 clamp(2.6rem, 5vw, 3.7rem)/1 var(--serif); }
.results__big span { max-width: 26rem; font-size: 1.15rem; line-height: 1.45; }
.results__data .tbl { margin-top: 22px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.tbl th, .tbl td { padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl thead th { padding-block: 8px; border-bottom: 2px solid var(--ink); color: var(--soft); font-size: .92rem; font-weight: 700; vertical-align: bottom; }
.tbl tbody th { font-weight: 700; }
.tbl th small { display: block; color: var(--soft); font-size: .92rem; font-weight: 400; }

/* people */
.people { display: grid; gap: 40px 28px; }
.people--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.people--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.person img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 6px; background: var(--field); }
.person h3 { margin-top: 14px; }
.person__role { margin-top: 2px; font-weight: 700; font-size: 1rem; }
.person__bio { margin-top: 8px; color: var(--soft); font-size: 1.0625rem; }

/* home: dates and enrolment */
.start__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.start h2 { margin-bottom: 20px; }
.dates { border-top: 2px solid var(--ink); }
.dates div { padding: 15px 0 16px; border-bottom: 1px solid var(--line-strong); }
.dates dt { font: 400 1.3rem/1.25 var(--serif); }
.dates dd { margin-top: 4px; }
.steps { counter-reset: s; border-top: 2px solid var(--ink); }
.steps li { counter-increment: s; position: relative; padding: 15px 0 16px 3.3rem; border-bottom: 1px solid var(--line-strong); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 14px; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 1rem; }
.steps p { margin-top: 2px; }
.start__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* yellow call to the test */
.band { padding-block: clamp(36px, 5vw, 56px); background: var(--sun); }
.band__in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px 48px; }
.band p { max-width: 40rem; margin-top: 8px; }

/* courses page */
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; margin-top: 20px; }
.jump span { color: var(--soft); }
.jump a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cobalt); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.course { padding-block: clamp(48px, 6vw, 84px); }
.course + .course { border-top: 1px solid var(--line-strong); }
.course__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
.course__range { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; }
.course__main .lead { margin-top: 18px; }
.course__main h3 { margin-top: 26px; }
.course__main img { width: 100%; margin-top: 30px; border-radius: 6px; }
.facts { padding: 6px 24px 0; border-radius: 6px; background: var(--field); overflow: hidden; }
.facts div { padding: 13px 0 14px; border-bottom: 1px solid var(--line-strong); }
.facts dt { color: var(--soft); font-size: .92rem; font-weight: 700; }
.facts dd { margin-top: 1px; }
.facts .is-price { margin: 0 -24px; padding: 16px 24px 18px; border-bottom: 0; background: var(--sun); }
.facts .is-price dt { color: var(--ink); }
.facts .is-price dd { font-weight: 700; font-size: 1.15rem; line-height: 1.4; }
.course__facts .btn { width: 100%; margin-top: 16px; }
.course__extra { margin-top: 48px; }
.course__extra h3 { margin-bottom: 10px; font-size: 1.4rem; }

/* timetable page */
.filters { display: flex; flex-wrap: wrap; gap: 18px 48px; padding: 20px 24px 22px; border-radius: 6px; background: var(--field); }
.filters fieldset { min-width: 0; padding: 0; border: 0; }
.filters legend { margin-bottom: 8px; padding: 0; font-weight: 700; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: block; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 15px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; font-size: 1rem; }
.chip input:hover + span { border-color: var(--cobalt); color: var(--cobalt); }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.tt__count { margin: 24px 0 4px; color: var(--soft); font-size: 1rem; }
.tt__count b { color: var(--ink); }
.tt__table td:nth-child(4), .tt__act { white-space: nowrap; }
.tt__act { text-align: right; }
.seats { font-weight: 700; }
.seats--last { padding: 2px 8px 3px; border-radius: 4px; background: var(--sun); }
.seats--full { color: var(--soft); }
.meter { display: flex; gap: 2px; margin-top: 7px; }
.meter i { width: 8px; height: 8px; background: var(--line-strong); }
.meter i.on { background: var(--ink); }
.tt__empty { margin-top: 16px; padding: 26px 28px; border-radius: 6px; background: var(--field); }
.tt__empty p { margin-bottom: 16px; }
.tt__notes { display: grid; gap: 10px; max-width: 46rem; margin-top: 30px; color: var(--soft); font-size: 1.0625rem; }
.prices { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
.prices__main > p { margin-top: 14px; }
.prices__table { margin-top: 24px; }
.prices__table td, .prices__table thead th:not(:first-child) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.prices__table tr > :nth-child(2) { padding-inline: 16px; background: var(--sun); }
.prices__table thead th:nth-child(2) { color: var(--ink); }
.prices__table tbody td:nth-child(2) { font-weight: 700; border-bottom-color: rgba(27, 27, 58, .22); }
.prices__table tr > :nth-child(3) { padding-left: 16px; }
.terms { border-top: 2px solid var(--ink); }
.terms div { padding: 14px 0 15px; border-bottom: 1px solid var(--line-strong); }
.terms dt { font-weight: 700; }
.terms dd { margin-top: 2px; font-size: 1.0625rem; }

/* placement test */
.quiz { max-width: 47rem; padding: clamp(22px, 4vw, 40px); border: 2px solid var(--ink); border-radius: 8px; }
.quiz__nojs { margin-bottom: 20px; padding: 14px 16px; background: var(--sun); border-radius: 6px; }
.quiz__intro h2, .quiz__result h2 { font-size: 1.7rem; }
.quiz__intro .ticks { margin: 14px 0 26px; }
.quiz__progress { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.quiz__progress p { font-weight: 700; }
.quiz__bar { display: flex; align-items: flex-end; gap: 3px; flex: 0 1 15rem; height: 24px; }
.quiz__bar i { flex: 1; height: calc(8px + var(--n) * 1.4px); background: var(--line-strong); transition: background-color .2s ease; }
.quiz__bar i.is-done { background: var(--cobalt); }
.quiz__bar i.is-now { background: var(--ink); }
.quiz fieldset { min-width: 0; margin-top: 24px; padding: 0; border: 0; }
.quiz legend { display: block; width: 100%; padding: 0; }
.quiz__instr { display: block; color: var(--soft); font-size: 1rem; }
.quiz__sentence { display: block; margin-top: 8px; font: 400 clamp(1.45rem, 3.4vw, 1.9rem)/1.4 var(--serif); }
.quiz__sentence:focus { outline: none; }
.blank { display: inline-block; min-width: 3.4em; padding: 0 .2em; border-bottom: 3px solid var(--cobalt); color: var(--cobalt); text-align: center; line-height: 1.15; }
.quiz__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; min-height: 54px; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; font-size: 1.15rem; }
.opt input:hover + span { border-color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt); }
.opt input:checked + span { border-color: var(--cobalt); background: var(--cobalt); color: #fff; font-weight: 700; box-shadow: none; }
.opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.opt--dk { grid-column: 1 / -1; }
.opt--dk span { min-height: 48px; border-style: dashed; color: var(--soft); font-size: 1.0625rem; }
.opt--dk input:checked + span { border-style: solid; border-color: var(--ink); background: var(--ink); color: #fff; }
.quiz__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.quiz__nav .btn[type="submit"] { margin-left: auto; }
.err { margin-top: 6px; color: var(--err); font-weight: 700; font-size: 1rem; }
.quiz .err { margin-top: 14px; }
.res { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 24px; align-items: end; margin-top: 20px; }
.res__steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; align-items: end; height: 132px; border-bottom: 3px solid var(--ink); }
.res__steps li { display: flex; justify-content: center; height: calc(var(--h) * 100%); padding-top: 6px; border-radius: 3px 3px 0 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: .82rem; font-weight: 700; }
.res__steps li.is-below { background: var(--tint); box-shadow: none; }
.res__steps li.is-here { background: var(--cobalt); color: #fff; box-shadow: none; }
.res__level { display: grid; gap: 4px; padding: 18px 22px 20px; border-radius: 6px; background: var(--sun); }
.res__level > span:first-child { font-weight: 700; font-size: 1rem; }
.res__level b { font: 400 clamp(1.8rem, 4vw, 2.4rem)/1.1 var(--serif); }
.res__blurb { margin-top: 22px; font-size: 1.2rem; line-height: 1.5; }
.review { margin-top: 22px; border-block: 1px solid var(--line-strong); }
.review summary { padding: 12px 0; color: var(--cobalt); font-weight: 700; cursor: pointer; }
.review ol { padding: 0 0 18px 1.7em; list-style: decimal; }
.review li { margin-top: 10px; padding-left: 4px; }
.review li b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.review small { display: block; color: var(--soft); font-size: .95rem; }
.review .is-ok { color: var(--ok); font-weight: 700; }
.review .is-no { color: var(--err); font-weight: 700; }
#result-form { margin-top: 30px; padding-top: 26px; border-top: 2px solid var(--ink); }

/* forms */
.form { display: grid; gap: 18px; }
.form--box { padding: clamp(22px, 4vw, 38px); border-radius: 8px; background: var(--field); }
.form--box h2 { font-size: 1.7rem; }
.form h3 { font-size: 1.4rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field label { font-weight: 700; font-size: 1rem; }
.field__opt { color: var(--soft); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.field .err { margin-top: 0; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form > .btn { justify-self: start; }
.form__note { color: var(--soft); font-size: .98rem; }

/* contact page */
.contact__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
.ways { border-top: 2px solid var(--ink); }
.ways li { display: flex; gap: 14px; padding: 14px 0 15px; border-bottom: 1px solid var(--line-strong); }
.ways .ico { margin-top: 3px; color: var(--cobalt); }
.ways b { display: block; font-size: 1rem; }
.ways a { display: inline-flex; align-items: center; min-height: 32px; color: var(--cobalt); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact__info h2 { margin: 36px 0 8px; font-size: 1.5rem; }
.where__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); align-items: start; }
.where p { margin-top: 14px; }
.map { display: block; width: 100%; height: 380px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; }

/* footer */
.foot { padding-block: 56px 28px; background: var(--ink); color: var(--pale); font-size: 1rem; }
.foot .brand__sub { color: var(--pale); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, 1.3fr); gap: 36px 40px; }
.foot__about p { max-width: 30rem; margin-top: 14px; }
.foot h2 { margin-bottom: 8px; color: #fff; font: 700 1rem/1.4 var(--sans); }
.foot li { padding-block: 4px; }
.foot li a, .foot__legal a { display: inline-block; padding-block: 5px; color: #fff; overflow-wrap: anywhere; }
.foot li a:hover, .foot__legal a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .22); }
.foot__legal ul { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot__legal li { padding: 0; }
.foot__demo { margin-top: 12px; color: #B9BCDD; font-size: .92rem; }

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

@media (max-width: 1240px) {
  .top .brand__sub { display: none; }
}
@media (max-width: 1080px) {
  .top__in { min-height: 68px; gap: 12px; }
  .top__tools { margin-left: auto; }
  .burger { display: inline-flex; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 4px clamp(18px, 4vw, 40px) 20px; border-bottom: 2px solid var(--ink); background: #fff; font-size: 1.125rem; }
  .menu.is-open { display: flex; }
  .menu a:not(.btn) { min-height: 52px; border-top: 0; border-bottom: 1px solid var(--line); }
  .menu a[aria-current="page"] { border-bottom-color: var(--line); color: var(--cobalt); }
  .menu .menu__cta { margin-top: 16px; min-height: 50px; }
}
@media (max-width: 1020px) {
  .demobar__txt { display: none; }
  .demobar__cta { margin-left: auto; }
}
@media (max-width: 960px) {
  .hero__in, .lesson__in, .results__in, .start__in, .course__in, .prices, .contact__in, .where__in { grid-template-columns: minmax(0, 1fr); }
  .hero__txt { padding-top: 0; }
  .people--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ladder__panels { min-height: 0; }
}
@media (max-width: 900px) {
  .lines__head { display: none; }
  .lines ul { border-top: 2px solid var(--ink); }
  .line { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; align-items: start; padding: 18px 0 20px; }
  .line__name { grid-column: 1 / -1; }
  .line__k { display: block; color: var(--soft); font-size: .88rem; font-weight: 400; }
  .line__lv { flex-wrap: wrap; gap: 0 10px; }
  .line__lv .line__k { flex-basis: 100%; }

  /* tables turn into stacked records */
  .tbl--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl--stack, .tbl--stack tbody { display: block; }
  .tbl--stack tbody { border-top: 2px solid var(--ink); }
  .tbl--stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; padding: 16px 0 18px; border-bottom: 1px solid var(--line-strong); }
  .tbl--stack th, .tbl--stack td { display: block; padding: 0; border: 0; }
  .tbl--stack tbody th { grid-column: 1 / -1; font: 400 1.3rem/1.25 var(--serif); }
  .tbl--stack tbody th small { margin-top: 2px; font-family: var(--sans); }
  .tbl--stack td[data-label]::before { content: attr(data-label); display: block; color: var(--soft); font-size: .88rem; }
  .tbl--stack .tt__act { grid-column: 1 / -1; text-align: left; }
  .tbl--stack .tt__act a { display: inline-flex; align-items: center; min-height: 44px; }
  .course__extra .tbl--stack td:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .lead { font-size: 1.15rem; }
  .ladder__steps { height: 176px; gap: 4px; }
  .step { align-items: center; padding: 8px 2px 4px; }
  .step__code { font-size: 1.25rem; }
  .step__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lvl { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .flow__bar { height: 52px; }
  .flow__seg small { display: none; }
  .flow__steps li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .results__big { padding: 22px 20px 24px; }
  .hero__cta .btn, .start__cta .btn, .band .btn, .form > .btn, .form__actions .btn { width: 100%; }
  .filters { padding: 16px 16px 18px; }
  .chip span { padding-inline: 13px; }
  .quiz__opts { grid-template-columns: minmax(0, 1fr); }
  .quiz__progress { flex-wrap: wrap; }
  .res { grid-template-columns: minmax(0, 1fr); }
  .res__steps { max-width: 15rem; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .people--3 { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .people--3 .person { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; align-content: start; }
  .people--3 .person img { grid-row: 1 / span 2; align-self: start; }
  .people--3 .person h3 { margin-top: 0; align-self: end; }
  .people--3 .person__role { align-self: start; }
  .people--3 .person__bio { grid-column: 1 / -1; margin-top: 12px; }
  .people--4 { gap: 28px 16px; }
  .map { height: 300px; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .prices__table { font-size: 1rem; }
  .prices__table tr > :nth-child(2) { padding-inline: 10px; }
  .prices__table tr > :nth-child(3) { padding-left: 10px; }
  .tbl th, .tbl td { padding-right: 10px; }
}
@media (max-width: 380px) {
  .brand__mark { font-size: 1.5rem; }
  .burger span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ---- узкие телефоны: длинное слово переносится, а не вылезает из блока ---- */
h1, h2, h3, h4, p, li, dt, dd, td, th, label, b, strong, small, a { overflow-wrap: break-word; }

@media (max-width: 420px) {
  .tt__table td:nth-child(4), .tt__act { white-space: normal; }
}

/* ---- телефоны: по ссылкам и кнопкам легче попасть пальцем ---- */
@media (max-width: 700px) {
  .demobar__back, .demobar__cta { display: inline-flex; align-items: center; min-height: 40px; }
  footer a:not([class*="btn"]):not([class*="logo"]):not([class*="brand"]):not([class*="marca"]) { display: inline-block; padding-block: 7px; }
  .link, .tl, .more, .tlink, .lnk, .band__link { display: inline-block; padding-block: 9px; }
}
