/* imotidubai.com — „позлатен чертеж“: нощен Залив, пясък и златни линии.
   Една гарнитура (Jost) за всичко; куфи за арабските термини. */
:root {
  --gulf-950: #041f28; --gulf-900: #062b36; --gulf-800: #0a3a47; --gulf-700: #0f4c5c; --gulf-600: #1a6072;
  --paper: #fbf9f4; --sand-50: #f6f0e2; --sand-100: #efe5cf; --sand-200: #e3d3b0; --sand-300: #cdb684;
  --gold-300: #f1d48a; --gold-400: #e2b955; --gold-500: #c9952c; --gold-600: #b8801a; --gold-700: #8a6212;
  --lagoon-400: #3cc4b4; --lagoon-500: #12a594; --lagoon-700: #0b7468;
  --ink: #0a2630; --ink-2: #44606a; --ink-3: #566d75; --line: rgba(10, 38, 48, .12); --line-2: rgba(10, 38, 48, .26);
  --s1: #b8801a; --s2: #c2416c; --s3: #1f7fc4; --s4: #12996b; --s0: #a9b6ba;
  --good: #0c7a0c; --warn: #9a6400; --crit: #b3261e;
  --wrap: 1200px; --gut: clamp(16px, 4vw, 40px); --measure: 68ch;
  --font: "Jost", "Century Gothic", "Futura", "Avenir Next", system-ui, sans-serif;
  --kufi: "Noto Kufi Arabic", "Geeza Pro", "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
.on-dark { --s1: #c08a1e; --s2: #dd5c87; --s3: #4a9be0; --s4: #25a074; --s0: #5c7a84; --line: rgba(241, 212, 138, .16); --line-2: rgba(241, 212, 138, .34); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.62 var(--font); font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--lagoon-700); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--gold-700); }
:focus-visible { outline: 2px solid var(--lagoon-500); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.008em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.5rem); font-weight: 300; line-height: 1.03; letter-spacing: -.018em; }
h2 { font-size: clamp(1.65rem, 3.1vw, 2.5rem); font-weight: 300; }
h3 { font-size: clamp(1.22rem, 1.8vw, 1.45rem); font-weight: 500; }
h4 { font-size: 1.06rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
small { font-size: .82em; }
strong, b { font-weight: 600; }
ul, ol { padding-left: 1.2em; margin: 0 0 1.1em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
[lang="ar"] { font-family: var(--kufi); direction: rtl; unicode-bidi: isolate; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ── предупреждение ── */
.notice { background: var(--sand-200); color: var(--ink); font-size: .9rem; line-height: 1.4; }
.notice .wrap { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; }
.notice svg { flex: none; width: 18px; height: 18px; margin-top: .12rem; color: var(--crit); }
.notice a { color: var(--ink); font-weight: 500; }
@media (max-width: 700px) { .notice .more-txt { display: none; } }

/* ── шапка ── */
.top { position: sticky; top: 0; z-index: 50; background: var(--gulf-900); color: #f3ead6; border-bottom: 1px solid rgba(241, 212, 138, .22); }
.top .wrap { display: flex; align-items: center; gap: 1.2rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #f8f1df; text-decoration: none; font-weight: 500; letter-spacing: .2em; font-size: .98rem; white-space: nowrap; }
.brand:hover { color: var(--gold-300); }
.brand svg { width: 26px; height: 26px; color: var(--gold-400); flex: none; }
.brand span span { color: var(--gold-400); }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.5rem, 1.25vw, 1.25rem); }
.nav a { color: #e9dfc8; text-decoration: none; font-size: .96rem; padding: .4rem 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-300); border-bottom-color: var(--gold-500); }
.nav .nav-cta { border: 1px solid var(--gold-500); padding: .42rem .9rem; border-radius: 2px; color: var(--gold-300); }
.nav .nav-cta:hover { background: var(--gold-500); color: var(--gulf-950); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid rgba(241, 212, 138, .4); color: #f3ead6; font: inherit; font-size: .95rem; padding: .4rem .8rem; border-radius: 2px; cursor: pointer; }
@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; align-items: center; gap: .5rem; }
  .nav { position: fixed; inset: 64px 0 0 0; background: var(--gulf-950); flex-direction: column; align-items: stretch; gap: 0; padding: 1rem var(--gut) 3rem; margin: 0; overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s var(--ease), visibility .2s; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { font-size: 1.25rem; padding: .85rem 0; border-bottom: 1px solid rgba(241, 212, 138, .14); }
  .nav .nav-cta { margin-top: 1.2rem; text-align: center; padding: .9rem; }
}

/* ── тъмни ленти и орнамент ── */
.night { background: var(--gulf-900); color: #efe6d2; position: relative; }
.night a { color: var(--gold-300); }
.night a:hover { color: #fff; }
.night a.btn { color: var(--gulf-950); }
.night a.btn:hover { color: var(--gulf-950); }
.night a.btn.is-line { color: var(--gold-300); }
.night a.btn.is-line:hover { color: #fff; }
.lattice::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23e2b955' stroke-opacity='.13' stroke-width='1'%3E%3Cpath d='M36 6 66 36 36 66 6 36z'/%3E%3Cpath d='M14.8 14.8h42.4v42.4H14.8z'/%3E%3Cpath d='M36 0v6M36 66v6M0 36h6M66 36h6M0 0l14.8 14.8M72 0 57.2 14.8M0 72l14.8-14.8M72 72 57.2 57.2'/%3E%3C/g%3E%3C/svg%3E"); }
.lattice > * { position: relative; }

/* ── начало на страница ── */
.phead { padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3.2rem); }
.phead h1 { max-width: 20ch; }
.phead.is-wide h1 { max-width: 26ch; }
.phead .lead { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.5; max-width: 60ch; margin: 1.3rem 0 0; color: #dfd6c1; font-weight: 300; }
.crumbs { font-size: .88rem; margin: 0 0 1.4rem; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .55rem; color: #b9c7c4; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .55rem; opacity: .5; }
.crumbs a { color: #d8ceb6; text-decoration: none; }
.crumbs a:hover { color: var(--gold-300); text-decoration: underline; }
.stamp { font-size: .88rem; color: #b9c7c4; margin-top: 1.4rem; }

/* размерна линия — носи реално число */
.dim { display: flex; align-items: center; gap: .9rem; color: var(--gold-400); font-size: .98rem; margin-top: 1.8rem; max-width: 720px; }
.dim::before, .dim::after { content: ""; flex: 1; height: 9px; border-bottom: 1px solid currentColor; opacity: .75; transform: translateY(-4px); }
.dim::before { border-left: 1px solid currentColor; }
.dim::after { border-right: 1px solid currentColor; }
.dim b { font-weight: 500; color: #f6ecd2; white-space: nowrap; }

/* ── секции ── */
.sec { padding: clamp(2.6rem, 6vw, 5rem) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec.is-sand { background: var(--sand-50); border-top: 0; }
.sec.is-sand + .sec { border-top: 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); max-width: 62ch; }
.sec-head p { color: var(--ink-2); margin: 0; }
.night .sec-head p { color: #cfd8d4; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.4rem); }
@media (max-width: 860px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
.more { display: inline-block; margin-top: 1.2rem; font-weight: 500; }

/* ── бутони ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 500 1rem/1.2 var(--font); padding: .85rem 1.4rem; border-radius: 2px; border: 1px solid var(--gold-500); background: var(--gold-500); color: var(--gulf-950); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--gold-300); border-color: var(--gold-300); color: var(--gulf-950); }
.btn.is-line { background: transparent; color: var(--gold-300); }
.btn.is-line:hover { background: rgba(241, 212, 138, .12); color: #fff; }
.btn.is-dark { background: var(--gulf-900); border-color: var(--gulf-900); color: #f6ecd2; }
.btn.is-dark:hover { background: var(--gulf-700); border-color: var(--gulf-700); color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ── герой с карта ── */
.hero { padding: clamp(2.2rem, 5vw, 4.2rem) 0 0; overflow: hidden; }
.hero h1 { max-width: 15ch; }
.hero .lead { font-size: clamp(1.12rem, 1.6vw, 1.36rem); line-height: 1.5; max-width: 58ch; margin: 1.4rem 0 0; color: #dcd3be; font-weight: 300; }
.hero-map { margin-top: clamp(1.5rem, 3vw, 2.4rem); position: relative; }
.map-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--gulf-600) transparent; }
.map-svg { display: block; width: 100%; min-width: 980px; height: auto; }
.map-coast { fill: var(--gulf-800); stroke: var(--gold-500); stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-land { fill: var(--gulf-800); stroke: none; }
.map-shore { fill: none; stroke: var(--gold-500); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.map-road { fill: none; stroke: rgba(241, 212, 138, .28); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-sea-label { fill: rgba(241, 212, 138, .5); font: 300 15px var(--font); letter-spacing: .5em; }
.map-b { cursor: pointer; }
.map-b circle { stroke: var(--gulf-900); stroke-width: 2; vector-effect: non-scaling-stroke; transition: r .2s var(--ease); }
.map-b:hover circle, .map-b:focus circle, .map-b.is-on circle { stroke: #fff; }
.map-b text { fill: #f1e7cf; font: 400 13px var(--font); paint-order: stroke; stroke: var(--gulf-900); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.map-b:focus { outline: none; }
.map-labels { cursor: default; pointer-events: none; }
.map-card { position: absolute; z-index: 5; min-width: 230px; max-width: 280px; background: var(--gulf-950); border: 1px solid var(--gold-500); padding: .8rem .95rem; font-size: .92rem; line-height: 1.35; color: #efe6d2; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.map-card.is-on { opacity: 1; transform: none; }
.map-card strong { display: block; font-size: 1.05rem; font-weight: 500; color: #fff; margin-bottom: .35rem; }
.map-card dl { display: grid; grid-template-columns: auto auto; gap: .12rem .9rem; margin: 0; }
.map-card dt { color: #b9c7c4; }
.map-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--gold-300); }
.map-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; align-items: center; font-size: .86rem; color: #b9c7c4; padding: .7rem 0 1.1rem; }
.map-legend .ramp { display: inline-flex; align-items: center; gap: .45rem; }
.map-legend .ramp i { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #6b5320, #b8801a, #e2b955, #f7e3a8); }
.map-legend .sizes { display: inline-flex; align-items: center; gap: .4rem; }
.map-legend .sizes i { display: inline-block; border-radius: 50%; border: 1px solid var(--gold-400); }
.map-hint { display: none; font-size: .84rem; color: #b9c7c4; margin: .2rem 0 0; }
@media (max-width: 1000px) { .map-hint { display: block; } }
@media (prefers-reduced-motion: no-preference) {
  .js .map-anim .map-shore, .js .map-anim .map-coast { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) .15s forwards; }
  .js .map-anim .map-coast { fill-opacity: 0; animation: draw 2.4s var(--ease) .15s forwards, fillin 1.2s ease 1.6s forwards; }
  .js .map-anim .map-land { opacity: 0; animation: fade 1.2s ease 1.5s forwards; }
  .js .map-anim .map-b { opacity: 0; animation: pop .5s var(--ease) forwards; animation-delay: calc(2s + var(--i) * 28ms); }
  .js .map-anim .map-sea-label, .js .map-anim .map-road { opacity: 0; animation: fade 1s ease 2.4s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill-opacity: 1; } }
@keyframes fade { to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.map-b { transform-box: fill-box; transform-origin: center; }

/* мерна лента под героя */
.strip { border-top: 1px solid rgba(241, 212, 138, .28); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 0; }
.strip div { padding: 1.3rem 1.2rem 1.4rem 0; border-left: 1px solid rgba(241, 212, 138, .2); padding-left: 1.2rem; }
.strip div:first-child { border-left: 0; padding-left: 0; }
.strip dt { font-size: .9rem; color: #b9c7c4; line-height: 1.3; }
.strip dd { margin: .35rem 0 0; font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 300; color: #fff; line-height: 1.1; }
.strip dd small { display: block; font-size: .86rem; color: var(--gold-300); margin-top: .35rem; font-weight: 400; line-height: 1.3; }
@media (max-width: 860px) { .strip .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip div:nth-child(3) { border-left: 0; padding-left: 0; } .strip div:nth-child(n+3) { border-top: 1px solid rgba(241, 212, 138, .2); } }

/* ── графики ── */
.viz { margin: 0 0 2rem; }
.viz figcaption { display: grid; gap: .2rem; margin-bottom: .9rem; }
.viz figcaption strong { font-size: 1.12rem; font-weight: 500; line-height: 1.3; }
.viz figcaption span { font-size: .93rem; color: var(--ink-2); line-height: 1.4; }
.night .viz figcaption span, .night .viz-src, .night .viz-note { color: #b9c7c4; }
.viz-src, .viz-note { font-size: .84rem; color: var(--ink-3); margin: .7rem 0 0; line-height: 1.45; }
.viz-note { color: var(--ink-2); }
.viz-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; padding: 0; margin: 0 0 .8rem; font-size: .9rem; color: var(--ink-2); }
.night .viz-legend { color: #d5ddd9; }
.viz-legend li { margin: 0; display: inline-flex; align-items: center; gap: .45rem; }
.key { display: inline-block; flex: none; }
.key.box { width: 11px; height: 11px; border-radius: 2px; }
.key.line { width: 18px; height: 0; border-top: 2px solid; background: none !important; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .s4 { background: var(--s4); } .s0 { background: var(--s0); }
.key.line.s1 { border-color: var(--s1); } .key.line.s2 { border-color: var(--s2); } .key.line.s3 { border-color: var(--s3); } .key.line.s4 { border-color: var(--s4); } .key.line.s0 { border-color: var(--s0); }
.viz-data { margin-top: .7rem; font-size: .9rem; }
.viz-data summary { cursor: pointer; color: var(--ink-2); max-width: 100%; }
.night .viz-data summary { color: #b9c7c4; }

.hb { display: grid; gap: .5rem; }
.hb-row { display: grid; grid-template-columns: minmax(7.5rem, 34%) minmax(0, 1fr) auto; align-items: center; gap: .8rem; font-size: .96rem; line-height: 1.25; padding: .12rem 0; border-radius: 2px; }
.hb-l { min-width: 0; }
.hb-l a { color: inherit; text-decoration-color: var(--line-2); }
.hb-l small { display: block; color: var(--ink-3); font-size: .8rem; }
.hb-t { height: 12px; display: block; }
.hb-t i { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; transform-origin: left center; }
.hb-v { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; min-width: 4.2em; text-align: right; }
.hb-v small { font-weight: 400; color: var(--ink-3); }
.hb-row:hover .hb-t i, .hb-row:focus .hb-t i { filter: brightness(1.12); }
.hb-row.is-hl .hb-l { font-weight: 600; }
@media (max-width: 560px) { .hb-row { grid-template-columns: minmax(0, 1fr) auto; } .hb-t { grid-column: 1 / -1; grid-row: 2; height: 9px; } }

.cc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 .6rem; padding-top: 1.3rem; }
.cc-y { position: relative; height: var(--h); min-width: 2.6em; font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cc-y span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.cc-plot { position: relative; height: var(--h); display: flex; align-items: stretch; gap: 2px; margin-bottom: 1.9rem; }
.cc-grid u { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.cc-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.cc-stack { position: relative; width: min(24px, 78%); display: flex; flex-direction: column-reverse; gap: 2px; }
.cc-stack.is-group { flex-direction: row; align-items: flex-end; width: min(52px, 90%); }
.cc-stack.is-group i { flex: 1; max-width: 24px; }
.cc-stack i { display: block; min-height: 1px; transform-origin: bottom center; }
.cc-stack.is-stacked i:last-of-type, .cc-stack.is-group i { border-radius: 4px 4px 0 0; }
.cc-stack em { position: absolute; left: 50%; transform: translate(-50%, -4px); font-style: normal; font-size: .76rem; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.night .cc-stack em, .night .cc-col b, .night .cc-y, .night .lc-y, .night .lc-x { color: #c5d0cc; }
.cc-col b { position: absolute; top: calc(100% + .4rem); left: 50%; transform: translateX(-50%); font-weight: 400; font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.cc-col.is-partial i { opacity: .45; }
.cc-col:hover i, .cc-col:focus i { filter: brightness(1.14); }
.cc-event, .lc-event { position: absolute; top: -1.2rem; bottom: 0; border-left: 1px solid var(--crit); z-index: 2; pointer-events: none; }
.cc-event span, .lc-event span { position: absolute; top: 0; left: 6px; font-size: .76rem; line-height: 1.15; color: var(--crit); white-space: nowrap; background: var(--paper); padding: 0 .2rem; }
.night .cc-event, .night .lc-event { border-color: #ff9a8a; }
.night .cc-event span, .night .lc-event span { color: #ffb4a6; background: var(--gulf-900); }
.is-sand .cc-event span, .is-sand .lc-event span { background: var(--sand-50); }

.lc { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--h) auto; gap: 0 .6rem; padding-top: 1.3rem; }
.lc-y { position: relative; min-width: 2.6em; font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lc-y span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.lc-plot { position: relative; margin-right: 3.2em; cursor: crosshair; }
.lc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc-plot .gr { stroke: var(--line); stroke-width: 1; }
.lc-plot .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; background: none; }
.ln.s1 { stroke: var(--s1); } .ln.s2 { stroke: var(--s2); } .ln.s3 { stroke: var(--s3); } .ln.s4 { stroke: var(--s4); } .ln.s0 { stroke: var(--s0); }
.ln.is-dash { stroke-dasharray: 5 4; }
.lc-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--paper); }
.night .lc-dot { box-shadow: 0 0 0 2px var(--gulf-900); }
.is-sand .lc-dot { box-shadow: 0 0 0 2px var(--sand-50); }
.lc-end { position: absolute; transform: translate(9px, -50%); font-size: .8rem; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc-x { grid-column: 2; position: relative; height: 1.6rem; margin-right: 3.2em; font-size: .78rem; color: var(--ink-3); }
.lc-x span { position: absolute; top: .45rem; transform: translateX(-50%); white-space: nowrap; }
.lc-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--ink-2); pointer-events: none; }
.night .lc-cross { border-color: #dfe7e3; }
@media (prefers-reduced-motion: no-preference) {
  .js .viz:not(.is-in) .hb-t i { transform: scaleX(0); }
  .js .viz:not(.is-in) .cc-stack i { transform: scaleY(0); }
  .js .viz:not(.is-in) .lc-plot svg { clip-path: inset(0 100% 0 0); }
  .js .viz:not(.is-in) .lc-dot, .js .viz:not(.is-in) .lc-end, .js .viz:not(.is-in) .cc-stack em { opacity: 0; }
  .viz .hb-t i { transition: transform .8s var(--ease); }
  .viz .cc-stack i { transition: transform .7s var(--ease); }
  .viz .lc-plot svg { transition: clip-path 1.3s var(--ease); clip-path: inset(0 -6% 0 0); }
  .viz .lc-dot, .viz .lc-end, .viz .cc-stack em { transition: opacity .4s ease .9s; }
}

.duel { display: grid; gap: .1rem; }
.duel-head, .duel-row { display: grid; grid-template-columns: minmax(8rem, 30%) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: center; }
.duel-head { font-size: .9rem; color: var(--ink-2); padding-bottom: .5rem; border-bottom: 1px solid var(--line-2); }
.duel-head span { display: inline-flex; align-items: center; gap: .45rem; }
.duel-row { padding: .65rem 0; border-bottom: 1px solid var(--line); font-size: .97rem; line-height: 1.25; }
.duel-l small { display: block; color: var(--ink-3); font-size: .8rem; margin-top: .15rem; }
.duel-c { display: grid; gap: .3rem; }
.duel-c b { font-weight: 500; font-variant-numeric: tabular-nums; }
.duel-c .hb-t { height: 8px; }
@media (max-width: 560px) { .duel-head, .duel-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .duel-l, .duel-head span:first-child { grid-column: 1 / -1; } .duel-head span:first-child { display: none; } }

.seg { display: flex; gap: 2px; height: 28px; }
.seg-p { display: flex; align-items: center; min-width: 2px; border-radius: 4px; padding-left: .45rem; overflow: visible; }
.seg-p b { font-size: .8rem; font-weight: 500; color: #fff; white-space: nowrap; }
.seg-p.s0 b, .seg-p.s1 b, .seg-p.s4 b, .seg-p.g1 b, .seg-p.g2 b, .seg-p.g3 b { color: var(--gulf-950); }
.g1 { background: #ecd08a; } .g2 { background: #dcb352; } .g3 { background: #c5912a; } .g4 { background: #94640f; } .g5 { background: #6f4a0a; } .g6 { background: #4d3306; }
.seg-legend { margin-top: .7rem; margin-bottom: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 0 2rem; }
.tile { padding: 1.05rem 1.1rem 1.15rem 0; display: grid; gap: .3rem; align-content: start; }
.tile + .tile { border-left: 1px solid var(--line); padding-left: 1.1rem; }
.tile-l { font-size: .9rem; color: var(--ink-2); line-height: 1.3; }
.tile-v { font-size: clamp(1.45rem, 2.4vw, 1.95rem); font-weight: 400; line-height: 1.1; }
.tile-v small { font-size: .55em; color: var(--ink-2); font-weight: 400; }
.tile-d { font-size: .88rem; font-weight: 500; }
.tile-d.down { color: var(--crit); } .tile-d.up { color: var(--good); }
.tile-n { font-size: .82rem; color: var(--ink-3); line-height: 1.35; }
.night .tile-l, .night .tile-n { color: #b9c7c4; }
.night .tile-d.down { color: #ffb4a6; } .night .tile-d.up { color: #8fe0a0; }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile:nth-child(odd) { border-left: 0; padding-left: 0; } .tile:nth-child(n+3) { border-top: 1px solid var(--line); } }
.spark { vertical-align: middle; }
.spark polyline { fill: none; stroke-width: 1.5; stroke: var(--s1); }
.spark.s2 polyline { stroke: var(--s2); } .spark.s3 polyline { stroke: var(--s3); } .spark.s0 polyline { stroke: var(--s0); }
.spark { background: none !important; }

.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--gulf-950); color: #efe6d2; border: 1px solid var(--gold-500); padding: .5rem .7rem; font-size: .86rem; line-height: 1.35; max-width: 280px; opacity: 0; transition: opacity .12s; }
.tip.is-on { opacity: 1; }
.tip b { display: block; color: #fff; font-weight: 500; font-size: .95rem; font-variant-numeric: tabular-nums; }
.tip span { display: block; color: #c8d3cf; }
.tip .row { display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.tip .row b { display: inline; margin-left: auto; padding-left: .9rem; }

/* ── таблици ── */
.tbl-wrap { overflow-x: auto; margin: 0 0 1.6rem; -webkit-overflow-scrolling: touch; }
.tbl { border-collapse: collapse; width: 100%; font-size: .96rem; line-height: 1.35; }
.tbl caption { text-align: left; font-weight: 500; font-size: 1.05rem; padding-bottom: .6rem; }
.tbl th, .tbl td { padding: .6rem .9rem .6rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl thead th { font-weight: 500; font-size: .86rem; color: var(--ink-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: bottom; }
.tbl tbody th { font-weight: 500; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.tbl-sm { font-size: .88rem; }
.tbl a { color: inherit; text-decoration-color: var(--line-2); }
.tbl a:hover { color: var(--gold-700); }
.tbl .mut { color: var(--ink-3); }
.tbl-sort th[data-sort] { cursor: pointer; user-select: none; }
.tbl-sort th[data-sort]::after { content: " ↕"; opacity: .35; font-size: .8em; }
.tbl-sort th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
.tbl-sort th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; }
.tbl-prose td, .tbl-prose th { white-space: normal; }
@media (max-width: 640px) {
  .tbl-prose thead { display: none; }
  .tbl-prose tr { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
  .tbl-prose th, .tbl-prose td { display: block; border: 0; padding: .12rem 0; }
  .tbl-prose td[data-h]::before { content: attr(data-h) ": "; color: var(--ink-3); font-size: .86em; }
}

/* ── дълъг текст ── */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding: clamp(2rem, 5vw, 3.6rem) 0 clamp(2.5rem, 6vw, 5rem); }
@media (min-width: 1100px) { .doc.has-toc { grid-template-columns: 15.5rem minmax(0, 1fr); gap: 4rem; } }
.toc { font-size: .93rem; line-height: 1.35; }
@media (min-width: 1100px) { .toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: .5rem; } }
.toc h2 { font-size: .9rem; font-weight: 500; color: var(--ink-2); margin-bottom: .7rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-2); }
.toc li { margin: 0; }
.toc a { display: block; padding: .32rem 0 .32rem .9rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.is-on { border-left-color: var(--gold-600); color: var(--ink); font-weight: 500; }
@media (max-width: 1099px) { .toc { border: 1px solid var(--line-2); padding: 1rem 1.1rem; } .toc ol { columns: 2; column-gap: 1.5rem; border-left: 0; } .toc a { padding-left: 0; } }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.prose { min-width: 0; }
.prose > * { max-width: var(--measure); }
.prose > .viz, .prose > .tbl-wrap, .prose > .tiles, .prose > .wide, .prose > .steps, .prose > .cards { max-width: 860px; }
.prose h2 { margin: 2.6rem 0 1rem; padding-top: 1.4rem; border-top: 1px solid var(--line-2); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin: 2rem 0 .7rem; }
.prose h4 { margin: 1.4rem 0 .5rem; }
.prose .lead-in { font-size: 1.24rem; line-height: 1.5; font-weight: 300; color: var(--ink); }
.prose li::marker { color: var(--gold-600); }

.callout { border-left: 2px solid var(--gold-600); background: var(--sand-50); padding: 1.05rem 1.25rem 1.1rem; margin: 1.6rem 0; font-size: 1rem; line-height: 1.55; }
.callout > strong:first-child, .callout h4 { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1rem; margin: 0 0 .4rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout svg { width: 18px; height: 18px; flex: none; }
.callout.is-risk { border-left-color: var(--crit); background: #fbeeeb; }
.callout.is-risk svg { color: var(--crit); }
.callout.is-law { border-left-color: var(--gulf-700); background: #e9f1f1; }
.callout.is-bg { border-left-color: var(--s2); background: #faedf1; }
.callout.is-tip { border-left-color: var(--lagoon-700); background: #e8f4f1; }

.fact { display: grid; gap: .25rem; margin: 1.8rem 0; padding: 1.1rem 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.fact b { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 300; line-height: 1.05; }
.fact span { color: var(--ink-2); font-size: .98rem; }
.fact small { color: var(--ink-3); }

.steps { list-style: none; padding: 0; margin: 1.6rem 0; counter-reset: st; }
.steps > li { counter-increment: st; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .2rem 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); margin: 0; }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(st); grid-row: 1 / span 2; font-size: 1.7rem; font-weight: 300; color: var(--gold-600); line-height: 1; font-variant-numeric: tabular-nums; }
.steps h3, .steps h4 { margin: 0; font-size: 1.1rem; font-weight: 500; }
.steps p { margin: .3rem 0 0; grid-column: 2; }
.steps div { grid-column: 2; }
.steps div p:first-child { margin-top: .3rem; }

.term { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1.5rem; align-items: baseline; padding: 1rem 0; border-top: 1px solid var(--line); }
.term dt { font-weight: 500; font-size: 1.1rem; }
.term dt small { font-weight: 400; color: var(--ink-3); margin-left: .5rem; }
.term dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; grid-column: 1 / -1; }
.term dt .ar { margin-left: auto; font-weight: 400; }
.term .ar { font-family: var(--kufi); font-size: 1.35rem; color: var(--gold-700); direction: rtl; line-height: 1.2; }
.term dd { grid-column: 1 / -1; margin: 0; color: var(--ink-2); }

.faq { margin: 0; }
.faq details { border-top: 1px solid var(--line-2); }
.faq details:last-child { border-bottom: 1px solid var(--line-2); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 500; font-size: 1.08rem; line-height: 1.35; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: .3rem; top: 1.45rem; width: 9px; height: 9px; border-right: 1.5px solid var(--gold-600); border-bottom: 1.5px solid var(--gold-600); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.7rem; }
.faq details > div { padding: 0 0 1.1rem; max-width: var(--measure); color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

.sources { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.sources ol { padding-left: 1.3em; }
.sources li { margin-bottom: .3em; overflow-wrap: anywhere; }
.byline { font-size: .9rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.5rem; }

/* ── списъци от връзки ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 2.2rem; }
.card { display: block; padding: 1.25rem 0 1.35rem; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.card h3 { font-size: 1.2rem; font-weight: 500; line-height: 1.25; margin-bottom: .45rem; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .2em; transition: text-decoration-color .15s; }
.card:hover h3 { text-decoration-color: var(--gold-600); }
.card:hover { color: inherit; }
.card p { margin: 0; color: var(--ink-2); font-size: .96rem; line-height: 1.45; }
.card .meta { display: block; font-size: .84rem; color: var(--ink-3); margin-bottom: .45rem; }
.card .kv { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin-top: .6rem; font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.card .kv b { color: var(--ink); font-weight: 500; }
.night .card { border-top-color: rgba(241, 212, 138, .3); }
.night .card p, .night .card .meta, .night .card .kv { color: #c5d0cc; }
.night .card .kv b { color: #fff; }
.pillrow { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.pillrow li { margin: 0; }
.pillrow a, .pill { display: inline-block; font-size: .9rem; padding: .32rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); text-decoration: none; line-height: 1.3; }
.pillrow a:hover { border-color: var(--gold-600); color: var(--ink); }
.flag { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; padding: .16rem .55rem; border-radius: 2px; background: var(--sand-100); color: var(--ink); white-space: nowrap; }
.flag.is-risk { background: #f6ddd8; color: #7c1d17; }
.flag.is-ok { background: #dcefdc; color: #0b5a0b; }

/* ── калкулатор ── */
.calc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 980px) { .calc { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); gap: 3.2rem; align-items: start; } }
.calc fieldset { border: 0; border-top: 1px solid var(--line-2); padding: 1.1rem 0 .4rem; margin: 0; }
.calc legend { font-weight: 500; font-size: 1.05rem; padding: 0 .6rem 0 0; }
.fld { display: grid; gap: .3rem; margin-bottom: 1rem; }
.fld label, .fld .lab { font-size: .93rem; color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.fld output { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fld input[type="number"], .fld input[type="text"], .fld input[type="tel"], .fld input[type="email"], .fld select, .fld textarea { font: inherit; font-size: 1rem; padding: .62rem .7rem; border: 1px solid var(--line-2); border-radius: 2px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--lagoon-500); outline-offset: 1px; border-color: var(--lagoon-700); }
.fld input[type="range"] { width: 100%; accent-color: var(--gold-600); margin: .2rem 0 0; }
.fld small { color: var(--ink-3); font-size: .82rem; line-height: 1.35; }
.fld-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.seg-ctl { display: flex; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; }
.seg-ctl label { flex: 1; text-align: center; padding: .55rem .4rem; font-size: .95rem; cursor: pointer; color: var(--ink-2); display: block; border-left: 1px solid var(--line-2); }
.seg-ctl label:first-of-type { border-left: 0; }
.seg-ctl input { position: absolute; opacity: 0; pointer-events: none; }
.seg-ctl input:checked + label { background: var(--gulf-900); color: #f6ecd2; }
.seg-ctl input:focus-visible + label { outline: 2px solid var(--lagoon-500); outline-offset: -2px; }
.calc-out .h3 { font-size: clamp(1.22rem, 1.8vw, 1.45rem); font-weight: 500; margin-bottom: .8rem; letter-spacing: -.008em; }
.calc-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-bottom: 1.6rem; }
.calc-big div { padding: 1rem 1rem 1.1rem 0; }
.calc-big div + div { border-left: 1px solid var(--line); padding-left: 1rem; }
.calc-big dt { font-size: .88rem; color: var(--ink-2); line-height: 1.3; }
.calc-big dd { margin: .3rem 0 0; font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 400; line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc-big dd small { display: block; font-size: .82rem; color: var(--ink-3); margin-top: .3rem; font-weight: 400; }
@media (max-width: 560px) { .calc-big { grid-template-columns: 1fr; } .calc-big div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }
.calc-tbl td, .calc-tbl th { padding-top: .42rem; padding-bottom: .42rem; }
.calc-tbl tr.is-total th, .calc-tbl tr.is-total td { font-weight: 600; border-top: 1px solid var(--line-2); }
.calc-chart { margin: 1.4rem 0; }
.calc-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.calc-chart text { font: 400 11px var(--font); fill: var(--ink-3); }
.calc-flags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.scn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-2); margin: 1rem 0 1.4rem; }
.scn div { padding: .8rem .9rem; }
.scn div + div { border-left: 1px solid var(--line); }
.scn span { display: block; font-size: .84rem; color: var(--ink-2); line-height: 1.3; }
.scn b { display: block; font-size: 1.25rem; font-weight: 500; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.scn .neg { color: var(--crit); } .scn .pos { color: var(--good); }

/* ── форма ── */
.form { max-width: 620px; }
.form .btn { margin-top: .6rem; }
.form-msg { margin-top: 1rem; font-size: .95rem; }
.form-msg.is-err { color: var(--crit); }
.hp { position: absolute; left: -9999px; }

/* ── долна част ── */
.foot { padding: 0 0 2.2rem; font-size: .95rem; }
.skyline { display: block; width: 100%; height: auto; color: var(--gold-500); margin-bottom: -1px; }
.skyline path, .skyline circle, .skyline ellipse, .skyline line, .skyline polyline, .skyline rect { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.foot-rule { border-top: 1px solid var(--gold-500); padding-top: 2.4rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > :first-child { grid-column: 1 / -1; } }
.foot h2 { font-size: .95rem; font-weight: 500; color: var(--gold-300); margin-bottom: .7rem; letter-spacing: .02em; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: .4rem; }
.foot a { color: #e3dac4; text-decoration: none; }
.foot a:hover { color: var(--gold-300); text-decoration: underline; }
.foot p { color: #b9c7c4; font-size: .9rem; line-height: 1.5; max-width: 46ch; }
.foot .ar { font-family: var(--kufi); font-size: 2rem; color: var(--gold-400); line-height: 1.2; margin: .2rem 0 .8rem; direction: rtl; text-align: left; }
.legal { border-top: 1px solid rgba(241, 212, 138, .2); margin-top: 2.2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; justify-content: space-between; color: #9fb0ad; font-size: .86rem; }
.legal p { max-width: none; margin: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
@media print { .top, .notice, .foot, .toc, .btns, .map-hint { display: none !important; } body { background: #fff; } .night { background: #fff; color: #000; } }
