:root {
  --ink: #0f2742;
  --muted: #4f6278;
  --paper: #ffffff;
  --tint: #eef5fc;
  --line: #d6e3f0;
  --blue: #1670be;
  --pink: #d92c7e;
  --bubble: #b9c9da;
  --focus: #d92c7e;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6eef7; --muted: #a3b4c7; --paper: #0d1a29; --tint: #13253a;
    --line: #24384f; --blue: #5fb0f0; --pink: #ff6fae; --bubble: #3a5068; --focus: #ff6fae;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e6eef7; --muted: #a3b4c7; --paper: #0d1a29; --tint: #13253a;
  --line: #24384f; --blue: #5fb0f0; --pink: #ff6fae; --bubble: #3a5068; --focus: #ff6fae;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-head nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover { color: var(--ink); }

/* hero */
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding-block: 64px 56px; }
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: -0.035em;
}
.hero h1 span { display: block; }
.lede { margin: 0 0 28px; max-width: 34ch; font-size: 1.2rem; color: var(--muted); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 12px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 650;
}
.store svg { width: 22px; height: 22px; fill: currentColor; }
.store small { display: block; font-weight: 500; font-size: 0.72rem; opacity: 0.8; line-height: 1.1; }
.store b { display: block; font-size: 1.02rem; line-height: 1.2; }
.store.alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

/* optical answer sheet */
.sheet {
  justify-self: end; width: min(100%, 420px);
  background: var(--paper);
  border: 2px solid var(--pink);
  border-radius: 14px;
  padding: 18px 20px 14px;
  color: var(--pink);
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--pink); padding-bottom: 8px; margin-bottom: 8px; font-weight: 700; font-size: 0.95rem; }
.sheet-head span:last-child { font-weight: 500; font-size: 0.85rem; }
.sheet ol { list-style: none; margin: 0; padding: 0; }
.sheet li { display: grid; grid-template-columns: 2.2em repeat(5, 1fr); align-items: center; padding: 6px 0; border-bottom: 1px dashed color-mix(in srgb, var(--pink) 35%, transparent); font-variant-numeric: tabular-nums; }
.sheet li:last-child { border-bottom: 0; }
.sheet .q { font-weight: 700; font-size: 0.9rem; }
.bub {
  justify-self: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--pink);
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  position: relative;
}
.bub.on::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--ink);
  transform: scale(0); animation: fill 260ms ease-out forwards;
}
.sheet li:nth-child(1) .on::after { animation-delay: 300ms; }
.sheet li:nth-child(2) .on::after { animation-delay: 520ms; }
.sheet li:nth-child(3) .on::after { animation-delay: 740ms; }
.sheet li:nth-child(4) .on::after { animation-delay: 960ms; }
.sheet li:nth-child(5) .on::after { animation-delay: 1180ms; }
.sheet li:nth-child(6) .on::after { animation-delay: 1400ms; }
@keyframes fill { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bub.on::after { animation: none; transform: scale(1); } }
.sheet-foot { margin-top: 10px; font-size: 0.82rem; color: var(--muted); }

/* sections */
section { padding-block: 56px; }
.band { background: var(--tint); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 24px; font-weight: 800; }

.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; margin: 0; }
.features div { border-top: 3px solid var(--blue); padding-top: 12px; }
.features div:nth-child(even) { border-top-color: var(--pink); }
.features dt { font-weight: 750; font-size: 1.15rem; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--muted); max-width: 46ch; }

.exams { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: baseline; font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 850; letter-spacing: -0.02em; }
.exams span:nth-child(odd) { color: var(--blue); }
.exams span:nth-child(even) { color: var(--pink); }
.exams p { flex-basis: 100%; margin: 6px 0 0; font-size: 1.05rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 32px 40px; font-size: 0.92rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-foot address { font-style: normal; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* policy page */
.doc .wrap { max-width: 780px; padding-block: 40px 64px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 6px; font-size: 0.95rem; }
.doc h2 { font-size: 1.4rem; margin: 40px 0 10px; padding-top: 10px; border-top: 2px solid var(--line); }
.doc h3 { font-size: 1.12rem; margin: 26px 0 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 0.93rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--tint); font-weight: 700; }
.doc .table-scroll { overflow-x: auto; }
.lang-switch { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.lang-switch a { padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; color: var(--ink); font-size: 0.92rem; }
.downloads { margin: 18px 0 0; padding: 14px 16px; background: var(--tint); border-radius: 12px; font-size: 0.95rem; }
.lang-block + .lang-block { margin-top: 72px; padding-top: 24px; border-top: 4px solid var(--ink); }
:target { scroll-margin-top: 16px; }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; padding-block: 40px; }
  .sheet { justify-self: stretch; width: 100%; }
  .features { grid-template-columns: 1fr; }
  .site-head nav { gap: 12px; font-size: 0.88rem; }
  .bub { width: 26px; height: 26px; }
}
