:root {
  color-scheme: dark;
  --bg: #05060f;
  --bg-2: #080a18;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --panel-solid: #0c0f20;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eceffb;
  --muted: #9298ba;
  --faint: #646a8a;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #e879f9;
  --ok: #34e3b0;
  --warn: #f8c45c;
  --danger: #ff7185;
  --grad: linear-gradient(100deg, #38bdf8 0%, #818cf8 48%, #c084fc 100%);
  --grad-soft: linear-gradient(100deg, rgba(56, 189, 248, 0.14), rgba(192, 132, 252, 0.14));
  --radius: 16px;
  --radius-lg: 22px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Manrope", var(--font);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  background: rgba(129, 140, 248, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.46;
  background-image:
    linear-gradient(rgba(129, 140, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  opacity: 0.54;
  filter: blur(2px);
}

.aurora--1 {
  width: 58vw;
  height: 58vw;
  left: -18vw;
  top: -22vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3), transparent 62%);
}

.aurora--2 {
  width: 54vw;
  height: 54vw;
  right: -16vw;
  top: 8vh;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.26), transparent 62%);
}

.aurora--3 {
  width: 48vw;
  height: 48vw;
  left: 25vw;
  bottom: -30vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 62%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 15, 0.74);
  box-shadow: 0 14px 44px -34px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar-inner {
  width: min(1440px, calc(100% - 48px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  overflow: visible;
}

.brand-ring {
  fill: none;
  stroke: url("#brand-gradient");
  stroke: #818cf8;
  stroke-width: 1.35;
  transform-origin: 20px 20px;
  transition: stroke 0.25s, transform 0.5s ease;
}

.brand-ring:nth-child(2) {
  stroke: var(--cyan);
}

.brand-ring--faint {
  stroke: rgba(192, 132, 252, 0.45);
}

.brand-core {
  fill: #fff;
  filter: drop-shadow(0 0 5px rgba(129, 140, 248, 0.9));
}

.brand:hover .brand-ring:first-child {
  transform: rotate(16deg);
}

.brand:hover .brand-ring:nth-child(2) {
  transform: rotate(-16deg);
}

.brand-name {
  color: var(--muted);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-name b {
  color: var(--text);
  font-weight: 800;
}

.topnav {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 28px;
}

.topnav a {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.25s;
}

.topnav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transform: scaleX(0.2);
  transition: opacity 0.25s, transform 0.3s ease;
}

.topnav a:hover,
.topnav a.active {
  color: var(--text);
}

.topnav a:hover::after,
.topnav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-full {
  margin-right: 0.3em;
}

main {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 72px;
}

.heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

h1 {
  font-family: var(--display);
  font-size: clamp(34px, 4.2vw, 58px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.grad-text {
  background: var(--grad);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.heading-lead {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

.heading-count {
  color: #828bb0;
  font-weight: 400;
}

#as-of {
  margin-top: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.source-link {
  flex: none;
  margin-bottom: 3px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.source-link span {
  margin-left: 5px;
  color: var(--cyan);
}

.source-link:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.07);
  color: var(--text);
}

.kpis {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.kpis--totals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpis > div {
  position: relative;
  min-height: 116px;
  padding: 22px 22px 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(260px circle at 0 0, rgba(129, 140, 248, 0.11), transparent 62%),
    var(--panel);
  box-shadow: 0 24px 70px -48px rgba(59, 130, 246, 0.75);
  transition: border-color 0.3s, background 0.3s, transform 0.3s ease;
}

.kpis > div::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 0;
  left: 22px;
  height: 1px;
  background: var(--grad);
  opacity: 0.48;
}

.kpis > div:hover {
  border-color: var(--line-2);
  background:
    radial-gradient(300px circle at 0 0, rgba(129, 140, 248, 0.16), transparent 62%),
    var(--panel-2);
  transform: translateY(-2px);
}

.kpis strong {
  display: block;
  background: var(--grad);
  color: transparent;
  font-family: var(--display);
  font-size: clamp(27px, 2.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  -webkit-background-clip: text;
  background-clip: text;
}

.kpis span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.period-strip {
  min-height: 42px;
  margin-bottom: 14px;
  padding-bottom: 2px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.period-strip button {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s;
}

.period-strip button {
  padding: 0 16px;
}

.period-strip button:hover {
  border-color: rgba(129, 140, 248, 0.5);
  background: var(--panel-2);
  color: var(--text);
}

.period-strip button.active {
  border-color: transparent;
  background: var(--grad);
  box-shadow: 0 12px 32px -16px rgba(99, 102, 241, 0.9);
  color: #06080f;
  font-weight: 700;
}

.toolbar {
  min-height: 48px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.period-picker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.period-picker select {
  min-width: 160px;
  height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: #0d1130;
  color: var(--text);
  cursor: pointer;
}

.period-picker select:focus {
  border-color: rgba(129, 140, 248, 0.7);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.09);
}

.period-picker option {
  background: #0d1130;
  color: var(--text);
}

.search {
  width: min(460px, 100%);
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 10, 24, 0.72);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.search:focus-within {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(12, 15, 32, 0.92);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07);
}

.search span {
  color: var(--cyan);
  font-size: 17px;
  line-height: 1;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search input::placeholder {
  color: var(--faint);
}

.error {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 113, 133, 0.28);
  border-radius: 14px;
  background: rgba(255, 113, 133, 0.08);
  color: #ffc3cd;
}

.table-wrap {
  position: relative;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(8, 10, 24, 0.82);
  box-shadow: 0 32px 90px -54px rgba(0, 0, 0, 0.95);
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
}

th,
td {
  height: 54px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(13, 16, 35, 0.98);
  color: #9da5cd;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: default;
}

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th[data-sort]:hover {
  color: var(--cyan);
}

th[data-sort] .sort-heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

th[data-sort].number .sort-heading {
  width: 100%;
  justify-content: flex-end;
}

.sort-indicator {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  color: #4f577d;
  line-height: 0.65;
}

.sort-caret {
  font-size: 7px;
  transition: color 0.2s;
}

th[data-sort]:hover .sort-caret {
  color: #7b85ad;
}

.sort-caret.is-active,
th[data-sort]:hover .sort-caret.is-active {
  color: var(--cyan);
}

tbody tr {
  transition: background 0.2s;
}

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

tbody tr:hover {
  background: rgba(129, 140, 248, 0.055);
}

.rank {
  width: 56px;
  color: #aab3e9;
  text-align: center;
}

th.rank .sort-heading {
  width: 100%;
  justify-content: center;
}

.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.number.mono {
  font-family: inherit;
  font-size: inherit;
}

.name-button {
  max-width: 330px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.name-button:hover {
  color: var(--cyan);
}

.legal {
  max-width: 330px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
}

.site {
  display: block;
  max-width: 180px;
  overflow: hidden;
  color: var(--cyan);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.positive {
  color: var(--ok);
}

.negative {
  color: var(--danger);
}

.badge {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(248, 196, 92, 0.35);
  border-radius: 999px;
  background: rgba(248, 196, 92, 0.07);
  color: var(--warn);
  font-size: 9px;
  font-weight: 700;
}

.loading,
.empty {
  height: 140px;
  color: var(--muted);
  text-align: center;
}

.mobile-rating {
  display: none;
}

dialog {
  width: min(860px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 40px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background:
    radial-gradient(560px circle at 15% 0, rgba(129, 140, 248, 0.13), transparent 62%),
    var(--panel-solid);
  box-shadow: 0 34px 120px -24px rgba(0, 0, 0, 0.95);
  color: var(--text);
}

dialog::backdrop {
  background: rgba(2, 3, 9, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-head {
  min-height: 94px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-head h2 {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 800;
}

.dialog-head p {
  max-width: 690px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.close {
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.close:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.detail-meta > div {
  min-height: 78px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.detail-meta > div:last-child {
  border-right: 0;
}

.detail-meta strong,
.detail-meta span,
.detail-financial > div span,
.detail-financial > div strong {
  display: block;
}

.detail-meta strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
}

.detail-meta span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.detail-financial {
  min-height: 86px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 26px;
  background: var(--grad-soft);
}

.detail-financial > div span {
  color: var(--muted);
  font-size: 10px;
}

.detail-financial > div strong {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 14px;
}

.detail-financial p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.detail-financial a {
  color: var(--cyan);
}

.detail-columns {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
}

.detail-columns section {
  padding: 21px 24px 25px;
}

.detail-columns section + section {
  border-left: 1px solid var(--line);
}

.detail-columns h3 {
  margin-bottom: 11px;
  color: var(--text);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
}

.detail-list > div {
  min-height: 36px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list span:last-child {
  flex: none;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
}

html.embedded,
html.embedded body {
  min-height: 0;
}

html.embedded .topbar,
html.embedded .bg-grid,
html.embedded .bg-aurora {
  display: none;
}

html.embedded main {
  width: 100%;
  max-width: none;
  padding: 24px;
}

html.embedded .heading {
  align-items: start;
  margin-bottom: 24px;
}

html.embedded .heading h1 {
  color: #fff;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}

html.embedded .heading-lead {
  margin-top: 4px;
}

html.embedded .source-link {
  margin-top: 4px;
}

html.embedded .kpis {
  margin-bottom: 18px;
}

html.embedded .kpis > div {
  min-height: 96px;
  padding: 16px 20px;
  border-color: #1d2350;
  border-radius: 14px;
  background: #0d1130;
  box-shadow: none;
}

html.embedded .kpis > div::after {
  display: none;
}

html.embedded .kpis strong {
  font-size: 26px;
}

html.embedded .kpis span {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

html.embedded .table-wrap,
html.embedded .mobile-card {
  border-color: #1d2350;
  background: #0d1130;
  box-shadow: none;
}

html.embedded th {
  background: #0a0d20;
  color: #8b94bd;
}

@media (max-width: 900px) {
  .topbar-inner,
  main {
    width: calc(100% - 32px);
  }

  .heading {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    width: calc(100% - 24px);
    min-height: 60px;
    gap: 15px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 15px;
  }

  .topnav {
    margin-left: auto;
    gap: 14px;
  }

  .topnav a {
    font-size: 11px;
  }

  main {
    width: calc(100% - 24px);
    padding: 32px 0 48px;
  }

  .heading {
    margin-bottom: 24px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 10px;
  }

  h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .heading-lead {
    margin-top: 11px;
    font-size: 14px;
  }

  #as-of {
    max-width: 40ch;
    line-height: 1.65;
  }

  .source-link {
    margin-top: -4px;
  }

  .kpis {
    gap: 9px;
    margin-bottom: 22px;
  }

  .kpis > div {
    min-height: 94px;
    padding: 17px 15px 15px;
    border-radius: 18px;
  }

  .kpis > div::after {
    right: 15px;
    left: 15px;
  }

  .kpis strong {
    font-size: 27px;
  }

  .kpis span {
    margin-top: 8px;
    font-size: 10px;
    line-height: 1.35;
  }

  .period-strip {
    margin-right: -12px;
    padding-right: 12px;
  }

  .period-strip button {
    padding: 0 14px;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .search {
    width: 100%;
  }

  .period-picker {
    width: 100%;
  }

  .period-picker select {
    flex: 1;
    min-width: 0;
  }

  .table-wrap {
    display: none;
  }

  .mobile-rating {
    display: grid;
    gap: 10px;
  }

  .mobile-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
      radial-gradient(260px circle at 0 0, rgba(129, 140, 248, 0.09), transparent 62%),
      rgba(8, 10, 24, 0.78);
    box-shadow: 0 24px 60px -46px rgba(59, 130, 246, 0.7);
  }

  html.embedded main {
    width: 100%;
    padding: 20px 12px 48px;
  }

  html.embedded .heading {
    margin-bottom: 20px;
  }

  html.embedded .heading > div {
    width: 100%;
    min-width: 0;
  }

  html.embedded .heading h1 {
    max-width: 100%;
    font-size: clamp(28px, 8.5vw, 40px);
  }

  html.embedded .heading-lead {
    font-size: 16px;
    line-height: 1.45;
  }

  html.embedded .source-link {
    display: none;
  }

  html.embedded .kpis {
    gap: 14px;
  }

  html.embedded .kpis > div {
    min-height: 96px;
    padding: 16px 20px;
    border-radius: 14px;
  }

  .mobile-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
  }

  .mobile-head .name-button {
    max-width: 100%;
    font-size: 14px;
  }

  .mobile-head .legal {
    max-width: 100%;
  }

  .mobile-metrics {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-metrics div,
  .mobile-financial div {
    min-width: 0;
  }

  .mobile-metrics strong,
  .mobile-metrics span,
  .mobile-financial span,
  .mobile-financial strong {
    display: block;
  }

  .mobile-metrics strong {
    font-family: var(--display);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
  }

  .mobile-metrics span,
  .mobile-financial span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
  }

  .mobile-financial {
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
  }

  .mobile-financial strong {
    margin-top: 3px;
    overflow: hidden;
    font-family: var(--mono);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-foot {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 10px;
  }

  .detail-meta {
    grid-template-columns: 1fr 1fr;
  }

  .detail-meta > div:nth-child(2) {
    border-right: 0;
  }

  .detail-meta > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .detail-financial,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .detail-columns section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 430px) {
  .brand-name {
    font-size: 14px;
  }

  .topnav {
    width: 100%;
    justify-content: flex-end;
  }

  .nav-full {
    display: none;
  }

  .kpis strong {
    font-size: 24px;
  }
}

@media (max-width: 350px) {
  .brand-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Full special-depositary card */
.entity-page {
  width: min(1440px, calc(100% - 48px));
  padding-top: 34px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s;
}

.back-link:hover,
.entity-kv a,
.source-cell a {
  color: var(--cyan);
}

.entity-heading {
  margin-bottom: 27px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.entity-heading h1 {
  max-width: 1000px;
  font-size: clamp(30px, 3.6vw, 50px);
}

.entity-badges {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entity-badge,
.file-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.entity-badge--ok,
.status-ok {
  border-color: rgba(52, 227, 176, 0.28);
  background: rgba(52, 227, 176, 0.08);
  color: var(--ok);
}

.entity-badge--warn,
.status-warn {
  border-color: rgba(248, 196, 92, 0.28);
  background: rgba(248, 196, 92, 0.08);
  color: var(--warn);
}

.status-bad {
  border-color: rgba(255, 113, 133, 0.28);
  background: rgba(255, 113, 133, 0.08);
  color: var(--danger);
}

.entity-switch {
  max-width: 440px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.entity-switch a,
.table-controls button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.entity-switch a:hover,
.table-controls button:hover {
  border-color: rgba(34, 211, 238, 0.38);
  color: var(--cyan);
}

.detail-kpis {
  margin: 27px 0 15px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.detail-kpis > div {
  min-height: 112px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.detail-kpis strong,
.detail-kpis span {
  display: block;
}

.detail-kpis strong {
  font-family: var(--display);
  font-size: 28px;
}

.detail-kpis span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.entity-card-grid {
  margin-bottom: 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.entity-card,
.entity-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(8, 10, 24, 0.78);
  box-shadow: 0 28px 76px -58px rgba(0, 0, 0, 0.95);
}

.entity-card {
  padding: 23px;
}

.entity-card h2,
.section-heading h2 {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.015em;
}

.entity-card h2 span {
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
}

.entity-kv {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px 18px;
}

.entity-kv dt {
  color: var(--muted);
  font-size: 11px;
}

.entity-kv dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
}

.entity-section {
  margin-top: 18px;
  overflow: hidden;
}

.section-heading {
  min-height: 78px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.section-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.entity-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.entity-table-wrap table {
  min-width: 760px;
}

.entity-list-table {
  min-width: 820px !important;
}

.entity-ofr {
  min-width: 980px !important;
}

.entity-ofr th:first-child {
  min-width: 430px;
  text-align: left;
}

.entity-ofr th:not(:first-child) {
  min-width: 105px;
}

.entity-ofr th small {
  margin-top: 2px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  text-transform: none;
}

.entity-ofr td:first-child {
  font-size: 11px;
}

.entity-ofr td:first-child > span {
  width: 28px;
  display: inline-block;
  color: var(--faint);
}

.entity-ofr .ofr-sub {
  padding-left: 28px;
  color: var(--muted);
}

.entity-ofr .ofr-section td {
  height: 36px;
  background: rgba(129, 140, 248, 0.07);
  color: #b7bee3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.entity-ofr .ofr-total td {
  border-top: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.022);
  font-weight: 700;
}

.entity-ofr .annual-cell {
  background: rgba(129, 140, 248, 0.055);
}

.full-report-section .report-period-strip {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.report-period-strip button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.report-period-strip button small {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.report-form-controls {
  min-height: 68px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.report-form-controls label {
  min-width: min(520px, 48vw);
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.report-form-controls select {
  width: 100%;
  min-height: 40px;
  padding: 8px 34px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: 600 11px/1.3 var(--font);
}

.report-form-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 10px;
}

.report-form-meta a {
  color: var(--cyan);
  font-weight: 650;
}

.full-report-table th:first-child {
  min-width: 72px;
}

.full-report-table th:nth-child(2) {
  min-width: 430px;
  text-align: left;
}

.full-report-table th:nth-child(n+3) {
  min-width: 126px;
}

.full-report-table td:nth-child(2) {
  color: #d8dcf1;
  font-size: 11px;
}

.full-report-table .report-row-code {
  color: var(--muted);
}

.full-report-table .primary-value {
  background: rgba(34, 211, 238, 0.055);
  color: #ecfeff;
  font-weight: 700;
}

.row-provenance {
  margin-top: 4px;
  display: block;
  color: var(--faint);
  font: 500 8px/1.3 var(--mono);
}

.muted-cell {
  color: var(--faint);
}

.entity-note {
  min-height: 36px;
  padding: 10px 18px;
  color: var(--faint);
  font-size: 10px;
}

.source-cell {
  max-width: 580px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.companies-list {
  padding: 0 16px 16px;
}

.service-company {
  border-bottom: 1px solid var(--line);
}

.service-company:last-child {
  border-bottom: 0;
}

.service-company summary {
  min-height: 58px;
  padding: 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
}

.service-company summary::-webkit-details-marker {
  display: none;
}

.service-company summary::before {
  content: "›";
  flex: none;
  color: var(--cyan);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s;
}

.service-company[open] summary::before {
  transform: rotate(90deg);
}

.service-company summary > span {
  margin-right: auto;
  font-weight: 650;
}

.service-company summary strong {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.service-company .entity-table-wrap {
  margin: 0 8px 14px 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.funds-table {
  min-width: 720px !important;
}

.funds-table th,
.funds-table td,
.entity-list-table th,
.entity-list-table td {
  height: 46px;
}

@media (max-width: 760px) {
  .entity-page {
    width: min(100% - 24px, 1440px);
    padding-top: 25px;
  }

  .entity-heading {
    align-items: start;
    flex-direction: column;
  }

  .entity-switch {
    max-width: none;
    justify-content: flex-start;
  }

  .detail-kpis,
  .entity-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-kpis > div {
    min-height: 96px;
    padding: 17px;
  }

  .detail-kpis strong {
    font-size: 23px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-controls {
    justify-content: flex-start;
  }

  .report-form-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .report-form-controls label {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .report-form-meta {
    justify-content: flex-start;
  }
}

/* Same-page entity card, aligned with the management-company rating UX. */
.entity-row {
  cursor: pointer;
}

.entity-row:focus-within {
  outline: 1px solid rgba(96, 165, 250, 0.55);
  outline-offset: -1px;
}

html.dialog-open {
  overflow: hidden;
}

.card-dialog {
  width: min(1480px, calc(100vw - 32px));
  max-width: none;
  height: min(940px, calc(100vh - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(122, 132, 255, 0.25);
  border-radius: 20px;
  background: #070914;
  color: var(--text);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.72);
}

.card-dialog::backdrop {
  background: rgba(2, 3, 10, 0.78);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.card-dialog-shell {
  height: 100%;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}

.card-dialog-head {
  padding: 0 12px 0 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 11, 25, 0.96);
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.card-dialog-head .close {
  position: static;
}

#detail-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #05060f;
}

body.embedded .topbar,
body.embedded .back-link {
  display: none;
}

body.embedded .entity-page {
  width: min(1440px, calc(100% - 36px));
  padding-top: 22px;
}

@media (max-width: 760px) {
  .card-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .card-dialog-shell {
    grid-template-rows: 46px minmax(0, 1fr);
  }

  body.embedded .entity-page {
    width: calc(100% - 24px);
    padding-top: 18px;
  }
}

@media (max-width: 480px) {
  .detail-kpis,
  .entity-card-grid {
    grid-template-columns: 1fr;
  }

  .entity-kv {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .entity-kv dd {
    margin-bottom: 8px;
    text-align: left;
  }
}

/* Card parity with the management-company benchmark. */
.entity-page {
  width: min(1280px, calc(100% - 52px));
  padding-top: 24px;
}

.entity-heading {
  margin-bottom: 18px;
  display: block;
}

.entity-title-block h1 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: clamp(28px, 4vw, 40px);
}

.entity-title-block .heading-lead {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.entity-rank {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font: 700 11px/1 var(--mono);
}

.entity-switch,
.entity-badges {
  max-width: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.entity-switch a {
  min-height: 26px;
  padding: 5px 11px;
  border-color: var(--violet);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--text);
  font: 600 11px/1.25 var(--mono);
}

.entity-badge,
.file-status {
  min-height: 22px;
  padding: 3px 9px;
  font-family: var(--mono);
}

.entity-badge--verified {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
}

#periods {
  margin: 14px 0 18px;
}

.entity-card-grid {
  margin: 18px 0;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.entity-card,
.entity-section-card {
  border: 1px solid #1d2350;
  border-radius: 16px;
  background: #0d1130;
  box-shadow: none;
}

.entity-card {
  padding: 24px 26px;
}

.entity-card h2 {
  font-size: 20px;
}

.entity-kv {
  margin-top: 16px;
  grid-template-columns: minmax(150px, 0.78fr) minmax(0, 1.22fr);
  gap: 9px 18px;
}

.entity-kv dt {
  font-size: 12px;
}

.entity-kv dd {
  color: var(--text);
  text-align: left;
  font-family: var(--font);
  font-size: 13px;
}

.entity-kv dd.mono,
.entity-kv dd .mono {
  font-family: var(--mono);
}

.verification-card {
  margin: 16px 0 0;
  border-left: 4px solid var(--ok);
}

.verification-card h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.verification-date {
  color: var(--muted);
  font: 500 12px/1.4 var(--font);
}

.verification-card p {
  margin-top: 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.entity-report-block {
  margin-top: 34px;
}

.entity-report-block > .section-heading {
  min-height: 0;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  align-items: end;
}

.entity-report-block > .section-heading h2 {
  font-size: 24px;
}

.entity-report-block > .section-heading h2 span {
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.82em;
  font-weight: 500;
}

.entity-report-block > .section-heading p {
  font: 600 12px/1.4 var(--mono);
}

.entity-section-card {
  overflow: hidden;
}

.entity-section-card .entity-table-wrap {
  margin: 0;
}

.entity-table-wrap table {
  font-size: 12px;
}

.entity-table-wrap thead th {
  height: 48px;
  padding: 10px 12px;
  background: #0a0d20;
  color: var(--muted);
  font: 600 10px/1.35 var(--mono);
  letter-spacing: 0.03em;
}

.entity-table-wrap tbody td {
  height: 45px;
  padding: 9px 12px;
  border-bottom-color: #1d2350;
}

.entity-ofr th:first-child,
.entity-ofr td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #0d1130;
}

.entity-ofr thead th:first-child {
  z-index: 2;
  background: #0a0d20;
}

.entity-ofr th:first-child {
  min-width: 300px;
}

.entity-ofr th:not(:first-child) {
  min-width: 76px;
}

.entity-ofr .annual-cell {
  background: rgba(129, 140, 248, 0.09);
}

.entity-ofr thead .annual-cell {
  background: #10173a;
  color: var(--violet);
}

.full-report-table th:first-child {
  min-width: 64px;
}

.full-report-table th:nth-child(2) {
  min-width: 360px;
}

.full-report-table td:nth-child(2) {
  background: #0d1130;
}

.full-report-section .report-period-strip {
  margin: 0;
}

.report-form-controls {
  background: #0d1130;
}

.full-report-details {
  border-top: 1px solid #1d2350;
  background: #0a0d24;
}

.full-report-details > summary {
  min-height: 54px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--text);
  font: 600 12px/1.4 var(--mono);
  cursor: pointer;
}

.full-report-details[open] > summary {
  border-bottom: 1px solid #1d2350;
}

.full-report-details > summary::marker {
  color: var(--violet);
}

.full-report-summary {
  padding: 12px 18px 0;
  color: var(--muted);
  font-size: 11px;
}

.full-report-details .report-period-strip {
  margin: 0;
}

.companies-list {
  padding-bottom: 0;
}

body.embedded #periods {
  display: none;
}

body.embedded .entity-page {
  width: min(1280px, calc(100% - 52px));
  padding-top: 26px;
}

@media (max-width: 760px) {
  .entity-page,
  body.embedded .entity-page {
    width: calc(100% - 28px);
    padding-top: 20px;
  }

  .entity-title-block h1 {
    gap: 6px;
    font-size: 23px;
  }

  .entity-title-block .heading-lead {
    font-size: 12px;
  }

  .entity-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .entity-card {
    padding: 20px 18px;
  }

  .entity-kv {
    grid-template-columns: minmax(118px, 0.75fr) minmax(0, 1.25fr);
  }

  .entity-report-block {
    margin-top: 26px;
  }

  .entity-report-block > .section-heading {
    align-items: flex-start;
  }

  .entity-report-block > .section-heading h2 {
    font-size: 21px;
  }

  .table-controls {
    align-items: center;
  }

  .entity-ofr th:first-child {
    min-width: 170px;
  }

  .entity-ofr th:not(:first-child) {
    min-width: 64px;
  }

  .full-report-table th:nth-child(2) {
    min-width: 260px;
  }
}

@media (max-width: 420px) {
  .entity-kv {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .entity-kv dd {
    margin-bottom: 8px;
  }
}

.entity-badge--stop {
  border-color: rgba(255, 113, 133, 0.32);
  background: rgba(255, 113, 133, 0.10);
  color: var(--danger);
}

.entity-succession {
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 11px;
  background: rgba(248, 196, 92, 0.05);
  max-width: 780px;
}

.succession-line {
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.succession-line:last-child { margin-bottom: 0; }

.succession-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warn);
}

.succession-line a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.succession-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.72;
}

.license-note {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.45;
  opacity: 0.62;
}


/* Контроль качества данных (карточка СД) */
.quality-card h2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quality-kpi { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; margin: 10px 0; }
.quality-kpi-label { font-size: 11px; color: var(--muted); }
.quality-notes > div { margin-bottom: 8px; font-size: 13px; }
.quality-notes ul { margin: 4px 0 0 18px; }
.quality-hint { color: var(--muted); font-size: 12px; }
.quality-periods { font-size: 13px; }
.quality-periods summary { cursor: pointer; color: var(--muted); }
.quality-period { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-top: 4px; }
.quality-period .entity-badge { min-width: 130px; justify-content: center; }


/* --- таблица формы 0420003 на карточке брокера: читаемость на телефоне --- */
/* sticky-ячейки не держатся при border-collapse: collapse — переводим на separate */
.entity-ofr {
  border-collapse: separate;
  border-spacing: 0;
}
.entity-ofr th.ofr-name {
  min-width: 240px;
  max-width: 280px;
  white-space: normal;
  text-align: left;
  font-weight: 500;
  line-height: 1.25;
}
.entity-ofr .ofr-num {
  display: inline-block;
  min-width: 22px;
  margin-right: 6px;
  color: var(--muted);
  font: 600 10px/1 var(--mono);
}
.entity-ofr thead .ofr-year {
  display: block;
  color: var(--muted);
}
.entity-ofr thead .ofr-period {
  display: block;
  color: #c7d2fe;
}
.entity-ofr th.is-derived .ofr-period {
  color: #a5b4fc;
}
@media (max-width: 700px) {
  .entity-ofr th.ofr-name {
    min-width: 150px;
    max-width: 170px;
    font-size: 11px;
  }
  .entity-ofr th:not(.ofr-name) {
    min-width: 68px;
  }
  .entity-table-wrap table {
    font-size: 11px;
  }
}

/* --- управление таблицей формы 0420003 (как на карточке УК) --- */
.ofr-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ofr-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ofr-btn:hover {
  border-color: rgba(129, 140, 248, 0.5);
  background: var(--panel-2);
  color: var(--text);
}
.ofr-btn.is-on {
  border-color: rgba(129, 140, 248, 0.55);
  color: #c7d2fe;
}
/* шапка: год — общий заголовок над своими кварталами */
.entity-ofr thead th.ofr-yearhead {
  text-align: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 700 12px/1.2 var(--mono, monospace);
  letter-spacing: 0.04em;
}
.entity-ofr thead th.ofr-yearhead + .ofr-yearhead {
  border-left: 1px solid var(--line);
}
.entity-ofr thead th.ofr-yearhead button {
  border: 0;
  background: none;
  color: #c7d2fe;
  font: inherit;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.entity-ofr thead th.ofr-yearhead button:hover {
  background: rgba(129, 140, 248, 0.14);
}
.entity-ofr .ofr-caret {
  color: var(--muted);
  font-weight: 700;
}
/* граница между годами и подсветка годовой колонки */
.entity-ofr th.year-start,
.entity-ofr td.year-start {
  border-left: 1px solid var(--line);
}
.entity-ofr th.is-annual,
.entity-ofr td.is-annual {
  background: rgba(99, 102, 241, 0.08);
}
.entity-ofr tr.is-empty td,
.entity-ofr tr.is-empty th.ofr-name {
  color: var(--muted);
  opacity: 0.75;
}

/* шапка стала двухэтажной: во второй строке первая ячейка — это квартал, а не
   название строки. Снимаем с неё «липкое» позиционирование и ширину колонки
   показателей, иначе 1 кв. растягивается на 300px и наезжает при прокрутке. */
.entity-ofr thead tr + tr th.num,
.entity-ofr thead th.ofr-yearhead {
  position: static;
  min-width: 76px;
  background: transparent;
}
.entity-ofr thead tr + tr th.num {
  text-align: right;
}
.entity-ofr th.is-annual,
.entity-ofr td.is-annual {
  background: rgba(99, 102, 241, 0.1);
}
.entity-ofr thead th.ofr-name {
  min-width: 300px;
}

/* переключатель «за квартал / нарастающим итогом» в панели фильтров */
.basis-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.basis-switch button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.basis-switch button:hover { color: var(--text); }
.basis-switch button.active {
  background: var(--grad);
  color: #06080f;
  font-weight: 700;
}
@media (max-width: 700px) {
  .basis-switch { width: 100%; justify-content: center; }
  .basis-switch button { flex: 1; padding: 0 8px; }
}
