/* Путівник по Славському: static article pages, Domivka tokens (see DESIGN.md). No JS. */
:root {
  --cream: #fdf1e8; --paper: #fff9f3; --soft: #f3e4d6; --note: #fff8f1;
  --brown: #321803; --dark: #432106; --brown-hover: #532b0d;
  --orange: #eb7514; --orange-hover: #f1852c; --link: #a74608;
  --muted: #795b46; --line: #dec8b5; --line-strong: #d8bcaa;
  --head: DomivkaHead, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --body: DomivkaBody, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --max: 1180px; --read: 700px; --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--brown); font: 400 17px/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brown); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 16px; top: 12px; z-index: 20; background: var(--brown); color: var(--cream); padding: 10px 14px; border-radius: 4px; }

/* Header */
.g-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.g-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.g-logo { display: block; flex: none; line-height: 0; }
.g-logo img { width: 128px; height: auto; }
.g-nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.g-nav a { color: var(--brown); text-decoration: none; }
.g-nav a:hover, .g-nav a[aria-current] { color: var(--link); text-decoration: underline; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 4px; font: 500 15px/1 var(--body); text-decoration: none; white-space: nowrap; transition: background-color .16s; }
.btn-dark { background: var(--brown); color: var(--cream); }
.btn-dark:hover { background: var(--brown-hover); color: var(--cream); }
.btn-orange { background: var(--orange); color: var(--brown); }
.btn-orange:hover { background: var(--orange-hover); color: var(--brown); }
.g-header .btn { padding: 11px 18px; }
@media (max-width: 720px) { .g-nav a:not(.g-nav-guide) { display: none; } .g-nav { gap: 14px; } .g-logo img { width: 108px; } }

/* Breadcrumbs */
.crumbs { margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }

/* Article head */
.a-head { padding-block: 28px 32px; max-width: 900px; }
.kicker { display: inline-block; font: 500 13px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.04; letter-spacing: -.03em; margin: 14px 0 18px; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; margin: 0; max-width: 62ch; }
.meta { margin-top: 16px; font-size: 14px; color: var(--muted); }
.a-hero { margin: 0 0 8px; }
.a-hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 5px; background: var(--soft); }

/* Article body + aside */
.a-grid { display: grid; grid-template-columns: minmax(0, var(--read)) minmax(260px, 340px); gap: clamp(32px, 6vw, 80px); justify-content: space-between; padding-block: 36px 24px; }
.a-body { min-width: 0; }
.a-body h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin: 52px 0 14px; }
.a-body > section:first-child h2 { margin-top: 0; }
.a-body p { margin: 0 0 16px; }
.a-body ul { margin: 0 0 18px; padding-left: 1.2em; }
.a-body li { margin: 6px 0; }
.a-body li::marker { color: var(--orange); }
.steps { list-style: none; counter-reset: s; padding: 0 !important; margin: 0 0 20px; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 52px; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: var(--brown); font: 600 15px/34px var(--body); text-align: center; }
.steps b { display: block; margin-bottom: 2px; }
.tip { margin: 22px 0; padding: 18px 22px; background: var(--cream); border-radius: 8px; }
.tip strong.tip-l { display: block; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--link); margin-bottom: 4px; }
.tip p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--cream); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
figure.a-img { margin: 26px 0; }
figure.a-img img { width: auto; max-width: 100%; max-height: min(640px, 80vh); margin-inline: auto; border-radius: 5px; background: var(--soft); }
figure.a-img figcaption { text-align: center; }
figure.a-img figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

.a-aside { min-width: 0; }
.a-aside .sticky { position: sticky; top: 92px; display: grid; gap: 18px; }
.box { background: var(--note); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; }
.box h2 { font: 600 13px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--link); margin: 0 0 12px; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; gap: 1px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; line-height: 1.4; }
.toc ol { margin: 0; padding-left: 1.1em; font-size: 15px; }
.toc li { margin: 6px 0; }
.toc a { color: var(--brown); text-decoration: none; }
.toc a:hover { text-decoration: underline; color: var(--link); }
@media (max-width: 960px) {
  .a-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  /* Boxes join the single column: the short answer first, distances after the article. */
  .a-aside, .a-aside .sticky { display: contents; }
  .a-aside .quick { order: -1; }
  .a-aside .from { order: 1; }
  .a-aside .toc { display: none; }
  .quick .facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px 18px; }
}

/* FAQ */
.faq { margin-top: 52px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--orange); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; }

/* Stay CTA */
.stay { margin: 56px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--brown); color: var(--cream); border-radius: 9px; overflow: hidden; }
.stay img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }
.stay div { padding: clamp(24px, 4vw, 40px); align-self: center; }
.stay h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; margin: 0 0 12px; color: var(--cream); }
.stay p { margin: 0 0 20px; color: #ead6c6; }
@media (max-width: 720px) { .stay { grid-template-columns: 1fr; } .stay img { max-height: 220px; } }

/* Sources */
.sources { margin-top: 44px; font-size: 14px; color: var(--muted); }
.sources h2 { font: 600 13px/1.2 var(--body) !important; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px !important; color: var(--muted); }
.sources ol { padding-left: 1.2em; margin: 0; }
.sources li { margin: 4px 0; overflow-wrap: anywhere; }
.sources a { color: var(--muted); }
.owner-note { font-size: 14px; color: var(--muted); }

/* Cards (hub + related) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px 24px; margin: 0; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--brown); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: var(--soft); }
.card .kicker { font-size: 12px; margin-top: 6px; }
.card h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.015em; margin: 0; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.card:hover h3 { color: var(--link); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.related { padding-block: 56px 24px; border-top: 1px solid var(--line); margin-top: 48px; }
.related > h2, .hub-sec > h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 24px; }

/* Hub */
.hub-head { padding-block: 28px 8px; max-width: 860px; }
.hub-sec { padding-block: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--brown); text-decoration: none; font-size: 14px; }
.chips a:hover { background: var(--cream); }
.dist { max-width: 760px; }

/* Footer */
.g-footer { margin-top: 64px; background: var(--brown); color: var(--cream); padding-block: 44px; font-size: 15px; }
.g-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.g-footer a { color: var(--cream); }
.g-footer p { margin: 4px 0; color: #ead6c6; }
.g-footer strong { font-family: var(--head); font-size: 20px; font-weight: 600; color: var(--cream); }
