/* =====================================================================
   ADITES ENERGY ARABIA — Company Profile 2026 (A4, печать и экран)
   Стиль саудовских дек и сайта ksa.dfstore.de: тёмный фон, мята/голубой/коралл/янтарь.
   Одна страница = <section class="page">. PDF: python3 tools/build_profile_pdf.py
   ===================================================================== */

@font-face { font-family: "Plex"; font-weight: 100 700; font-display: block; src: url("../assets/fonts/ibm-plex-sans-latin-var.woff2") format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: block; src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: block; src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  --bg: #070A08;
  --bg-2: #0B100D;
  --card: #131A16;
  --card-g: #10241A;
  --card-photo: #0C110E;
  --line: #1E2823;
  --line-g: #1E4433;
  --line-2: #2A3A31;
  --tx: #F2F6F3;
  --tx-2: #C3D0C9;
  --tx-3: #9AA8A0;
  --tx-4: #6E7B75;
  --mint: #3ECF8E;
  --mint-ink: #07130D;
  --mint-t: #123024;
  --mint-b: #1E4A35;
  --sky: #5BC9F5;
  --sky-t: #0E2634;
  --sky-b: #1B3A4E;
  --coral: #EF6B5E;
  --coral-t: #2A1210;
  --amber: #F5B84B;
  --amber-t: #332611;
  --sun: #FFDE14;
  --f: "Plex", "Plex Arabic", "Helvetica Neue", Arial, sans-serif;
  --f-ar: "Plex Arabic", "Plex", "Geeza Pro", sans-serif;
  --mx: 16mm;          /* поля страницы */
}

@page { size: A4; margin: 0; }
* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; background: #2A2F2C; color: var(--tx); font-family: var(--f); font-size: 9.6pt; line-height: 1.55; -webkit-font-smoothing: antialiased; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
img { display: block; max-width: 100%; }
bdi, .num { unicode-bidi: isolate; direction: ltr; }
.ar { font-family: var(--f-ar); direction: rtl; }
.tbd { color: var(--amber); background: rgba(245, 184, 75, .1); border: .25mm dashed rgba(245, 184, 75, .6); border-radius: 1.2mm; padding: 0 1.4mm; font-weight: 600; }

/* --- Экран: листы по центру; печать: без зазоров ---------------------- */
.sheets { display: flex; flex-direction: column; align-items: center; gap: 8mm; padding: 10mm 0 16mm; }
@media print { .sheets { display: block; padding: 0; gap: 0; } body { background: var(--bg); } .screen-only { display: none !important; } }

.page {
  position: relative; width: 210mm; height: 297mm; overflow: hidden; background: var(--bg);
  padding: 16mm var(--mx) 14mm; break-after: page; page-break-after: always;
  box-shadow: 0 6mm 20mm rgba(0, 0, 0, .45);
}
@media print { .page { box-shadow: none; } }
.page:last-child { break-after: auto; page-break-after: auto; }

/* --- Шапка и подвал содержательных страниц ------------------------------ */
.pg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; margin-bottom: 9mm; }
.pg-logo { height: 9.5mm; width: auto; opacity: .95; }
.eyebrow { display: flex; align-items: center; gap: 3mm; font-size: 7pt; font-weight: 700; letter-spacing: .27em; text-transform: uppercase; color: var(--mint); }
.eyebrow .n { color: var(--tx-4); letter-spacing: .1em; display: inline-flex; align-items: center; gap: 3mm; }
.eyebrow .n::after { content: ""; width: 7mm; height: .3mm; background: currentColor; opacity: .8; }
.eyebrow--sky { color: var(--sky); }
.eyebrow--coral { color: var(--coral); }
.eyebrow--amber { color: var(--amber); }
.h1 { font-size: 25pt; line-height: 1.08; letter-spacing: -.02em; margin-top: 3.5mm; max-width: 150mm; }
.h1 .hl { color: var(--mint); }
.lead { font-size: 10.5pt; color: var(--tx-3); margin-top: 4mm; max-width: 150mm; line-height: 1.55; }
.pg-foot {
  position: absolute; left: var(--mx); right: var(--mx); bottom: 8mm; display: flex; justify-content: space-between; align-items: center;
  font-size: 6.6pt; color: var(--tx-4); letter-spacing: .06em; border-top: .25mm solid var(--line); padding-top: 2.5mm;
}
.pg-foot b { color: var(--tx-3); font-weight: 600; letter-spacing: .14em; }
.pg-foot .pn { font-variant-numeric: tabular-nums; color: var(--tx-3); font-weight: 600; }

/* --- Строительные блоки ------------------------------------------------- */
.grid { display: grid; gap: 4mm; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: .25mm solid var(--line); border-radius: 3mm; padding: 5mm; }
.card--g { background: linear-gradient(165deg, #0F2A1D 0%, var(--card) 70%); border-color: var(--line-g); }
.card--sky { background: linear-gradient(165deg, #0C2230 0%, var(--card) 70%); border-color: var(--sky-b); }
.card h3 { font-size: 11.5pt; line-height: 1.25; }
.card p { color: var(--tx-3); margin-top: 1.8mm; font-size: 9pt; }
.kpi { display: flex; flex-direction: column; justify-content: flex-end; gap: 1.2mm; }
.kpi b { font-size: 26pt; line-height: 1; letter-spacing: -.02em; color: var(--tx); font-variant-numeric: tabular-nums; }
.kpi b.m { color: var(--mint); }
.kpi span { font-size: 8pt; color: var(--tx-3); line-height: 1.35; }
.tile { width: 10mm; height: 10mm; border-radius: 2.6mm; display: grid; place-items: center; flex: none; }
.tile svg { width: 5.2mm; height: 5.2mm; }
.tile--m { background: var(--mint-t); color: var(--mint); }
.tile--s { background: var(--sky-t); color: var(--sky); }
.tile--a { background: var(--amber-t); color: var(--amber); }
.tile--c { background: var(--coral-t); color: var(--coral); }
.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill { display: inline-flex; align-items: center; gap: 1.6mm; padding: 1mm 3mm; border-radius: 99mm; font-size: 7pt; font-weight: 700; letter-spacing: .08em; }
.pill--m { background: var(--mint-t); color: var(--mint); border: .25mm solid var(--mint-b); }
.pill--a { background: var(--amber-t); color: var(--amber); border: .25mm solid #4A3A1C; }
.pill--s { background: var(--sky-t); color: var(--sky); border: .25mm solid var(--sky-b); }
.muted { color: var(--tx-3); }
.small { font-size: 7.6pt; color: var(--tx-4); line-height: 1.45; }
.sep { height: .25mm; background: var(--line); margin: 5mm 0; }

/* фото с плашкой-подписью, как в деках */
.ph { position: relative; border-radius: 3mm; overflow: hidden; background: var(--card-photo); border: .25mm solid var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .cap {
  position: absolute; left: 3mm; bottom: 3mm; max-width: calc(100% - 6mm); padding: 1.4mm 3mm; border-radius: 1.8mm;
  background: rgba(7, 10, 8, .86); border: .25mm solid #39453E; font-size: 7.4pt; line-height: 1.35; color: var(--tx-2);
}
.ph .cap b { color: var(--tx); font-weight: 600; }
.ph .cap .kw { color: var(--mint); font-weight: 700; }
.ph .viz { position: absolute; right: 2.5mm; top: 2.5mm; font-size: 6pt; padding: .6mm 2mm; border-radius: 99mm; background: rgba(7, 10, 8, .6); color: rgba(242, 246, 243, .7); letter-spacing: .04em; }

/* списки с галочками */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.2mm; }
.ticks li { display: grid; grid-template-columns: 5mm 1fr; gap: 2.5mm; align-items: start; font-size: 9pt; color: var(--tx-2); }
.ticks li::before { content: ""; width: 4.6mm; height: 4.6mm; border-radius: 99mm; margin-top: .3mm;
  background: var(--mint-t) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ECF8E' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 3mm no-repeat; }
.ticks b { color: var(--tx); font-weight: 600; }

/* таблицы */
.tbl { width: 100%; border-collapse: collapse; font-size: 8pt; }
.tbl th { text-align: left; font-size: 6.6pt; letter-spacing: .14em; text-transform: uppercase; color: var(--tx-4); font-weight: 700; padding: 0 2.5mm 2mm; border-bottom: .3mm solid var(--line-2); }
.tbl td { padding: 2.2mm 2.5mm; border-bottom: .25mm solid var(--line); color: var(--tx-2); vertical-align: top; }
.tbl td b { color: var(--tx); font-weight: 600; }
.tbl td.num { text-align: right; color: var(--mint); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }

/* =====================================================================
   Обложка
   ===================================================================== */
.cover { padding: 0; }
.cover .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.cover .shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(7,10,8,.92) 0%, rgba(7,10,8,.35) 26%, rgba(7,10,8,.15) 48%, rgba(7,10,8,.78) 72%, var(--bg) 100%); }
.cover .glow { position: absolute; top: -60mm; right: -50mm; width: 170mm; height: 170mm; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,222,20,.32), rgba(245,184,75,.1) 38%, rgba(245,184,75,0) 66%); }
.cover .top { position: absolute; left: var(--mx); right: var(--mx); top: 16mm; display: flex; justify-content: space-between; align-items: flex-start; }
.cover .top img { height: 15mm; width: auto; }
.cover .year { text-align: right; font-size: 7.5pt; letter-spacing: .27em; color: var(--tx-2); font-weight: 700; }
.cover .year b { display: block; font-size: 30pt; letter-spacing: -.02em; color: var(--tx); margin-top: 1mm; }
.cover .body { position: absolute; left: var(--mx); right: var(--mx); bottom: 22mm; }
.cover .kicker { font-size: 8pt; letter-spacing: .3em; font-weight: 700; color: var(--mint); text-transform: uppercase; }
.cover h1 { font-size: 46pt; line-height: .98; letter-spacing: -.03em; margin-top: 4mm; }
.cover h1 span { display: block; }
.cover h1 .g { color: var(--mint); }
.cover .arname { font-family: var(--f-ar); font-size: 17pt; color: var(--tx-2); margin-top: 4mm; direction: rtl; text-align: left; }
.cover .tag { margin-top: 6mm; font-size: 12pt; color: var(--tx-2); max-width: 140mm; }
.cover .tag b { color: var(--sun); font-weight: 600; }
.cover .bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12mm; padding-top: 4mm; border-top: .3mm solid rgba(242,246,243,.18); font-size: 7.6pt; color: var(--tx-3); }
.cover .bottom b { color: var(--tx); font-weight: 600; }

/* =====================================================================
   Разделители и спец-страницы
   ===================================================================== */
.letter { font-size: 9.8pt; color: var(--tx-2); line-height: 1.7; }
.letter p + p { margin-top: 3.4mm; }
.letter .salute { color: var(--tx); font-weight: 600; margin-bottom: 4mm; }
.sign { margin-top: 9mm; display: grid; gap: .8mm; }
.sign .line { width: 45mm; height: .3mm; background: var(--line-2); margin-bottom: 2mm; }
.sign b { font-size: 10.5pt; color: var(--tx); }
.sign span { font-size: 8pt; color: var(--tx-3); }

.timeline { position: relative; display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 18mm 1fr; gap: 4mm; padding-bottom: 4.2mm; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 20.6mm; top: 2mm; bottom: -1mm; width: .3mm; background: var(--line-2); }
.tl-item:last-child::before { display: none; }
.tl-y { font-size: 11pt; font-weight: 700; color: var(--mint); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.3; }
.tl-t { position: relative; padding-left: 3mm; font-size: 8.8pt; color: var(--tx-2); line-height: 1.5; }
.tl-t::before { content: ""; position: absolute; left: -2.4mm; top: 1.6mm; width: 2.4mm; height: 2.4mm; border-radius: 99mm; background: var(--bg); border: .5mm solid var(--mint); }
.tl-t b { color: var(--tx); font-weight: 600; display: block; }

.org { display: grid; gap: 3mm; justify-items: center; }
.org .box { background: var(--card); border: .25mm solid var(--line-g); border-radius: 2.5mm; padding: 2.6mm 4mm; text-align: center; min-width: 40mm; }
.org .box b { display: block; font-size: 8.6pt; }
.org .box span { font-size: 7pt; color: var(--tx-3); }
.org .box--top { background: var(--card-g); border-color: var(--mint-b); }
.org .row { display: flex; gap: 3mm; justify-content: center; flex-wrap: wrap; }
.org .v { width: .3mm; height: 4mm; background: var(--line-2); }

.logowall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; }
.logowall .lg { height: 20mm; border-radius: 2.5mm; background: #F4F7F5; display: grid; place-items: center; padding: 3mm 5mm; }
.logowall .lg img { max-height: 12mm; max-width: 100%; object-fit: contain; }

.back { padding: 0; }
.back .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.back .shade { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(7,10,8,.7) 40%, rgba(7,10,8,.92) 75%, var(--bg) 100%); }
.back .in { position: absolute; left: var(--mx); right: var(--mx); top: 24mm; bottom: 20mm; display: flex; flex-direction: column; }
.qr { background: #F4F7F5; border-radius: 3mm; padding: 3mm; width: 32mm; height: 32mm; }
.qr img { width: 100%; height: 100%; }

@media screen and (max-width: 820px) {
  .sheets { gap: 4mm; padding: 4mm 0 20mm; }
}
/* на узком экране лист масштабирует скрипт в index.html (style.zoom); в печати — всегда 1:1 */
@media print { .page { zoom: 1 !important; } }

/* плотные карточки (страницы с большим объёмом) */
.compact .card, .grid.compact > .card { padding: 3.6mm 4.2mm; }
.compact .card h3, .grid.compact > .card h3 { font-size: 10.2pt; }
.compact .card p, .grid.compact > .card p { font-size: 8.3pt; margin-top: 1.2mm; }
.grid.compact .pill { font-size: 6.4pt; }
.org .row--5 { flex-wrap: nowrap; width: 100%; }
.org .row--5 .box { flex: 1 1 0; min-width: 0; padding: 2.4mm 1.6mm; }
.org .row--5 .box b { font-size: 7.8pt; }
.org .row--5 .box span { font-size: 6.4pt; }

/* =====================================================================
   Страницы 02 · 04 · 07 · 08 · 09 (история, услуги, инновации, референсы, клиенты)
   ===================================================================== */

/* плотная лента вех (история) */
.timeline--tight .tl-item { grid-template-columns: 15mm 1fr; gap: 4mm; padding-bottom: var(--gap, 2.5mm); }
.timeline--tight .tl-item::before { left: 17.65mm; top: 2.2mm; }
.timeline--tight .tl-y { font-size: 9.6pt; }
.timeline--tight .tl-t { font-size: 7.9pt; line-height: 1.42; color: var(--tx-3); }
.timeline--tight .tl-t b { font-size: 8.8pt; line-height: 1.35; margin-bottom: .3mm; }
.timeline--tight .tl-item.key .tl-t::before { background: var(--mint); }
.timeline--tight .tl-item.ksa .tl-y { color: var(--amber); }
.timeline--tight .tl-item.ksa .tl-t::before { background: var(--amber); border-color: var(--amber); }

/* компании группы */
.co { display: grid; grid-template-columns: 8.5mm 1fr; gap: 3mm; align-items: center; padding: 2.2mm 3mm; background: var(--card); border: .25mm solid var(--line); border-radius: 2.4mm; }
.co .cc { width: 8.5mm; height: 8.5mm; border-radius: 2mm; display: grid; place-items: center; font-size: 6.6pt; font-weight: 700; letter-spacing: .06em; background: var(--mint-t); color: var(--mint); }
.co b { display: block; font-size: 8.3pt; color: var(--tx); font-weight: 600; line-height: 1.3; }
.co span { display: block; font-size: 7pt; color: var(--tx-3); line-height: 1.35; }
.co--hq { background: var(--card-g); border-color: var(--mint-b); }
.co--ksa { background: linear-gradient(120deg, #1B1606 0%, var(--card) 70%); border-color: #4A3A1C; }
.co--ksa .cc { background: var(--amber-t); color: var(--amber); }
.co--gulf .cc { background: var(--sky-t); color: var(--sky); }

/* столбики роста команды */
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3mm; align-items: end; height: 34mm; margin-top: 3mm; }
.bars .b { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 1.2mm; height: 100%; }
.bars .b i { display: block; width: 100%; border-radius: 1.4mm 1.4mm 0 0; background: linear-gradient(180deg, var(--mint) 0%, #1E6B49 100%); }
.bars .b em { font-style: normal; font-size: 9pt; font-weight: 700; color: var(--tx); font-variant-numeric: tabular-nums; }
.bars-x { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3mm; border-top: .3mm solid var(--line-2); padding-top: 1.4mm; font-size: 7pt; color: var(--tx-4); text-align: center; font-variant-numeric: tabular-nums; }

/* плитки услуг с фото */
.svc { display: flex; flex-direction: column; background: var(--card); border: .25mm solid var(--line); border-radius: 3mm; overflow: hidden; }
.svc .ph { border: 0; border-radius: 0; height: 39mm; flex: none; }
.svc .bd { padding: 3.2mm 4mm 3.8mm; display: flex; flex-direction: column; gap: 1.4mm; flex: 1; }
.svc h3 { font-size: 10.4pt; line-height: 1.25; display: flex; align-items: center; gap: 2.4mm; }
.svc h3 .tile { width: 7.5mm; height: 7.5mm; border-radius: 2mm; }
.svc h3 .tile svg { width: 4.2mm; height: 4.2mm; }
.svc p { font-size: 8pt; color: var(--tx-3); line-height: 1.45; }
.svc .where { display: flex; gap: 1.4mm; margin-top: auto; padding-top: 1mm; }
.tag { font-size: 6pt; font-weight: 700; letter-spacing: .12em; padding: .5mm 1.8mm; border-radius: 99mm; border: .25mm solid var(--line-2); color: var(--tx-3); }
.tag--ksa { color: var(--amber); border-color: #4A3A1C; background: var(--amber-t); }
.tag--de { color: var(--mint); border-color: var(--mint-b); background: var(--mint-t); }

/* отрасли (иконки в ряд) */
.sectors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2.5mm; }
.sectors > div { display: grid; justify-items: center; text-align: center; gap: 1.6mm; padding: 3mm 1.5mm; background: var(--card); border: .25mm solid var(--line); border-radius: 2.4mm; font-size: 7.4pt; color: var(--tx-2); line-height: 1.3; font-weight: 600; }

/* KPI списком (число + подпись) */
.kpis { display: grid; }
.kpis > div { display: grid; grid-template-columns: 31mm 1fr; gap: 3mm; align-items: baseline; padding: 2.4mm 0; border-bottom: .25mm solid var(--line); }
.kpis > div:first-child { padding-top: 0; }
.kpis > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kpis b { font-size: 17pt; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpis span { font-size: 7.8pt; color: var(--tx-3); line-height: 1.35; }

/* цепочка «лето → зима» (водород) */
.chain { display: grid; grid-template-columns: repeat(5, 1fr); }
.chain .season { grid-row: 1; font-size: 6.4pt; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; padding-top: 1.4mm; border-top: .6mm solid; margin: 0 3mm 3.4mm; }
.chain .season--s { grid-column: 1 / 4; color: var(--amber); border-color: var(--amber); }
.chain .season--w { grid-column: 4 / 6; color: var(--sky); border-color: var(--sky); }
.chain .node { grid-row: 2; display: grid; justify-items: center; align-content: start; text-align: center; gap: 1.2mm; position: relative; padding: 0 1.5mm; }
.chain .node:not(:last-child)::after { content: ""; position: absolute; top: 5.4mm; left: calc(50% + 7.5mm); width: calc(100% - 15mm); border-top: .5mm dashed #3A4A41; }
.chain .node:not(:last-child)::before { content: ""; position: absolute; top: 4.3mm; right: calc(-50% + 7.2mm); border: 1.1mm solid transparent; border-left: 1.6mm solid #3A4A41; border-right: 0; }
.chain .node .tile { width: 11mm; height: 11mm; border-radius: 99mm; }
.chain .node .tile svg { width: 5.4mm; height: 5.4mm; }
.chain .node b { font-size: 8.4pt; color: var(--tx); line-height: 1.25; margin-top: .6mm; }
.chain .node span { font-size: 7pt; color: var(--tx-3); line-height: 1.35; }

/* цитата */
.quote { font-size: 10pt; line-height: 1.45; color: var(--tx); font-weight: 500; }
.quote::before { content: "“"; display: block; font-size: 30pt; line-height: .7; color: var(--mint); font-weight: 700; margin-bottom: 1mm; }
.quote + .who { margin-top: 2mm; font-size: 7.2pt; color: var(--tx-4); }

/* список СМИ */
.press { list-style: none; margin: 0; padding: 0; display: grid; }
.press li { display: grid; grid-template-columns: 1fr auto; gap: 3mm; padding: 1.7mm 0; border-bottom: .25mm solid var(--line); font-size: 8pt; color: var(--tx-2); }
.press li:last-child { border-bottom: 0; }
.press li b { color: var(--tx); font-weight: 600; }
.press li em { font-style: normal; color: var(--tx-4); font-size: 7.4pt; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* карточки референсов */
.ref { background: var(--card); border: .25mm solid var(--line); border-radius: 3mm; overflow: hidden; display: flex; flex-direction: column; }
.ref .img { height: 38mm; flex: none; background: var(--card-photo); }
.ref .img img { width: 100%; height: 100%; object-fit: cover; }
.ref .bd { padding: 3mm 3.8mm 3.4mm; display: flex; flex-direction: column; gap: .8mm; flex: 1; }
.ref .loc { font-size: 6.2pt; letter-spacing: .16em; text-transform: uppercase; color: var(--tx-4); font-weight: 700; }
.ref h3 { font-size: 9.4pt; line-height: 1.3; }
.ref p { font-size: 7.6pt; color: var(--tx-3); line-height: 1.4; }
.ref .kwp { font-size: 15pt; font-weight: 700; color: var(--mint); letter-spacing: -.01em; margin-top: auto; padding-top: 1mm; font-variant-numeric: tabular-nums; }
.ref .kwp small { font-size: 7.4pt; color: var(--tx-3); font-weight: 600; letter-spacing: 0; margin-left: 1mm; }

/* метка на фото */
.ph .flag { position: absolute; left: 3mm; top: 3mm; font-size: 6.6pt; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 1mm 2.6mm; border-radius: 99mm; background: var(--mint); color: var(--mint-ink); }

/* карточки «в разработке» */
.pipe { display: flex; flex-direction: column; gap: 1mm; }
.pipe .st { align-self: flex-start; font-size: 6pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .5mm 1.8mm; border-radius: 99mm; }
.pipe .st--aw { color: var(--mint); background: var(--mint-t); border: .25mm solid var(--mint-b); }
.pipe .st--ksa { color: var(--amber); background: var(--amber-t); border: .25mm solid #4A3A1C; }
.pipe b.big { font-size: 15pt; line-height: 1.05; letter-spacing: -.01em; color: var(--tx); margin-top: 1.2mm; font-variant-numeric: tabular-nums; }

/* печать-сертификат на белой плашке */
.seal { width: 24mm; height: 24mm; border-radius: 3mm; background: #FFFFFF; padding: 1.6mm; flex: none; }
.seal img { width: 100%; height: 100%; object-fit: contain; }

.kpis--tight > div { padding: 1.7mm 0; }
.kpis--tight b { font-size: 16pt; }
.press--tight li { padding: 1.25mm 0; }
.tbl--tight td { padding: 1.7mm 2.5mm; }

/* задняя обложка: QR слева, контакт справа */
.back-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; }
.back-contact { text-align: right; font-size: 8.6pt; line-height: 1.6; color: var(--tx-2); }
.back-contact b { color: var(--tx); font-weight: 600; }

/* =====================================================================
   Телефон и планшет: листы A4 превращаются в обычные экраны —
   одна колонка, текст крупнее, фото по пропорциям. На печать и PDF не влияет.
   ===================================================================== */
@media screen and (max-width: 820px) {
  html { -webkit-text-size-adjust: 100%; }
  body { background: var(--bg); }
  .sheets { display: block; padding: 0 0 84px; gap: 0; }
  .page { width: 100%; height: auto; overflow: visible; box-shadow: none; padding: 40px 18px 28px; border-bottom: 1px solid var(--line); zoom: 1 !important; }
  .page > *:not(.bg):not(.shade):not(.glow) { zoom: 1.22; }

  /* сетки в одну колонку (inline-стили тоже) */
  .page .grid { grid-template-columns: 1fr !important; gap: 3.5mm !important; }
  .page .grid.g4 { grid-template-columns: 1fr 1fr !important; }
  .page .grid.g4.contacts { grid-template-columns: 1fr !important; }
  .sectors { grid-template-columns: repeat(3, 1fr); }
  .logowall { grid-template-columns: 1fr 1fr; }

  /* фото: высоту задаёт пропорция, а не мм */
  .page .ph { height: auto !important; min-height: 0 !important; aspect-ratio: 16 / 10; margin-top: 3.5mm !important; }
  .page .ph img { position: absolute; inset: 0; }
  .page .ph[style*="background: #F4F7F5"] { aspect-ratio: auto; }
  .page .ph[style*="background: #F4F7F5"] img { position: static; }
  .ref .img { height: auto !important; aspect-ratio: 16 / 10; }
  .svc .ph { margin-top: 0 !important; }
  .ph .cap { font-size: 7pt; }

  .pg-head { margin-bottom: 6mm; gap: 4mm; }
  .pg-logo { height: 7mm; }
  .h1 { font-size: 17pt; max-width: none; }
  .lead { font-size: 9.6pt; max-width: none; }
  .kpi b { font-size: 19pt; }
  .pg-foot { position: static; margin-top: 6mm; }
  .tbl td, .tbl th { padding-left: 1.6mm; padding-right: 1.6mm; }
  .tbl td.num { white-space: normal; }

  /* обложки */
  .cover { height: 100svh; min-height: 600px; max-height: 900px; padding: 0; }
  .cover .top { top: 26px; left: 18px; right: 18px; }
  .cover .body { left: 18px; right: 18px; bottom: 30px; }
  .cover h1 { font-size: 26pt; }
  .cover .kicker { font-size: 6.4pt; letter-spacing: .2em; }
  .cover .year b { font-size: 20pt; }
  .back { padding: 0; }
  .back .in { position: relative; inset: auto; padding: 56px 18px 40px; }
  .back .in > div[style*="flex: 1"] { height: 40px; }
  .back h2 { font-size: 26pt !important; }
  .back-foot { flex-direction: column; align-items: flex-start; }
  .back-contact { text-align: left; }

  /* история: колонка вех и группа друг под другом */
  .timeline--tight .tl-t { font-size: 8.2pt; }

  /* цепочка «лето → зима» — вертикально */
  .chain { grid-template-columns: 1fr; row-gap: 3mm; }
  .chain .season { grid-row: auto; grid-column: auto !important; margin: 2mm 0 0; }
  .chain .season--s { order: 0; } .chain .node:nth-of-type(-n+3) { order: 1; }
  .chain .season--w { order: 2; } .chain .node:nth-of-type(n+4) { order: 3; }
  .chain .node { grid-row: auto; grid-template-columns: 11mm 1fr; column-gap: 3mm; justify-items: start; text-align: left; padding: 0; }
  .chain .node .tile { grid-row: span 2; }
  .chain .node b { margin-top: 0; }
  .chain .node::before, .chain .node::after { display: none !important; }

  /* оргструктура */
  .org .row--5 { flex-wrap: wrap; }
  .org .row--5 .box { flex: 1 1 40%; }

  .cover, .back { overflow: hidden; }
  .page .v2030 { grid-template-columns: 1fr !important; gap: 3mm !important; }
  .page .grid.g4.compact { grid-template-columns: 1fr !important; }
  /* подпись под фото, а не поверх (чтобы не закрывать людей) */
  .page .ph:has(.cap) { aspect-ratio: auto; }
  .page .ph:has(.cap) img { position: static; height: auto; aspect-ratio: 16 / 10; }
  .page .ph .cap { position: static; max-width: none; border: 0; border-radius: 0; background: var(--card); padding: 2mm 3mm; }
  .back { min-height: 100svh; }
  .back .in { min-height: 100svh; display: flex; flex-direction: column; }
  .back .in > div[style*="flex: 1"] { flex: 1; height: auto; min-height: 40px; }
  /* реквизиты: подпись над значением */
  .kv tr { display: block; padding: 2.2mm 0; border-bottom: .25mm solid var(--line); }
  .kv td { display: block; width: auto !important; padding: 0 1.6mm !important; border: 0 !important; }
  .kv td:first-child { font-size: 7pt; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8mm; }
}

.letter--long { font-size: 9.1pt; line-height: 1.58; }
.letter--long p + p { margin-top: 2.6mm; }
.contacts > .card { min-width: 0; padding: 3.8mm 3.6mm; }
.contacts h3 { font-size: 10pt; }
.contacts .small { font-size: 7.2pt; overflow-wrap: anywhere; }

/* переключатель языка (экран) */

/* =====================================================================
   Арабская версия (ar.html, dir=rtl): шрифт, межбуквенный интервал, зеркальные позиции
   ===================================================================== */
html[dir=rtl] body { font-family: var(--f-ar); line-height: 1.7; }
html[dir=rtl] * { letter-spacing: 0 !important; }
html[dir=rtl] .eyebrow, html[dir=rtl] .kicker, html[dir=rtl] .tbl th, html[dir=rtl] .ref .loc,
html[dir=rtl] .chain .season, html[dir=rtl] .ph .flag, html[dir=rtl] .tag, html[dir=rtl] .pipe .st { text-transform: none; }
html[dir=rtl] .eyebrow { font-size: 8pt; }
html[dir=rtl] .h1 { line-height: 1.32; }
html[dir=rtl] .lead { line-height: 1.75; }
html[dir=rtl] .cover h1 { line-height: 1.22; }
html[dir=rtl] .cover .year { text-align: left; font-size: 9pt; }
html[dir=rtl] .cover .kicker { font-size: 9pt; }
html[dir=rtl] .letter { line-height: 1.85; }
html[dir=rtl] .ph .cap { left: auto; right: 3mm; }
html[dir=rtl] .ph .viz { right: auto; left: 2.5mm; }
html[dir=rtl] .ph .flag { left: auto; right: 3mm; }
html[dir=rtl] .tl-y { text-align: left; }
html[dir=rtl] .tl-item::before { left: auto; right: 20.6mm; }
html[dir=rtl] .timeline--tight .tl-item::before { left: auto; right: 17.65mm; }
html[dir=rtl] .tl-t { padding-left: 0; padding-right: 3mm; }
html[dir=rtl] .tl-t::before { left: auto; right: -2.4mm; }
html[dir=rtl] .tbl th { text-align: right; }
html[dir=rtl] .tbl td.num { text-align: left; direction: ltr; unicode-bidi: isolate; }
html[dir=rtl] .chain .node:not(:last-child)::after { left: auto; right: calc(50% + 7.5mm); }
html[dir=rtl] .chain .node:not(:last-child)::before { right: auto; left: calc(-50% + 7.2mm); border-left: 0; border-right: 1.6mm solid #3A4A41; }
html[dir=rtl] .back-contact { text-align: left; }
html[dir=rtl] .kpis b, html[dir=rtl] .ref .kwp, html[dir=rtl] .pipe b.big, html[dir=rtl] .bars em { unicode-bidi: isolate; }
@media screen and (max-width: 820px) {
  html[dir=rtl] .back-contact { text-align: right; }
}
html[dir=rtl] bdi { white-space: nowrap; }
html[dir=rtl] .kv bdi, html[dir=rtl] .tl-t bdi, html[dir=rtl] .letter bdi { white-space: normal; }

/* =====================================================================
   Панель «язык + PDF» (только экран): сверху на компьютере, снизу на телефоне
   ===================================================================== */
.toolbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px max(20px, env(safe-area-inset-left)) 10px max(20px, env(safe-area-inset-right));
  background: rgba(7,10,8,.9); border-bottom: 1px solid #26332C; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-family: var(--f); }
html[dir=rtl] .toolbar { font-family: var(--f-ar); }
.tb-title { margin-inline-end: auto; font-size: 13px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title b { color: var(--tx); font-weight: 600; letter-spacing: .06em; }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: #131A16; border: 1px solid #2A3A31; }
.seg a { display: inline-flex; align-items: center; justify-content: center; min-width: 86px; min-height: 36px; padding: 0 16px; border-radius: 99px; color: var(--tx-2); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1; }
.seg a[lang=ar] { font-family: var(--f-ar); font-size: 15px; }
.seg a[lang=en] { font-family: var(--f); }
.seg a:hover { color: var(--tx); background: #1C2621; }
.seg a.on { background: var(--tx); color: var(--bg); cursor: default; }
.dlbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 18px 6px 14px; border-radius: 12px; background: var(--mint); color: var(--mint-ink); text-decoration: none; box-shadow: 0 6px 18px rgba(62,207,142,.25); transition: transform .15s, box-shadow .15s; }
.dlbtn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(62,207,142,.35); }
.dlbtn .i { width: 22px; height: 22px; stroke-width: 2.4; flex: none; }
.dlbtn span { display: grid; line-height: 1.15; }
.dlbtn b { font-size: 14px; font-weight: 700; }
.dlbtn small { font-size: 11px; font-weight: 500; opacity: .75; }
@media screen and (min-width: 821px) { .sheets { padding-top: 84px; } }
@media screen and (max-width: 820px) {
  .toolbar { top: auto; bottom: 0; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-bottom: 0; border-top: 1px solid #26332C; }
  .tb-title { display: none; }
  .seg { flex: 1; }
  .seg a { flex: 1; min-width: 0; min-height: 44px; padding: 0 10px; font-size: 15px; }
  .dlbtn { flex: none; min-height: 50px; padding: 6px 14px 6px 12px; }
  .sheets { padding-bottom: 96px !important; }
}
@media print { .toolbar { display: none !important; } }
a.tb-title { text-decoration: none; }
a.tb-title:hover, a.tb-title:hover b { color: var(--mint); }
.tb-back { display: inline-block; margin-inline-end: 8px; color: var(--mint); font-weight: 700; }
