@font-face {
  font-family: Onest;
  src: url("Onest.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #fcfcfd;
  --paper-2: #f1f2f4;
  --ink: #1a1b1f;
  --ink-2: #5d5f66;
  --ink-3: #8d8f96;
  --accent: #225948;
  --green-rgb: 79 153 126;
  --green: rgb(var(--green-rgb));
  --brass: #bd9350;
  --gold-ink: #805b29;
  --rule: rgba(26, 27, 31, .22);
  --rule-soft: rgba(26, 27, 31, .09);
  --grid: rgba(26, 27, 31, .06);
  font: 16px/1.45 Onest, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { position: relative; margin: 0; background: var(--paper); color: var(--ink); }
body::before { content: ""; display: block; height: 3px; background: var(--green); }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
a { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { color: var(--ink-3); opacity: .6; cursor: default; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { width: 92%; max-width: 1440px; margin-inline: auto; }
.masthead { display: flex; align-items: center; gap: 28px; min-height: 80px; padding: 18px 0; border-bottom: 1px solid var(--ink); }
.wordmark { flex: 0 0 217px; border-right: 1px solid var(--rule); padding-right: 28px; text-decoration: none; color: var(--ink-3); }
.wordmark img { display: block; width: 188px; max-width: 100%; height: auto; }
.wordmark span { display: block; font-size: 12px; letter-spacing: .02em; margin-top: 3px; }
.masthead-title { position: relative; padding-right: 56px; }
.masthead h1 { font-size: 22px; font-weight: 600; line-height: 1.06; letter-spacing: -.03em; }
.masthead h1 span { font-weight: 500; color: var(--ink-2); }
.rosette { position: absolute; right: 0; top: 50%; width: 38px; height: 38px; transform: translateY(-50%); }
.tagline, .kpi > span, .section-heading p, .panel-heading p { color: var(--ink-3); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.tagline { margin-top: 4px; }
.related-databases { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; }
.report-link { color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
.report-link:hover { color: var(--accent); }
.ornament-band { height: 20px; margin-top: 4px; background: url("ornament-band.svg") center / 44px 20px repeat-x; opacity: .8; }
.ornament-band--footer { margin-top: 56px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 4px; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.kpi { border-left: 1px solid var(--rule-soft); padding: 0 18px; }
.kpi:first-child { padding-left: 0; border-left: 0; }
.kpi > span { display: block; }
.kpi strong { display: block; font-size: 36px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 6px; white-space: nowrap; }
.controls { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(90px, 1fr)) minmax(164px, 1.22fr) auto; align-items: stretch; gap: 8px; margin-top: 24px; }
.filters { display: contents; }
.control-actions { display: flex; gap: 8px; }
.controls > input, .control-button, .sort-label select, .filter summary {
  min-width: 0; min-height: 40px; padding: 9px 12px; border: 1px solid var(--rule); background: transparent; font-size: 13px; line-height: 20px;
}
.controls > input::placeholder { color: var(--ink-3); opacity: 1; }
.control-button { white-space: nowrap; padding-inline: 14px; }
.control-button:hover:not(:disabled), .filter summary:hover, .filter[open] summary, .sort-label select:hover { border-color: var(--ink); }
.sort-label { display: block; position: relative; min-width: 0; }
.sort-label select { display: block; appearance: none; width: 100%; height: 40px; padding-right: 25px; }
.sort-label::after, .filter summary::after { content: ""; border: 3px solid transparent; border-bottom: 0; border-top-color: var(--ink-3); pointer-events: none; }
.sort-label::after { position: absolute; right: 12px; top: 19px; }
.filter { position: relative; min-width: 0; }
.filter summary { display: flex; align-items: center; justify-content: space-between; gap: 5px; list-style: none; }
.filter summary::-webkit-details-marker { display: none; }
.filter summary span { margin-left: auto; color: var(--accent); font-weight: 600; }
.dropdown { position: absolute; z-index: 5; left: 0; top: calc(100% + 5px); width: min(260px, 74vw); background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 4px 14px var(--grid); padding: 10px; }
.dropdown input[type=search] { width: 100%; padding: 6px 8px; border: 1px solid var(--rule); background: transparent; }
.dropdown-actions { display: flex; gap: 10px; }
.dropdown-actions button { border: 0; padding: 5px 0; background: transparent; color: var(--ink-3); font-size: 12px; }
.dropdown-actions button:hover { color: var(--accent); }
.option-list { max-height: 235px; overflow: auto; }
.option-list label { display: flex; gap: 7px; align-items: start; padding: 5px 2px; font-size: 13px; cursor: pointer; }
.option-list label:hover { background: var(--paper-2); }
.option-list input { accent-color: var(--accent); }
.analytics { margin-top: 28px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 10px; }
.section-heading > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.section-heading h2, .callout h2 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.text-button { border: 0; padding: 0; background: none; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.text-button:hover, .text-button[aria-pressed=true] { color: var(--accent); text-decoration: underline; }
.yearly-scroll, .heatmap, .table-scroll { overflow-x: auto; }
.yearly-scroll { margin-top: 18px; }
.year-bars { display: grid; grid-template-columns: repeat(var(--year-count), minmax(52px, 1fr)); gap: 4px; height: 150px; align-items: end; }
.year-bucket { display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 4px; height: 100%; background: none; border: 0; padding: 0; color: var(--ink-2); font-size: 12px; letter-spacing: .03em; }
.year-bucket:hover, .year-bucket[aria-pressed=true] { background: var(--grid); }
.bar-area { display: flex; align-items: center; flex-direction: column; gap: 4px; }
.bar-area b { font-weight: 600; color: var(--ink); }
.bar-area i { width: 56px; max-width: 7vw; height: var(--bar-height); border: 1px solid var(--accent); background: repeating-linear-gradient(-45deg, rgb(var(--green-rgb) / .63) 0 1.5px, transparent 1.5px 7px); }
.year-bucket[data-current=true] .bar-area i { border-color: var(--gold-ink); background: repeating-linear-gradient(-45deg, rgb(189 147 80 / .8) 0 2px, transparent 2px 7px); }
.year-bucket[data-current=true] .year-extra { color: var(--ink-3); font-size: 11px; text-transform: none; }
.bar-year { margin-top: 2px; }
.year-extra { height: 10px; line-height: 10px; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; margin-top: 36px; }
.chart { position: relative; min-width: 0; border-top: 1px solid var(--ink); padding-top: 16px; }
.chart::before {
  content: ""; position: absolute; top: -7px; right: 0; width: 24px; height: 14px; padding-inline: 6px; box-sizing: content-box;
  background: var(--paper) url("rosette.svg") center / 14px 14px no-repeat;
}
.panel-heading { margin-bottom: 13px; }
.panel-heading h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.panel-heading p { margin-top: 3px; }
.heat-table { border-collapse: separate; border-spacing: 1px; width: 100%; font-size: 12px; }
.heat-table th { color: var(--ink-2); font-size: 12px; font-weight: 400; text-align: center; height: 26px; }
.heat-table th[scope=row] { text-align: left; padding: 4px 8px; color: var(--ink-2); font-size: 12px; min-width: 134px; }
.heat-tile { width: 100%; padding: 3px 4px; min-width: 25px; min-height: 26px; border: 0; background: var(--paper-2); color: var(--text, var(--ink)); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.heat-tile[data-count] { background: rgb(var(--green-rgb) / var(--heat-strength)); }
.heat-tile:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.buyers { display: grid; }
.buyer-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 50px; align-items: center; gap: 8px; padding: 3px 0 4px; min-height: 39px; background: transparent; border: 0; border-bottom: 1px solid var(--rule-soft); text-align: left; font-size: 12px; }
.buyer-row:hover, .buyer-row[aria-pressed=true] { background: var(--grid); }
.buyer-rank { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px; }
.buyer-main { min-width: 0; display: grid; gap: 2px; }
.buyer-main span { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-weight: 500; }
.buyer-main i { position: relative; display: block; background: var(--grid); height: 6px; }
.buyer-main i::after { content: ""; display: block; height: 100%; width: var(--width); background: var(--green); }
.buyer-row:first-child .buyer-main i::after { border-right: 4px solid var(--brass); }
.buyer-row b { text-align: right; font-size: 12px; font-weight: 600; }
.registry { margin-top: 36px; }
#status-filter .filter summary { min-height: 27px; padding: 2px 7px; font-size: 12px; }
#status-filter .dropdown { left: auto; right: 0; }
.table-scroll { margin-top: 16px; }
.deal-table { width: 100%; min-width: 1080px; table-layout: fixed; border-collapse: collapse; text-align: left; font-size: 12px; }
.date-col { width: 6%; }
.company-col { width: 16%; }
.party-col { width: 13%; }
.country-col { width: 9%; }
.sector-col { width: 10%; }
.type-col { width: 10%; }
.amount-col { width: 9%; }
.stake-col { width: 5%; }
.source-col { width: 9%; }
.deal-table th { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.deal-table th, .deal-table td { padding: 9px 8px; vertical-align: top; }
.deal-table td { border-bottom: 1px solid var(--rule-soft); color: var(--ink-2); overflow-wrap: anywhere; }
.deal-table tbody tr:hover { background: var(--grid); }
.deal-table th button { border: 0; padding: 0; background: none; text-transform: inherit; letter-spacing: inherit; }
.deal-table td:nth-child(1), .deal-table td:nth-child(8), .deal-table td:nth-child(9) { font-variant-numeric: tabular-nums; }
.deal-table td:nth-child(8) { color: var(--ink); }
.deal-table td:nth-child(9), .deal-table th:nth-child(9) { text-align: right; }
.deal-table td:nth-child(6) { color: var(--ink-3); }
.deal-button { background: none; border: 0; padding: 0; text-align: left; color: var(--ink); font-weight: 600; }
.deal-button:hover { color: var(--accent); }
.source { color: var(--accent); font-size: 12px; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.status, .deal-type { display: inline-block; padding: 1px 5px; border: 1px solid var(--rule); line-height: 1.25; font-size: 12px; color: var(--ink-2); }
.deal-type { color: var(--ink); border-color: var(--ink); font-weight: 500; }
.deal-type.rumor { border-style: dashed; }
.deal-type.negotiation, .deal-type.other { border-color: var(--rule); color: var(--ink-2); }
.deal-type.investment { border-color: var(--accent); }
.status.active, .status.denied { border-style: dashed; }
.row-status { margin-top: 3px; }
.empty { padding: 20px 8px; color: var(--ink-3); }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 22px; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.pagination > div { display: flex; align-items: center; gap: 5px; }
.pagination button { min-width: 31px; padding: 0 6px; height: 29px; border: 1px solid var(--rule); background: transparent; }
.pagination button[aria-current=page] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pagination button:not(:disabled):hover { border-color: var(--ink); }
#page-info { margin-left: 8px; }
.callout { position: relative; overflow: hidden; display: grid; grid-template-columns: 3fr 1fr; align-items: center; column-gap: 22px; margin-top: 56px; padding: 28px 0 30px; border-top: 1px solid var(--ink); }
.callout > div, .callout > a { position: relative; z-index: 1; }
.callout .callout-label { margin-bottom: 6px; color: var(--gold-ink); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.callout-rosette { position: absolute; right: -36px; top: 50%; width: 230px; height: 230px; transform: translateY(-50%); opacity: .4; pointer-events: none; }
.callout p { max-width: 465px; margin-top: 7px; color: var(--ink-2); }
.callout a { text-decoration: none; font-size: 14px; }
.callout a:hover { text-decoration: underline; }
.footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 20px 0 32px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 12px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.callout + * { margin: 0; }
dialog { margin: 0 0 0 auto; width: min(560px, 100%); height: 100%; max-height: 100%; border: 0; border-left: 1px solid var(--rule); padding: 26px; color: var(--ink); background: var(--paper) url("ornament-band.svg") 0 18px / 44px 20px repeat-x; }
dialog::backdrop { background: rgba(26,27,31,.24); }
.dialog-header { display: flex; align-items: center; justify-content: flex-end; margin-top: 20px; }
.close-button { background: var(--paper) !important; }
.close-button { border: 1px solid var(--rule); background: none; height: 32px; width: 32px; font-size: 22px; line-height: 1; }
dialog h2 { margin: 12px 0; font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
dialog dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin: 0 0 16px; padding: 14px 0; border-block: 1px solid var(--rule); font-size: 13px; }
dialog dt { color: var(--ink-2); }
dialog dd { margin: 0; overflow-wrap: anywhere; }
#detail-description p { margin-bottom: 10px; }
#detail-source { margin-top: 12px; font-size: 13px; }
@media (max-width: 1240px) {
  .controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .controls > input { grid-column: span 2; }
  .control-actions { grid-column: span 2; justify-content: flex-end; }
  .chart-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
}
@media (max-width: 920px) {
  .masthead { flex-wrap: wrap; }
  .related-databases { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 740px) {
  .masthead { gap: 12px 18px; }
  .wordmark { flex-basis: auto; border-right: 0; padding-right: 0; }
  .wordmark img { width: 155px; }
  .masthead-title { flex: 1 0 54%; padding-right: 39px; }
  .rosette { width: 30px; height: 30px; }
  .callout-rosette { right: 0; width: 180px; height: 180px; opacity: .22; }
  .masthead h1 { font-size: 19px; }
  .kpi { padding-inline: 9px; }
  .kpi strong { font-size: clamp(17px, 4.7vw, 30px); }
  .chart-grid { grid-template-columns: 1fr; }
  .footer { flex-wrap: wrap; }
}
@media (max-width: 500px) {
  .shell { width: calc(100% - 30px); }
  .masthead-title { flex-basis: 100%; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 12px 0; }
  .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kpi strong { font-size: 27px; }
  .controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .controls > input { grid-column: span 3; }
  .control-actions { gap: 4px; }
  .control-button, .sort-label select, .filter summary { padding-inline: 6px; font-size: 12px; }
  .control-actions button { min-width: 0; }
  .filter:nth-child(3) .dropdown { left: auto; right: 0; }
  .section-heading { align-items: start; flex-wrap: wrap; }
  .callout { grid-template-columns: 1fr; row-gap: 12px; }
}

#detail-description { font-size: .95rem; }
#detail-fields dt { max-width: 160px; }
@media (max-width: 740px) {
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls > input { grid-column: 1 / -1; }
  .controls .control-actions { grid-column: auto; justify-content: end; }
  .filter:nth-child(even) .dropdown { left: auto; right: 0; }
  .filter:nth-child(3) .dropdown { left: 0; right: auto; }
}
@media (max-width: 430px) {
  .controls .control-actions { grid-column: 1 / -1; }
  .sort-label { grid-column: 1 / -1; }
}

.source-directory { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--rule); }
.source-directory summary { width: fit-content; font-size: 14px; font-weight: 600; }
.source-directory p { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.source-directory ul { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; }

.source-note { border-left: 2px solid var(--brass); padding: 6px 10px; color: var(--ink-2); }

/* ── Phone layout, matched to the Russia page (ncma.ru/) ── */
@media (max-width: 740px) {
  .controls .control-actions button { flex: 1; min-width: 0; }
  /* registry: one card per deal instead of a wide table */
  .table-scroll { overflow: visible; margin-top: 4px; }
  .deal-table, .deal-table tbody { display: block; width: 100%; min-width: 0 !important; }
  .deal-table colgroup, .deal-table thead { display: none; }
  .deal-table tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); cursor: pointer; }
  .deal-table tbody tr:hover { background: none; }
  .deal-table td { display: block; padding: 0; border: 0; }
  .deal-table td[data-empty] { display: none; }
  .deal-table td:nth-child(2) { order: 1; flex: 1 1 0; min-width: 45%; }
  .deal-table td:nth-child(7) { order: 2; flex: 0 1 auto; max-width: 50%; text-align: right; }
  /* zero-height line break: title and type on the first line, details below */
  .deal-table tbody tr::before { content: ""; order: 3; flex-basis: 100%; height: 0; }
  .deal-table td:nth-child(1), .deal-table td:nth-child(5), .deal-table td:nth-child(6), .deal-table td:nth-child(8), .deal-table td:nth-child(9) {
    order: 4; color: var(--ink-3); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; text-align: left;
  }
  .deal-table td:nth-child(3), .deal-table td:nth-child(4) { order: 5; flex-basis: 100%; color: var(--ink-2); font-size: 13px; }
  .deal-table td:nth-child(10) { order: 6; flex-basis: 100%; text-align: left; }
  .deal-table td[data-label]::before { content: attr(data-label); margin-right: 6px; color: var(--ink-3); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
  .deal-table td:nth-child(9)::before { content: attr(data-label) ":"; font-size: 11px; letter-spacing: .06em; }
  .deal-button { font-size: 16px; letter-spacing: -.02em; }
  .row-status { margin-top: 6px; }
}
@media (max-width: 500px) {
  /* every year fits the width instead of scrolling sideways */
  .year-bars { grid-template-columns: repeat(var(--year-count), minmax(0, 1fr)); gap: 2px; }
  .year-bucket { font-size: 9.5px; letter-spacing: 0; }
  .bar-area b { font-size: 10px; }
  .bar-area i { width: 100%; max-width: 26px; }
  .year-bucket[data-current=true] .year-extra { font-size: 8px; white-space: nowrap; align-self: flex-end; }
  /* heatmap shows all years, compact cells */
  .heat-table { table-layout: fixed; font-size: 10px; }
  .heat-table th { font-size: 9.5px; height: 20px; }
  .heat-table thead th:first-child { width: 92px; text-align: left; }
  .heat-table th[scope=row] { min-width: 0; width: 92px; padding: 3px 6px 3px 0; font-size: 10.5px; line-height: 1.2; }
  /* counts here reach three digits */
  .heat-tile { min-width: 0; min-height: 22px; padding: 2px 0; font-size: 9px; letter-spacing: -.03em; }
  .buyer-row { grid-template-columns: 20px minmax(0, 1fr) 28px; }
  /* page numbers wrap instead of running off the screen */
  .pagination > div { flex-wrap: wrap; justify-content: center; }
  .pagination button { min-width: 36px; height: 36px; }
}
