/* Блімо: public pages (home, tests, mock exam, preparation, features, 404).
   Plain CSS, no frameworks, no scripts, system fonts: the pages are small and fast on a phone. */
:root {
  --bg: #f4f6f8; --surface: #fff; --text: #17201b; --muted: #55606b; --line: #e3e7eb;
  --brand: #138a4a; --brand-dark: #0e6d3a; --on-brand: #fff; --soft: #e3f6ea; --accent: #7a4dff;
  --radius: 18px; --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(20, 40, 30, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --surface: #181b20; --text: #e8eeec; --muted: #aab3bf; --line: #262b33;
    --brand: #4cd98b; --brand-dark: #35c177; --on-brand: #00210f; --soft: #123824; --accent: #a68bff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 Roboto, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--brand); } }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 14px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand img { border-radius: 10px; }
.menu { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; order: 3; width: 100%; padding-bottom: 2px; }
.menu::-webkit-scrollbar { display: none; }
.menu a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--soft); color: var(--text); }
@media (min-width: 860px) { .menu { order: 0; width: auto; } .bar { flex-wrap: nowrap; } .brand { margin-right: 12px; } .menu { margin-right: auto; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 17px; text-decoration: none; border: 2px solid var(--brand); }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); background: var(--soft); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* hero */
.hero { padding: 36px 0 28px; }
.hero .wrap { display: grid; gap: 24px; align-items: center; }
.hero h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; font-weight: 900; }
.lead { font-size: clamp(18px, 2.6vw, 21px); color: var(--muted); margin: 0; max-width: 62ch; }
.note { color: var(--muted); font-size: 15px; margin-top: 14px; }
.hero figure { margin: 0; display: flex; justify-content: center; }
@media (min-width: 820px) { .hero .wrap { grid-template-columns: 1.4fr .8fr; } .hero { padding: 56px 0 40px; } }

/* sections */
section { padding: 28px 0; content-visibility: auto; contain-intrinsic-size: 1px 600px; }
h2 { font-size: clamp(24px, 4vw, 32px); line-height: 1.2; margin: 0 0 16px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; font-weight: 800; }
p { margin: 0 0 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin-bottom: 10px; }
.card a.more { font-weight: 700; }
.badge { display: inline-block; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 800; vertical-align: middle; }
ol.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
ol.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 16px 64px; position: relative; }
ol.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 900; display: grid; place-items: center; }
ul.tick { list-style: none; padding: 0; margin: 0 0 12px; }
ul.tick li { padding-left: 28px; position: relative; margin-bottom: 8px; }
ul.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 900; }
.two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; margin: 0; list-style: none; }
.shots li { flex: 0 0 auto; scroll-snap-align: start; width: min(240px, 62vw); }
.shots img { border-radius: 16px; border: 1px solid var(--line); display: block; width: 100%; height: auto; box-shadow: var(--shadow); }
.shots figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.faq h3 { margin-top: 18px; }
.crumbs { font-size: 15px; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.cta { text-align: center; background: var(--soft); border-radius: 24px; padding: 32px 20px; margin: 20px 0 8px; }
.cta h2 { margin-bottom: 8px; }
.cta .actions { justify-content: center; }
.related { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 8px 0 0; }
.related a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--surface); font-weight: 600; font-size: 15px; }

/* article pages */
.page { padding: 14px 0 20px; }
.page h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 12px 0 14px; font-weight: 900; letter-spacing: -.02em; }
.page .lead { margin-bottom: 20px; }
.prose { max-width: 74ch; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* examples of real questions on the tests page: a card with the question, its options and the right answer behind a button */
.qa-list { display: grid; gap: 14px; margin: 14px 0 18px; }
.qa-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.qa-q { font-weight: 800; margin: 0 0 8px; }
.qa-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-dark); color: var(--on-brand); font-size: 14px; font-weight: 800; margin-right: 8px; vertical-align: 1px; }
.prose .qa-opts { margin: 0 0 8px; padding-left: 26px; }
.qa-ans { border-top: 1px solid var(--line); padding-top: 6px; }
.qa-ans summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--brand-dark); }
.qa-ans summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.qa-ans p { margin: 2px 0 6px; }

/* footer */
footer { margin-top: 36px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
footer .cols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
footer h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; color: var(--text); }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 6px; }
footer a { color: var(--muted); }
footer .fine { margin-top: 20px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ===== wordmark in the header of the inner pages ===== */
.brand img { height: 34px; width: auto; border-radius: 0; display: block; }

/* ===== home page: always dark, as in the owner's reference ===== */
.home {
  --bg: #0f1317; --surface: #161b20; --text: #f4f7f5; --muted: #b3bcc4; --line: #2b3136;
  --brand: #3ddc78; --brand-dark: #3ddc78; --on-brand: #fff; --soft: #1a2d26; --accent: #b39dff;
  --cta: #00a52f; --cta-hover: #009129;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .3);
  color-scheme: dark;
  background: linear-gradient(180deg, #0f1317 0, #11151a 55%, #0a1d15 100%) no-repeat, #0f1317;
}
.home a { color: var(--brand); }
.home .wrap { width: min(1080px, 100% - 40px); }
.h-top { padding: 18px 0; }
.h-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.h-logo { display: inline-flex; line-height: 0; }
.h-logo img { height: 36px; width: auto; display: block; }
.h-login { color: var(--text) !important; font-weight: 700; font-size: 17px; text-decoration: none; padding: 10px 4px; }
.h-login:hover { text-decoration: underline; }

.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; width: min(360px, 100%); padding: 0 28px; border-radius: 16px; background: var(--cta); color: #fff !important; font-weight: 800; font-size: 20px; text-decoration: none; border: 0; box-shadow: 0 8px 24px rgba(0, 165, 47, .25); }
.h-btn:hover { background: var(--cta-hover); }
.h-btn svg { flex: none; }
.h-btn.compact { min-height: 52px; width: auto; min-width: 190px; font-size: 18px; border-radius: 12px; box-shadow: none; }

/* the iPhone button under «Почати тест» and the notice it shows while the application is not in the App Store */
.h-ios { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; width: min(360px, 100%); margin-top: 14px; padding: 0 20px; border-radius: 16px; border: 2px solid #46525d; background: rgba(255, 255, 255, .04); color: var(--text) !important; font: inherit; font-weight: 700; font-size: 18px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.h-ios:hover { border-color: var(--muted); background: rgba(255, 255, 255, .08); }
.h-ios:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.h-ios svg { flex: none; }
.h-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 50; width: min(420px, 100% - 32px); display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: 16px; background: #fff; color: #14181e; text-align: center; line-height: 1.4; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); cursor: pointer; transform: translate(-50%, 16px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
.h-toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.h-toast strong { font-size: 19px; }
.h-toast span { font-size: 15px; color: #46515c; }
@media (prefers-reduced-motion: reduce) { .h-toast { transition: none; } }

.h-hero { padding: 36px 0 28px; text-align: center; }
.h-hero .wrap { display: flex; flex-direction: column; align-items: center; }
.h-mascot { height: 250px; width: auto; display: block; margin-bottom: 18px; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .35)); }
.h-hero h1 { font-size: clamp(34px, 7.4vw, 60px); line-height: 1.1; letter-spacing: -.02em; font-weight: 800; margin: 0 0 14px; text-wrap: balance; }
.h-sub { font-size: clamp(20px, 3.4vw, 26px); color: var(--muted); margin: 0 0 34px; }
.h-more { margin-top: 40px; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted) !important; text-decoration: none; font-size: 16px; padding: 6px 14px; }
.h-more:hover { color: var(--text) !important; }

.h-rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.h-learn { padding: 56px 0 40px; text-align: center; }
.h-learn h2, .h-band h2, .h-final h2 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; font-weight: 800; letter-spacing: -.015em; margin: 0 0 16px; text-wrap: balance; }
.h-lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 40em; margin: 0 auto 44px; text-wrap: balance; }
.h-feats { display: grid; gap: 36px; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; margin: 0 auto; max-width: 900px; }
.h-feats li { display: flex; flex-direction: column; align-items: center; }
.h-feats svg { color: #19d65a; margin-bottom: 14px; }
.h-feats h3 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.h-feats p { color: var(--muted); margin: 0; max-width: 16em; font-size: 18px; line-height: 1.45; }
@media (max-width: 680px) { .h-feats { grid-template-columns: 1fr; gap: 30px; } }

.h-band-wrap { padding: 8px 0 28px; }
.h-band { background: #1a2d26; border: 1px solid #22392f; border-radius: 28px; text-align: center; padding: 38px 20px 40px; }
.h-band p { color: var(--muted); font-size: 19px; margin: 0 0 26px; }
.h-devices { display: flex; justify-content: center; align-items: flex-end; gap: 36px; color: #19d65a; }
@media (max-width: 480px) { .h-devices { gap: 22px; } .h-devices svg { height: 54px; width: auto; } }

.h-detail { padding: 24px 0 8px; }
.h-detail .eyebrow { text-align: center; color: var(--muted); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; margin: 0 0 4px; }
.h-final { text-align: center; padding: 44px 0 40px; }
.h-final .wrap { display: flex; flex-direction: column; align-items: center; }

.h-foot { border-top: 1px solid var(--line); margin: 0; padding: 22px 0 36px; color: var(--muted); font-size: 15px; }
.h-foot .row { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.h-foot .h-logo img { height: 30px; }
.h-foot ul { display: flex; flex-wrap: wrap; gap: 6px 28px; list-style: none; padding: 0; margin: 0; }
.h-foot li { margin: 0; }
.h-foot a { color: var(--text); text-decoration: none; font-size: 15px; }
.h-foot a:hover { text-decoration: underline; }
.h-foot .sections { margin-top: 18px; }
.h-foot .sections a { color: var(--muted); }
.h-foot .fine { margin: 18px 0 0; font-size: 13.5px; line-height: 1.5; max-width: 70em; }
@media (max-width: 560px) { .h-foot .row { flex-direction: column; align-items: flex-start; } }
.h-detail .wrap.prose { max-width: none; }
.h-detail .prose > p, .h-detail .prose > h3, .h-detail .prose > .note { max-width: 74ch; }

/* ===== closed testing on Android: the compact block on the home page and the /android/ page ===== */
.h-android { padding: 22px 0 4px; }
.h-android-card { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; background: #1a2d26; border: 1px solid #22392f; border-radius: 24px; padding: 22px 26px; }
.h-android-card h2 { font-size: clamp(22px, 3.6vw, 28px); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; }
.h-android-card p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.45; }
.h-android-card .h-btn { flex: none; }
@media (max-width: 640px) {
  .h-android-card { flex-direction: column; align-items: stretch; text-align: center; padding: 22px 18px; }
  .h-android-card .h-btn { width: 100%; min-height: 56px; }
}

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.inv-note { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: 16px; padding: 14px 16px; margin: 0 0 18px; font-weight: 700; line-height: 1.45; }
.inv-note svg { flex: none; color: var(--brand); margin-top: 1px; }
ol.inv-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: none; }
.prose ol.inv-steps { padding: 0; }
.inv-step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); margin: 0; }
.inv-num { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 900; font-size: 19px; display: grid; place-items: center; }
.inv-kicker { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.inv-body h2 { font-size: 22px; line-height: 1.25; margin: 2px 0 6px; }
.inv-body p { margin: 0 0 14px; color: var(--muted); }
.inv-btn { width: 100%; min-height: 56px; font-size: 18px; text-align: center; }
@media (min-width: 560px) { .inv-btn { width: auto; min-width: 300px; } }
.inv-after { margin: 22px 0 16px; }
.inv-help { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.inv-help summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; font-weight: 800; list-style: none; }
.inv-help summary::-webkit-details-marker { display: none; }
.inv-help summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.inv-help[open] summary::after { transform: rotate(180deg); }
.inv-help summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
.inv-help ul { margin: 0; padding: 0 18px 14px 38px; }
