/* Юридическая клиника МПГУ. Общие стили публичной части. */

:root {
  --navy: #17294a;
  --deep: #12213c;
  --gold-l: #c6a65e;
  --blue: #2f62a0;
  --blue-dark: #244d80;
  --pale: #eef2f8;
  --gold: #a9853a;
  --text: #1f2630;
  --muted: #586271;
  --rule: #cdd4de;
  --bg: #fff;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
html[data-fs="2"] { font-size: 128%; }
html[data-fs="3"] { font-size: 145%; }

body {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; transition: color 0.2s; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0; }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 66rem; margin: 0 auto; padding: 0 1.25rem; }

.skip { position: absolute; left: -999em; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: #fff; padding: 0.5rem 0.75rem; }

/* Служебная строка */

.service { background: var(--navy); color: #d5dcea; font-size: 0.78rem; }
.service .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2.2rem; }
.service .org { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service a { color: inherit; text-decoration: none; }
.service a:hover { color: #fff; text-decoration: underline; }
.a11y { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.a11y button {
  font: inherit; color: inherit; background: none; border: 1px solid #5f6f8c;
  padding: 0 0.45rem; height: 1.5rem; cursor: pointer; border-radius: 0;
}
.a11y button:hover, .a11y button[aria-pressed="true"] { background: #fff; color: var(--navy); border-color: #fff; }
.a11y .fs2 { font-size: 1.15em; }
.a11y .fs3 { font-size: 1.3em; }
.a11y .contrast-toggle { margin-left: 0.6rem; }

/* Шапка */

.head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--navy); }
.brand img { width: 4.1rem; flex: none; }
.brand b { display: block; font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; }
.brand span { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.head-contact { text-align: right; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.head-contact a { display: block; font-size: 1.15rem; font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; }

.nav { border-top: 1px solid var(--rule); background: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--rule); }
.nav .wrap { display: flex; align-items: stretch; justify-content: space-between; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav li a { display: block; padding: 0.85rem 0; margin-right: 1.5rem; transition: color 0.2s; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav li a:hover { color: var(--blue); }
.nav li a[aria-current] { font-weight: 700; color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); }
.nav .apply { display: flex; align-items: center; padding: 0 1.5rem; transition: background-color 0.2s; background: var(--blue); color: #fff; font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.nav .apply:hover { background: var(--blue-dark); color: #fff; }
.nav-toggle { display: none; }

/* Основная часть */

main { padding: 0 0 4.5rem; }
main > .wrap { padding-top: 3.2rem; }
.lede { font-size: 1.15rem; max-width: 38rem; }
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.8rem; }
.crumbs a { color: inherit; }
.page-title { margin-bottom: 1.4rem; }
.text { max-width: 40rem; }
.text h2 { margin: 2.2rem 0 0.7rem; }
.text h3 { margin: 1.6rem 0 0.4rem; }
.text ul, .text ol { padding-left: 1.3rem; margin: 0 0 1em; }
.text li { margin-bottom: 0.35em; }
.note { border-left: 3px solid var(--gold); padding: 0.1rem 0 0.1rem 1rem; color: var(--muted); font-size: 0.92rem; }
.draft { border: 1px solid var(--rule); background: var(--pale); padding: 0.7rem 1rem; font-size: 0.9rem; margin-bottom: 1.6rem; }

.btn {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--blue); color: #fff; border: 2px solid var(--blue);
  padding: 0.8rem 1.6rem; border-radius: 2px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.plain { background: #fff; color: var(--blue); }
.btn.plain:hover { background: var(--pale); color: var(--navy); }
.btn[disabled] { opacity: 0.55; cursor: default; }

section + section { margin-top: 4rem; padding-top: 3.2rem; border-top: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.8rem; }
.section-head h2::after, .about-row h2::after { content: ""; display: block; width: 2.6rem; height: 2px; background: var(--gold); margin-top: 0.8rem; }
.section-head a { font-size: 0.92rem; white-space: nowrap; }

/* Главная: вводный блок */

.intro-row { display: grid; grid-template-columns: 1fr 20rem; gap: 4rem; align-items: center; }
.intro-row h1 { font-size: 3.1rem; line-height: 1.12; margin-bottom: 1.4rem; }
.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.7rem; }

.reception { border-top: 3px solid var(--navy); background: var(--pale); padding: 1.1rem 1.25rem 1.2rem; font-size: 0.92rem; }
.reception h2 { font-size: 1.15rem; margin-bottom: 0.7rem; }
.reception dl { margin: 0; }
.reception dt { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 0.75rem; }
.reception dd { margin: 0.1rem 0 0; }
.reception dd a { color: var(--navy); font-weight: 700; text-decoration: none; }
.reception p { margin: 0.9rem 0 0; padding-top: 0.7rem; border-top: 1px solid var(--rule); font-size: 0.84rem; color: var(--muted); }

/* Направления: список в две колонки */

.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
.topics li { padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.topics h3 { margin-bottom: 0.15rem; }
.topics h3 a { color: var(--navy); text-decoration: none; }
.topics h3 a:hover { text-decoration: underline; }
.topics p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.after-list { margin-top: 1.2rem; max-width: 40rem; }

/* Порядок обращения */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; counter-reset: s; }
.steps li { counter-increment: s; border-top: 1px solid var(--navy); padding-top: 0.6rem; font-size: 0.92rem; }
.steps li::before { content: counter(s); display: block; font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--gold); margin-bottom: 0.5rem; }
.steps b { display: block; font-size: 1.02rem; color: var(--navy); margin-bottom: 0.2rem; }
.steps.vertical { grid-template-columns: 1fr; gap: 0; max-width: 40rem; }
.steps.vertical li { position: relative; border-top: 1px solid var(--rule); padding: 1.1rem 0 1.1rem 3.4rem; font-size: 1rem; }
.steps.vertical li::before { position: absolute; left: 0; top: 1rem; margin: 0; }

.about-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; }
.about-row h2 { margin-bottom: 1.4rem; }
.about-row p:last-child { margin-bottom: 0; }

/* Таблицы данных и вопросы */

.facts { margin: 0; max-width: 40rem; }
.facts div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: 0.92rem; }
.facts dd { margin: 0; }

.people { list-style: none; padding: 0; margin: 0; max-width: 40rem; }
.people li { padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.people b { display: block; }
.people span { color: var(--muted); font-size: 0.92rem; }

.faq { max-width: 40rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 0.85rem 1.6rem 0.85rem 0; font-weight: 700; color: var(--navy); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.7rem; font-family: var(--serif); font-size: 1.3rem; color: var(--gold); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 1rem; }

.docs { list-style: none; padding: 0; margin: 0; max-width: 40rem; }
.docs li { padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.docs span { display: block; color: var(--muted); font-size: 0.88rem; }

/* Заявление */

.form-cols { display: grid; grid-template-columns: 1fr 17rem; gap: 3.2rem; align-items: start; }
.form-aside { font-size: 0.88rem; color: var(--muted); border-top: 3px solid var(--navy); padding-top: 0.9rem; }
.form-aside h2 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.form-aside ul { padding-left: 1.1rem; margin: 0 0 1rem; }
.form-aside a { white-space: nowrap; }

.progress { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0 0 1.8rem; padding: 0 0 0.1rem; border-bottom: 1px solid var(--rule); counter-reset: p; font-size: 0.9rem; color: var(--muted); }
.progress li { counter-increment: p; padding: 0.5rem 0; }
.progress li::before { content: counter(p) ". "; }
.progress li.done { color: var(--text); }
.progress li.now { color: var(--navy); font-weight: 700; box-shadow: 0 2px 0 var(--gold); }

.step h2 { margin-bottom: 0.3rem; }
.step > p.hint { color: var(--muted); margin-bottom: 1.3rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.choices label { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.7rem 0.8rem; border: 1px solid var(--rule); cursor: pointer; border-radius: 2px; }
.choices label:hover { border-color: var(--blue); }
.choices input { margin: 0.3rem 0 0; accent-color: var(--blue); flex: none; }
.choices label:has(input:checked) { border-color: var(--blue); background: var(--pale); box-shadow: inset 3px 0 0 var(--blue); }
.choices small { display: block; color: var(--muted); font-size: 0.82rem; }

.field { margin-bottom: 1.2rem; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field .help { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="password"],
.field input[type="date"], .field input[type="datetime-local"], .field select, .field textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid #8a94a3; border-radius: 2px; padding: 0.55rem 0.7rem;
}
.field textarea { min-height: 11rem; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--navy); }
.field .err, .form-error { color: #a32020; font-size: 0.88rem; margin-top: 0.3rem; }
.field.bad input, .field.bad textarea { border-color: #a32020; }
.counter { float: right; font-size: 0.8rem; color: var(--muted); }

.prompts { background: var(--pale); padding: 0.8rem 1rem; font-size: 0.9rem; margin-bottom: 1.2rem; }
.prompts ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }

.slots { border-top: 1px solid var(--rule); }
.slot-day { display: grid; grid-template-columns: 11rem 1fr; gap: 0.5rem 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); align-items: center; }
.slot-day .times { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.slot-day label { cursor: pointer; }
.slot-day input { position: absolute; opacity: 0; }
.slot-day label span { display: block; padding: 0.3rem 0.7rem; border: 1px solid #8a94a3; border-radius: 2px; }
.slot-day label:hover span { border-color: var(--blue); }
.slot-day input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.slot-day input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 1px; }
.slot-day em { color: var(--muted); font-style: normal; font-size: 0.9rem; }
.any-slot { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1rem; }
.any-slot input, .check input { margin-top: 0.35rem; accent-color: var(--blue); flex: none; }

.check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 1.4rem 0 0.4rem; }
.summary { margin: 0 0 1.4rem; }
.summary div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.summary dt { color: var(--muted); font-size: 0.9rem; }
.summary dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

.form-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.form-nav .back { background: none; border: 0; font: inherit; color: var(--blue); cursor: pointer; padding: 0.5rem 0; text-decoration: underline; text-underline-offset: 0.15em; }
.hp { position: absolute; left: -999em; }

.done-number { font-family: var(--serif); font-size: 3rem; color: var(--navy); line-height: 1; margin: 0.4rem 0 1.2rem; }
.demo-flag { background: #fff6d8; border: 1px solid #d9c27a; padding: 0.5rem 0.8rem; font-size: 0.85rem; margin-bottom: 1.4rem; }

/* Подвал */

.foot { background: var(--navy); color: #c9d2e3; font-size: 0.86rem; padding: 2.2rem 0 1.4rem; }
.foot a { color: #fff; }
.foot .wrap > div { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.foot .who { display: flex; gap: 0.9rem; align-items: flex-start; }
.foot .who img { width: 3.4rem; flex: none; filter: brightness(0) invert(1); opacity: 0.9; }
.foot b { display: block; font-family: var(--serif); font-size: 1.05rem; color: #fff; margin-bottom: 0.3rem; }
.foot h2 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: #93a1bb; margin-bottom: 0.5rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.3rem; }
.foot .legal { margin: 1.8rem 0 0; padding-top: 1rem; border-top: 1px solid #34466a; color: #93a1bb; font-size: 0.78rem; }

/* Заставка с эмблемой */

html.intro-pending body::before { content: ""; position: fixed; inset: 0; background: var(--deep); z-index: 90; }
html.intro-lock { overflow: hidden; }
.splash {
  position: fixed; inset: 0; z-index: 100; background: var(--deep); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.2, 1);
}
.splash.leaving { transform: translateY(-100%); pointer-events: none; }
.splash.leaving > * { opacity: 0; transition: opacity 0.35s; }
.emblem { position: relative; width: min(14rem, 52vw); aspect-ratio: 567 / 504; filter: brightness(0) invert(1); }
.emblem i { position: absolute; inset: 0; background: url(../img/logo.png) center / 100% 100% no-repeat; }
.emblem .shield { clip-path: polygon(26.8% 21%, 28% 21%, 33% 25.6%, 67% 25.6%, 72% 21%, 73.6% 21%, 73.6% 100%, 26.8% 100%); animation: sp-shield 0.9s ease-out both; }
.emblem .crown { clip-path: polygon(28% 0, 72% 0, 72% 21%, 67% 25.6%, 33% 25.6%, 28% 21%); animation: sp-crown 0.7s 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.emblem .lion-l { clip-path: inset(0 73.2% 0 0); animation: sp-left 0.8s 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.emblem .lion-r { clip-path: inset(0 0 0 73.6%); animation: sp-right 0.8s 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.splash-rule { width: min(18rem, 64vw); height: 1px; margin-top: 2rem; background: var(--gold-l); animation: sp-rule 1s 1.6s cubic-bezier(0.6, 0, 0.2, 1) both; }
.splash-name { margin-top: 1.3rem; font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; text-align: center; animation: sp-name 0.8s 2s ease-out both; }
.splash-name small { display: block; margin-top: 0.6rem; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.14em; color: #9fabc2; }
@keyframes sp-shield { from { opacity: 0; transform: scale(0.94); } }
@keyframes sp-crown { from { opacity: 0; transform: translateY(-30%); } }
@keyframes sp-left { from { opacity: 0; transform: translateX(-18%); } }
@keyframes sp-right { from { opacity: 0; transform: translateX(18%); } }
@keyframes sp-rule { from { transform: scaleX(0); } }
@keyframes sp-name { from { opacity: 0; transform: translateY(0.4rem); } }

/* Тёмная полоса: первый экран главной и заголовки внутренних страниц */

.hero, .band { position: relative; background: var(--deep); color: #d9e0ec; overflow: hidden; }
.hero::after, .band::after {
  content: ""; position: absolute; top: 50%; right: -5rem; width: 40rem; aspect-ratio: 567 / 504;
  transform: translateY(-50%); background: url(../img/logo.png) center / contain no-repeat;
  filter: brightness(0) invert(1); opacity: 0.04; pointer-events: none;
}
.band::after { width: 22rem; right: 2rem; opacity: 0.05; }
.hero .wrap, .band .wrap { position: relative; z-index: 1; }
.hero .wrap { padding-top: 4.6rem; padding-bottom: 4.8rem; }
.hero h1, .band h1 { color: #fff; }
.hero .lede { color: #fff; }
.hero a { color: #fff; }
.kicker { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-l); margin-bottom: 1.3rem; }
.btn.gold { background: var(--gold-l); border-color: var(--gold-l); color: var(--deep); }
.btn.gold:hover { background: #d6b974; border-color: #d6b974; color: var(--deep); }
.hero .reception { background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.2); border-top: 2px solid var(--gold-l); color: #d9e0ec; padding: 1.4rem 1.5rem 1.5rem; }
.hero .reception h2 { color: #fff; }
.hero .reception dt { color: var(--gold-l); }
.hero .reception p { border-top-color: rgba(255, 255, 255, 0.2); color: #aab5c9; }
.band { padding: 2.4rem 0 2.7rem; border-bottom: 2px solid var(--gold-l); }
.hero { border-bottom: 2px solid var(--gold-l); }
.band h1 { font-size: 2.4rem; }
.band .crumbs { color: #9fabc2; margin-bottom: 0.9rem; letter-spacing: 0.02em; }
.band .crumbs a { color: #d9e0ec; }

/* Цитата на всю ширину */

section.quote { border: 0; margin-top: 4rem; padding: 3.4rem 0 3.2rem; background: var(--pale); box-shadow: 0 0 0 100vmax var(--pale); clip-path: inset(0 -100vmax); }
.quote blockquote { margin: 0; max-width: 46rem; font-family: var(--serif); font-size: 1.45rem; line-height: 1.45; color: var(--navy); }
.quote cite { display: block; margin-top: 1.1rem; font-style: normal; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
section.quote + section { border-top: 0; margin-top: 0; padding-top: 4rem; }

.cases { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.cases li { border-top: 1px solid var(--rule); }
.cases li:last-child { border-bottom: 1px solid var(--rule); }
.cases a { display: block; padding: 0.8rem 1.6rem 0.8rem 0; color: var(--navy); text-decoration: none; font-family: var(--serif); position: relative; }
.cases a::after, .topics h3 a::after { content: "\2192"; position: absolute; right: 0; color: var(--gold); transition: transform 0.2s; }
.cases a:hover::after, .topics li:hover h3 a::after { transform: translateX(4px); }
.topics li { position: relative; padding: 1.05rem 2rem 1.05rem 0; transition: background-color 0.2s; }
.topics h3 a::before { content: ""; position: absolute; inset: 0; }
.topics h3 a::after { top: 1.05rem; font-family: var(--sans); font-weight: 400; }

.people li { display: grid; grid-template-columns: 19rem 1fr; gap: 1.5rem; padding: 0.95rem 0; }
.people b { font-family: var(--serif); font-size: 1.05rem; color: var(--navy); }
.who-worked { font-size: 0.88rem; color: var(--muted); }
.events { margin: 0; max-width: 46rem; }
.events div { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.events dt { font-family: var(--serif); color: var(--navy); }
.events dd { margin: 0; }
.hours { border-collapse: collapse; width: 100%; max-width: 40rem; }
.hours th { text-align: left; font-weight: 400; font-size: 0.8rem; color: var(--muted); padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--navy); }
.hours td { padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--rule); }

/* Плавное появление блоков при прокрутке */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.in { opacity: 1; transform: none; }

/* Версия для слабовидящих */

html.contrast { --deep: #000; --gold-l: #fff; --navy: #000; --blue: #000; --blue-dark: #000; --pale: #fff; --gold: #000; --text: #000; --muted: #000; --rule: #000; font-size: 135%; }
html.contrast[data-fs="2"] { font-size: 155%; }
html.contrast[data-fs="3"] { font-size: 175%; }
html.contrast a { text-decoration: underline; }
html.contrast img { filter: grayscale(1) contrast(1.4); }
html.contrast .service, html.contrast .foot { background: #000; color: #fff; }
html.contrast .foot h2, html.contrast .foot .legal { color: #fff; }
html.contrast .reception, html.contrast .prompts, html.contrast .draft { border: 2px solid #000; }
html.contrast .btn.plain { color: #000; }
html.contrast .head-contact { display: none; }
html.contrast .hero::after, html.contrast .band::after { display: none; }
html.contrast .btn.gold { background: #fff; color: #000; }
html.contrast .hero .reception { border: 2px solid #fff; }

/* Узкие экраны */

@media (max-width: 60rem) {
  .intro-row, .form-cols, .about-row { grid-template-columns: 1fr; gap: 2.4rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .foot .wrap > div { grid-template-columns: 1fr 1fr; }
  .foot .who { grid-column: 1 / -1; }
}

@media (max-width: 46rem) {
  html { font-size: 106%; }
  h1, .intro-row h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  main { padding: 0 0 3rem; }
  main > .wrap { padding-top: 2rem; }
  .hero .wrap { padding-top: 2.6rem; padding-bottom: 2.8rem; }
  .band { padding: 1.6rem 0 1.8rem; }
  .service .org { display: none; }
  .service .wrap { justify-content: flex-end; }
  .head .wrap { padding-top: 0.75rem; padding-bottom: 0.75rem; gap: 0.75rem; }
  .brand img { width: 3.1rem; }
  .brand b { font-size: 1.05rem; }
  .brand span { display: none; }
  .head-contact a { font-size: 0.95rem; }
  .head-contact span { display: none; }
  .nav .wrap { flex-wrap: wrap; padding: 0; }
  .nav-toggle { display: block; flex: 1; text-align: left; font: inherit; font-weight: 700; color: var(--navy); background: none; border: 0; padding: 0.75rem 1.25rem; cursor: pointer; }
  .nav-toggle::after { content: " \25BE"; }
  .nav ul { display: none; order: 3; width: 100%; flex-direction: column; border-top: 1px solid var(--rule); }
  .nav.open ul { display: flex; }
  .nav li a { margin: 0; padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--rule); }
  .nav li a[aria-current] { box-shadow: inset 3px 0 0 var(--gold); }
  .topics, .choices, .steps { grid-template-columns: 1fr; }
  .steps { gap: 1.1rem; }
  .facts div, .summary div, .slot-day, .people li, .events div { grid-template-columns: 1fr; gap: 0.15rem; }
  .band h1 { font-size: 1.8rem; }
  .quote blockquote { font-size: 1.2rem; }
  .nav { position: static; }
  .slot-day { gap: 0.5rem; }
  .foot .wrap > div { grid-template-columns: 1fr; gap: 1.5rem; }
  .form-nav .btn { flex: 1; text-align: center; }
  .slot-day label span { padding: 0.5rem 0.9rem; }
  section + section { margin-top: 2.2rem; padding-top: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .service, .nav, .foot, .head-contact, .intro-actions { display: none; }
  .reveal { opacity: 1; transform: none; }
  body { font-size: 11pt; }
}

.summary dt a { display: block; font-size: 0.8rem; }
[tabindex="-1"]:focus { outline: none; }
#done h3 { margin: 1.6rem 0 0.6rem; }
.hero .reception dd a { color: #fff; }
.cases a::after { top: 0.8rem; }

/* Руководитель клиники */
.director { display: grid; grid-template-columns: 17rem 1fr; gap: 2.6rem; align-items: center; max-width: 52rem; margin: 2.4rem 0 0.6rem; padding: 1.8rem; background: var(--pale); border-top: 3px solid var(--navy); }
.director img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 52% 15%; display: block; }
.director .kicker { color: var(--gold); margin-bottom: 0.6rem; }
.director h2 { font-size: 1.7rem; margin-bottom: 0.9rem; }
.director p { margin-bottom: 0.7rem; }
.director .contacts { margin: 1.1rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.head-mini { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.3rem; align-items: start; margin-bottom: 1em; }
.head-mini img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 52% 15%; display: block; }
.head-mini p { margin: 0; }
.choices.one { grid-template-columns: 1fr; }
@media (max-width: 46rem) {
  .director { grid-template-columns: 1fr; gap: 1.4rem; padding: 1.2rem; }
  .director img { max-width: 15rem; }
}
.nav li a { margin-right: 1.15rem; font-size: 0.92rem; }
.nav .apply { padding: 0 1.15rem; }

/* Практика */
.text h2.first { margin-top: 2.4rem; }
.case { max-width: 44rem; padding: 1.6rem 0 1.2rem; border-top: 1px solid var(--rule); }
.case h3 { font-size: 1.4rem; margin-bottom: 0.8rem; }
.case-date { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
a.more { font-weight: 700; white-space: nowrap; }
a.more::after { content: " \2197"; font-weight: 400; }
.docs.brief a.more { white-space: normal; font-weight: 400; }
.docs.brief a.more::after { content: ""; }
.events a.more { font-weight: 400; font-size: 0.9rem; }
.foot .wrap > div { grid-template-columns: 1.4fr 1fr 1.1fr 1.1fr; gap: 2.2rem; }
@media (max-width: 60rem) { .foot .wrap > div { grid-template-columns: 1fr 1fr; } }
@media (max-width: 46rem) { .foot .wrap > div { grid-template-columns: 1fr; } a.more { white-space: normal; } }

/* Просмотр PDF */
.doc-head { max-width: 46rem; margin-bottom: 1.2rem; }
.doc-links { font-size: 0.92rem; }
.pdf-box { border: 1px solid var(--rule); background: #f3f4f6; }
.pdf-box > .note { padding: 1rem; margin: 0; }
.pdf-frame { display: block; width: 100%; height: 85vh; min-height: 32rem; border: 0; }
.pdf-pages { padding: 0.5rem; }
.pdf-pages canvas { display: block; width: 100%; height: auto; margin: 0 auto 0.5rem; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
@media (max-width: 46rem) { .pdf-frame { height: 75vh; min-height: 0; } }
