:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #211d19;
  --muted: #625951;
  --line: #dbd5ca;
  --accent: #a13e2a;
  --warm: #efe7dd;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { opacity: .4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
.frame { width: min(100% - 112px, 1344px); margin-inline: auto; }
.hero { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(30px, 4.6vw, 78px); align-items: center; padding-block: clamp(40px, 6.15vw, 96px) clamp(50px, 7vw, 112px); }
.hero h1 { font: 600 clamp(64px, 8.1vw, 126px)/.86 var(--serif); letter-spacing: -.07em; margin-block: 28px 28px; }
.hero h1 em { color: var(--accent); font-weight: 500; }
.hero-intro { max-width: 36ch; color: var(--muted); font-size: clamp(15px, 1.4vw, 20px); line-height: 1.6; }
.welcome-form { display: grid; justify-items: start; gap: 16px; margin-top: 25px; }
.subject-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.subject-choice legend { margin-bottom: 9px; color: var(--muted); font-size: 13px; font-weight: 650; }
.subject-options { display: flex; flex-wrap: wrap; gap: 7px; }
.subject-options label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.subject-options label:hover { border-color: var(--ink); }
.subject-options label:has(input:checked) { border-color: var(--accent); background: var(--warm); }
.subject-options input { margin: 0; accent-color: var(--accent); }
.result-description { white-space: pre-line; }
.result-source { font-size: 13px; }
.result-source + .examples-grid { margin-top: 10px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 13px; min-height: 52px; padding: 12px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700; text-align: center; transition: background .16s, border-color .16s, color .16s; }
.button:hover { border-color: var(--accent); background: var(--accent); }
.button.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.button.secondary:hover { border-color: var(--ink); }
.button .arrow { margin-inline-start: 9px; font-size: 20px; line-height: .8; }
.hero-gallery { position: relative; display: grid; grid-template-columns: 1fr .92fr; gap: 12px; align-items: start; }
.hero-gallery figure:nth-child(2) { margin-top: clamp(25px, 4vw, 58px); }
.hero-gallery .image-wrap { aspect-ratio: 5/7; }
.image-wrap { position: relative; overflow: hidden; background: white; }
.image-wrap[aria-busy="true"] img { visibility: hidden; }
.image-wrap img { object-position: 50% 38%; }
.section { padding-block: 34px 62px; }
.section.compact { max-width: 1000px; }
.page-title { font: 600 clamp(52px, 6.5vw, 92px)/.9 var(--serif); letter-spacing: -.055em; }
.page-copy { color: var(--muted); margin-top: 13px; max-width: 65ch; font-size: 15px; line-height: 1.6; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0 0 22px; padding: 0; }
.steps li { padding: 11px 0 0; color: var(--muted); font-size: 12px; font-weight: 650; background: linear-gradient(to right, var(--accent) var(--stage-progress), var(--line) 0) top left/100% 2px no-repeat; }
.steps [aria-current] { color: var(--accent); }
.steps .complete { color: var(--ink); }
.section.quiz { max-width: 820px; padding-block: 17px 32px; }
.quiz .steps { margin-bottom: 14px; }
.quiz-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 13px; }
.quiz-head .page-title { font-size: clamp(41px, 5.25vw, 65px); }
.quiz-head .page-copy { margin-top: 5px; }
.round { display: grid; gap: 3px; flex-shrink: 0; padding-bottom: 2px; color: var(--ink); font-size: 12px; text-align: right; white-space: nowrap; }
.round-status { color: var(--muted); font-size: 11px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-card { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: white; color: var(--ink); }
.photo-card .image-wrap { height: clamp(112px, 18vh, 200px); }
.photo-card .image-wrap :is(img, canvas) { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.photo-grid[data-stage="body"] .image-wrap { height: clamp(156px, 23vh, 220px); }
.photo-load-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; }
.photo-load-error .button { min-height: 38px; }
.photo-card::after { position: absolute; inset: 0; border: 2px solid transparent; content: ""; pointer-events: none; }
.photo-card:hover::after { border-color: #bda494; }
.photo-card[aria-pressed="true"] { border-color: var(--accent); }
.photo-card[aria-pressed="true"]::after { border-color: var(--accent); }
.photo-check { position: absolute; right: 7px; bottom: 7px; display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #9d9187; background: rgba(247, 245, 239, .93); color: var(--paper); }
.photo-check svg { opacity: 0; }
.photo-card[aria-pressed="true"] .photo-check { border-color: var(--accent); background: var(--accent); }
.photo-card[aria-pressed="true"] .photo-check svg { opacity: 1; }
.response-row { display: grid; grid-template-columns: minmax(94px, 1fr) auto auto; align-items: center; gap: 7px; margin-top: 10px; }
.response-row .button { min-height: 42px; padding: 8px 13px; font-size: 12px; }
.selection-count { font-size: 12px; font-weight: 650; color: var(--muted); }
.selection-count span { color: var(--ink); }
.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.profile-card { border: 1px solid var(--line); padding: 17px; }
.profile-card h3 { font: 650 35px/.95 var(--serif); letter-spacing: -.035em; }
.card-copy { font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 13px; }
.profile-list { margin: 11px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.4; }
.profile-list li { padding: 9px 0; border-top: 1px solid var(--line); }
.profile-list strong { display: block; color: var(--ink); }
.detail { color: var(--muted); }
.examples-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; max-width: 720px; margin-top: 24px; }
.example-card .image-wrap { aspect-ratio: 4/3; }
.example-card :is(img, canvas) { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.example-card figcaption { padding-top: 7px; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1020px) {
  .frame { width: min(100% - 64px, 1344px); }
  .hero { gap: 30px; }
  .hero h1 { font-size: clamp(58px, 9vw, 93px); }
}
@media (max-width: 700px) {
  .frame { width: calc(100% - 32px); }
  .hero { grid-template-columns: 1fr; padding-block: 37px 30px; gap: 25px; }
  .hero h1 { margin-block: 21px; font-size: clamp(66px, 14vw, 95px); }
  .hero-intro { max-width: 34ch; }
  .hero-gallery { gap: 8px; }
  .hero-gallery figure:nth-child(2) { margin-top: 23px; }
  .hero-gallery .image-wrap { aspect-ratio: 6/7; }
  .section { padding-block: 19px 37px; }
  .steps { margin-bottom: 15px; }
  .section.quiz { width: calc(100% - 24px); padding-top: 12px; }
  .quiz-head { align-items: start; gap: 8px; }
  .quiz-head .page-title { font-size: clamp(34px, 7vw, 49px); }
  .quiz-head .page-copy { font-size: 13px; }
  .round { max-width: 85px; margin-top: 6px; font-size: 10px; }
  .round-status { font-size: 9px; }
  .photo-grid { gap: 5px; }
  .photo-card .image-wrap { height: auto; aspect-ratio: 1; }
  .photo-grid[data-stage="body"] .image-wrap { height: auto; aspect-ratio: 3/4; }
  .photo-check { right: 4px; bottom: 4px; width: 21px; height: 21px; }
  .photo-check svg { width: 13px; height: 13px; }
  .response-row { grid-template-columns: 1.35fr 1.1fr; gap: 5px; }
  .selection-count { grid-column: 1/-1; padding-block: 2px; }
  .response-row .button { gap: 4px; padding-inline: 4px; font-size: 11px; }
  .response-row .button .arrow { margin-inline-start: 0; font-size: 15px; }
  .profile-grid { grid-template-columns: 1fr; }
  .examples-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 8px; }
  .example-card .image-wrap { aspect-ratio: 3/4; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@font-face {
  font-family: Inter;
  src: url("./fonts/inter-cyr.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Inter;
  src: url("./fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+2190-21FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/cormorant-cyr.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/cormorant-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+2190-21FF;
}
:root { --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif; }
#page-title:focus { outline: none; }
