:root {
  --header-h: 72px;
  --pad: 28px;
  --radius: 18px;
  --btn-radius: 10px;
  --accent: #c99700;
  --accent-soft: rgba(201, 151, 0, 0.14);
  --accent-strong: #f5a623;
  --dollar: #f5c400;
  --bg: #ffffff;
  --header-bg: #ffffff;
  --border: rgba(17, 17, 17, 0.1);
  --border-strong: rgba(0, 0, 0, 0.18);
  --text: #171717;
  --muted: rgba(23, 23, 23, 0.58);
  --brand: #2f3338;
  --brand-tag: #8a9aab;
  --brand-divider: rgba(120, 135, 150, 0.45);
  --card: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f5f1;
  --surface-alt: #fbfaf8;
  --chip: #ffffff;
  --chip-active: #fff8e8;
  --badge-bg: #fff7e6;
  --badge-text: #9a6b00;
  --scroll-btn-bg: #fff8e8;
  --scroll-btn-border: rgba(201, 151, 0, 0.35);
  --scroll-btn-text: #9a6b00;
  --shadow: 0 10px 30px rgba(23, 23, 23, 0.06);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%239a6b00' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] {
  --accent: #e0b12a;
  --accent-soft: rgba(224, 177, 42, 0.18);
  --accent-strong: #f0c14d;
  --dollar: #ffd400;
  --bg: #121417;
  --header-bg: #121417;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #eceff3;
  --muted: rgba(236, 239, 243, 0.58);
  --brand: #f2f4f7;
  --brand-tag: #9aa8b8;
  --brand-divider: rgba(154, 168, 184, 0.45);
  --card: #121417;
  --surface: #121417;
  --surface-soft: #222831;
  --surface-alt: #1d232b;
  --chip: #222831;
  --chip-active: #2a2416;
  --badge-bg: rgba(224, 177, 42, 0.16);
  --badge-text: #f0c14d;
  --scroll-btn-bg: #2a2416;
  --scroll-btn-border: rgba(224, 177, 42, 0.4);
  --scroll-btn-text: #f0c14d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23f0c14d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html.theme-ready body,
html.theme-ready body::before,
html.theme-ready body * {
  transition:
    background-color 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    fill 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    stroke 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

html.theme-ready .theme-toggle__icon {
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.34, 1.3, 0.64, 1);
}

html,
body {
  height: 100%;
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--bg);
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
}

header {
  flex: 0 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--pad);
  border-bottom: 0;
  background: var(--header-bg);
  position: relative;
  z-index: 20;
  overflow: hidden;
  isolation: isolate;
}

.header-spacer {
  display: none;
  flex: 0 0 auto;
  height: var(--header-h);
  pointer-events: none;
}

@media (min-width: 561px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    box-sizing: border-box;
  }

  .header-spacer {
    display: block;
  }
}

/* Large screens: pull header content inward (align with wide country row) */
@media (min-width: 1400px) {
  header {
    padding-left: max(var(--pad), calc((100vw - 1480px) / 2));
    padding-right: max(var(--pad), calc((100vw - 1480px) / 2));
  }
}

main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px var(--pad) 56px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
}

.brand-lockup__mark {
  height: 28px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

.brand-lockup__text {
  fill: var(--brand);
}

.brand-lockup__dollar {
  fill: #fc0;
}

.brand-lockup__divider {
  width: 1px;
  height: 16px;
  background: var(--brand-divider);
  flex: 0 0 auto;
}

.brand-lockup__tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-tag);
  border-bottom: 0;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

.logo {
  height: 34px;
  width: auto;
  display: block;
}

.right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.theme-toggle {
  appearance: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
  line-height: 0;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  display: block;
  grid-area: 1 / 1;
  margin: auto;
}

.theme-toggle__icon--moon {
  width: 20px;
  height: 20px;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.45);
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.45);
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html.theme-ready body,
  html.theme-ready body::before,
  html.theme-ready body *:not(.po-modal):not(.po-modal *):not(.oc-modal):not(.oc-modal *),
  html.theme-ready .theme-toggle__icon {
    transition: none !important;
  }

  .panel-view,
  .panel-view.is-shown,
  .panel-view.is-fading,
  .panel-results,
  .panel-results.is-shown,
  .panel-results.is-fading {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .country-chip .chip-ripple {
    animation: none !important;
    display: none !important;
  }
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  margin-left: 16px;
  margin-right: 4px;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.download:hover {
  border-color: var(--border-strong);
}

.contacts__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.people {
  display: flex;
  align-items: center;
  gap: 8px;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.person__name {
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
}

.state {
  color: var(--muted);
  padding: 48px 0;
  text-align: center;
}

.page-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 52ch;
}

.panel {
  background: var(--card);
  border: 0;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: none;
  padding: 18px;
}

.panel-view,
.panel-results {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
  will-change: opacity, transform;
}

.panel-view.is-shown,
.panel-results.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.panel-view.is-fading,
.panel-results.is-fading {
  opacity: 0;
  transform: translateY(4px);
}

.country-scroller {
  /* Width follows the top chip row; centered under main content */
  --chip-gap: 10px;
  display: block;
  width: fit-content;
  max-width: calc(100vw - 2 * var(--pad));
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
  position: relative;
  left: auto;
  transform: none;
  box-sizing: border-box;
  padding: 0;
  overflow: visible;
}

.country-track {
  width: auto;
  max-width: 100%;
  overflow: visible;
  padding: 8px 0;
}

.country-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--chip-gap);
  width: max-content;
  max-width: 100%;
  overflow: visible;
  padding: 0;
  margin: 0 auto;
}

.country-row__line--top {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--chip-gap);
  width: max-content;
}

.country-row__line--top > .country-chip {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.country-row__line--bottom {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--chip-gap);
  box-sizing: border-box;
}

.country-row__line--bottom > .country-chip {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
  justify-content: center;
}

.country-row .country-chip__name,
.country-row .country-chip__meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

.scroll-btn {
  display: none;
}

.scroll-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.subcountry-row {
  display: none;
}

.country-chip {
  appearance: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--border);
  background: var(--chip);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  white-space: nowrap;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.country-chip:focus,
.country-chip:focus-visible {
  outline: none;
}

.country-chip > * {
  position: relative;
  z-index: 1;
}

.country-chip:hover {
  border-color: var(--border-strong);
}

.country-chip > .chip-ink {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.country-chip .chip-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(224, 177, 42, 0.35);
  transform: scale(0);
  animation: chip-ripple-out 0.7s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}

@keyframes chip-ripple-out {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.country-chip.is-active {
  border-color: rgba(201, 151, 0, 0.55);
  background: var(--chip-active);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.flag-img {
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  background: var(--surface-soft);
  flex: 0 0 auto;
  display: block;
}

.flag-img--sm {
  width: 22px;
  height: 16px;
  border-radius: 3px;
}

.flag-stack {
  --flag-w: 28px;
  --flag-shift-base: 8px;
  --flag-shift: var(--flag-shift-base);
  --flag-count: 1;
  position: relative;
  display: inline-block;
  /* Layout width stays collapsed so text never shifts. */
  width: calc(var(--flag-w) + (var(--flag-count) - 1) * var(--flag-shift-base));
  height: 21px;
  flex: 0 0 auto;
  vertical-align: middle;
  z-index: 2;
}

.flag-stack .flag-img {
  position: absolute;
  top: 0;
  /* Leftmost flag stays put; others fan right over the text. */
  left: calc(var(--i, 0) * var(--flag-shift));
  transition: left 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .country-chip:has(.flag-stack) {
    overflow: visible;
  }

  .country-chip:has(.flag-stack) .country-chip__name,
  .country-chip:has(.flag-stack) .country-chip__meta {
    position: relative;
    z-index: 1;
  }

  .country-chip:has(.flag-stack):hover .flag-stack,
  .country-chip:has(.flag-stack):focus-visible .flag-stack {
    --flag-shift: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flag-stack .flag-img {
    transition: none;
  }
}

.flag-fallback {
  font-size: 18px;
  line-height: 1;
}

.geo-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.country-chip--sub {
  background: var(--chip);
}

.country-chip__name {
  font-weight: 650;
  font-size: 14px;
}

.country-chip__meta {
  font-size: 12px;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  width: 100%;
}

.toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
  margin-left: 0;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.filter--search {
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 160px;
  max-width: none;
}

.filter--search .filter__search {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.market-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 16px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1.2;
}

.market-stat__label {
  font-size: 15px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0;
  line-height: inherit;
  text-transform: none;
}

.market-stat__value {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: inherit;
}

.market-stat__hint {
  font-size: 15px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0;
  line-height: inherit;
}

.market-stat--empty .market-stat__value {
  color: var(--muted);
  font-weight: 650;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.filter__label {
  font-weight: 600;
  white-space: nowrap;
}

.filter__search {
  appearance: none;
  height: 34px;
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.filter__search::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.filter__search:focus {
  outline: none;
  border-color: rgba(201, 151, 0, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter__select {
  appearance: none;
  display: inline-flex;
  align-items: center;
  height: 34px;
  min-width: 120px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.filter__select:focus {
  outline: none;
  border-color: rgba(201, 151, 0, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter__control {
  position: relative;
  min-width: 0;
}

.filter--custom.is-open .filter__select {
  border-color: rgba(201, 151, 0, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 100%;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.filter__menu[hidden] {
  display: none !important;
}

.filter__option {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.filter__option:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.filter__option.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 0;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent-strong);
}

.tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.copy-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--btn-radius);
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  min-width: 148px;
}

.copy-btn:hover {
  border-color: var(--border-strong);
}

.copy-btn__done {
  display: none;
  color: var(--accent-strong);
}

.copy-btn.is-copied .copy-btn__idle {
  display: none;
}

.copy-btn.is-copied .copy-btn__done {
  display: inline;
}

.copy-btn.is-copied {
  border-color: rgba(240, 193, 77, 0.45);
  background: var(--accent-soft);
}

.section {
  margin-top: 18px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.section__title--exclusive {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.lc-coin {
  --coin-size: 16px;
  --coin-depth: 3px;
  position: relative;
  display: inline-block;
  width: var(--coin-size);
  height: var(--coin-size);
  flex: 0 0 auto;
  perspective: 480px;
  cursor: inherit;
  user-select: none;
  vertical-align: -2px;
  z-index: 1;
  pointer-events: auto;
}

.lc-coin__scene {
  display: block;
  width: var(--coin-size);
  height: var(--coin-size);
  transform-style: preserve-3d;
  transform: rotateX(-18deg);
}

.lc-coin__spin {
  position: relative;
  display: block;
  width: var(--coin-size);
  height: var(--coin-size);
  transform-style: preserve-3d;
  will-change: transform;
}

.lc-coin__face {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--coin-size);
  height: var(--coin-size);
  box-sizing: border-box;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background:
    radial-gradient(circle at 30% 26%, #fff3bf 0%, #f0c14d 38%, #c99700 70%, #8a6a08 100%);
  border: 1.5px solid rgba(255, 225, 140, 0.85);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(90, 60, 0, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.35);
  color: #5a4000;
}

.lc-coin__face--front {
  transform: translateZ(calc(var(--coin-depth) / 2));
}

.lc-coin__face--back {
  transform: rotateY(180deg) translateZ(calc(var(--coin-depth) / 2));
}

.lc-coin__face svg {
  width: 46%;
  height: 62%;
  display: block;
  overflow: visible;
}

.lc-coin__rim {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--coin-size);
  height: var(--coin-size);
  border-radius: 50%;
  transform: translateZ(0);
  background: linear-gradient(
    115deg,
    #fff1b0 0%,
    #d4b14a 28%,
    #8a6500 52%,
    #d4b14a 76%,
    #fff1b0 100%
  );
  box-shadow: 0 0 0 1px rgba(120, 85, 0, 0.4);
}

.lc-coin__edge {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--coin-depth);
  height: var(--coin-size);
  margin-left: calc(var(--coin-depth) / -2);
  border-radius: 1px;
  background: linear-gradient(
    180deg,
    #ffe28a 0%,
    #c99700 28%,
    #6e5200 50%,
    #c99700 72%,
    #ffe28a 100%
  );
  transform: rotateY(90deg) translateZ(0);
}

.table-wrap {
  overflow: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
}

.offers-table--web,
.offers-table--mobile {
  /* Size columns to content; scroll instead of squashing → no overlaps. */
  width: max-content;
  min-width: 100%;
}

/* Fixed only where content is predictable; other cols hug text. */
.offers-table--web .col-offer,
.offers-table--mobile .col-offer { width: 200px; }
.offers-table--web .col-cabinet,
.offers-table--mobile .col-cabinet { width: 158px; }
.offers-table--web.offers-table--with-country .col-offer,
.offers-table--mobile.offers-table--with-country .col-offer { width: 190px; }

.offers-table--web .col-epc,
.offers-table--web .col-cr,
.offers-table--mobile .col-epc,
.offers-table--mobile .col-cr { width: 72px; }

/* Soft wrap off everywhere; payouts/traffic break only on comma → <br>. */
.offers-table td,
.offers-table th {
  white-space: nowrap;
}

.offers-table td.cell-payouts,
.offers-table td.cell-traffic {
  line-height: 1.35;
}

.offers-table td.cell-cabinet,
.offers-table th.th-cabinet {
  width: 158px;
  padding-left: 4px;
  padding-right: 10px;
}

.offer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.offer-title {
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}

.cabinet-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  position: sticky;
  top: 0;
}

tr:last-child td {
  border-bottom: 0;
}

tr:nth-child(odd) td {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}

tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface-alt) 90%, transparent);
}

.offer-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: transparent;
  border: 0;
  flex: 0 0 auto;
}

.th-cabinet {
  width: 1%;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared primary CTA — same look as Continue to cabinet */
.btn-primary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--btn-radius);
  padding: 10px 14px;
  background: linear-gradient(180deg, #f0d57a, #d4b14a);
  color: #1a1406;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(212, 177, 74, 0.22);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
  filter: none;
}

.cabinet-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--btn-radius);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

/* Previous exclusive look: gold outline + soft gold gradient fill */
.cabinet-btn--exclusive {
  border: 1px solid rgba(201, 151, 0, 0.38);
  background: linear-gradient(180deg, rgba(201, 151, 0, 0.12), rgba(201, 151, 0, 0.04));
  color: var(--badge-text);
}

.cabinet-btn--exclusive:hover {
  border-color: rgba(201, 151, 0, 0.58);
  background: linear-gradient(180deg, rgba(201, 151, 0, 0.18), rgba(201, 151, 0, 0.08));
}

html[data-theme="dark"] .cabinet-btn--exclusive {
  border-color: rgba(224, 177, 42, 0.45);
  background: linear-gradient(180deg, rgba(224, 177, 42, 0.14), rgba(224, 177, 42, 0.05));
  color: #f0c14d;
}

html[data-theme="dark"] .cabinet-btn--exclusive:hover {
  border-color: rgba(224, 177, 42, 0.65);
  background: linear-gradient(180deg, rgba(224, 177, 42, 0.2), rgba(224, 177, 42, 0.08));
}

/* Same gradient treatment in grey for non-exclusive */
.cabinet-btn--muted {
  border: 1px solid rgba(120, 130, 145, 0.35);
  background: linear-gradient(180deg, rgba(120, 130, 145, 0.14), rgba(120, 130, 145, 0.04));
  color: rgba(23, 23, 23, 0.55);
}

.cabinet-btn--muted:hover {
  border-color: rgba(120, 130, 145, 0.55);
  background: linear-gradient(180deg, rgba(120, 130, 145, 0.2), rgba(120, 130, 145, 0.08));
  color: rgba(23, 23, 23, 0.78);
}

html[data-theme="dark"] .cabinet-btn--muted {
  border-color: rgba(170, 180, 195, 0.28);
  background: linear-gradient(180deg, rgba(170, 180, 195, 0.14), rgba(170, 180, 195, 0.04));
  color: rgba(236, 239, 243, 0.55);
}

html[data-theme="dark"] .cabinet-btn--muted:hover {
  border-color: rgba(170, 180, 195, 0.45);
  background: linear-gradient(180deg, rgba(170, 180, 195, 0.2), rgba(170, 180, 195, 0.08));
  color: rgba(236, 239, 243, 0.82);
}

.cabinet-btn__icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.offer-link {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.offer-link:hover {
  text-decoration: underline;
}

.cell-dash {
  display: inline-block;
  width: 12px;
  height: 2px;
  background: currentColor;
  opacity: 0.45;
  vertical-align: middle;
  border-radius: 1px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty--request {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
}

.empty__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.empty__text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 420px;
}

.request-offer-btn {
  margin-top: 8px;
  min-width: 180px;
  min-height: 42px;
  padding: 0 20px;
  font-size: 14px;
}

.request-offer-btn:hover {
  filter: brightness(1.05);
}

.request-offer-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.request-offer-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(100%, 320px);
  text-align: left;
}

.request-offer-field__label {
  font-size: 12px;
  color: var(--muted);
}

.request-offer-field__input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.request-offer-field__input:focus {
  outline: none;
  border-color: rgba(201, 151, 0, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.request-offer-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.request-offer-status {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.request-offer-status.is-ok {
  color: var(--accent-strong);
}

.request-offer-status.is-error {
  color: #e57373;
}

.private-offers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 20px 22px;
  border: 0;
  background: transparent;
  border-radius: 0 0 var(--radius) var(--radius);
}

.private-offers__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.private-offers__text {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 520px;
}

.private-offers__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 200px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}

.private-offers__btn:hover {
  border-color: rgba(201, 151, 0, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
  filter: none;
}

.private-offers__person:hover {
  border-color: rgba(201, 151, 0, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

body.po-modal-open,
body.oc-modal-open {
  overflow: hidden;
}

.oc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.oc-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: po-modal-fade-in 0.35s ease both;
}

.oc-modal.is-closing {
  animation: po-modal-fade-out 0.28s ease both;
}

.oc-modal[hidden] {
  display: none !important;
}

.oc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.62);
  backdrop-filter: blur(4px);
}

.oc-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 22px 22px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--text);
}

.oc-modal.is-open .oc-modal__dialog {
  animation: po-modal-dialog-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.oc-modal.is-closing .oc-modal__dialog {
  animation: po-modal-dialog-out 0.28s ease both;
}

.oc-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.oc-modal__close:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.oc-modal__head {
  padding-right: 28px;
  margin-bottom: 14px;
}

.oc-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.oc-modal__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.oc-modal__info {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(91, 140, 255, 0.22);
  background: rgba(91, 140, 255, 0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.oc-modal__info strong {
  font-weight: 700;
}

.oc-modal__steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.oc-modal__steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.oc-modal__steps span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--badge-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex: 0 0 auto;
}

.oc-modal__hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.oc-modal__actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.oc-modal__cancel {
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.oc-modal__cancel:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.oc-modal__continue {
  min-height: 40px;
  padding: 10px 14px;
  font-size: 13px;
}

.oc-modal__continue:hover {
  filter: brightness(1.04);
}

.po-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.po-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: po-modal-fade-in 0.35s ease both;
}

.po-modal.is-closing {
  animation: po-modal-fade-out 0.28s ease both;
}

.po-modal[hidden] {
  display: none !important;
}

.po-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.po-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 24px 22px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(24px) scale(0.94);
}

.po-modal.is-open .po-modal__dialog {
  animation: po-modal-dialog-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.po-modal.is-closing .po-modal__dialog {
  animation: po-modal-dialog-out 0.28s ease both;
}

@keyframes po-modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes po-modal-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes po-modal-dialog-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes po-modal-dialog-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}

@keyframes po-modal-sheet-in {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes po-modal-sheet-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(40px);
  }
}

.po-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.po-modal__close:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.po-modal__title {
  margin: 0 28px 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.po-modal__text {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.po-modal__managers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.po-modal__managers .private-offers__person {
  width: 100%;
  justify-content: flex-start;
  box-sizing: border-box;
}

.po-modal__managers .person__name {
  display: inline;
}

.po-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.po-modal__divider::before,
.po-modal__divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

.po-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.po-modal__form .request-offer-field {
  width: 100%;
}

.request-offer-field__textarea {
  width: 100%;
  min-height: 84px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
}

.request-offer-field__textarea:focus {
  outline: none;
  border-color: rgba(201, 151, 0, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.po-modal__submit {
  width: 100%;
  margin-top: 2px;
}

@media (max-width: 960px) {
  .toolbar-controls {
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .toolbar-right {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
    gap: 8px;
  }

  .filters {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex: none;
  }

  .filter--search {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    flex: none;
    max-width: none;
  }

  .filter {
    min-width: 0;
    width: 100%;
  }

  .filter__label {
    display: none;
  }

  .filter__select,
  .filter__search,
  .filter__control {
    width: 100%;
    min-width: 0;
  }

  .toolbar-right .copy-btn {
    width: 100%;
    flex: none;
  }
}

@media (max-width: 560px) {
  header {
    height: auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 10px 16px;
    row-gap: 8px;
    column-gap: 12px;
    position: relative;
    top: auto;
  }

  .brand {
    flex: 1 1 100%;
  }

  .right {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }

  .download {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    margin: 4px 0 0;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .person {
    padding: 0;
    border: none;
    background: transparent;
  }

  .avatar {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    padding: 2px;
    background: var(--surface);
  }

  .person__name {
    display: none;
  }

  main {
    padding: 12px 0 32px;
  }

  .tabs-row {
    gap: 8px;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .tab {
    padding: 12px 10px;
  }

  .tab:first-child {
    padding-left: 0;
  }

  .market-stat {
    padding: 0;
    font-size: 14px;
    justify-content: flex-end;
    text-align: right;
  }

  .market-stat__label,
  .market-stat__value,
  .market-stat__hint {
    font-size: 14px;
  }

  .toolbar {
    justify-content: flex-start;
    margin-bottom: 8px;
  }

  .country-scroller {
    display: block;
    width: 100%;
    max-width: none;
    left: auto;
    transform: none;
    margin: 0 0 8px;
    padding: 0 4px;
    box-sizing: border-box;
  }

  .country-scroller .scroll-btn {
    display: none !important;
  }

  .country-track {
    width: 100% !important;
    max-width: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .country-track::-webkit-scrollbar {
    display: none;
  }

  .country-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: none;
    min-width: 0;
    overflow: visible;
    padding: 0;
  }

  .country-row__line {
    display: contents;
  }

  .country-row__line > .country-chip {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    justify-content: flex-start;
  }

  .scroll-btn {
    display: none;
  }

  .toolbar,
  .section h2,
  .private-offers {
    padding-left: 12px;
    padding-right: 12px;
  }

  .private-offers {
    margin-top: 20px;
    border-radius: 0;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .private-offers__text {
    max-width: none;
  }

  .private-offers__btn {
    width: 100%;
  }

  .po-modal {
    padding: 16px;
    align-items: flex-end;
  }

  .po-modal__dialog {
    width: 100%;
    border-radius: 16px 16px 12px 12px;
    transform: translateY(40px) scale(1);
  }

  .po-modal.is-open .po-modal__dialog {
    animation-name: po-modal-sheet-in;
  }

  .po-modal.is-closing .po-modal__dialog {
    animation-name: po-modal-sheet-out;
  }

  .oc-modal {
    padding: 16px;
    align-items: flex-end;
  }

  .oc-modal__dialog {
    width: 100%;
    border-radius: 16px 16px 12px 12px;
    transform: translateY(40px) scale(1);
  }

  .oc-modal.is-open .oc-modal__dialog {
    animation-name: po-modal-sheet-in;
  }

  .oc-modal.is-closing .oc-modal__dialog {
    animation-name: po-modal-sheet-out;
  }

  .cabinet-btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .po-modal__managers {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    margin-top: 16px;
  }

  .section h2 {
    margin-bottom: 8px;
  }

  .page-title {
    font-size: 24px;
  }

  .brand-lockup {
    gap: 8px;
  }

  .brand-lockup__mark {
    height: 24px;
  }

  .brand-lockup__tag {
    font-size: 9px;
  }

  .brand-lockup__divider {
    height: 14px;
  }

  .panel {
    padding: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .table-wrap {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .country-chip__meta {
    display: none;
  }
}
