:root {
  color-scheme: light;
  --ground: #f3f4f2;
  --raised: #fbfbfa;
  --sunken: #eef0ed;
  --hairline: #d6d8d4;
  --label: #c0392c;
  --label-ink: #fbf4f2;
  --ink: #161514;
  --muted: #66605a;
  --line: #d8d2c7;
  --panel: #f7f4ee;
  --panel-strong: #ece7dc;
  --green: #126b4f;
  --red: #a33a33;
  --amber: #8b651f;
  --blue: #245f9f;
  --white: #fffdfa;
  --shadow-hard: 14px 14px 0 rgba(23, 25, 28, 0.05);
  --font-display: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
}

.legal-body {
  background: var(--ground);
}

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.legal-page h1 {
  margin-top: 10px;
  font-size: clamp(36px, 7vw, 58px);
}

.legal-page section {
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}

.legal-page section:first-of-type {
  margin-top: 38px;
}

.legal-page h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 21px;
}

.legal-page p {
  margin: 0 0 12px;
  color: #393633;
  line-height: 1.65;
}

.legal-page p:last-child {
  margin-bottom: 0;
}

.legal-back,
.legal-links a {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-underline-offset: 3px;
}

.legal-updated {
  margin-top: 12px !important;
  color: var(--muted) !important;
  font-family: var(--font-mono);
  font-size: 12px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 0 32px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  gap: 28px;
  align-items: start;
  padding: 24px 0 18px;
}

.masthead {
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.toolbar {
  display: grid;
  /* The toolbar shares a row with the masthead on wide screens. Grid tracks
     must be allowed to shrink there; fixed minima made the Set control spill
     into Category when a long set name was selected. */
  grid-template-columns: minmax(0, 2fr) repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  justify-content: stretch;
  min-width: 0;
}

.nav-tabs {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--label);
  border-radius: 8px;
  background: white;
  width: 100%;
  max-width: 100%;
}

.nav-tab {
  flex: 1 1 116px;
  min-height: 32px;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  white-space: normal;
}

.nav-tab.is-active {
  background: var(--label);
  color: white;
}

.nav-research-menu {
  display: block;
  flex: 1 1 190px;
  min-width: 0;
}

.nav-research-menu > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-research-menu select {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  padding: 7px 26px 7px 9px;
  text-align: center;
  text-transform: none;
}

.nav-research-menu.is-active select {
  background-color: var(--label);
  color: white;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%20viewBox='0%200%2012%208'%3E%3Cpath%20d='M1%201l5%205%205-5'%20fill='none'%20stroke='%23ffffff'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
}

.toolbar.is-raw-pricing > :not(.nav-tabs) {
  display: none;
}

label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  align-self: end;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 8px 10px;
  color: var(--ink);
  text-transform: none;
  cursor: pointer;
}

.toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 14px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(36, 95, 159, 0.35);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%20viewBox='0%200%2012%208'%3E%3Cpath%20d='M1%201l5%205%205-5'%20fill='none'%20stroke='%2366605a'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px 8px;
  padding-right: 30px;
  font-family: var(--font-mono);
  cursor: pointer;
}

select:hover {
  border-color: var(--label);
}

select::-ms-expand {
  display: none;
}

/* Custom select: progressive enhancement over the native <select> so the
   open option list can be styled (native listboxes cannot be styled with
   CSS). The native <select> stays in the DOM, visually hidden, and remains
   the source of truth for .value/.disabled/change events used by app.js. */
.custom-select {
  position: relative;
  min-width: 0;
}

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

.custom-select-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: white;
  color: var(--ink);
  padding: 8px 30px 8px 10px;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%20viewBox='0%200%2012%208'%3E%3Cpath%20d='M1%201l5%205%205-5'%20fill='none'%20stroke='%2366605a'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px 8px;
}

.custom-select-button:hover {
  border-color: var(--label);
}

.custom-select-button[aria-expanded="true"] {
  border-color: var(--label);
}

.custom-select-button:focus-visible {
  outline: 3px solid rgba(36, 95, 159, 0.35);
  outline-offset: 2px;
}

.custom-select-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.nav-research-menu .custom-select-button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  padding: 7px 26px 7px 9px;
  text-align: center;
}

.nav-research-menu.is-active .custom-select-button {
  background-color: var(--label);
  color: white;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%20viewBox='0%200%2012%208'%3E%3Cpath%20d='M1%201l5%205%205-5'%20fill='none'%20stroke='%23ffffff'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
}

.custom-select-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 100%;
  max-height: 280px;
  margin: 0;
  padding: 4px;
  list-style: none;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(22, 21, 20, 0.16);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* A filter button should remain compact, but a set picker needs enough room
   in its popover to identify a set without chopping every option. */
.custom-select-wide-options .custom-select-list {
  width: min(340px, calc(100vw - 32px));
  min-width: 100%;
}

.custom-select-wide-options .custom-select-option {
  overflow: visible;
  text-overflow: clip;
}

.custom-select-list[hidden] {
  display: none;
}

.custom-select-option {
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.custom-select-option.is-active {
  background: var(--panel-strong);
}

.custom-select-option.is-selected {
  color: var(--label);
  font-weight: 700;
}

.custom-select-option[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

main {
  padding: 22px 32px 32px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.1;
}

.metric-value.is-compact {
  font-size: 18px;
  line-height: 1.22;
}

.layout {
  display: block;
}

.table-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 10px;
  text-align: right;
  text-transform: uppercase;
}

.ratings-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.ratings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

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

th {
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.is-selected {
  background: #f4f8fb;
}

.card-name {
  font-family: var(--font-display);
  font-weight: 800;
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  color: var(--blue);
  text-decoration: underline;
}

.card-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.instrument-ticker {
  display: inline-block;
  margin: 5px 0 12px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.instrument-ticker:hover,
.ticker-link:hover,
.cashtag:hover {
  text-decoration: underline;
}

.ticker-link {
  color: var(--blue);
  font-family: var(--font-mono);
  font-weight: 700;
  text-decoration: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.badge.UNDERVALUED {
  color: var(--green);
  background: #e8f5ef;
}

.badge.FAIRLY_VALUED {
  color: var(--amber);
  background: #f8efd8;
}

.badge.OVERVALUED {
  color: var(--red);
  background: #f9e6e4;
}

.badge.STRONG_WATCH,
.badge.WATCH {
  color: var(--green);
  background: #e8f5ef;
}

.badge.NEUTRAL {
  color: var(--blue);
  background: #e8f0f8;
}

.badge.AVOID {
  color: var(--red);
  background: #f9e6e4;
}

.badge.DISCOUNTED_TO_HIGHER_GRADE,
.badge.DISCOUNTED_TO_LOWER_GRADE {
  color: var(--green);
  background: #e8f5ef;
}

.badge.EXPENSIVE_TO_HIGHER_GRADE,
.badge.EXPENSIVE_TO_LOWER_GRADE {
  color: var(--red);
  background: #f9e6e4;
}

.badge.BALANCED,
.badge.NO_PAIR {
  color: var(--blue);
  background: #e8f0f8;
}

.gap-negative {
  color: var(--green);
  font-weight: 800;
}

.gap-positive {
  color: var(--red);
  font-weight: 800;
}

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

.row-toggle {
  display: inline-flex;
  width: 18px;
  color: var(--blue);
}

.expanded-row td {
  padding: 0;
  background: #fbfaf6;
}

.expanded-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.card-page {
  max-width: 1320px;
  margin: 0 auto;
}

.card-tearsheet {
  display: grid;
  gap: 18px;
}

.card-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.card-art-panel {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.card-art {
  width: min(100%, 245px);
  height: auto;
  display: block;
}

.card-art-placeholder {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-hero-main {
  min-width: 0;
}

.card-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
}

.card-hero h2 {
  margin: 6px 0 12px;
  font-size: 34px;
  line-height: 1.05;
}

.card-lens-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.card-lens-tab {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.card-lens-tab.is-active {
  background: var(--ink);
  color: white;
}

.card-lens-tab:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}

.grade-pill,
.quality-pill,
.liquidity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 4px 8px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.liquidity-pill.liquidity-liquid {
  border-color: #2f7d5b;
  color: #216447;
}

.liquidity-pill.liquidity-thin {
  border-color: #c77a39;
  color: #8a4b16;
}

.liquidity-pill.liquidity-modeled {
  border-color: #8c867d;
  color: var(--muted);
}

.evidence-status {
  margin-top: 3px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.hero-metric {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.hero-metric span,
.source-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
}

.source-strip {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.source-strip strong {
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.card-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.card-page-grid section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.card-page-grid .wide-section {
  grid-column: 1 / -1;
}

.expanded-detail h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--muted);
}

.card-page-grid h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-item strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.detail-grid-compact {
  margin: 0;
}

.reasons {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #2b2926;
  line-height: 1.45;
}

.score-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sales-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.sales-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

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

.delta-sales-grid h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sales-table th,
.sales-table td {
  padding: 9px 10px;
  font-size: 12px;
}

.sales-table tbody tr {
  cursor: default;
}

.evidence-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

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

.evidence-missing {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.empty-inline {
  margin: 0;
  color: var(--muted);
}

.thesis {
  max-width: 1280px;
  margin: 0 auto;
}

.thesis-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 34px 40px;
}

.thesis-copy h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.15;
}

.thesis-copy p {
  color: #2b2926;
  font-size: 16px;
  line-height: 1.55;
  margin: 12px 0 0;
  max-width: 980px;
}

.thesis-reference {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.thesis-reference h3 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
}

.thesis-reference dl {
  column-count: 2;
  column-gap: 34px;
  margin: 0;
}

.thesis-reference dt {
  break-after: avoid;
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 800;
}

.thesis-reference dd {
  break-inside: avoid;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ece7dc;
  color: #3c3935;
  line-height: 1.45;
}

.social,
.portfolio-page {
  max-width: 1280px;
  margin: 0 auto;
}

.raw-pricing-page {
  max-width: 900px;
  margin: 48px auto;
}

.raw-pricing-page h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
}

.raw-pricing-lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.price-filter-row,
.price-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-filter-row {
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 0;
}

.price-filter-group .small-btn.is-selected {
  border-color: var(--label);
  background: var(--label);
  color: var(--label-ink);
}

.raw-pricing-status {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.raw-pricing-status div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}

.raw-pricing-status div:first-child {
  border-left: 0;
}

.raw-pricing-status span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.provider-set-select {
  min-width: 220px;
}

.provider-set-coverage {
  margin-top: 24px;
}

.provider-set-coverage summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.raw-pricing-status strong {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}

.source-quote + .source-quote {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.source-quote small,
.ratings-table td small {
  line-height: 1.45;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.table-pager button {
  min-width: 92px;
}

.social-shell,
.portfolio-grid {
  display: grid;
  gap: 18px;
}

.social-shell {
  align-items: start;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(240px, 320px);
}

.portfolio-grid {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1.4fr) minmax(260px, 340px);
}

.social-composer,
.social-feed,
.social-rail,
.profile-panel,
.portfolio-panel,
.watchlist-panel {
  min-width: 0;
}

.social-composer,
.social-feed,
.rail-block,
.profile-panel,
.portfolio-panel,
.watchlist-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
}

.social-rail {
  display: grid;
  gap: 12px;
}

.home-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 340px);
  align-items: start;
}

.home-main,
.home-rail {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.news-list {
  display: grid;
  gap: 8px;
}

.news-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.news-heading .eyebrow {
  margin-bottom: 0;
}

.news-view-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.news-view-toggle button {
  border: 0;
  border-radius: 4px;
  padding: 4px 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.news-view-toggle button.is-active {
  background: var(--ink);
  color: white;
}

.news-item {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: inherit;
  text-decoration: none;
}

.news-item.has-meta {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 4px 10px;
  align-items: baseline;
}

a.news-item:hover {
  border-color: var(--accent, #444);
}

.news-meta {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-headline {
  min-width: 0;
}

.news-source-group {
  display: grid;
  gap: 6px;
}

.news-source-heading {
  padding: 3px 2px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 900px) {
  .home-shell {
    grid-template-columns: 1fr;
  }

  .news-item.has-meta {
    grid-template-columns: 1fr;
  }
}

.rail-block {
  padding: 14px;
}

.social-composer h2,
.social-feed h2,
.portfolio-panel h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.12;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.social-composer form,
.profile-panel form {
  display: grid;
  gap: 12px;
}

.social-composer {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  background: #fbfaf6;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px 110px auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.inline-form > * {
  min-width: 0;
}

.action-btn,
.small-btn {
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 12px;
  touch-action: manipulation;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 120ms ease;
}

.small-btn {
  background: white;
  color: var(--ink);
  min-height: 36px;
  padding: 5px 9px;
}

.action-btn:hover,
.action-btn:focus-visible {
  border-color: var(--label);
  background: var(--label);
  color: var(--label-ink);
}

.small-btn:hover,
.small-btn:focus-visible {
  border-color: var(--label);
  background: var(--label);
  color: var(--label-ink);
}

.action-btn:active,
.small-btn:active {
  transform: translateY(1px);
}

.form-status {
  min-height: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post-list,
.watchlist-list {
  display: grid;
  gap: 12px;
}

.post-card,
.watchlist-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  padding: 14px;
}

.profile-mini-card {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.avatar-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}

.profile-mini-main {
  display: grid;
  min-width: 0;
}

.profile-mini-main strong,
.market-row-main strong,
.coverage-row span {
  overflow-wrap: anywhere;
}

.profile-mini-main span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.profile-signout {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: flex-start;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.profile-signout:hover,
.profile-signout:focus {
  color: var(--accent, #b3261e);
}

.rail-metrics {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.rail-metrics div,
.coverage-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.rail-metrics span,
.market-row small,
.coverage-row strong {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.rail-metrics strong,
.coverage-row strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.post-card h3 {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.2;
}

.post-tag {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.post-body {
  color: #2b2926;
  line-height: 1.5;
  max-width: 75ch;
  overflow-wrap: anywhere;
}

.post-body p {
  margin: 0 0 10px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body code,
.cashtag {
  color: var(--blue);
  font-family: var(--font-mono);
  font-weight: 700;
}

.cashtag {
  text-decoration: none;
}

.post-signal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.market-list {
  display: grid;
  gap: 4px;
}

.market-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 6px;
  color: inherit;
  min-height: 48px;
  padding: 8px 0;
  text-decoration: none;
}

.market-row:hover {
  background: #f4f8fb;
}

.rank {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.market-row-main {
  display: grid;
  min-width: 0;
}

.market-row-stat {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-empty {
  padding: 10px 0;
  text-align: left;
}

.mini-summary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 12px 0;
}

.social-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.social-table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
}

.social-table tbody tr {
  cursor: default;
}

.watchlist-card {
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
}

.watchlist-card.is-compact {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 0;
}

.watchlist-card.is-compact:first-child {
  border-top: 0;
  padding-top: 0;
}

body.is-landing {
  background: var(--ground);
}

body.is-landing .site-header {
  border-bottom-color: var(--hairline);
  background: var(--ground);
}

body.is-landing .toolbar,
body.is-landing #summary,
body.is-landing .table-status {
  display: none !important;
}

body.is-landing main {
  padding-top: 0;
}

.landing {
  max-width: 1080px;
  margin: 0 auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 52px;
  align-items: center;
  padding: 66px 0 72px;
  border-bottom: 1px solid var(--hairline);
}

.landing-hero .eyebrow {
  margin-bottom: 14px;
  color: var(--label);
}

.landing-hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 54px;
  line-height: 1.05;
  letter-spacing: 0;
  max-width: none;
}

.landing-hero h2 span {
  display: block;
}

.landing-hero .sub {
  margin: 22px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 17px;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.landing-cta-note {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.landing-cta-note a {
  color: var(--muted);
}

.auth-gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
}

.auth-gate a {
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-gate a.primary {
  background: var(--ink);
  color: var(--white);
}

.landing-btn {
  border: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  min-height: 46px;
  padding: 13px 20px;
  text-decoration: none;
  text-transform: uppercase;
}

.landing-btn.primary {
  background: var(--ink);
  color: var(--ground);
}

.landing-btn.ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--ink);
}

.landing-btn:hover {
  background: var(--label);
  border-color: var(--label);
  color: var(--label-ink);
}

.verdict {
  margin: 0;
  background: var(--raised);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-hard);
  font-family: var(--font-mono);
}

.verdict-head {
  background: var(--label);
  color: var(--label-ink);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.verdict-id {
  padding: 12px 13px;
  border-bottom: 1px solid var(--hairline);
}

.verdict-id .set {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.verdict-id .name {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
}

.verdict-id .grade {
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  white-space: nowrap;
}

.verdict-row {
  align-items: baseline;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
}

.verdict-row .k {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.verdict-row .v {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.verdict-row .v.big {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.verdict-row .v.pos {
  color: var(--green);
}

.verdict-row .v.sig {
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 1px 7px;
  text-transform: uppercase;
}

.verdict-foot {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 8px 13px;
  text-transform: uppercase;
}

.landing-band {
  padding: 54px 0;
  border-bottom: 1px solid var(--hairline);
}

.band-lead {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.4;
  max-width: 32ch;
}

.band-lead .dim {
  color: var(--muted);
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 26px;
}

.landing-step {
  border-left: 1px solid var(--hairline);
  padding-left: 22px;
}

.landing-step:first-child {
  border-left: 0;
  padding-left: 0;
}

.landing-step .n {
  color: var(--label);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.landing-step h3 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.landing-step p {
  margin: 0;
  color: var(--muted);
}

.landing-lenses {
  width: 100%;
  border-collapse: collapse;
  margin-top: 22px;
}

.landing-lenses th,
.landing-lenses td {
  border-top: 1px solid var(--hairline);
  padding: 14px 16px 14px 0;
  text-align: left;
  vertical-align: top;
}

.landing-lenses tr:last-child td,
.landing-lenses tr:last-child th {
  border-bottom: 1px solid var(--hairline);
}

.landing-lenses th {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: 220px;
}

.landing-lenses th a {
  color: inherit;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}

.landing-lenses th a:hover {
  color: var(--label);
  text-decoration-color: var(--label);
}

.landing-lenses td {
  color: var(--muted);
}

.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.landing-stat .num {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.landing-stat .cap {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

.landing-closer {
  padding: 64px 0 34px;
}

.landing-closer h2 {
  margin: 12px 0 24px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  max-width: 24ch;
}

.landing-foot {
  border-top: 1px solid var(--hairline);
  padding: 30px 0 56px;
}

.landing-foot .disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 64ch;
}

.landing-foot .line {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.landing-foot .line a {
  color: inherit;
  text-underline-offset: 3px;
}

.landing-foot .line a:hover {
  color: var(--label);
}

.is-hidden {
  display: none !important;
}

.nav-feedback {
  margin-left: 4px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 25, 28, 0.42);
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-hard);
  padding: 22px;
  display: grid;
  gap: 12px;
}

.modal-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.modal-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.modal-card .field {
  display: grid;
  gap: 6px;
}

.modal-card .field > span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-actions .ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.score-row {
  display: grid;
  grid-template-columns: 100px 1fr 44px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--panel-strong);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.empty {
  padding: 24px;
  color: var(--muted);
}

@media (max-width: 1360px) {
  .topbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    /* The tabs already wrap. Keeping this container scrollable also makes its
       vertical overflow compute to `auto`, which clips the Research listbox
       and lets scrollIntoView hide the first tabs on mobile Safari. */
    overflow: visible;
  }

  .summary,
  .layout,
  .card-hero,
  .card-page-grid,
  .delta-sales-grid,
  .expanded-detail,
  .social-shell,
  .portfolio-grid,
  .landing-hero,
  .landing-steps {
    grid-template-columns: 1fr;
  }

  .raw-pricing-status {
    grid-template-columns: 1fr;
  }

  .raw-pricing-status div,
  .raw-pricing-status div:first-child {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .raw-pricing-status div:first-child {
    border-top: 0;
  }

  .inline-form {
    grid-template-columns: 1fr 1fr;
  }

  .landing-hero {
    gap: 40px;
    padding: 44px 0 52px;
  }

  .landing-steps {
    gap: 26px;
  }

  .landing-step {
    border-left: 0;
    padding-left: 0;
  }

  .landing-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Set controls live in the right column of the two-column filter grid.
     Their readable popover must grow toward the page interior, not beyond the
     right viewport edge (which made mobile Safari pan the entire document). */
  .custom-select-wide-options .custom-select-list {
    left: auto;
    right: 0;
  }

  .legal-page {
    padding-top: 36px;
    padding-bottom: 56px;
  }

  input,
  select {
    width: 100%;
  }

  .toggle {
    width: 100%;
  }

  .ratings-table {
    min-width: 980px;
  }

  .ratings-table-wrap {
    overflow-x: auto;
  }

  .card-hero {
    padding: 14px;
  }

  .card-art-panel {
    min-height: 300px;
  }

  .card-hero h2 {
    font-size: 28px;
  }

  .market-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .market-row-stat {
    grid-column: 2;
    justify-self: start;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .source-strip {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .landing-hero h2,
  .landing-closer h2 {
    font-size: 34px;
    max-width: none;
  }

  .landing-lenses th,
  .landing-lenses td {
    display: block;
    padding-right: 0;
  }

  .landing-lenses td {
    border-top: 0;
    padding-top: 0;
  }
}
