:root {
  color-scheme: light;
  --paper: #fbf7ef;
  --white: #fffdf9;
  --ink: #252a23;
  --muted: #535b50;
  --green: #20463a;
  --rust: #a0412b;
  --line: #e3d8c8;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Baskervville", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
a { color: inherit; text-underline-offset: .23em; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #bc5e38; outline-offset: 4px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
.container { width: min(1152px, calc(100% - 72px)); margin-inline: auto; }
.sr-only, .trap, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: absolute; top: 0; z-index: 2; background: white; padding: 10px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.topbar, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 16px; }
.brand { display: inline-flex; gap: 12px; align-items: center; font-weight: 750; line-height: 1.25; text-decoration: none; }
.brand img { object-fit: contain; }
.brand small { display: block; font-size: .78rem; margin-top: 3px; color: var(--muted); font-weight: 400; }
nav { display: flex; gap: 24px; align-items: center; font-size: .9rem; font-weight: 650; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
.cabinet-link { border: 1px solid var(--green); border-radius: 999px; padding: 8px 15px; }
.hero { padding-block: 64px; display: grid; grid-template-columns: 1fr 1.12fr; align-items: center; gap: clamp(32px, 5vw, 76px); }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(3.4rem, 6.2vw, 6rem); letter-spacing: -.055em; }
h1 em { display: block; color: var(--rust); font-weight: inherit; }
h2 { font-size: clamp(2.25rem, 4vw, 3.55rem); letter-spacing: -.035em; }
h3 { line-height: 1.25; }
.intro { font-size: clamp(1rem, 1.45vw, 1.2rem); max-width: 36ch; margin: 23px 0 25px; color: var(--muted); }
.hero-image { width: 100%; height: auto; aspect-ratio: 1.19; object-fit: cover; border-radius: 24px 24px 78px 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 21px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; border: 1px solid var(--green); border-radius: 10px; background: var(--green); color: #fff; padding: 12px 18px; min-height: 48px; font-weight: 700; text-decoration: none; text-align: center; }
.button:hover:not(:disabled) { background: #2c5a4b; }
.button.secondary { background: var(--white); color: var(--green); }
.button.secondary:hover:not(:disabled) { background: #edf1e6; }
.button:disabled { opacity: .65; cursor: default; }
.text-link { font-weight: 650; color: var(--green); }
.facts { margin: 25px 0 0; padding: 19px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 30px; }
dt { font-size: .84rem; color: var(--muted); }
dd { margin: 0; font-weight: 700; }
.conditions { background: var(--green); color: #fffdf6; padding-block: 34px; }
.conditions-grid { display: grid; gap: 24px 38px; grid-template-columns: 1.02fr 1fr 1fr; align-items: start; }
.conditions h2 { font-size: clamp(2rem, 3.2vw, 3rem); }
.conditions strong { font-size: 1.04rem; }
.conditions p { margin: 6px 0 0; color: #f0f4eb; }
.section { padding-block: 62px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-heading p { margin: 0; color: var(--muted); }
.ages { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 19px 0 25px; padding: 0; }
.ages li { background: #eee9dc; border-radius: 999px; padding: 4px 12px; font-size: .87rem; font-weight: 650; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { margin: 0 0 11px; color: var(--muted); }
.card summary { color: var(--green); font-weight: 650; }
.card details p { margin: 10px 0 0; }
summary { cursor: pointer; }
.application { background: #f0e9db; padding-block: 58px; }
.form-layout, .cabinet { display: grid; grid-template-columns: 1fr 1.75fr; gap: clamp(25px, 5vw, 76px); align-items: start; }
.form-intro p, .cabinet p { color: var(--muted); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 19px; background: var(--white); padding: clamp(18px, 3vw, 31px); }
.notice { margin: 0 0 18px; padding: 9px 12px; border-radius: 8px; background: #f6ebdc; color: #673a2c; font-size: .93rem; }
fieldset { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
legend { margin-bottom: 12px; padding: 0; font-size: 1.13rem; font-weight: 750; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wide { grid-column: 1 / -1; }
.family-heading { padding-top: 12px; border-top: 1px solid var(--line); }
.family-heading h3, .family-heading p { margin: 0; }
.family-heading p { margin-top: 4px; font-size: .92rem; color: var(--muted); }
.family-list { display: grid; gap: 10px; }
.family-list:empty { display: none; }
.family-row { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.family-remove { justify-self: start; align-self: end; background: transparent; border: 0; color: var(--rust); text-decoration: underline; text-underline-offset: .2em; min-height: 38px; padding: 0; }

label { display: grid; gap: 5px; font-size: .92rem; color: var(--ink); font-weight: 650; }
label small, .file-hint { color: var(--muted); font-weight: 400; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid #c9bbab; border-radius: 8px; padding: 9px 11px; min-height: 44px; color: var(--ink); background: var(--white); }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: #f4f1eb; }
textarea { resize: vertical; }
.check { display: flex; gap: 9px; align-items: start; font-weight: 500; }
.check input { width: 18px; height: 18px; min-height: 0; flex: 0 0 auto; accent-color: var(--green); margin: 3px 0 0; }
.consent { padding-top: 12px; border-top: 1px solid var(--line); }
.legal-links { display: flex; flex-wrap: wrap; gap: 7px 15px; color: var(--green); margin-bottom: 8px; font-size: .88rem; }
.legal-links:empty { display: none; }
#upload-fields { display: grid; gap: 11px; padding: 14px; border-radius: 10px; background: #f5f0e6; }
.file-hint { margin: 0; font-size: .92rem; }
form button[type=submit] { margin-top: 16px; }
.feedback { margin: 8px 0 0; overflow-wrap: anywhere; }
.feedback:empty { margin: 0; }
.feedback.error { color: #9c321e; }
progress { width: 100%; margin-top: 12px; accent-color: var(--green); }
.receipt dd { overflow-wrap: anywhere; margin-bottom: 9px; }
#status-form label + label, #admin-login label + label { margin-top: 12px; }
.faq { border-top: 1px solid var(--line); }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq p { max-width: 75ch; }
.site-footer { background: #eae2d3; }
.footer-inner { padding-block: 25px; align-items: start; }
.footer-inner p { margin: 4px 0 0; font-size: .88rem; }
.footer-inner a { display: block; margin: 0 0 5px; }
.admin .panel { margin-top: 18px; }
.admin .fields { align-items: end; }
.admin-list { display: grid; gap: 14px; }
.admin-list .panel { margin: 0; }
.meta { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 810px) {
  .container { width: min(720px, calc(100% - 36px)); }
  .hero { gap: 24px; padding-block: 36px; }
  .hero-image { aspect-ratio: 1; }
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }
  .conditions h2 { grid-column: 1 / -1; }
  .form-layout, .cabinet { grid-template-columns: 1fr 1.7fr; gap: 22px; }
}
@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  nav { gap: 13px; flex-wrap: wrap; font-size: .8rem; }
  .cabinet-link { padding: 5px 8px; }
  .hero, .form-layout, .cabinet { grid-template-columns: 1fr; }
  .hero-image { aspect-ratio: 1.3; border-radius: 18px 18px 52px 18px; }
  .section, .application { padding-block: 38px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 7px; }
  .cards, .fields { grid-template-columns: 1fr; }
  .card { padding: 17px; }
  .footer-inner { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
