:root {
  --green: #12332B;
  --green-2: #1B4539;
  --ivory: #F6F3EC;
  --paper: #FFFFFF;
  --gold: #B89B5E;
  --gold-2: #CDB37A;
  --ink: #1C2421;
  --muted: #69716D;
  --line: #E2DDD1;
  --head: 'PT Serif', Georgia, serif;
  --body: 'PT Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.title { font-size: clamp(1.9rem, 7vw, 3rem); margin-top: 12px; }
.section { padding: 64px 0; }
.section-dark { background: var(--green); color: var(--ivory); }
.section-white { background: var(--paper); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 26px; border: 1.5px solid transparent; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-gold { background: var(--gold); color: var(--green); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { border-color: currentColor; }
.btn-line:hover { background: var(--ivory); color: var(--green); border-color: var(--ivory); }
.btn-green { background: var(--green); color: var(--ivory); }
.btn-green:hover { background: var(--green-2); }
.btn-block { width: 100%; }

/* header */
.topline { display: none; background: var(--green); color: rgba(246, 243, 236, .75); font-size: .85rem; }
.topline .wrap { display: flex; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.header { position: sticky; top: 0; z-index: 50; background: var(--ivory); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 1.25rem; color: var(--green); }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: var(--green); color: var(--gold); font-size: .95rem; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; font-weight: 700; font-size: .92rem; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--green); }
.nav a.is-active { color: var(--green); border-bottom-color: var(--gold); }
.header-cta { display: none; }
.subnav { display: flex; border-top: 1px solid var(--line); }
.subnav .nav { width: 100%; justify-content: space-between; padding: 0 8px; }

/* hero */
.hero { padding: 40px 0 0; }
.hero-in { display: grid; gap: 32px; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 4rem); margin-top: 14px; color: var(--green); }
.hero h1 em { font-style: italic; color: var(--gold); }
.lead { margin-top: 18px; color: var(--muted); font-size: 1.08rem; max-width: 50ch; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.hero-actions .btn-line { color: var(--green); }
.hero-actions .btn-line:hover { background: var(--green); color: var(--ivory); border-color: var(--green); }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-photo::before { content: ''; position: absolute; inset: 16px -12px -12px 16px; border: 1px solid var(--gold); z-index: -1; }
.hero-photo { isolation: isolate; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; background: var(--green); color: var(--ivory); }
.stats li { padding: 22px 14px; border-right: 1px solid rgba(246, 243, 236, .12); }
.stats li:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--head); font-size: clamp(1.5rem, 6vw, 2.4rem); color: var(--gold); }
.stats span { font-size: .82rem; color: rgba(246, 243, 236, .7); }

/* page hero */
.page-hero { padding: 48px 0 40px; background: var(--green); color: var(--ivory); }
.page-hero h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); margin-top: 12px; }
.page-hero p { margin-top: 14px; max-width: 56ch; color: rgba(246, 243, 236, .75); }
.crumbs { font-size: .85rem; color: rgba(246, 243, 236, .6); margin-bottom: 14px; }
.crumbs a:hover { color: var(--gold); }

/* practices */
.practice-grid { display: grid; gap: 1px; margin-top: 32px; background: var(--line); border: 1px solid var(--line); }
.practice { display: flex; flex-direction: column; gap: 10px; padding: 26px 22px; background: var(--paper); transition: background .25s; }
.practice:hover { background: var(--ivory); }
.practice b { font-family: var(--head); font-size: 1.6rem; color: var(--gold); }
.practice h3 { font-size: 1.25rem; color: var(--green); }
.practice p { color: var(--muted); font-size: .96rem; }
.practice .more { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--green); font-size: .92rem; }

/* why */
.why { display: grid; gap: 28px; }
.why-list { display: grid; gap: 18px; }
.why-list li { padding-left: 22px; border-left: 2px solid var(--gold); }
.why-list h3 { font-size: 1.15rem; }
.why-list p { margin-top: 4px; color: rgba(246, 243, 236, .72); font-size: .96rem; }
.why img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.lawyer img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(.2); }
.lawyer h3 { margin-top: 12px; font-size: 1.1rem; color: var(--green); }
.lawyer p { font-size: .88rem; color: var(--muted); }
.lawyer-full { display: grid; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.lawyer-full img { width: 100%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; }
.lawyer-full h2 { font-size: 1.6rem; color: var(--green); }
.lawyer-full .role { color: var(--gold); font-weight: 700; margin-top: 4px; }
.lawyer-full p { margin-top: 12px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags span { padding: 5px 12px; border: 1px solid var(--line); font-size: .82rem; }

/* service details */
.detail { display: grid; gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 140px; }
.detail:first-child { padding-top: 0; }
.detail h2 { font-size: 1.7rem; color: var(--green); }
.detail p { color: var(--muted); }
.detail ul { display: grid; gap: 8px; }
.detail li { padding-left: 20px; position: relative; }
.detail li::before { content: '—'; position: absolute; left: 0; color: var(--gold); }
.detail .price { font-family: var(--head); font-size: 1.2rem; color: var(--green); }
.steps { display: grid; gap: 12px; margin-top: 28px; counter-reset: s; }
.steps li { counter-increment: s; padding: 22px; background: rgba(246, 243, 236, .06); border: 1px solid rgba(246, 243, 236, .12); }
.steps li::before { content: counter(s, upper-roman) '.'; display: block; font-family: var(--head); font-size: 1.4rem; color: var(--gold); margin-bottom: 8px; }
.steps b { display: block; font-size: 1.1rem; }
.steps span { color: rgba(246, 243, 236, .7); font-size: .95rem; }

/* about */
.split { display: grid; gap: 28px; align-items: center; }
.split img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.split p { margin-top: 14px; color: var(--muted); }

/* cta band */
.cta-band { padding: 48px 0; background: var(--gold); color: var(--green); }
.cta-band .wrap { display: grid; gap: 20px; }
.cta-band h2 { font-size: clamp(1.7rem, 6vw, 2.4rem); }
.cta-band p { margin-top: 8px; }

/* contacts */
.contact-grid { display: grid; gap: 32px; }
.contact-list { display: grid; gap: 18px; margin-top: 24px; }
.contact-list dt { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.contact-list dd { margin: 4px 0 0; font-size: 1.1rem; }
.map { margin-top: 26px; height: 220px; position: relative; background-color: #E8E3D6; background-image: linear-gradient(90deg, rgba(18, 51, 43, .08) 1px, transparent 1px), linear-gradient(rgba(18, 51, 43, .08) 1px, transparent 1px); background-size: 32px 32px; }
.map::after { content: '⚖'; position: absolute; left: 46%; top: 38%; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--green); color: var(--gold); font-size: 1.3rem; box-shadow: 0 0 0 10px rgba(18, 51, 43, .15); }
.form { display: grid; gap: 12px; padding: 26px 22px; background: var(--paper); border-top: 4px solid var(--gold); }
.form h2 { font-size: 1.6rem; color: var(--green); margin-bottom: 4px; }
.form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); background: var(--ivory); color: var(--ink); }
.form textarea { min-height: 110px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.form small { color: var(--muted); font-size: .8rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-family: var(--head); font-weight: 700; font-size: 1.1rem; color: var(--green); }
.faq details p { padding-bottom: 18px; color: var(--muted); }

/* footer */
.footer { padding: 32px 0; background: var(--green); color: rgba(246, 243, 236, .7); font-size: .9rem; }
.footer-in { display: grid; gap: 18px; }
.footer .logo { color: var(--ivory); }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer nav a:hover { color: var(--gold); }

@media (min-width: 768px) {
  .wrap { padding: 0 32px; }
  .topline { display: block; }
  .subnav { display: none; }
  .header-cta { display: inline-flex; padding: 11px 18px; }
  .hero { padding-top: 64px; }
  .hero-in { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
  .hero-actions { flex-direction: row; }
  .stats li { padding: 28px 32px; }
  .practice-grid { grid-template-columns: repeat(3, 1fr); }
  .why { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .team-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .lawyer-full { grid-template-columns: 280px 1fr; gap: 36px; padding: 36px 0; }
  .detail { grid-template-columns: 1fr 1.3fr; gap: 40px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split.reverse img { order: 2; }
  .cta-band .wrap { grid-template-columns: 1fr auto; align-items: center; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
  .form { padding: 36px; }
  .footer-in { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 768px) {
  .header-in .nav { display: flex; }
}
@media (max-width: 767px) {
  .header-in .nav { display: none; }
}

/* ===== Головна: симетрична «видавнича» композиція ===== */
.crest { padding: 40px 0 0; text-align: center; }
.seal { width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--gold); box-shadow: inset 0 0 0 5px var(--ivory), inset 0 0 0 6px var(--gold); color: var(--green); font-size: 1.8rem; }
.crest-line { font-size: .74rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.crest-title { margin: 16px auto 0; font-size: clamp(2.8rem, 12vw, 6.4rem); line-height: 1; color: var(--green); }
.crest-title em { font-style: italic; color: var(--gold); font-weight: 700; }
.crest-sub { max-width: 54ch; margin: 22px auto 0; color: var(--muted); font-size: 1.08rem; }
.crest-actions { display: flex; flex-direction: column; gap: 12px; justify-content: center; margin-top: 28px; }
.crest-actions .btn-line { color: var(--green); }
.crest-actions .btn-line:hover { background: var(--green); color: var(--ivory); border-color: var(--green); }
.band { margin: 44px 0 0; padding: 10px 0; border-top: 3px double var(--green); border-bottom: 3px double var(--green); }
.band img { width: 100%; height: clamp(220px, 46vw, 520px); object-fit: cover; filter: sepia(.12) contrast(1.02); }
.band figcaption { margin-top: 8px; font-size: .8rem; font-style: italic; color: var(--muted); }
.numerals { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 28px 0 56px; }
.numerals li { padding: 0 8px; border-right: 1px solid var(--line); }
.numerals li:last-child { border-right: 0; }
.numerals b { display: block; font-family: var(--head); font-size: clamp(1.6rem, 6vw, 2.8rem); color: var(--green); }
.numerals span { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }

.toc { padding: 64px 0; background: var(--paper); border-top: 1px solid var(--line); }
.toc-label { text-align: center; font-size: .74rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.toc-title { text-align: center; font-size: clamp(2rem, 8vw, 3.4rem); color: var(--green); margin: 10px 0 34px; }
.toc-list { max-width: 900px; margin: 0 auto; }
.toc-list a { display: grid; grid-template-columns: 42px auto 1fr auto; align-items: baseline; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: background .25s, padding .25s; }
.toc-list a:hover { background: var(--ivory); padding-left: 10px; padding-right: 10px; }
.toc-list .r { font-family: var(--head); font-weight: 700; color: var(--gold); }
.toc-list .t { font-family: var(--head); font-weight: 700; font-size: 1.15rem; color: var(--green); }
.toc-list small { display: block; font-family: var(--body); font-weight: 400; font-size: .82rem; color: var(--muted); }
.toc-list i { border-bottom: 1px dotted var(--muted); translate: 0 -6px; min-width: 20px; }
.toc-list .p { font-family: var(--head); font-style: italic; white-space: nowrap; color: var(--green); }

.word { padding: 70px 0; background: var(--green); color: var(--ivory); }
.word-in { display: grid; gap: 28px; justify-items: center; text-align: center; max-width: 900px; }
.word img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.word blockquote { margin: 0; }
.word p { font-family: var(--head); font-style: italic; font-size: clamp(1.5rem, 5.5vw, 2.4rem); line-height: 1.3; }
.word footer { margin-top: 18px; font-size: .9rem; color: rgba(246, 243, 236, .7); }
.word footer b { display: block; color: var(--gold); font-size: 1rem; }

.partners { padding: 64px 0; }
.circles { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; }
.circles a { display: flex; flex-direction: column; align-items: center; text-align: center; width: 150px; }
.circles img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; filter: grayscale(.4); transition: filter .3s, transform .3s; }
.circles a:hover img { filter: none; transform: scale(1.04); }
.circles b { margin-top: 12px; font-family: var(--head); color: var(--green); }
.circles span { font-size: .82rem; color: var(--muted); font-style: italic; }

.framed { padding: 10px 0 72px; }
.frame { max-width: 760px; margin: 0 auto; padding: 40px 24px; text-align: center; border: 1px solid var(--green); outline: 1px solid var(--green); outline-offset: 6px; }
.frame h2 { font-size: clamp(1.8rem, 7vw, 2.8rem); color: var(--green); margin: 12px 0; }
.frame p:not(.toc-label) { color: var(--muted); margin-bottom: 24px; }

@media (min-width: 768px) {
  .crest { padding-top: 64px; }
  .crest-actions { flex-direction: row; }
  .word-in { grid-template-columns: auto 1fr; text-align: left; justify-items: start; gap: 48px; align-items: center; }
  .circles { gap: 56px; }
  .frame { padding: 56px; }
}

/* ===== Практики: «Кодекс» ===== */
.crumbs-dark, .crumbs-light { font-size: .85rem; margin-bottom: 22px; color: var(--muted); }
.crumbs-dark a:hover, .crumbs-light a:hover { color: var(--gold); }
.crumbs-light { color: rgba(246, 243, 236, .6); }
.codex-head { padding: 36px 0 44px; text-align: center; border-bottom: 3px double var(--green); }
.codex-head .crumbs-dark { text-align: left; }
.codex-head h1 { margin-top: 12px; font-size: clamp(2.6rem, 11vw, 5.2rem); line-height: 1; color: var(--green); }
.codex-sub { max-width: 54ch; margin: 18px auto 0; color: var(--muted); font-size: 1.05rem; }
.codex { padding: 28px 0 64px; }
.codex-in { display: grid; gap: 8px; }
.codex-in > * { min-width: 0; }
.codex-toc nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 4px; }
.codex-toc nav::-webkit-scrollbar { display: none; }
.codex-toc a { flex-shrink: 0; display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); background: var(--paper); font-size: .88rem; font-weight: 700; color: var(--green); white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.codex-toc a span { font-family: var(--head); color: var(--gold); }
.codex-toc a.is-on { background: var(--green); color: var(--ivory); border-color: var(--green); }
.codex-toc .toc-label { text-align: left; }
.chapter { position: relative; padding: 40px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.chapter header { display: flex; align-items: center; gap: 18px; }
.roman { font-family: var(--head); font-weight: 700; font-size: 4.2rem; line-height: .8; color: transparent; -webkit-text-stroke: 1.2px var(--gold); min-width: 74px; }
.chapter small { font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.chapter h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); color: var(--green); }
.chapter-lead { margin-top: 18px; font-family: var(--head); font-style: italic; font-size: 1.12rem; color: var(--ink); }
.articles { display: grid; gap: 10px; margin-top: 18px; }
.articles li { display: grid; grid-template-columns: 62px 1fr; gap: 10px; color: var(--muted); }
.articles b { font-family: var(--head); color: var(--green); font-size: .92rem; }
.margin-note { display: inline-grid; margin-top: 22px; padding: 14px 18px; border-left: 3px solid var(--gold); background: var(--paper); }
.margin-note span { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.margin-note b { font-family: var(--head); font-size: 1.5rem; color: var(--green); }
.margin-note small { font-size: .8rem; color: var(--muted); }
.reglament { padding: 64px 0; background: var(--green); color: var(--ivory); }
.reglament .toc-title { color: var(--ivory); }
.reg-line { position: relative; display: grid; gap: 26px; max-width: 760px; margin: 0 auto; }
.reg-line::before { content: ''; position: absolute; left: 25px; top: 10px; bottom: 10px; width: 1px; background: rgba(205, 179, 122, .5); }
.reg-line li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; }
.reg-line span { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green); border: 1px solid var(--gold); color: var(--gold); font-family: var(--head); font-weight: 700; }
.reg-line b { font-family: var(--head); font-size: 1.25rem; }
.reg-line p { color: rgba(246, 243, 236, .7); }

/* ===== Команда: «Реєстр» ===== */
.registry-head { padding: 40px 0 46px; background: var(--green); color: var(--ivory); }
.registry-head-in { display: grid; gap: 24px; align-items: end; }
.registry-head h1 { margin-top: 12px; font-size: clamp(2.3rem, 9vw, 4.2rem); }
.registry-head h1 em { color: var(--gold); }
.big-num { display: flex; align-items: center; gap: 14px; font-family: var(--head); font-weight: 700; font-size: clamp(5rem, 22vw, 9rem); line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--gold); }
.big-num small { font-family: var(--body); font-size: .95rem; line-height: 1.3; color: rgba(246, 243, 236, .75); -webkit-text-stroke: 0; font-weight: 400; }
.gallery { padding: 64px 0; background: var(--paper); }
.gallery .wrap { display: grid; gap: 56px; }
.portrait { display: grid; justify-items: center; text-align: center; }
.oval { padding: 10px; border-radius: 50%; background: linear-gradient(135deg, #8a7140, var(--gold-2) 40%, #8a7140 70%, var(--gold-2)); box-shadow: 0 24px 40px -24px rgba(18, 51, 43, .6); }
.oval img { width: 220px; height: 280px; object-fit: cover; border-radius: 50%; border: 4px solid var(--ivory); filter: sepia(.15); }
.plaque { margin-top: -18px; position: relative; padding: 10px 22px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--green); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.plaque b { display: block; font-family: var(--head); font-size: 1.15rem; }
.plaque span { font-size: .82rem; font-weight: 700; }
.dossier { display: grid; gap: 8px; margin: 22px 0 0; width: 100%; max-width: 380px; text-align: left; }
.dossier div { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding-bottom: 8px; border-bottom: 1px dotted var(--line); }
.dossier dt { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.dossier dd { margin: 0; font-size: .92rem; }
.proud { margin-top: 14px; max-width: 380px; font-family: var(--head); font-style: italic; color: var(--muted); }
.annals { padding: 64px 0; }
.annals-line { display: grid; max-width: 980px; margin: 0 auto; }
.annals-line li { display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.annals-line b { font-family: var(--head); font-size: 1.6rem; color: var(--gold); line-height: 1.1; }
.annals-line p { color: var(--muted); }
.diptych { padding: 0 0 72px; }
.diptych-in { display: grid; gap: 28px; }
.diptych figure { margin: 0; padding: 10px; background: var(--paper); border: 1px solid var(--line); }
.diptych img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.diptych figcaption { padding: 14px 6px 6px; font-size: .94rem; color: var(--muted); }
.diptych figcaption b { font-family: var(--head); color: var(--green); }

/* ===== Контакти: «Заява» ===== */
.desk { padding: 36px 0 64px; }
.desk-in { display: grid; gap: 36px; align-items: start; }
.desk h1 { margin-top: 12px; font-size: clamp(2.3rem, 9vw, 4rem); color: var(--green); }
.desk h1 em { color: var(--gold); }
.desk .codex-sub { margin: 16px 0 0; }
.card-biz { margin-top: 30px; padding: 24px; background: var(--paper); border: 1px solid var(--gold); outline: 1px solid var(--gold); outline-offset: -8px; rotate: -1.2deg; box-shadow: 0 30px 40px -30px rgba(18, 51, 43, .45); max-width: 440px; }
.card-biz-top { display: flex; align-items: center; gap: 12px; padding: 4px 6px 16px; border-bottom: 1px solid var(--line); }
.card-biz-top b { display: block; font-family: var(--head); font-size: 1.2rem; color: var(--green); }
.card-biz-top small { font-size: .8rem; color: var(--muted); }
.card-biz dl { display: grid; gap: 10px; margin: 16px 6px 4px; }
.card-biz dt { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.card-biz dd { margin: 0; }
.petition { position: relative; display: grid; gap: 18px; padding: 34px 22px 26px; background-color: var(--paper); background-image: repeating-linear-gradient(transparent 0 35px, rgba(18, 51, 43, .07) 35px 36px); box-shadow: 0 2px 0 var(--line), 0 4px 0 #fff, 0 6px 0 var(--line), 0 30px 50px -30px rgba(18, 51, 43, .45); }
.petition-to { justify-self: end; text-align: right; font-size: .9rem; color: var(--muted); font-style: italic; }
.petition h2 { text-align: center; font-size: 1.7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--green); }
.petition-text { font-family: var(--head); font-size: 1.12rem; line-height: 2.3; }
.petition-text input, .petition-text select { min-width: 0; max-width: 100%; padding: 0 4px; border: 0; border-bottom: 1.5px solid var(--gold); background: transparent; color: var(--green); font-family: var(--body); font-weight: 700; font-size: 1rem; }
.petition-text input { width: 11em; }
.petition-text .w-tel { width: 10em; }
.petition-text input:focus, .petition-text select:focus { outline: 0; border-bottom-color: var(--green); background: var(--ivory); }
.petition-free { display: grid; gap: 6px; font-family: var(--head); font-size: 1.05rem; }
.petition-free textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: rgba(246, 243, 236, .6); resize: vertical; font-family: var(--body); }
.petition-free textarea:focus { outline: 2px solid var(--gold); }
.petition-sign { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; font-size: .9rem; color: var(--muted); }
.sign-line { flex: 0 0 40%; padding-top: 26px; border-top: 1px solid var(--ink); text-align: center; font-size: .78rem; }
.petition-note { text-align: center; color: var(--muted); font-size: .8rem; }
.clarify { padding: 64px 0; background: var(--paper); border-top: 1px solid var(--line); }
.clarify-list { max-width: 820px; margin: 0 auto; }
.clarify details { border-bottom: 1px solid var(--line); }
.clarify summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: baseline; padding: 20px 0; font-family: var(--head); font-weight: 700; font-size: 1.12rem; color: var(--green); }
.clarify summary::-webkit-details-marker { display: none; }
.clarify summary span { color: var(--gold); font-size: .9rem; }
.clarify summary::after { content: '§'; color: var(--gold); transition: rotate .3s; }
.clarify details[open] summary::after { rotate: 180deg; }
.clarify details p { padding: 0 0 20px 64px; color: var(--muted); }
.map-band .map { margin: 0; height: 260px; }
.map-note { padding-top: 14px; padding-bottom: 40px; font-size: .9rem; font-style: italic; color: var(--muted); }

@media (min-width: 768px) {
  .codex-head { padding-top: 48px; }
  .codex-in { grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
  .codex-toc { position: sticky; top: 110px; padding-top: 40px; }
  .codex-toc nav { flex-direction: column; overflow: visible; gap: 2px; }
  .codex-toc a { border: 0; border-left: 2px solid var(--line); background: transparent; padding: 10px 14px; white-space: normal; }
  .codex-toc a.is-on { background: transparent; color: var(--green); border-left-color: var(--gold); }
  .chapter { display: grid; grid-template-columns: 1fr 200px; column-gap: 40px; }
  .chapter > * { grid-column: 1; }
  .chapter .margin-note { grid-column: 2; grid-row: 1 / span 3; align-self: start; margin-top: 8px; }
  .reg-line { grid-template-columns: repeat(4, 1fr); max-width: none; gap: 28px; }
  .reg-line::before { left: 26px; right: 26px; top: 26px; bottom: auto; width: auto; height: 1px; }
  .reg-line li { grid-template-columns: 1fr; gap: 16px; }
  .registry-head-in { grid-template-columns: 1fr auto; }
  .gallery .wrap { grid-template-columns: 1fr 1fr; gap: 72px 48px; }
  .gallery .portrait:nth-child(even) { margin-top: 90px; }
  .annals-line { grid-template-columns: repeat(5, 1fr); gap: 20px; }
  .annals-line li { grid-template-columns: 1fr; gap: 6px; border-top: 2px solid var(--gold); }
  .diptych-in { grid-template-columns: 1.2fr 1fr; align-items: end; }
  .diptych figure:last-child { margin-bottom: 60px; }
  .desk { padding-top: 48px; }
  .desk-in { grid-template-columns: .9fr 1.1fr; gap: 64px; }
  .petition { padding: 46px 48px 36px; }
}
