:root {
  color-scheme: light;
  --ink: #132238;
  --muted: #34465a;
  --line: #d9e1ea;
  --soft: #f6f8f5;
  --panel: #ffffff;
  --blue: #255f8f;
  --green: #12715b;
  --amber: #b47a2a;
  --red: #b42318;
  --cream: #fbf8ef;
  --sage: #e8f1ea;
  --sky: #edf5fb;
  --deep: #102a43;
  --shadow: 0 18px 42px rgba(16, 42, 67, 0.1);
  --strong-shadow: 0 24px 70px rgba(16, 42, 67, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(237, 245, 251, 0.92), rgba(251, 248, 239, 0.72) 460px, #f8faf6 1000px),
    repeating-linear-gradient(90deg, rgba(18, 113, 91, 0.035) 0 1px, transparent 1px 96px);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-status {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  background: rgba(246, 248, 245, 0.96);
  color: var(--ink);
  text-align: center;
}

.app-status strong {
  font-size: 21px;
}

.app-status span:last-child {
  color: var(--muted);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #d7e1e8;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: loading-spin 800ms linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.app-error {
  background: rgba(255, 250, 248, 0.98);
}

.app-error button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--deep);
  color: #fff;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(16, 42, 67, 0.96), rgba(18, 113, 91, 0.94));
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 35px rgba(16, 42, 67, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  filter: drop-shadow(0 6px 12px rgba(6, 25, 39, 0.24));
}

h1,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.3;
  color: #fff;
}

.brand p,
.search-panel p,
.section-heading p,
.methodology-text p,
.muted {
  color: var(--muted);
}

.brand p {
  font-size: 13px;
  margin-top: 2px;
  color: #f4f8fb;
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px auto;
  background: #fff;
}

.nav-button,
.tab {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 8px;
  padding: 9px 13px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-button.active,
.tab.active {
  background: #f7c66a;
  color: #102a43;
  border-color: #f7c66a;
  font-weight: 800;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.tabs .tab {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.tabs .tab.active {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 20px;
  align-items: end;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--strong-shadow);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(16, 42, 67, 0.96), rgba(18, 113, 91, 0.9)),
    linear-gradient(90deg, rgba(247, 198, 106, 0.24), transparent);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: var(--strong-shadow);
  color: #ffffff;
}

.home-hero h2 {
  font-size: 36px;
  margin: 8px 0 10px;
}

.home-hero .eyebrow {
  color: #f7c66a;
}

.home-hero p {
  max-width: 820px;
  color: #f7fafc;
  font-weight: 500;
  line-height: 1.8;
}

.home-hero .data-update-note {
  border-color: #f7c66a;
  background: #fff4d6;
  color: #694009;
  box-shadow: 0 8px 22px rgba(16, 42, 67, 0.16);
}

.primary-action {
  border: 1px solid #f7c66a;
  background: #f7c66a;
  color: #102a43;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(247, 198, 106, 0.22);
}

.home-metrics {
  margin-top: 22px;
}

.start-guide {
  margin: 18px 0 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.compact-heading {
  margin-bottom: 14px;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.start-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfbf6);
  color: var(--ink);
  text-align: right;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(16, 42, 67, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.start-card:hover {
  border-color: rgba(18, 113, 91, 0.34);
  background: linear-gradient(180deg, #ffffff, #f3faf5);
  box-shadow: 0 18px 40px rgba(16, 42, 67, 0.11);
  transform: translateY(-2px);
}

.start-card span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.start-card strong {
  font-size: 17px;
  color: #102a43;
}

.start-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
}

.home-rankings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.ask-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ask-panel {
  position: sticky;
  top: 96px;
}

.ask-questions {
  display: grid;
  gap: 10px;
}

.ask-question {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 13px;
  text-align: right;
  cursor: pointer;
}

.ask-question span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.ask-question.active {
  border-color: var(--green);
  background: #eef8f1;
}

.ask-answer .data-block h3 {
  margin-top: 6px;
}

.answer-note {
  margin-bottom: 12px;
  line-height: 1.8;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.map-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.map-card span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.map-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.map-card p {
  color: var(--muted);
  line-height: 1.8;
}

.map-card ul {
  margin: 14px 0 0;
  padding-right: 20px;
  color: var(--ink);
  line-height: 1.9;
}

.guide-card {
  border-color: rgba(247, 198, 106, 0.62);
  background: #fff8e7;
}

.search-panel h2,
.section-heading h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.data-update-note {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(247, 198, 106, 0.42);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.96);
  color: #7a4c11;
  font-size: 13px;
  font-weight: 600;
}

.data-update-note.compact {
  margin-top: 8px;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
  background: #fbfcfb;
}

.search-box input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 113, 91, 0.13);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}

.filter-chip.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.reset-chip {
  margin-right: auto;
  color: var(--muted);
}

.reset-chip.active {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.filter-note {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(18, 113, 91, 0.22);
  border-right: 4px solid var(--green);
  border-radius: 12px;
  background: #f3faf5;
  color: var(--ink);
  line-height: 1.8;
  font-size: 14px;
}

.filter-insights {
  margin-top: 18px;
}

.cycle-explanation {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(18, 113, 91, 0.24);
  border-right: 4px solid var(--green);
  border-radius: 8px;
  background: #f6fbf7;
  color: var(--ink);
  line-height: 1.85;
}

.cycle-explanation h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.cycle-explanation p {
  margin: 0;
}

.cycle-explanation ol {
  margin: 10px 0;
  padding-right: 22px;
}

.cycle-example {
  padding-top: 10px;
  border-top: 1px solid rgba(18, 113, 91, 0.18);
}

.compact-heading {
  margin-bottom: 12px;
}

.compact-heading h2 {
  font-size: 24px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.company-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.company-list-panel,
.company-profile,
.methodology-text,
.market-card,
.data-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.company-list-panel {
  overflow: hidden;
  position: sticky;
  top: 96px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.list-head span {
  color: var(--muted);
}

.list-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-list-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--deep);
  cursor: pointer;
  font-weight: 800;
}

.company-list {
  max-height: 680px;
  overflow: auto;
}

.company-row {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eef1f5;
  background: transparent;
  text-align: right;
  padding: 12px 16px;
  cursor: pointer;
}

.company-row:hover,
.company-row.active {
  background: #eef8f1;
}

.company-row strong {
  display: block;
  font-size: 15px;
}

.company-row-main > span {
  color: var(--muted);
  font-size: 12px;
}

.company-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.company-tags small {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef8f1;
  color: var(--green);
  font-size: 11px;
  line-height: 1.4;
}

.company-profile {
  min-height: 620px;
  padding: 22px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: var(--muted);
}

.company-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  color: #174f7c;
  font-size: 13px;
  font-weight: 800;
}

.company-title h2 {
  font-size: 32px;
  margin-top: 6px;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff3d1;
  color: #7a4c11;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.executive-summary {
  padding: 18px 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(18, 113, 91, 0.22);
  border-right: 4px solid var(--green);
  border-radius: 12px;
  background: linear-gradient(180deg, #f3faf5, #ffffff);
}

.executive-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.executive-summary p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
}

.simple-reading {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border: 1px solid #d8e1d3;
  border-right: 4px solid var(--green);
  border-radius: 12px;
  background: #fbfdf8;
}

.simple-reading h3 {
  margin-top: 4px;
  font-size: 20px;
}

.simple-reading ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.simple-reading li {
  position: relative;
  padding: 10px 14px;
  border: 1px solid #e4ebdf;
  border-radius: 8px;
  background: #fff;
  line-height: 1.8;
}

.metric {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfbf7);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.06);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 22px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

.tab-panel {
  display: none;
}

.active-tab {
  display: block;
}

.overview-grid,
.market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.data-block {
  min-width: 0;
  padding: 16px;
}

.data-block h3,
.market-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.table-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.inline-action {
  border: 1px solid #c8d5ef;
  background: #f2f6ff;
  color: #174382;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
}

.inline-action:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f5;
  text-align: right;
  vertical-align: top;
  font-size: 13px;
  white-space: nowrap;
}

th {
  background: #edf5ef;
  color: #123b31;
  font-weight: 800;
}

.section-heading {
  margin-bottom: 18px;
}

.delisted-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.delisted-controls {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  align-items: end;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.delisted-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delisted-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.delisted-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--muted);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.delisted-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.delisted-card h3 {
  margin-top: 5px;
  font-size: 19px;
  line-height: 1.55;
}

.archive-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.archive-identifiers {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.archive-identifiers strong,
.archive-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #eef1f5;
  color: var(--deep);
  font-size: 12px;
}

.archive-type {
  background: #f3f5f7;
  color: var(--muted);
}

.archive-type.fund {
  background: #fff3d1;
  color: #75501a;
}

.archive-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.archive-details div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf1f5;
}

.archive-details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.archive-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.75;
}

.archive-source {
  width: fit-content;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.archive-note,
.archive-empty {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #e4d5ad;
  border-radius: 8px;
  background: #fff9e9;
  color: #604716;
  line-height: 1.8;
}

.archive-empty {
  grid-column: 1 / -1;
  margin-top: 0;
  text-align: center;
}

.archive-map-card {
  grid-column: 1 / -1;
  border-right: 4px solid var(--muted);
}

.archive-map-card .inline-action {
  margin-top: 14px;
}

.compare-controls {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.compare-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compare-selector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.compare-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.compare-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.compare-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
}

.compare-controls select:focus {
  outline: 3px solid rgba(37, 95, 143, 0.16);
  border-color: var(--blue);
}

.compare-swap {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
}

.compare-add {
  min-height: 46px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 8px 16px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.compare-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.compare-remove {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #c66b6b;
  border-radius: 8px;
  background: #fff;
  color: #9d2d2d;
  cursor: pointer;
  font-size: 24px;
}

.compare-company-heads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.compare-company-heads article {
  padding: 18px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.compare-company-heads span,
.coverage-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.compare-company-heads h3 {
  margin-bottom: 7px;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.coverage-grid article {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf8;
}

.coverage-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

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

.compare-block {
  min-width: 0;
}

.comparison-table {
  min-width: 680px;
}

.comparison-table.multi-company {
  min-width: 900px;
}

.comparison-high {
  background: #edf5fb;
  color: #174f7c;
  font-weight: 800;
}

.comparison-low {
  background: #fff8e8;
  color: #75501a;
  font-weight: 800;
}

.comparison-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.comparison-legend span {
  border-radius: 5px;
  padding: 4px 8px;
  font-weight: 800;
}

.legend-high {
  background: #edf5fb;
  color: #174f7c;
}

.legend-low {
  background: #fff8e8;
  color: #75501a;
}

.comparison-table th small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.comparison-disclaimer {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e4d5ad;
  border-radius: 8px;
  background: #fff9e9;
  color: #604716;
  line-height: 1.8;
}

.comparison-availability-note {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border: 1px solid #cbd8e4;
  border-right: 4px solid var(--blue);
  border-radius: 8px;
  background: #f4f8fc;
  color: var(--muted);
  line-height: 1.8;
}

.market-card {
  padding: 18px;
}

.market-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.market-card li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f5;
}

.market-card li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  background: #e8f6ef;
  color: var(--green);
}

.warning {
  background: #fff7ed;
  color: var(--amber);
}

.danger {
  background: #fff1f0;
  color: var(--red);
}

.methodology-text {
  padding: 22px;
  display: grid;
  gap: 14px;
  line-height: 1.9;
  max-width: 920px;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.method-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.method-card.wide {
  grid-column: 1 / -1;
}

.method-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.method-card p {
  color: var(--muted);
  line-height: 1.9;
}

.warning-card {
  border-color: #f1d5a8;
  background: #fffaf2;
}

.warning-card h3 {
  color: var(--amber);
}

.author-card {
  max-width: 900px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--strong-shadow);
}

.author-photo {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 4px solid #ffffff;
  border-radius: 10px;
  background: #e7ebef;
  box-shadow: 0 16px 36px rgba(16, 42, 67, 0.18);
}

.author-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.author-card h2 {
  margin: 8px 0 18px;
  font-size: 34px;
}

.author-card p {
  color: var(--muted);
  line-height: 2;
  margin-top: 14px;
  font-size: 16px;
}

.download-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.download-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.main-download {
  display: grid;
  gap: 18px;
  grid-row: span 2;
}

.download-card h3 {
  margin: 8px 0 12px;
  font-size: 22px;
}

.download-card p,
.download-card li {
  color: var(--muted);
  line-height: 1.9;
}

.download-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-right: 20px;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-meta span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef8f1;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.secondary-download {
  background: var(--blue);
}

.download-button:disabled {
  cursor: not-allowed;
  background: #c8d1df;
  color: #526273;
}

.download-status {
  font-size: 13px;
}

.download-disclaimer {
  grid-column: 1 / -1;
  border-color: #f1d5a8;
  background: #fffaf2;
}

.download-disclaimer h3 {
  color: var(--amber);
}

.english-disclaimer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f1d5a8;
  text-align: left;
}

.english-disclaimer h4 {
  margin-bottom: 10px;
  color: var(--amber);
  font-size: 18px;
}

.english-disclaimer ul {
  padding-right: 0;
  padding-left: 20px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 26px 34px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .topbar,
  .home-hero,
  .start-grid,
  .search-panel,
  .company-layout,
  .ask-layout,
  .map-grid,
  .insight-grid,
  .overview-grid,
  .market-grid,
  .download-layout,
  .home-rankings,
  .methodology-grid,
  .author-card {
    grid-template-columns: 1fr;
  }

  .delisted-summary,
  .delisted-controls,
  .delisted-results {
    grid-template-columns: 1fr;
  }

  .author-photo {
    width: min(260px, 100%);
    justify-self: center;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    position: static;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding-top: 4px;
  }

  .nav.nav-open {
    display: grid;
  }

  .nav-button {
    width: 100%;
    text-align: center;
  }

  .home-hero {
    align-items: start;
  }

  .company-list-panel {
    position: static;
  }

  .company-list-toggle {
    display: inline-grid;
    place-items: center;
  }

  .company-list {
    max-height: 320px;
  }

  .company-list-panel.list-collapsed .company-list {
    display: none;
  }

  .ask-panel {
    position: static;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main {
    padding: 14px;
  }

  .topbar {
    padding: 14px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .home-hero h2 {
    font-size: 30px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .compare-selectors {
    grid-template-columns: 1fr;
  }

  .compare-swap {
    transform: rotate(90deg);
  }

  .compare-company-heads,
  .coverage-grid {
    grid-template-columns: 1fr;
  }

  .company-title {
    display: grid;
  }

  .delisted-card-head,
  .archive-details div {
    grid-template-columns: 1fr;
  }

  .delisted-card-head {
    display: grid;
  }

  footer {
    display: grid;
    padding-inline: 14px;
  }
}
