/* ============================================================================
   TOOLS: the section layouts of the Информационен център's reference tools (inc/tools.php):
   cards with facts (with the Incoterms® picker, the container drawings and a switch between card
   sections), the comparison with ticks, data tables that scroll in their own box, the unit converter
   in a dark glass panel with the CBM box, official links in group cards and document cards.
   Loaded only on a page that has one of them (functions.php, ts_assets()).
   ============================================================================ */

/* ---- cards with a code and facts (Incoterms rules, container types) ---- */
.ip-spec{display:flex;flex-direction:column}
.ip-spec-code{align-self:flex-start;margin:0 0 14px;padding:5px 10px;border-radius:var(--r-xs);background:var(--ink);color:var(--white);font-size:15px;font-weight:800;letter-spacing:.08em}
.ip-spec-facts{margin:18px 0 0;padding:0}
.ip-spec-facts div{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:4px 14px;padding:9px 0;border-top:1px solid var(--rule)}
.ip-spec-facts div:last-child{border-bottom:1px solid var(--rule)}
.ip-spec-facts dt{margin:0;font-size:var(--fs-small);line-height:1.4;color:var(--muted)}
.ip-spec-facts dd{margin:0;font-size:var(--fs-small);line-height:1.4;font-weight:600;color:var(--ink)}
.ip-spec-facts div > dd:only-child{grid-column:1 / -1;font-weight:400;color:var(--text)}
.sec-soft .ip-spec-facts div{border-color:var(--rule)}
/* a label beside its value needs a wide card; in the narrower three-column cards (under 1200 px) they stack */
@media (max-width:1199px){.ip-spec-cards:not(.hp-cards--2) .ip-spec-facts div{grid-template-columns:1fr;gap:2px}}
@media (max-width:767px){.ip-spec-facts div{grid-template-columns:1fr;gap:2px}}

/* the tighter rule cards under the Incoterms picker: label over value, less air */
.ip-spec-group{margin:56px 0 20px;font-size:var(--fs-h3);font-weight:800;line-height:1.2;color:var(--ink)}
.ip-spec-group:first-of-type{margin-top:48px}
.ip-spec-cards--tight .hp-card{padding:26px 22px 24px}
.ip-spec-cards--tight .ip-spec-facts{margin-top:14px}
.ip-spec-cards--tight .ip-spec-facts div{grid-template-columns:1fr;gap:1px;padding:7px 0}
.ip-spec-cards--tight .ip-spec-facts dt{font-size:13px}
.ip-spec-cards--tight .hp-card-text{font-size:var(--fs-small)}

/* the container drawings: a soft banner across the top of the card, the figures under it */
.ip-spec-fig{margin:0 0 24px;padding:22px 18px 12px;border-radius:var(--r-sm);background:var(--soft)}
.sec-soft .ip-spec-fig{background:var(--white);box-shadow:inset 0 0 0 1px var(--rule)}
.ip-spec-drawing{display:block;width:100%;max-width:340px;height:auto;margin:0 auto;fill:none;stroke:var(--ink);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.ip-spec-drawing .d-rib{opacity:.4}
.ip-spec-drawing .d-bar{stroke:var(--red)}
.ip-spec-drawing .d-dash{stroke:var(--red);stroke-dasharray:4 4}
.ip-spec-drawing .d-ground{opacity:.25}
.ip-spec-body{display:flex;flex-direction:column;flex:1}
@media (max-width:767px){.ip-spec-fig{padding:16px 12px 8px}}

/* ---- a switch between card sections (20' / 40' and 45') ---- */
.ip-spec-tabs .ip-tab-panels{display:block}
.ip-spec-panel{padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.ip-spec-panel{scroll-margin-top:calc(var(--mh-compact,68px) + var(--ip-nav-h) + 24px)}
.sec-soft .ip-spec-panel{border:0}
.js .ip-spec-switch{margin:0 0 40px}
.ip-spec-panel + .ip-spec-panel{margin-top:72px}
.js .ip-spec-panel + .ip-spec-panel{margin-top:0}
.ip-spec-switch .ip-tab{min-width:120px}

/* ---- the Incoterms® picker: a chip per rule over one line from the seller to the buyer ---- */
.ip-inco{margin:0 0 8px;padding:32px 36px 30px;border-radius:var(--r-lg);background:var(--dark);color:var(--text-on-dark);box-shadow:0 32px 64px -40px rgba(var(--ink-rgb),.6)}
.js .ip-inco-bar{display:flex;flex-wrap:wrap;align-items:flex-start;gap:16px 36px;width:auto;max-width:none;margin:0 0 30px;padding:0;overflow:visible;background:none;border:0;border-radius:0;box-shadow:none}
.ip-inco-set{display:flex;flex-direction:column;gap:10px}
.ip-inco-set + .ip-inco-set{padding-left:36px;border-left:1px solid var(--rule-on-dark)}
.ip-inco-chips{display:flex;flex-wrap:wrap;gap:6px}
.ip-inco-grp{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-on-dark)}
.ip-inco .ip-tab{min-height:44px;padding:0 16px;border:1px solid var(--rule-on-dark);background:rgba(255,255,255,.04);color:var(--white);font-size:16px;letter-spacing:.06em}
.ip-inco .ip-tab:hover{background:rgba(255,255,255,.1)}
.ip-inco .ip-tab[aria-selected="true"]{background:var(--red);border-color:var(--red);color:var(--white)}
.ip-inco .ip-tab:focus-visible{outline:2px solid var(--white);outline-offset:2px}
.ip-inco .ip-tab-panels{display:grid;gap:36px}
.ip-inco-panel{padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.ip-inco-panel:focus-visible{outline:2px solid var(--white);outline-offset:6px}
.ip-inco-h{display:flex;align-items:center;gap:14px;margin:0 0 30px}
.ip-inco-title{margin:0;font-size:var(--fs-h3);font-weight:800;line-height:1.2;color:var(--white)}
.ip-inco-h .ip-spec-code{margin:0;background:var(--red)}
/* the line: six stations, each drawing the stretch to the next; red while the risk is the seller's,
   a white mark where it passes */
.ip-inco-st{--dot:52px;position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;margin:0;padding:0;list-style:none}
.ip-inco-s{position:relative;display:flex;flex-direction:column;align-items:center;padding:0 6px;text-align:center}
.ip-inco-s:not(:last-child)::after{content:"";position:absolute;z-index:0;left:50%;width:100%;top:calc(var(--dot) / 2 - 2px);height:4px;background:var(--rule-on-dark)}
.ip-inco-s.is-run::after{background:var(--red)}
.ip-inco-s.has-mark::before,.ip-inco-s.is-mark::before{content:"";position:absolute;z-index:2;left:calc(150% - var(--dot) / 2 - 14px);top:calc(var(--dot) / 2 - 16px);width:5px;height:32px;border-radius:3px;background:var(--white);box-shadow:0 0 0 3px var(--dark)}
.ip-inco-s.is-mark::before{left:calc(50% + var(--dot) / 2 + 6px)}
.ip-inco-dot{position:relative;z-index:1;display:grid;place-items:center;width:var(--dot);height:var(--dot);border-radius:50%;background:var(--dark);border:2px solid var(--rule-on-dark);color:var(--text-on-dark)}
.ip-inco-dot svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ip-inco-s.is-s .ip-inco-dot{background:var(--red);border-color:var(--red);color:var(--white)}
.ip-inco-s.is-b .ip-inco-dot{background:var(--white);border-color:var(--white);color:var(--ink)}
.ip-inco-name{margin-top:14px;font-size:var(--fs-small);font-weight:700;line-height:1.3;color:var(--white)}
.ip-inco-who{margin-top:6px;font-size:14px;line-height:1.4;color:var(--text-on-dark)}
.ip-inco-s.is-s .ip-inco-who::before,.ip-inco-s.is-b .ip-inco-who::before{content:"";display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;vertical-align:1px;background:var(--white)}
.ip-inco-s.is-s .ip-inco-who::before{background:var(--red-on-dark)}
.ip-inco-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 28px;margin:32px 0 0;padding:20px 0 0;border-top:1px solid var(--rule-on-dark)}
.ip-inco-facts dt{margin:0;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-on-dark)}
.ip-inco-facts dd{margin:4px 0 0;font-size:var(--fs-card);line-height:1.45;color:var(--white)}
.ip-inco-legend{display:flex;flex-wrap:wrap;gap:8px 24px;margin:26px 0 0;padding:0;list-style:none;font-size:14px;color:var(--text-on-dark)}
.ip-inco-legend li::before{content:"";display:inline-block;margin-right:8px;vertical-align:1px}
.ip-inco-legend .is-run::before{width:22px;height:4px;border-radius:2px;background:var(--red)}
.ip-inco-legend .is-s::before,.ip-inco-legend .is-b::before{width:10px;height:10px;border-radius:50%;background:var(--red)}
.ip-inco-legend .is-b::before{background:var(--white)}
/* without JavaScript every rule shows: one line under another */
html:not(.js) .ip-inco-panel + .ip-inco-panel{padding-top:32px;border-top:1px solid var(--rule-on-dark)}
@media (max-width:980px){
  .ip-inco{padding:26px 22px 26px}
  .js .ip-inco-bar{flex-direction:column;gap:18px}
  .ip-inco-set + .ip-inco-set{padding-left:0;border-left:0}
  /* the line turns: the stations one under another, each stretch down to the next dot */
  .ip-inco-st{--dot:44px;grid-template-columns:1fr;gap:16px}
  .ip-inco-s{display:grid;grid-template-columns:var(--dot) minmax(0,1fr);grid-template-rows:auto auto;gap:2px 16px;align-items:center;padding:0;text-align:left;min-height:var(--dot)}
  .ip-inco-s:not(:last-child)::after{left:calc(var(--dot) / 2 - 2px);width:4px;top:calc(var(--dot) / 2);height:calc(100% + 16px)}
  .ip-inco-s.has-mark::before,.ip-inco-s.is-mark::before{left:calc(var(--dot) / 2 - 16px);top:calc(100% + 16px - 10px);width:32px;height:5px}
  .ip-inco-s.is-mark::before{top:calc(var(--dot) + 5px)}
  .ip-inco-dot{grid-row:1 / span 2;align-self:start}
  .ip-inco-dot svg{width:20px;height:20px}
  .ip-inco-name{margin:0;align-self:end}
  .ip-inco-who{margin:0;align-self:start}
  .ip-inco-s:not(:has(.ip-inco-who)) .ip-inco-name{grid-row:1 / span 2;align-self:center}
  .ip-inco-facts{grid-template-columns:1fr}
}

/* ---- the comparison with ticks (Institute Cargo Clauses) ---- */
.ip-cmp-cards .ip-cmp-card.is-first{background:var(--dark);border-color:var(--dark);color:var(--text-on-dark)}
.ip-cmp-cards .ip-cmp-card.is-first .hp-card-title{color:var(--white)}
.ip-cmp-cards .ip-cmp-card.is-first .hp-card-text{color:var(--text-on-dark)}
.ip-cmp-cards .ip-cmp-card.is-first .ip-spec-code{background:var(--red)}
.ip-cmp-wrap{margin-top:28px;border:1px solid var(--rule);border-radius:var(--r-md);background:var(--white);overflow:hidden}
.ip-cmp{width:100%;border-collapse:collapse;font-size:var(--fs-small);line-height:1.45;color:var(--text)}
.ip-cmp th,.ip-cmp td{padding:13px 18px;text-align:left;vertical-align:middle;border-bottom:1px solid var(--rule)}
.ip-cmp tbody tr:last-child th,.ip-cmp tbody tr:last-child td{border-bottom:0}
.ip-cmp thead th{background:var(--soft);font-size:13px;font-weight:700;letter-spacing:.06em;color:var(--ink)}
.ip-cmp thead th:not(:first-child){width:12%;text-align:center;font-size:16px;letter-spacing:.04em}
.ip-cmp tbody th{font-weight:600;color:var(--ink)}
.ip-cmp .is-first{background:rgba(var(--red-rgb),.05)}
.ip-cmp thead .is-first{background:var(--dark);color:var(--white)}
.ip-cmp-m{text-align:center}
.ip-cmp-m svg{display:inline-block;width:24px;height:24px;vertical-align:middle;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.ip-cmp-m.is-yes svg{padding:3px;border-radius:50%;background:var(--red);stroke:var(--white)}
.ip-cmp-m.is-no svg{stroke:var(--rule-2)}
@media (max-width:767px){.ip-cmp th,.ip-cmp td{padding:11px 10px}.ip-cmp thead th:not(:first-child){width:15%}}

/* ---- data tables: the box scrolls, never the page ---- */
.ip-table-wrap{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--rule);border-radius:var(--r-md);background:var(--white)}
.ip-table-wrap:focus-visible{outline:2px solid var(--focus,var(--red));outline-offset:3px}
.ip-table{width:100%;border-collapse:separate;border-spacing:0;font-size:var(--fs-small);line-height:1.45;color:var(--text)}
.ip-table caption{caption-side:top;padding:16px 20px 4px;text-align:left;font-weight:800;font-size:var(--fs-card);color:var(--ink)}
.ip-table th,.ip-table td{padding:13px 18px;text-align:left;vertical-align:top;border-bottom:1px solid var(--rule)}
.ip-table thead th{position:sticky;top:0;background:var(--soft);font-size:13px;font-weight:700;letter-spacing:.04em;color:var(--ink);white-space:nowrap}
.ip-table tbody tr:last-child th,.ip-table tbody tr:last-child td{border-bottom:0}
.ip-table--rh tbody th{font-weight:700;color:var(--ink);white-space:nowrap}
.ip-table td{min-width:9em}
.ip-table a{color:var(--red-deep)}
/* the first column stays in view while a wide table scrolls */
.ip-table--rh tbody th,.ip-table--rh thead th:first-child{position:sticky;left:0;z-index:1;background:var(--white);box-shadow:1px 0 0 var(--rule)}
.ip-table--rh thead th:first-child{background:var(--soft);z-index:2}
.ip-table-note{margin-top:20px;max-width:880px}
.ip-table-note-p{margin:0;font-size:var(--fs-small);line-height:1.55;color:var(--muted)}
.ip-table-note-p + .ip-table-note-p{margin-top:8px}
.ip-table-note a,.ip-spec a{color:var(--red-deep);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.ip-table-note .ip-ext,.ip-spec .ip-ext,.ip-table .ip-ext,.hp-sec p a .ip-ext{width:13px;height:13px;margin-left:3px;vertical-align:-1px}
.ip-sec--table .ip-table-wrap + .ip-table-note{margin-top:18px}
@media (max-width:767px){.ip-table th,.ip-table td{padding:11px 14px}.ip-table td{min-width:8em}}

/* ---- the unit converter: a dark glass panel on the light section ---- */
.ip-conv{position:relative;overflow:hidden;border-radius:var(--r-lg);background:var(--dark);color:var(--text-on-dark);box-shadow:0 32px 64px -40px rgba(var(--ink-rgb),.6)}
.ip-conv::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(600px 320px at 100% 0,rgba(var(--red-rgb),.18),transparent 70%)}
.ip-conv[hidden]{display:none}
.ip-conv-tabs{position:relative;display:flex;flex-wrap:wrap;gap:6px;padding:20px 24px 0}
.ip-conv-tab{flex:0 1 auto;min-height:46px;padding:0 20px;border:1px solid var(--rule-on-dark);border-radius:var(--pill);background:rgba(255,255,255,.04);font:inherit;font-size:var(--fs-small);font-weight:700;color:var(--white);cursor:pointer}
.ip-conv-tab[aria-selected="true"]{background:var(--red);border-color:var(--red);color:var(--white)}
.ip-conv-tab:hover{background:rgba(255,255,255,.1)}
.ip-conv-tab[aria-selected="true"]:hover{background:var(--red-deep)}
.ip-conv-tab:focus-visible{outline:2px solid var(--white);outline-offset:2px}
.ip-conv-panel{position:relative;padding:28px 28px 32px}
.ip-conv-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 20px;max-width:640px}
.ip-conv-in--cbm{grid-template-columns:repeat(3,minmax(0,1fr));max-width:none}
.ip-conv-field label{display:block;margin:0 0 6px;font-size:var(--fs-small);font-weight:700;color:var(--white)}
.ip-conv-input,.ip-conv-select{width:100%;min-height:50px;padding:10px 14px;border:1px solid rgba(255,255,255,.22);border-radius:var(--r-sm);background:rgba(255,255,255,.06);font:inherit;font-size:18px;color:var(--white)}
.ip-conv-select option{color:var(--ink);background:var(--white)}
.ip-conv-input:focus,.ip-conv-select:focus{outline:2px solid var(--white);outline-offset:1px;border-color:var(--white)}
.ip-conv-error{margin:12px 0 0;font-size:var(--fs-small);font-weight:700;color:var(--red-on-dark)}
.ip-conv-out{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin:26px 0 0;padding:0;list-style:none}
.ip-conv-out li{padding:16px 18px 18px;border:1px solid var(--rule-on-dark);border-radius:var(--r-md);background:rgba(255,255,255,.04)}
.ip-conv-out li.is-from{border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.1)}
.ip-conv-num{font-family:var(--ts-font-display);font-size:26px;font-weight:800;line-height:1.15;color:var(--white);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ip-conv-unit{font-size:var(--fs-card);font-weight:700;color:var(--white)}
.ip-conv-name{display:block;margin-top:4px;font-size:13px;font-weight:400;color:var(--muted-on-dark)}
.ip-conv-hint{margin:20px 0 0;max-width:720px;font-size:var(--fs-small);line-height:1.55;color:var(--text-on-dark)}
/* the CBM calculator: the box drawn to the proportions typed in, the results in large type */
.ip-cbm{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:24px 32px;align-items:center;margin-top:26px}
.ip-cbm-fig{position:relative;margin:0;padding:12px;border:1px solid var(--rule-on-dark);border-radius:var(--r-md);background:rgba(255,255,255,.03)}
.ip-cbm-svg{display:block;width:100%;height:auto;max-height:240px;overflow:visible}
.ip-cbm-svg path{stroke:var(--white);stroke-width:1.6;stroke-linejoin:round}
.ip-cbm-front{fill:rgba(var(--red-rgb),.35)}
.ip-cbm-top{fill:rgba(255,255,255,.16)}
.ip-cbm-side{fill:rgba(255,255,255,.08)}
.ip-cbm-t{font-family:var(--ts-font-display);font-size:13px;font-weight:700;fill:var(--white)}
.ip-cbm-n{position:absolute;top:12px;right:14px;padding:4px 10px;border-radius:var(--pill);background:var(--red);font-size:14px;font-weight:800;color:var(--white)}
.ip-conv-cbm{display:grid;grid-template-columns:1fr;gap:12px;margin:0}
.ip-conv-cbm div{padding:18px 20px;border:1px solid var(--rule-on-dark);border-radius:var(--r-md);background:rgba(255,255,255,.05)}
.ip-conv-cbm dt{margin:0;font-size:var(--fs-small);color:var(--text-on-dark)}
.ip-conv-cbm dd{margin:6px 0 0;font-family:var(--ts-font-display);font-size:36px;font-weight:800;line-height:1.1;color:var(--white);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ip-conv-ref{margin-top:28px}
.ip-conv-ref summary{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-weight:700;color:var(--ink);cursor:pointer}
.ip-conv-ref summary:focus-visible{outline:2px solid var(--red);outline-offset:3px}
.ip-conv-ref-in{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:16px}
.ip-conv-ref-box .ip-table td{min-width:0}
.ip-conv-ref-box th .ip-conv-name{display:inline;margin-left:6px;color:var(--muted)}
@media (max-width:980px){.ip-conv-ref-in{grid-template-columns:1fr}.ip-conv-in--cbm{grid-template-columns:repeat(2,minmax(0,1fr))}.ip-cbm{grid-template-columns:1fr}}
@media (max-width:767px){
  .ip-conv-tabs{padding:16px 14px 0}
  .ip-conv-tab{flex:1 1 auto;padding:0 14px}
  .ip-conv-panel{padding:22px 16px 24px}
  .ip-conv-in,.ip-conv-out{grid-template-columns:1fr}
  .ip-conv-in--cbm{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ip-conv-num{font-size:24px}
  .ip-conv-cbm dd{font-size:30px}
}

/* ---- official links: a card per group, its icon and name, the sites with the arrow ---- */
.ip-xl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}
.ip-xl-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ip-xl-grid--1{grid-template-columns:minmax(0,1fr)}
.ip-xl-group{position:relative;overflow:hidden;padding:28px 26px 14px;border:1px solid var(--rule);border-radius:var(--r-md);background:var(--white);box-shadow:var(--shadow-card)}
.ip-xl-group::before{content:"";position:absolute;left:0;top:0;width:48px;height:3px;background:var(--red)}
.ip-xl-head{display:flex;align-items:center;gap:14px;margin:0 0 12px}
.ip-xl-ico{display:grid;flex:none;place-items:center;width:46px;height:46px;border-radius:var(--r-sm);background:rgba(var(--red-rgb),.08);color:var(--red)}
.ip-xl-ico svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ip-xl-title{margin:0;font-size:var(--fs-h3);font-weight:800;line-height:1.2;color:var(--ink)}
.ip-xl-list{margin:0;padding:0;list-style:none}
.ip-xl-list li + li{border-top:1px solid var(--rule)}
.ip-xl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 14px;padding:16px 0;color:var(--ink);text-decoration:none}
.ip-xl > span:not(.ip-xl-go){grid-column:1}
.ip-xl-go{grid-column:2;grid-row:1 / span 3;align-self:center;color:var(--red);transition:transform .18s ease}
.ip-xl:hover .ip-xl-go{transform:translateX(3px)}
.ip-xl:hover .ip-xl-name{color:var(--red-deep)}
.ip-xl:focus-visible{outline:2px solid var(--red);outline-offset:3px;border-radius:var(--r-xs)}
.ip-xl-name{font-weight:800;font-size:var(--fs-card);line-height:1.3}
.ip-xl-text{font-size:var(--fs-small);line-height:1.5;color:var(--text)}
.ip-xl-host{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
/* on a dark section: glass cards */
.sec-dark .ip-xl-group{background:rgba(255,255,255,.04);border-color:var(--rule-on-dark);box-shadow:none}
.sec-dark .ip-xl-ico{background:rgba(255,255,255,.08);color:var(--white)}
.sec-dark .ip-xl-title,.sec-dark .ip-xl{color:var(--white)}
.sec-dark .ip-xl-list li + li{border-color:var(--rule-on-dark)}
.sec-dark .ip-xl-text{color:var(--text-on-dark)}
.sec-dark .ip-xl-host{color:var(--muted-on-dark)}
.sec-dark .ip-xl-go{color:var(--red-on-dark)}
.sec-dark .ip-xl:hover .ip-xl-name{color:var(--red-on-dark)}
.sec-dark .ip-xl:focus-visible{outline-color:var(--white)}
@media (max-width:1199px){.ip-xl-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:767px){.ip-xl-grid,.ip-xl-grid--2{grid-template-columns:1fr}.ip-xl-group{padding:24px 20px 10px}}
@media (prefers-reduced-motion:reduce){.ip-xl-go{transition:none}.ip-xl:hover .ip-xl-go{transform:none}}

/* ---- downloads: document cards with the action in red at the foot ---- */
.ip-dl-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:0;padding:0;list-style:none}
.ip-dl-list--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ip-dl-list--1{grid-template-columns:minmax(0,1fr)}
.ip-dl{display:flex;flex-direction:column;gap:18px}
.ip-dl-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:var(--r-sm);background:rgba(var(--red-rgb),.08);color:var(--red)}
.ip-dl-icon svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ip-dl-body{flex:1}
.ip-dl-title{margin:0;font-size:var(--fs-h3);font-weight:800;line-height:1.25;color:var(--ink)}
.ip-dl-text{margin:10px 0 0;font-size:var(--fs-card);line-height:1.55;color:var(--text)}
.ip-dl-meta{margin:8px 0 0;font-size:13px;color:var(--muted)}
.ip-dl-act{padding-top:16px;border-top:1px solid var(--rule)}
.ip-dl-empty{margin:0 0 8px;font-size:var(--fs-small);line-height:1.45;color:var(--text)}
.ip-dl-ask{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-weight:800;color:var(--red-deep);text-decoration:none}
.ip-dl-ask:hover{color:var(--red)}
.ip-dl-ask .hp-arrow{transition:transform .18s ease}
.ip-dl-ask:hover .hp-arrow{transform:translateX(3px)}
@media (max-width:980px){.ip-dl-list{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.ip-dl-ask .hp-arrow{transition:none}.ip-dl-ask:hover .hp-arrow{transform:none}}

/* ---- Проследяване на кораби: the live map (inc/tools.php, ts_flex_live_map(); assets/js/live-map.js) ----
   Before the click the corridor artwork under a dark veil, the provider named and the button; after it
   the provider's embed in the same frame, 520 px tall on desktop, 420 on phones (shorter, so a swipe
   past it still scrolls the page). */
.ip-live{margin-top:28px}
/* the ferries over the map: their names (links to the provider's ship pages) and, once the map is open, a button per view */
.ip-live-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 24px;margin:0 0 16px}
.ip-live-ships{flex:1 1 320px;max-width:62ch;margin:0;font-size:16px;line-height:1.5;color:var(--ink)}
.ip-live-ships a{font-weight:700;color:inherit;text-decoration:underline;text-decoration-color:var(--red);text-underline-offset:3px}
.ip-live-views{display:flex;flex-wrap:wrap;gap:8px}
.ip-live-views[hidden]{display:none}
.ip-live-view{min-height:44px;margin:0;padding:0 16px;border:1px solid var(--rule-2);border-radius:var(--pill);background:var(--white);color:var(--ink);font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.ip-live-view:hover{border-color:var(--ink)}
.ip-live-view[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--white)}
.ip-live-view:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.ip-live-stage{position:relative;overflow:hidden;height:520px;border-radius:var(--r-lg);background:var(--darker);color:var(--text-on-dark);box-shadow:0 32px 64px -40px rgba(var(--ink-rgb),.6)}
.ip-live-art{position:absolute;inset:0;display:block;width:100%;height:100%;opacity:.6}
/* the Black Sea drawing (ts_live_map_art()): the corridor map's colours; strokes keep their width at any size */
.ip-live-sea{fill:var(--map-sea)}
.ip-live-land{fill:var(--map-land);stroke:var(--map-border);stroke-width:1;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.ip-live-ferry{fill:none;stroke:var(--red);stroke-width:3;stroke-linecap:round;vector-effect:non-scaling-stroke}
.ip-live-ship{fill:var(--white)}
.ip-live-deck{opacity:.75}
.ip-live-port{fill:var(--red);stroke:var(--white);stroke-width:2;vector-effect:non-scaling-stroke}
.ip-live-name{font-family:var(--ts-font-body);font-size:4.4px;font-weight:700;text-anchor:middle;fill:var(--white);paint-order:stroke;stroke:var(--map-land);stroke-width:3px;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.ip-live-cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:32px;text-align:center;
  background:linear-gradient(180deg,rgba(var(--ink-rgb),.35),rgba(var(--ink-rgb),.75))}
.ip-live-consent{max-width:46ch;margin:0;font-size:17px;line-height:1.5}
.ip-live-link{color:var(--white);text-decoration:underline;text-underline-offset:3px}
.ip-live-btn:not([hidden]) ~ .ip-live-link{font-size:15px;color:var(--muted-on-dark)}
.ip-live-frame{display:block;width:100%;height:100%;border:0}
.ip-live-note{margin:14px 0 0;font-size:14px;line-height:1.5;color:var(--muted)}
@media (max-width:767px){.ip-live-stage{height:420px}.ip-live-cover{padding:24px 18px}.ip-live-consent{font-size:16px}
  /* the whole sea on top (font-size in the drawing's units: about 13 px at this scale), the text under it */
  .ip-live-art{bottom:auto;height:236px}
  .ip-live-name{font-size:11px}
  .ip-live-cover{justify-content:flex-end;padding-bottom:28px;background:linear-gradient(180deg,rgba(var(--ink-rgb),.15) 0,rgba(var(--ink-rgb),.35) 40%,rgba(var(--ink-rgb),.85) 62%)}}
