/* Roadling public site. Tokens follow the app (src/web-school-visual.mjs).
   Final brand tokens come from E4-09: change them here, in :root, only. */
:root {
  color-scheme: light;
  --canvas: #fcfcff;
  --surface: #fff;
  --ink: #141737;
  --muted: #555d76;
  --line: #e9eaf2;
  --control: #80859f;
  --violet: #5032fa;
  --violet-ink: #4935bd;
  --tint: #f1edff;
  --tint-soft: #faf9ff;
  --amber-bg: #fff4e3;
  --amber-ink: #6f4300;
  --amber-line: #f0d9b0;
  --green-bg: #edf8f3;
  --green-ink: #1f634a;
  --red-bg: #fff6f7;
  --red-ink: #9d2c43;
  --red-line: #f0cbd3;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3.25rem, 7vw, 5.5rem);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 1.0625rem; line-height: 1.6; overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 1.35rem + 1.4vw, 2.4rem); }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; }
ul[class], ol[class], nav ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
a { color: var(--violet-ink); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
strong { font-weight: 650; }

:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}
.band-navy :is(a, button, summary):focus-visible { outline-color: #fff; }

.skip {
  position: fixed; left: 1rem; top: -6rem; z-index: 30;
  padding: .75rem 1rem; border-radius: 8px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--violet);
}
.skip:focus { top: 1rem; }

.wrap { width: min(100%, calc(var(--wrap) + 2 * var(--gutter))); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section-tight { padding-top: 0; }
.section-line { border-top: 1px solid var(--line); }
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 44rem; }
.muted { color: var(--muted); }
.small { font-size: .9375rem; line-height: 1.55; }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head h2 + p { margin-top: .85rem; color: var(--muted); }
.stack > * + * { margin-top: 1rem; }

/* Beta strip */
.beta-strip { background: var(--ink); color: #fff; font-size: .9rem; line-height: 1.4; }
.beta-strip p { padding-block: .55rem; }
.beta-strip a { color: #fff; }
.beta-strip a:focus-visible { outline-color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(252 252 255 / .94); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1.25rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.25rem; letter-spacing: -.02em; }
.brand img { width: 2.1rem; height: 2.1rem; }
.nav-desktop { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav-desktop a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem; color: var(--ink); text-decoration: none; font-size: .975rem; border-radius: 8px; }
.nav-desktop a:hover { background: var(--tint); color: var(--violet-ink); }
.nav-desktop a[aria-current="page"], .nav-mobile a[aria-current="page"]:not(.button) { color: var(--violet-ink); font-weight: 650; }
.header-cta { flex: none; }
.nav-mobile { display: none; margin-left: auto; }
.nav-mobile summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); font-weight: 600; cursor: pointer; list-style: none; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { border-color: var(--violet); color: var(--violet-ink); }
.nav-mobile-panel { position: absolute; left: 0; right: 0; top: 100%; padding: .75rem var(--gutter) 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 28px rgb(20 23 55 / .1); }
.nav-mobile-panel ul { display: grid; gap: .1rem; margin-bottom: .75rem; }
.nav-mobile-panel .button { width: 100%; }
.nav-mobile-panel a:not(.button) { display: flex; align-items: center; min-height: 48px; color: var(--ink); text-decoration: none; }

@media (max-width: 62rem) {
  .nav-desktop, .site-header .header-cta { display: none; }
  .nav-mobile { display: block; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .6rem 1.3rem;
  border: 1px solid var(--violet); border-radius: 8px;
  background: var(--violet); color: #fff;
  font: inherit; font-weight: 650; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
}
.button:hover { background: #3f24d6; border-color: #3f24d6; color: #fff; }
.button-quiet { background: var(--surface); color: var(--violet-ink); border-color: var(--control); }
.button-quiet:hover { background: var(--tint); color: var(--violet-ink); border-color: var(--violet); }
.button-small { min-height: 44px; padding: .4rem 1rem; font-size: .975rem; }
.button-light { background: #fff; color: var(--ink); border-color: #fff; }
.button-light:hover { background: var(--tint); color: var(--ink); border-color: var(--tint); }
.button:disabled { background: #e6e7f0; border-color: #e6e7f0; color: var(--muted); cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Labels */
.tag { display: inline-flex; align-items: center; min-height: 1.75rem; padding: .15rem .65rem; border-radius: 999px; background: var(--tint); color: var(--violet-ink); font-size: .875rem; font-weight: 600; line-height: 1.3; }
.tag-amber { background: var(--amber-bg); color: var(--amber-ink); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy > * + * { margin-top: 1.25rem; }
.hero-copy .actions { margin-top: 1.75rem; }
.hero-note { color: var(--muted); font-size: .9375rem; max-width: 34rem; }
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.25rem) clamp(2rem, 4vw, 3rem); }
.page-hero > .wrap > * + * { margin-top: 1.1rem; }
.page-hero .actions { margin-top: 1.6rem; }

/* Route: the lesson as a path, the site's main motif */
.route-card { padding: clamp(1.25rem, 3vw, 1.9rem); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.route-card h2 { font-size: 1.2rem; letter-spacing: -.01em; margin-bottom: 1.25rem; }
.route { display: grid; }
.route li { position: relative; padding: 0 0 1.25rem 2.1rem; }
.route li:last-child { padding-bottom: 0; }
.route li::before { content: ""; position: absolute; left: .3rem; top: .35rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--violet); }
.route li::after { content: ""; position: absolute; left: calc(.7rem - 1px); top: 1.3rem; bottom: -.15rem; border-left: 2px dashed #b5a8f8; }
.route li:last-child::after { display: none; }
.route li:last-child::before { background: var(--violet); }
.route strong { display: block; line-height: 1.35; }
.route span { display: block; margin-top: .1rem; color: var(--muted); font-size: .9375rem; line-height: 1.45; }

/* Audience pair */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.panel { display: flex; flex-direction: column; gap: .75rem; padding: clamp(1.4rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.panel .button { align-self: flex-start; margin-top: auto; }
.panel ul { margin-bottom: 1rem; }

.check-list { display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.65rem; line-height: 1.45; }
.check-list li::before { content: ""; position: absolute; left: .15rem; top: .32em; width: .55rem; height: .85rem; border: solid var(--violet); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg) scale(.82); }
.dash-list { display: grid; gap: .55rem; }
.dash-list li { position: relative; padding-left: 1.35rem; line-height: 1.45; }
.dash-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: .75rem; border-top: 2px solid var(--muted); }

/* Screens: two entry points */
.screens { display: grid; grid-template-columns: minmax(0, 1fr) 15.5rem; gap: clamp(1.25rem, 3vw, 2.25rem); align-items: end; }
.screens-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.shot { min-width: 0; }
.shot figcaption { margin-top: .7rem; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.shot-frame { position: relative; overflow: hidden; background: var(--surface); border: 1px solid #d9dbe9; }
.shot-browser .shot-frame { border-radius: 12px; }
.shot-bar { display: flex; align-items: center; height: 2.1rem; padding: 0 .8rem; background: var(--tint-soft); border-bottom: 1px solid var(--line); }
.shot-bar span { width: min(46%, 12rem); height: .6rem; border-radius: 999px; background: #e3e0f5; }
.shot-area {
  display: grid; align-content: center; justify-items: center; gap: .25rem; padding: 1.25rem; text-align: center;
  background: repeating-linear-gradient(135deg, var(--tint-soft) 0 12px, #f5f2ff 12px 24px);
}
.shot-browser .shot-area { aspect-ratio: 16 / 10; }
.shot-phone .shot-frame { width: min(100%, 15.5rem); margin-inline: auto; padding: .55rem; border: 1px solid #c9cbdc; border-radius: 26px; }
.shot-phone .shot-area { aspect-ratio: 9 / 17; border-radius: 18px; }
.shot-area span { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.shot-area strong { line-height: 1.3; }
.screens-3 .shot-area strong { font-size: .975rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { position: relative; padding-top: 2.75rem; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--tint); color: var(--violet-ink); font-weight: 700; }
.steps li::after { content: ""; position: absolute; left: 2.6rem; right: -.9rem; top: 1rem; border-top: 2px dashed #cfc7fb; }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--muted); font-size: .9875rem; line-height: 1.5; }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1rem, 4vw, 3.5rem); padding-block: clamp(1.75rem, 3.5vw, 2.5rem); border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature h3 { font-size: clamp(1.3rem, 1.2rem + .5vw, 1.6rem); letter-spacing: -.015em; }
.feature > div > p { margin-top: .6rem; color: var(--muted); }

/* Honest facts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.facts div { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.facts dt { font-weight: 650; }
.facts dd { color: var(--muted); margin-top: .15rem; }

/* Notices */
.notice { padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 10px; background: var(--tint-soft); line-height: 1.5; }
.notice-amber { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }
.notice-green { background: var(--green-bg); border-color: #c5e6d6; color: var(--green-ink); }
.notice-red { background: var(--red-bg); border-color: var(--red-line); color: var(--red-ink); }
.notice strong { display: block; }
.notice a { color: inherit; }

/* Pricing */
.price-group + .price-group { margin-top: clamp(2.5rem, 6vw, 4rem); }
.price-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; margin-bottom: 1.25rem; }
.prices { display: grid; gap: 1.25rem; }
.prices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-card { display: flex; flex-direction: column; padding: clamp(1.35rem, 2.6vw, 1.75rem); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.price-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.price-amount { margin-top: 1rem; font-size: clamp(2rem, 1.6rem + 1.1vw, 2.5rem); font-weight: 750; letter-spacing: -.025em; line-height: 1.1; }
.price-amount small { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.price-year { margin-top: .35rem; color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.price-card .check-list { margin-block: 1.25rem 1.5rem; font-size: .9875rem; }
.price-card .button { margin-top: auto; }
#school-note { margin-top: 1rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-wrap:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .9875rem; }
caption { padding: .9rem 1rem; text-align: left; font-weight: 650; }
th, td { padding: .7rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); line-height: 1.4; }
thead th { background: var(--tint-soft); font-size: .9375rem; }
tbody th { font-weight: 500; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.faq-toc { position: sticky; top: 6rem; }
.faq-toc ul { display: grid; gap: .1rem; }
.faq-toc a { display: flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.faq-toc a:hover { color: var(--violet-ink); }
.faq-group + .faq-group { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.faq-group h2 { font-size: clamp(1.4rem, 1.25rem + .7vw, 1.75rem); margin-bottom: .75rem; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { position: relative; display: block; padding: .95rem 2.25rem .95rem 0; font-weight: 600; line-height: 1.4; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: .3rem; top: 1.25rem; width: .6rem; height: .6rem; border: solid var(--violet-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.faq-item[open] summary::after { top: 1.5rem; transform: rotate(225deg); }
.faq-answer { padding: 0 0 1.15rem; color: var(--muted); max-width: 44rem; }
.faq-answer > * + * { margin-top: .6rem; }

/* Application form */
.apply-grid { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form-card { padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.form-card > h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.form-card > .notice { margin-bottom: 1.5rem; }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem 1rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: .9875rem; line-height: 1.35; padding: 0; }
.field fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field .hint { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.optional { color: var(--muted); font-weight: 400; }
.field input:not([type="radio"], [type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem;
  border: 1px solid var(--control); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--red-ink); }
.field-error { color: var(--red-ink); font-size: .9rem; line-height: 1.4; }
.field-error:empty { display: none; }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .4rem; }
.choice { display: flex; align-items: center; gap: .65rem; min-height: 48px; padding: .5rem .8rem; border: 1px solid var(--control); border-radius: 8px; font-weight: 500; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--violet); background: var(--tint-soft); }
.choice input, .consent input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--violet); }
.consent { display: flex; align-items: flex-start; gap: .65rem; min-height: 44px; padding-block: .3rem; font-weight: 400 !important; cursor: pointer; }
.consent input { margin-top: .12rem; }
.form-fields:disabled :is(input, select, textarea) { background: #f5f6fa; cursor: not-allowed; }
.form-fields:disabled :is(.choice, .consent) { cursor: not-allowed; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
#antispam-slot:empty { display: none; }
#apply-message:empty { display: none; }

/* Legal documents */
.legal-doc { max-width: 46rem; }
.legal-doc > * + * { margin-top: .8rem; }
.legal-doc h2 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); margin-top: 2.4rem; }
.legal-doc h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal-doc ul { padding-left: 1.3rem; }
.legal-doc li + li { margin-top: .3rem; }
.legal-meta { color: var(--muted); }
.legal-table { overflow-x: auto; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: .975rem; }
.legal-table :is(th, td) { padding: .6rem .75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table thead th, .legal-table tbody th { background: var(--tint-soft); font-weight: 650; }
.legal-requisites dl { display: grid; gap: 0; }
.legal-requisites dl div { padding-block: .7rem; border-top: 1px solid var(--line); }
.legal-requisites dl div:last-child { border-bottom: 1px solid var(--line); }
.legal-requisites dt { font-weight: 650; }
.legal-requisites dd { margin: .1rem 0 0; }
.legal-fill { padding: .05rem .35rem; border-radius: 4px; background: var(--amber-bg); color: var(--amber-ink); }

/* Contacts */
.contact-list { display: grid; gap: 0; max-width: 44rem; }
.contact-list div { padding-block: 1rem; border-top: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font-weight: 650; }
.contact-list dd { color: var(--muted); margin-top: .1rem; }

/* Call to action */
.band-navy { background: var(--ink); color: #fff; }
.cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(2.75rem, 6vw, 4rem); }
.cta p { margin-top: .6rem; color: #d7d9ea; max-width: 40rem; }
.band-navy a:not(.button) { color: #fff; }

/* Footer */
.site-footer { padding-block: 2.5rem; border-top: 1px solid var(--line); background: var(--surface); font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.footer-grid h2 { font-size: .9375rem; letter-spacing: 0; margin-bottom: .35rem; }
.footer-grid ul { display: grid; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.footer-grid li a:hover { color: var(--violet-ink); text-decoration: underline; }
.footer-brand p { margin-top: .5rem; color: var(--muted); max-width: 22rem; }
.footer-grid li { display: flex; flex-wrap: wrap; align-items: center; column-gap: .4rem; }

@media (max-width: 62rem) {
  .hero-grid, .apply-grid, .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-toc { position: static; }
  .faq-toc ul { display: flex; flex-wrap: wrap; gap: .1rem 1.25rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .prices-3 { grid-template-columns: minmax(0, 1fr); }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .cta { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 47.9rem) {
  body { font-size: 1rem; }
  .pair, .prices-2, .facts, .screens, .screens-3, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .form-fields { grid-template-columns: minmax(0, 1fr); }
  .actions .button { flex: 1 1 100%; }
  .site-header { position: relative; }
  html { scroll-padding-top: 1rem; }
  .beta-strip { font-size: .875rem; }
}
@media (max-width: 30rem) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .choice-row { grid-template-columns: minmax(0, 1fr); }
  .price-top { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
