/* Dayyn «Плакат»: flat colour blocks (primary, accent, sand, ink), heavy display type, square corners. Colours are tokens below. */
:root {
  /* «Ночь»: deep navy, soft coral, warm cream. Text pairs pass WCAG AA (≥ 4.5:1). */
  --primary: #22305e;
  --primary-dark: #18234a;
  --primary-soft: #c7cfea;   /* muted text on primary, light primary fills */
  --on-primary: #ffffff;
  --accent: #f08a6c;
  --accent-dark: #a8452a;    /* accent as text on light backgrounds */
  --accent-tint: #fdeae3;    /* light accent fill: errors, wrong answers */
  --on-accent: #1f1a17;      /* coral is light, so text on it is dark */
  --on-accent-soft: #4f2c20; /* muted text on accent */
  --sand: #f7f3ec;
  --sand-2: #ece5d8;
  --black: #1f2230;          /* ink */
  --line: #1f2230;           /* poster borders */
  --white: #ffffff;
  --text: #23242b;
  --muted: #625d55;
  --danger: #cf6b63;         /* soft brick red: borders of leave/remove actions */
  --danger-text: #9c3a33;    /* that red as text on sand */
  --danger-tint: #f8e3df;    /* its light fill on hover */
  --display: "Montserrat", "Arial Black", sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--sand); color: var(--text); font: 500 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 900; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.2vw, 54px); color: var(--black); }
h3 { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; line-height: 1.15; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 100; background: #fff; padding: 12px 16px; }
.skip:focus { top: 12px; }
.caption { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Header */
.header { position: sticky; top: 0; z-index: 30; background: var(--sand); border-bottom: 3px solid var(--line); }
.header-inner { height: 60px; display: flex; align-items: center; gap: 40px; }
.logo { font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: -0.04em; color: var(--black); }
.nav { display: flex; gap: 28px; font-size: 15px; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--black); }
/* Shows only after the hero button scrolls away, so two identical buttons are never on screen together. */
.header-cta { margin-left: auto; min-height: 40px !important; padding: 0 18px !important; font-size: 14px !important; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.header-cta.show { opacity: 1; visibility: visible; }

/* Buttons: square, heavy */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 26px; border: 0; border-radius: 0; font-family: var(--font); font-weight: 800; font-size: 16px; cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--accent); color: var(--on-accent); }
.btn-black { background: var(--black); color: #fff; }
.btn-black:hover { background: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }
.text-link { font-weight: 700; color: #fff; border-bottom: 2px solid rgb(255 255 255 / .5); padding-bottom: 2px; }
.text-link:hover { border-color: #fff; }

/* Hero: the landing has no header bar, the page starts with these two columns */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; min-height: 100vh; min-height: 100svh; max-height: 880px; border-bottom: 3px solid var(--line); }
.hero-logo { position: absolute; z-index: 2; top: 28px; left: max(24px, calc((100vw - 1200px) / 2)); color: var(--on-primary); font-size: 28px; }
.hero-logo:hover { color: var(--primary-soft); }
/* Sign-in for students who already have access. Out of the flow like the logo, top right. */
.hero-login { position: absolute; z-index: 2; top: 22px; right: max(24px, calc((100vw - 1200px) / 2)); display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; background: #fff; color: var(--black); border: 3px solid var(--line); font-weight: 800; font-size: 15px; transition: background-color .15s, color .15s; }
.hero-login:hover { background: var(--black); color: #fff; }
.hero-main { background: var(--primary); color: var(--on-primary); padding: 56px 48px 56px max(24px, calc((100vw - 1200px) / 2)); display: flex; flex-direction: column; justify-content: flex-end; }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--primary-soft); margin-bottom: 18px; }
.hero h1 { font-size: clamp(48px, 6.8vw, 104px); color: var(--on-primary); max-width: 760px; }
.lead { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--primary-soft); max-width: 520px; }
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1.4fr 1fr; border-left: 3px solid var(--line); }
.tile { padding: 22px 26px; display: flex; flex-direction: column; justify-content: flex-end; }
.tile b { font-family: var(--display); font-weight: 900; line-height: .85; letter-spacing: -0.05em; font-size: clamp(48px, 5vw, 76px); }
.tile span { margin-top: 10px; font-size: 14px; font-weight: 600; }
.tile-big { grid-column: 1 / -1; border-bottom: 3px solid var(--line); }
.tile-big b { font-size: clamp(110px, 14vw, 220px); }
.tile-accent { background: var(--accent); color: var(--on-accent); }
.tile-sand { background: var(--sand); color: var(--black); border-right: 3px solid var(--line); }
.tile-black { background: var(--black); color: var(--sand); }

/* Scores */
.scores-sec { padding: 88px 0; background: var(--black); color: var(--sand); }
.scores-sec h2 { color: #fff; }
.sec-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; margin-bottom: 40px; }
.sec-head p { color: #b9b4aa; max-width: 440px; }
.scores { display: grid; grid-template-columns: repeat(6, 1fr); border: 3px solid var(--sand); }
.scores li { padding: 20px 18px 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 170px; }
.scores li + li { border-left: 3px solid var(--sand); }
.subj { font-size: 14px; font-weight: 600; color: #b9b4aa; line-height: 1.3; }
.scores b { font-family: var(--display); font-weight: 900; font-size: 54px; line-height: .9; letter-spacing: -0.04em; color: #fff; }
.scores small { font-size: 20px; color: #8d887f; font-weight: 800; }
.scores .low { background: var(--accent); }
.scores .low .subj, .scores .low small { color: var(--on-accent-soft); }
.scores .total { background: var(--primary); }
.scores .total .subj, .scores .total small { color: var(--primary-soft); }
.scores-sec .caption { color: #8d887f; }

/* Steps */
.how { padding-top: 88px; }
.how h2 { margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 3px solid var(--line); border-bottom: 3px solid var(--line); }
.step { padding: 32px 32px 40px; min-height: 340px; display: flex; flex-direction: column; }
.step + .step { border-left: 3px solid var(--line); }
.step-n { font-family: var(--display); font-weight: 900; font-size: 120px; line-height: .8; letter-spacing: -0.06em; margin-bottom: auto; }
.step h3 { margin-top: 28px; }
.step p { margin-top: 10px; font-size: 16px; max-width: 320px; }
.step-primary { background: var(--primary); color: var(--on-primary); } .step-primary p { color: var(--primary-soft); }
.step-sand { background: var(--sand-2); color: var(--black); } .step-sand p { color: var(--muted); }
.step-accent { background: var(--accent); color: var(--on-accent); } .step-accent p { color: var(--on-accent-soft); }

/* Mistake explained */
.fix { padding: 96px 0; }
.fix-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.fix-grid > div > p { margin-top: 18px; color: var(--muted); max-width: 440px; }
.fix-card { background: #fff; border: 3px solid var(--line); padding: 28px; }
.q { font-size: 18px; line-height: 1.5; color: var(--black); }
.q span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.answers { margin: 22px 0; display: grid; grid-template-columns: 1fr 1fr; border: 3px solid var(--line); }
.ans { padding: 14px 18px; display: grid; gap: 4px; }
.ans small { font-size: 13px; font-weight: 700; }
.ans s, .ans b { font-family: var(--display); font-weight: 900; font-size: 58px; line-height: 1; letter-spacing: -0.04em; }
.ans-wrong { background: var(--sand); color: var(--accent-dark); border-right: 3px solid var(--line); }
.ans-wrong s { text-decoration-thickness: 5px; text-decoration-color: var(--accent); }
.ans-right { background: var(--primary); color: var(--on-primary); }
.why { font-size: 16px; line-height: 1.6; color: var(--text); }
.why b { color: var(--primary); white-space: nowrap; }

/* Parents */
.parents { display: grid; grid-template-columns: 1fr 1fr; border-top: 3px solid var(--line); border-bottom: 3px solid var(--line); }
.parents-main { background: var(--primary); color: var(--on-primary); padding: 64px 48px 64px max(24px, calc((100vw - 1200px) / 2)); }
.parents-main h2 { color: var(--on-primary); max-width: 520px; }
.msg { margin-top: 32px; background: #fff; color: var(--text); padding: 22px 24px; display: grid; gap: 10px; max-width: 460px; font-size: 16px; line-height: 1.5; }
.msg b { color: var(--black); }
.msg figcaption { font-size: 13px; color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-left: 3px solid var(--line); }
.facts li { padding: 32px 28px; background: var(--sand); }
.facts li:nth-child(odd) { border-right: 3px solid var(--line); }
.facts li:nth-child(-n+2) { border-bottom: 3px solid var(--line); }
.facts li:nth-child(2) { background: var(--black); color: var(--sand); }
.facts li:nth-child(3) { background: var(--sand-2); }
.facts p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.facts li:nth-child(2) p { color: #b9b4aa; }

/* FAQ */
.faq { padding: 96px 0; }
.faq-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 56px; }
.faq-list { border-top: 3px solid var(--line); }
.faq-list details { border-bottom: 3px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--black); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 28px; line-height: .8; color: var(--accent); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 22px; color: var(--muted); max-width: 640px; }

/* Signup */
.signup { display: grid; grid-template-columns: 1.25fr 1fr; border-top: 3px solid var(--line); }
.signup-copy { background: var(--accent); color: var(--on-accent); padding: 72px 48px 72px max(24px, calc((100vw - 1200px) / 2)); display: flex; flex-direction: column; justify-content: center; }
.signup-copy h2 { color: var(--on-accent); font-size: clamp(38px, 5vw, 72px); }
.signup-copy p { margin-top: 20px; color: var(--on-accent-soft); max-width: 440px; font-size: 18px; }
.signup-form { background: var(--sand); padding: 56px max(24px, calc((100vw - 1200px) / 2)) 56px 48px; border-left: 3px solid var(--line); display: flex; align-items: center; }
.form, .form-done { width: 100%; max-width: 480px; }
/* The form is the one soft element on the poster: a white card, thin light borders, rounded corners. */
.form { display: grid; gap: 18px; background: #fff; border-radius: 20px; padding: 28px; box-shadow: 0 24px 48px -32px rgb(17 17 17 / .35); }
.seg { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; }
.seg legend { width: 100%; font-size: 14px; font-weight: 700; color: var(--black); margin-bottom: 8px; padding: 0; }
.seg label { flex: 1; min-width: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 11px 8px; border: 1.5px solid #e2dccf; border-radius: 12px; background: var(--sand); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.seg span:hover { border-color: #cfc7b6; }
.seg input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--black); }
.field input { min-height: 52px; padding: 0 16px; border: 1.5px solid #e2dccf; border-radius: 12px; background: #fff; font-size: 17px; font-weight: 500; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #a39d91; }
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.field input[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.form .btn-block { border-radius: 12px; background: var(--primary); margin-top: 4px; }
.form .btn-block:hover { background: var(--primary-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { font-size: 13px; color: var(--muted); text-align: center; }
.form-error { font-size: 14px; font-weight: 600; color: var(--accent-dark); background: var(--accent-tint); padding: 10px 14px; border-radius: 10px; }
.form-done { background: #fff; color: var(--text); padding: 40px 32px; border-radius: 20px; text-align: center; box-shadow: 0 24px 48px -32px rgb(17 17 17 / .35); }
.form-done b { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-family: var(--display); font-weight: 900; font-size: 36px; line-height: 1; }
.form-done h3 { margin-top: 16px; font-size: 26px; color: var(--black); }
.form-done p { margin-top: 8px; color: var(--muted); }

/* Footer */
.footer { background: var(--black); color: #8d887f; padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .logo { color: var(--sand); font-size: 20px; }

/* Tablet */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; max-height: none; }
  .hero-main { padding: 104px 24px 48px; }
  .hero-side { border-left: 0; border-top: 3px solid var(--line); min-height: 360px; }
  .sec-head, .fix-grid, .faq-grid { grid-template-columns: 1fr; gap: 24px; }
  .scores { grid-template-columns: repeat(3, 1fr); }
  .scores li + li { border-left: 0; }
  .scores li { border-right: 3px solid var(--sand); border-bottom: 3px solid var(--sand); }
  .scores li:nth-child(3n) { border-right: 0; }
  .scores li:nth-last-child(-n+3) { border-bottom: 0; }
  .parents, .signup { grid-template-columns: 1fr; }
  .parents-main, .signup-copy { padding: 56px 24px; }
  .facts { border-left: 0; border-top: 3px solid var(--line); }
  .signup-form { border-left: 0; border-top: 3px solid var(--line); padding: 40px 24px; justify-content: center; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .nav { display: none; }
  .header-inner { height: 56px; }
  .hero-main { padding: 84px 16px 44px; }
  .hero-logo { top: 20px; left: 16px; font-size: 24px; }
  .hero-login { top: 14px; right: 16px; min-height: 40px; padding: 0 16px; }
  .lead { font-size: 17px; }
  .hero-actions .btn { width: 100%; }
  .hero-side { min-height: 300px; }
  .tile { padding: 16px 16px; }
  .scores-sec, .fix, .faq { padding: 64px 0; }
  .scores { grid-template-columns: 1fr 1fr; }
  .scores li { min-height: 130px; border-right: 3px solid var(--sand) !important; border-bottom: 3px solid var(--sand) !important; }
  .scores li:nth-child(2n) { border-right: 0 !important; }
  .scores li:nth-last-child(-n+2) { border-bottom: 0 !important; }
  .scores b { font-size: 44px; }
  .how { padding-top: 64px; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; padding: 28px 16px 32px; }
  .step + .step { border-left: 0; border-top: 3px solid var(--line); }
  .step-n { font-size: 84px; margin-bottom: 0; }
  .fix-card { padding: 20px 16px; }
  .ans s, .ans b { font-size: 44px; }
  .parents-main, .signup-copy { padding: 48px 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts li { border-right: 0 !important; border-bottom: 3px solid var(--line); padding: 26px 16px; }
  .facts li:last-child { border-bottom: 0; }
  .signup-form { padding: 28px 16px; }
  .form { padding: 20px 16px; border-radius: 16px; }
}

/* Two-screen test page: hero + signup */
.gets { margin-top: 28px; display: grid; gap: 14px; max-width: 480px; }
.gets li { position: relative; padding-left: 30px; color: var(--on-accent-soft); font-size: 17px; line-height: 1.5; }
.gets li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; background: var(--on-accent); }
.gets b { color: var(--on-accent); }
.signup-copy > p { margin-top: 24px; font-size: 15px !important; }
