:root {
  --sidebar-width: 276px;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --sidebar: #111b2d;
  --sidebar-soft: #1c2940;
  --ink: #142033;
  --muted: #718096;
  --muted-strong: #526174;
  --line: #e3e9f1;
  --primary: #4e64e8;
  --primary-dark: #3449c5;
  --primary-soft: #eef1ff;
  --green: #159a70;
  --green-soft: #eaf8f3;
  --red: #d65766;
  --red-soft: #fff0f2;
  --amber: #b47c16;
  --shadow-sm: 0 2px 8px rgba(23, 37, 61, 0.04);
  --shadow-md: 0 14px 32px rgba(23, 37, 61, 0.08);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #0d1524;
  --surface: #142034;
  --surface-muted: #101b2c;
  --ink: #eff4ff;
  --muted: #98a7bc;
  --muted-strong: #c4cfdf;
  --line: #263650;
  --primary-soft: #202b5d;
  --green-soft: #123a31;
  --red-soft: #45212a;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--primary) var(--bg);
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

html::-webkit-scrollbar-track {
  background: var(--bg);
}

html::-webkit-scrollbar-thumb {
  border: 3px solid var(--bg);
  border-radius: 99px;
  background: var(--primary);
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.sidebar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 30px 24px 24px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--sidebar);
  color: #f4f7ff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand img {
  width: 56px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.sidebar-copy {
  max-width: 205px;
  margin: 14px 0 38px;
  color: #9aa8bd;
  font-size: 13px;
  line-height: 1.65;
}

.sidebar label {
  display: block;
  margin: 20px 0 8px;
  color: #aebbd0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar input {
  width: 100%;
  border: 1px solid #2e3d58;
  border-radius: 9px;
  outline: none;
  padding: 12px 13px;
  background: var(--sidebar-soft);
  color: #fff;
}

.sidebar input:focus {
  border-color: #8190ff;
  box-shadow: 0 0 0 3px rgba(129, 144, 255, 0.12);
}

.ticker-input {
  display: flex;
  align-items: center;
  border: 1px solid #2e3d58;
  border-radius: 9px;
  background: var(--sidebar-soft);
}

.ticker-input span {
  padding-left: 13px;
  color: #8190ff;
  font-weight: 800;
}

.ticker-input input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.ticker-input input:focus {
  border: 0;
  box-shadow: none;
}

.ticker-input:focus-within {
  border-color: #8190ff;
  box-shadow: 0 0 0 3px rgba(129, 144, 255, 0.12);
}

.primary,
.secondary {
  width: 100%;
  border-radius: 9px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary {
  margin-top: 24px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  border-color: #7182f6;
  background: #7182f6;
  transform: translateY(-1px);
}

.secondary {
  margin-top: 10px;
  border: 1px solid #33425c;
  background: transparent;
  color: #bdc8da;
  text-decoration: none;
  text-align: center;
}

.secondary:hover {
  border-color: #8391ff;
  color: #fff;
}

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #26344c;
  padding-top: 18px;
  color: #8493a9;
  font-size: 11px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #2dcc93;
  box-shadow: 0 0 0 4px rgba(45, 204, 147, 0.12);
}

.content {
  width: min(1180px, calc(100% - var(--sidebar-width)));
  min-width: 0;
  min-height: 100vh;
  margin: 0 auto 0 var(--sidebar-width);
  padding: 28px clamp(22px, 5vw, 72px) 0;
  display: flex;
  flex-direction: column;
  row-gap: 32px;
}

.home-page {
  min-height: auto;
}

.home-page footer {
  margin-top: 0;
}

.home-page .discovery {
  padding-bottom: 0;
}

.home-page .category:last-child {
  margin-bottom: 0;
}

.topbar,
.section-heading,
.card-top,
.expert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.welcome-line .eyebrow {
  margin-bottom: 0;
}

.welcome-line .icon-button {
  margin-left: auto;
}

.asset-card-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.asset-card-heading .eyebrow {
  min-width: 0;
  margin: 0;
}

.asset-brand {
  display: inline-grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.asset-brand img,
.asset-brand > span {
  grid-area: 1 / 1;
}

.asset-brand img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.currency-brand {
  display: flex;
  align-items: center;
  gap: 2px;
}

.currency-brand img {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
}

.bond-brand img {
  width: 24px;
  height: 17px;
  border-radius: 3px;
  object-fit: cover;
}

.product-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.product-heading h2 {
  min-width: 0;
}

.product-logo {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-muted);
  color: var(--primary);
  font-size: 19px;
  font-weight: 900;
}

.product-logo img,
.product-logo > span {
  grid-area: 1 / 1;
}

.product-logo img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.currency-product-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.currency-product-logo img {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  object-fit: cover;
}

.bond-product-logo img {
  width: 32px;
  height: 23px;
  border-radius: 4px;
  object-fit: cover;
}

.advanced-panel {
  margin-top: 16px;
  padding: 22px;
}

.advanced-panel h3 {
  margin: 0;
  font-size: 18px;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.advanced-insight {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface-muted);
}

.advanced-insight span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.advanced-insight strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 18px;
}

.advanced-insight p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.topbar {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.top-button {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.top-button.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.hero {
  max-width: none;
  padding: 0 0 50px;
}

.eyebrow {
  margin: 0 0 11px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6.4vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero h1 em {
  color: var(--primary);
  font-style: normal;
}

.hero-copy {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.message {
  margin-bottom: 30px;
  border: 1px solid #dbe4ff;
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--primary-soft);
  color: #51679f;
  font-size: 13px;
}

.detail-loading {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 24px;
  background: var(--bg);
  color: var(--muted-strong);
  text-align: center;
}

.loading-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.loading-logo img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  border-color: #f1c8cf;
  background: var(--red-soft);
  color: var(--red);
}

.hidden {
  display: none !important;
}

.section-heading {
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading > span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.catalog-link {
  border: 1px solid var(--primary);
  border-radius: 9px;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s ease;
}

.catalog-link:hover {
  border-color: #7182f6;
  background: #7182f6;
  transform: translateY(-1px);
}

.discovery {
  margin-bottom: 0;
  padding-bottom: 28px;
}

.discovery-copy {
  margin-top: 0;
  font-size: 14px;
}

.catalog-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 24px 0 10px;
}

.category-filter-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.category-arrow {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.category-arrow .bi {
  transform: translateY(-1px);
}

.bi {
  display: inline-block;
  font-style: normal;
  line-height: 1;
}

.bi-arrow-left::before {
  content: "←";
}

.bi-arrow-right::before {
  content: "→";
}

.bi-arrow-up::before {
  content: "↑";
}

.category-arrow:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.catalog-tools input {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.catalog-tools input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 100, 232, 0.1);
}

.catalog-tools select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  padding: 11px 42px 11px 14px;
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted-strong) 50%), linear-gradient(135deg, var(--muted-strong) 50%, transparent 50%);
  background-position: calc(100% - 19px) 19px, calc(100% - 14px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.catalog-tools select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 100, 232, 0.1);
}

.catalog-tools select:hover {
  border-color: var(--primary);
  background-color: var(--primary-soft);
}

.catalog-tools select option {
  background: var(--surface);
  color: var(--ink);
}

.catalog-select {
  position: relative;
  flex: 0 0 210px;
  min-width: 190px;
}

.catalog-select-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 42px 11px 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.catalog-select-button::after {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid var(--muted-strong);
  content: "";
  pointer-events: none;
}

.catalog-select-button:hover,
.catalog-select.open .catalog-select-button {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.catalog-select.open .catalog-select-button {
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 0 3px rgba(78, 100, 232, 0.1);
}

.catalog-select-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% - 1px);
  right: 0;
  left: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--primary);
  border-radius: 0 0 10px 10px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.catalog-select.open .catalog-select-menu {
  display: grid;
}

.catalog-select-option {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.catalog-select-option:last-child {
  border-bottom: 0;
}

.catalog-select-option:hover,
.catalog-select-option[aria-selected="true"] {
  background: var(--primary);
  color: #fff;
}

.category-filters {
  display: flex;
  flex: 1;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 3px 1px 5px;
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-filters button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.category-filters button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.catalog-count {
  margin: 13px 0;
  color: var(--muted);
  font-size: 12px;
}

.category {
  margin-bottom: 28px;
}

.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.category-title h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.category-title span {
  color: var(--muted);
  font-size: 12px;
}

.discovery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.discovery-card {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.discovery-card:hover {
  border-color: #9eabf8;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.discovery-more {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.discovery-more:hover {
  border-color: var(--primary-dark);
  background: var(--surface);
  transform: translateY(-3px);
}

.discovery-more strong {
  font-size: 30px;
  line-height: 1;
}

.discovery-more span {
  margin-top: 10px;
  font-weight: 900;
}

.discovery-more small {
  margin-top: 5px;
  color: var(--muted);
}

.discovery-card h3 {
  margin: 9px 0 8px;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.beginner-report {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.asset-score {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.asset-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.loading-card {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--muted);
}

.back-button {
  display: inline-block;
  margin: 0 0 24px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.catalog-heading {
  margin: 4px 0 20px;
}

.catalog-heading .eyebrow {
  margin-bottom: 5px;
}

.catalog-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.05em;
}

.catalog-page #full-catalog.full-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 13px;
}

.catalog-ticker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.metric-card,
.panel,
.signal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  min-height: 135px;
  padding: 21px;
}

.metric-card > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 30px;
  letter-spacing: -0.055em;
}

.metric-card b {
  color: var(--green);
  font-size: 13px;
}

.metric-card small {
  color: var(--muted);
}

.chart-panel {
  width: 100%;
  min-width: 0;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.chart-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.chart-heading > div {
  min-width: 0;
}

.chart-heading h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.chart-heading .eyebrow {
  margin-bottom: 5px;
}

#chart-change {
  padding-top: 4px;
  font-size: 14px;
  white-space: nowrap;
}

.chart-controls {
  display: flex;
  gap: 7px;
  margin: 20px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chart-controls::-webkit-scrollbar {
  display: none;
}

.chart-controls button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.chart-controls button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.chart-frame {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#price-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 720 / 260;
  overflow: visible;
  touch-action: none;
}

.chart-hit-area {
  fill: transparent;
  pointer-events: all;
}

.chart-transition .chart-line {
  animation: chart-line-reveal 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chart-tooltip-line {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-tooltip-dot {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 3;
}

.chart-tooltip-box {
  fill: var(--ink);
  opacity: 0.96;
}

.chart-tooltip-date,
.chart-tooltip-price {
  fill: var(--surface);
  font-size: 11px;
}

.chart-tooltip-price {
  font-weight: 800;
}

@keyframes chart-line-reveal {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}

.chart-grid-line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.chart-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-axis-tick {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis-label {
  font-size: 10px;
}

.progress {
  height: 6px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #78a0ff);
  transition: width 0.6s ease;
}

.signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px 0;
  padding: 22px;
}

.signal h3 {
  margin: 0 0 7px;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.signal p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.risk {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 12px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 25px;
  margin-top: 29px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  flex-shrink: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 13px 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tabs button.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.tab-content {
  display: none;
  padding-top: 20px;
}

.tab-content.active {
  display: block;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel h3 {
  margin: 0 0 15px;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel li {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  line-height: 1.5;
}

.panel li:last-child {
  border-bottom: 0;
}

.panel li::before {
  margin-right: 10px;
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.panel.danger li::before {
  color: var(--red);
  content: "!";
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-grid div {
  border-bottom: 1px solid var(--line);
  padding: 15px;
}

.data-grid span,
.expert-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.data-grid strong,
.expert-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.expert-header h3 {
  margin: 0 0 5px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.expert-header > strong {
  font-size: 21px;
}

.expert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.expert-grid div {
  border-radius: 10px;
  padding: 15px;
  background: var(--surface-muted);
}

.expert-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.news-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.news-item:last-child {
  border-bottom: 0;
}

.news-item a {
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.news-item a:hover {
  color: var(--primary);
}

.news-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

footer {
  display: grid;
  flex: 0 0 auto;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  width: 100vw;
  margin: auto 0 0 calc(-1 * (var(--sidebar-width) + clamp(22px, 5vw, 72px)));
  border-top: 1px solid #26344c;
  padding: 18px clamp(22px, 5vw, 72px) 18px calc(var(--sidebar-width) + clamp(22px, 5vw, 72px));
  background: var(--sidebar);
  color: #9aa8bd;
  font-size: 11px;
  line-height: 1.55;
}

.footer-attribution {
  display: inline-flex;
  grid-column: 1;
  align-items: center;
  justify-self: start;
  flex-shrink: 0;
  gap: 7px;
}

footer > span:last-child {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.footer-logo {
  grid-column: 2;
  justify-self: center;
  width: 56px;
  height: 32px;
  object-fit: contain;
}

.footer-attribution a {
  color: #f4f7ff;
  font-weight: 800;
  text-decoration: none;
}

.footer-attribution a:hover {
  color: var(--primary);
}

.cc-mark {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 238px;
  }

  .sidebar {
    width: var(--sidebar-width);
  }

  .discovery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-filters {
    max-width: none;
  }
}

@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 22px;
    overflow-y: visible;
  }

  .sidebar form,
  .sidebar .secondary {
    width: 100%;
    max-width: 520px;
  }

  .ticker-input,
  .ticker-input input,
  .catalog-tools input {
    min-width: 0;
  }

  .sidebar-copy {
    margin: 12px 0 20px;
  }

  .brand img {
    width: 50px;
    height: 36px;
  }

  .sidebar-bottom {
    display: none;
  }

  .content {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 24px 18px 0;
    row-gap: 18px;
  }

  .content > *,
  .catalog-browser,
  .discovery,
  #dashboard {
    max-width: 100%;
    min-width: 0;
  }

  .topbar {
    gap: 12px;
    letter-spacing: 0.1em;
  }

  .topbar > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .hero {
    padding: 0 0 12px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100vw;
    max-width: none;
    margin-right: 0;
    margin-left: calc(50% - 50vw);
    padding-right: 18px;
    padding-left: 18px;
  }

  .content > footer {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
  }

  .footer-attribution {
    grid-column: auto;
    align-self: center;
  }

  .footer-logo,
  footer > span:last-child {
    grid-column: auto;
    justify-self: stretch;
    text-align: left;
  }

  .footer-logo {
    align-self: center;
    justify-self: center;
    width: 56px;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 54px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .catalog-tools {
    display: block;
  }

  .catalog-tools input {
    width: 100%;
  }

  .catalog-tools select {
    width: 100%;
    min-width: 0;
    margin-top: 10px;
  }

  .catalog-select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
  }

  .category-filters {
    max-width: none;
    margin-top: 10px;
  }

  .category-filter-wrap {
    margin-top: 10px;
  }

  .catalog-page #full-catalog,
  .catalog-page #full-catalog.full-catalog-grid,
  .catalog-page .full-catalog-grid {
    grid-template-columns: 1fr !important;
  }

  .catalog-page .discovery-card {
    width: 100%;
  }

  .discovery-grid,
  .metrics,
  .two-columns,
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .home-page .discovery-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .home-page .card-top {
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .home-page .asset-card-heading {
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
  }

  .home-page .asset-score {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .home-page .discovery-more {
    min-height: 150px;
    padding: 14px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
  }

  .section-heading > div,
  .product-heading,
  .chart-heading {
    max-width: 100%;
    min-width: 0;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .home-page .catalog-link {
    margin-top: 6px;
  }

  .home-page .message {
    margin-bottom: 10px;
  }

  .section-heading > span {
    text-align: left;
  }

  .signal {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .signal p,
  .asset-meta span,
  .panel,
  .metric-card,
  .catalog-tools,
  footer > span:last-child {
    overflow-wrap: anywhere;
  }

  .metric-card,
  .panel,
  .chart-panel {
    padding: 18px;
  }

  .tabs {
    gap: 20px;
    margin-right: -18px;
    padding-right: 18px;
  }

  .data-grid,
  .expert-grid {
    grid-template-columns: 1fr;
  }

  .expert-header {
    align-items: flex-start;
    gap: 14px;
  }

  .expert-header > strong {
    flex-shrink: 0;
  }

  .catalog-page .discovery-card {
    max-width: 100%;
    min-width: 0;
  }

  .discovery-card h3 {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 34px), transparent 100%);
  }

  .home-page .discovery-card h3 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 34px), transparent 100%);
  }

  .asset-card-heading {
    min-width: 0;
    max-width: 100%;
  }

  .asset-card-heading .eyebrow {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 24px), transparent 100%);
  }

  .catalog-page .discovery-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 12px 14px;
  }

  .catalog-page .card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 10px;
  }

  .catalog-page .asset-card-heading {
    align-items: center;
    min-width: 0;
  }

  .catalog-page .asset-card-heading .eyebrow {
    display: none;
  }

  .catalog-page .beginner-report,
  .catalog-page .asset-meta {
    display: none;
  }

  .catalog-page .asset-score {
    flex-shrink: 0;
    font-size: 12px;
  }

  .catalog-page .discovery-card h3 {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 34px), transparent 100%);
  }

  .catalog-page .asset-brand,
  .catalog-page .bond-brand,
  .catalog-page .currency-brand {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }

  .catalog-page .asset-brand img,
  .catalog-page .currency-brand img,
  .catalog-page .bond-brand img {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 420px) {
  .sidebar,
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero {
    padding-top: 18px;
  }

  footer {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    padding-right: 14px;
    padding-left: 14px;
  }

  .content > footer {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
  }

  .hero h1 {
    font-size: 42px;
  }

  .catalog-page .discovery-card {
    min-height: 0;
    padding: 14px;
  }

  .catalog-page .asset-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    margin-right: -14px;
    padding-right: 14px;
  }
}
