:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --ink: #151817;
  --muted: #626e68;
  --line: #dce5e1;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --amber: #9a6814;
  --red: #a2332f;
  --green: #17633a;
  --steel: #394744;
  --shadow: 0 16px 40px rgba(21, 24, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

img,
svg {
  max-width: 100%;
}

code {
  color: var(--teal-dark);
  font-size: 0.9em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.94);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  margin-top: 1px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a,
.side-nav a,
.portfolio-nav a {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 650;
}

.nav-links a:hover,
.side-nav a:hover,
.portfolio-nav a:hover,
.portfolio-nav a.active {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.nav-links a.nav-cta {
  border-color: rgba(15, 118, 110, 0.22);
  color: var(--teal-dark);
  background: var(--surface);
}

.nav-links a.locked-action::after {
  content: "Locked";
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(154, 104, 20, 0.1);
  color: var(--amber);
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  text-transform: uppercase;
}

.auth-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-chip {
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  text-transform: uppercase;
}

.nav-auth-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  padding: 8px 10px;
}

.hero-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100vh - 72px);
  padding: clamp(28px, 6vw, 76px) clamp(20px, 5vw, 72px);
}

.research-hero {
  grid-template-columns: minmax(0, 0.88fr) minmax(440px, 1.12fr);
  align-items: start;
  min-height: calc(100vh - 72px);
  padding-top: clamp(20px, 3.4vw, 44px);
  padding-bottom: clamp(20px, 3.4vw, 44px);
  background: var(--bg);
  color: var(--ink);
}

.research-hero .hero-copy {
  position: relative;
  max-width: 840px;
}

.research-hero .eyebrow {
  color: var(--teal);
}

.research-hero .lead {
  color: var(--steel);
}

.research-build-board {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.scene-label {
  display: block;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pillar-score-card,
.portfolio-build-flow {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pillar-score-card {
  padding: 16px 18px 14px;
}

.visual-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 5px;
}

.visual-card-heading strong {
  color: var(--ink);
  font-size: 14px;
}

.score-card-title {
  display: block;
  font-size: 19px;
  line-height: 1.2;
  margin: 2px 0 4px;
}

.pillar-score-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) minmax(120px, 190px) 54px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 7px 0 0;
  margin-top: 7px;
  font-size: 13px;
}

.score-row b {
  display: block;
  height: 10px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.55) 0 1px,
      transparent 1px 10%
    ),
    linear-gradient(90deg, #dbe7e3 0%, #79b8aa 55%, #0f766e 100%);
}

.score-row em {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.portfolio-build-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.portfolio-build-flow article {
  position: relative;
  min-height: 132px;
  padding: 16px 16px 14px;
  border-right: 1px solid var(--line);
}

.portfolio-build-flow article:last-child {
  border-right: 0;
}

.portfolio-build-flow article::after {
  content: "";
  position: absolute;
  top: 27px;
  right: -8px;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
  background: var(--surface);
  transform: rotate(45deg);
  z-index: 1;
}

.portfolio-build-flow article:last-child::after {
  display: none;
}

.portfolio-build-flow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.portfolio-build-flow strong {
  display: block;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.2;
}

.portfolio-build-flow p {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.hero-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 18px;
}

.hero-proof-row span {
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  color: var(--steel);
  font-size: clamp(18px, 2vw, 23px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row.compact-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
  padding: 10px 14px;
}

.button.primary,
.small-button.strong {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.small-button.danger {
  border-color: rgba(130, 38, 38, 0.24);
  color: #8a2d2d;
}

.button.secondary:hover,
.small-button:hover {
  border-color: var(--teal);
}

.button:disabled,
.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button.locked-action {
  border-color: rgba(154, 104, 20, 0.25);
  color: var(--amber);
}

.small-button.danger:hover {
  border-color: #8a2d2d;
}

.terminal-preview,
.activity-panel,
.factsheet-panel,
.notice-panel,
.source-card,
.candidate-card,
.schema-card,
.metric-card,
.process-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.terminal-preview {
  overflow: hidden;
}

.preview-header,
.panel-heading,
.row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-header {
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
  padding: 14px 16px;
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.live {
  background: #3ddc84;
}

.metric-strip,
.metric-grid,
.small-metrics {
  display: grid;
  gap: 12px;
}

.metric-strip {
  grid-template-columns: repeat(3, 1fr);
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.metric-strip div,
.small-metrics div {
  display: grid;
  gap: 4px;
}

.metric-strip strong,
.metric-card strong,
.small-metrics strong {
  font-size: 24px;
}

.metric-strip span,
.metric-card span,
.small-metrics span,
td span,
.feed-item span {
  color: var(--muted);
  font-size: 12px;
}

.small-metrics small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.compact-metric-value {
  font-size: 16px;
  line-height: 1.25;
}

.tier-rule {
  display: block;
  margin-top: 6px;
}

.compact-table-wrap,
.table-wrap {
  overflow-x: auto;
}

.run-history-table {
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.compact-table td,
.compact-table th {
  padding: 12px 16px;
}

.data-table {
  min-width: 840px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table tr:last-child td,
.compact-table tr:last-child td {
  border-bottom: 0;
}

.table-select {
  min-width: 118px;
  padding: 7px 9px;
}

.band {
  padding: clamp(38px, 6vw, 82px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.muted-band {
  background: var(--surface-2);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
  line-height: 1.04;
}

.section-note {
  max-width: 900px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.35;
  margin: 8px 0 0;
}

.model-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1.18fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.workspace-section > .section-heading.row-heading {
  align-items: flex-end;
}

.workspace-section > .section-heading.row-heading > div:first-child {
  flex: 1 1 680px;
  min-width: 0;
}

.workspace-section > .section-heading.row-heading .portfolio-actions {
  align-self: flex-end;
  justify-content: flex-end;
  max-width: 640px;
}

.process-grid,
.source-grid,
.candidate-grid,
.schema-grid,
.factsheet-grid {
  display: grid;
  gap: 16px;
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.factor-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.factor-card strong,
.factor-card span {
  display: block;
}

.factor-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.factor-card span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.process-step,
.source-card,
.candidate-card,
.schema-card,
.notice-panel,
.factsheet-panel,
.activity-panel,
.metric-card {
  padding: 18px;
}

.process-step h3,
.source-card h3,
.candidate-card h3,
.factsheet-panel h3,
.activity-panel h3,
.activity-panel h2 {
  margin: 0;
}

.process-step p,
.notice-panel p,
.source-card p,
.candidate-card p,
.schema-card p,
.profile-block p {
  color: var(--muted);
}

.step-index {
  color: var(--amber);
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.pricing-hero {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 34px) clamp(20px, 5vw, 72px) clamp(24px, 3vw, 42px);
}

.pricing-hero .section-heading {
  max-width: 980px;
  margin-bottom: 0;
}

.pricing-hero .section-heading h1 {
  max-width: 920px;
  font-size: clamp(30px, 3.5vw, 46px);
}

.pricing-hero .section-note {
  max-width: 980px;
  font-size: clamp(17px, 1.7vw, 20px);
}

.pricing-account-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.pricing-account-status[hidden] {
  display: none;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.pricing-card.featured {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 18px 46px rgba(15, 118, 110, 0.12);
}

.plan-kicker {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-card h2 {
  margin: 4px 0 6px;
  font-size: 27px;
  line-height: 1.05;
}

.pricing-card p {
  color: var(--muted);
  margin: 0;
}

.price-line {
  color: var(--ink) !important;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.05;
}

.price-line span,
.annual-price {
  color: var(--muted) !important;
  font-size: 14px;
  font-weight: 750;
}

.plan-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-list li {
  border-top: 1px solid var(--line);
  color: var(--steel);
  font-size: 13px;
  font-weight: 650;
  padding-top: 7px;
}

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

.plan-actions .button {
  width: 100%;
  text-align: center;
}

.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.role-table,
.payment-path {
  display: grid;
  gap: 0;
}

.role-table div,
.payment-path div {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.role-table div:first-child,
.payment-path div:first-child {
  border-top: 0;
  padding-top: 0;
}

.role-table span,
.payment-path p {
  color: var(--muted);
  margin: 0;
}

.pricing-disclaimer {
  max-width: 980px;
}

.auth-page {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: start center;
  padding: clamp(26px, 4vw, 54px) clamp(20px, 5vw, 72px);
}

.auth-panel {
  display: grid;
  gap: 16px;
  width: min(920px, 100%);
}

.auth-form,
.auth-demo-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.auth-demo-panel p {
  color: var(--muted);
  margin: 0;
}

.account-hold-panel p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
  margin: 0;
}

.auth-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#authStatus.warning {
  color: var(--amber);
}

.upgrade-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(154, 104, 20, 0.25);
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: var(--shadow);
  margin: 0 0 18px;
  padding: 18px;
}

.upgrade-gate[hidden] {
  display: none;
}

.upgrade-gate h2 {
  margin: 8px 0 4px;
  font-size: 22px;
  line-height: 1.15;
}

.upgrade-gate p {
  color: var(--steel);
  margin: 0;
}

.locked-content {
  filter: blur(3px);
  opacity: 0.62;
  pointer-events: none;
  user-select: none;
}

.coverage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.coverage-strip span {
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
  padding: 8px 11px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px clamp(20px, 5vw, 72px);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 22px;
}

.profile-block {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.profile-kicker {
  color: var(--teal);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.side-nav,
.portfolio-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.portfolio-nav a {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
}

.portfolio-nav strong,
.portfolio-nav span {
  display: block;
  overflow-wrap: anywhere;
}

.portfolio-nav span {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  gap: 20px;
  padding: 26px;
}

.standalone-workspace {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.workspace-section {
  scroll-margin-top: 92px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.metric-card {
  min-height: 116px;
}

.metric-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.metric-card small {
  display: block;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 8px;
  padding-top: 8px;
}

.feed-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.feed-item:first-child {
  border-top: 0;
}

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
}

.filter-row select {
  width: auto;
  min-width: 160px;
}

.portfolio-action-select {
  width: auto;
  min-width: min(280px, 100%);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  white-space: nowrap;
}

.pill.success {
  border-color: rgba(23, 99, 58, 0.2);
  background: rgba(23, 99, 58, 0.08);
  color: var(--green);
}

.pill.warning {
  border-color: rgba(154, 104, 20, 0.22);
  background: rgba(154, 104, 20, 0.09);
  color: var(--amber);
}

.factsheet-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  margin-bottom: 18px;
}

.definition-grid,
.mini-definition {
  display: grid;
  gap: 12px;
  margin: 0;
}

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

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.layer-role-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  margin-top: 6px;
}

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

.performance-metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.performance-metrics-grid div {
  min-width: 0;
}

.performance-metrics-grid strong {
  font-size: 20px;
  line-height: 1.15;
}

.worksheet-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.holdings-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-width: 0;
}

.holdings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.holdings-actions {
  justify-content: flex-end;
}

.holdings-table-heading {
  align-items: flex-start;
}

.holdings-table-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.holdings-table-heading small {
  display: block;
  color: var(--muted);
  font-weight: 750;
}

.holdings-command-row {
  display: grid;
  grid-template-columns: minmax(280px, 620px) auto minmax(180px, 1fr);
  gap: 10px;
  align-items: end;
}

.workbench-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-width: 0;
}

.workbench-content.scores-layout {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  align-items: start;
}

.holdings-table-wrap {
  margin-top: 2px;
}

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

.candidate-table {
  min-width: 620px;
}

.portfolio-draft-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.portfolio-draft-panel[hidden] {
  display: none;
}

.portfolio-draft-panel h3 {
  margin: 0;
  font-size: 18px;
}

.portfolio-draft-panel small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.draft-table {
  font-size: 13px;
}

.draft-table th,
.draft-table td {
  padding: 9px 0;
}

.draft-table th:last-child,
.draft-table td:last-child {
  text-align: right;
}

.inline-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inline-status.success {
  color: var(--green);
}

.inline-status.warning {
  color: var(--amber);
}

.worksheet-controls,
.worksheet-summary,
.publication-form,
.upload-panel,
.chart-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: auto;
}

.prompt-box textarea {
  min-height: 190px;
  resize: vertical;
}

.prompt-box.holdings-adjustment-box textarea {
  height: 42px;
  min-height: 42px;
  max-width: 620px;
  resize: none;
}

.prompt-box.holdings-adjustment-box textarea:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

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

.publication-grid,
.chart-grid,
.archive-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.publication-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

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

.chart-grid {
  align-items: stretch;
}

.analytics-grid {
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr);
}

.analytics-performance-panel {
  display: grid;
  grid-template-rows: auto auto minmax(240px, 1fr);
  gap: 16px;
  min-height: 100%;
}

.analytics-industry-block {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.analytics-industry-list {
  display: grid;
  gap: 4px;
  max-height: 300px;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-gutter: stable;
}

.industry-exposure-row {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(13, 70, 63, 0.14);
  border-radius: 6px;
  background: var(--industry-color);
  padding: 5px 8px;
}

.industry-exposure-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.industry-exposure-main strong {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.industry-exposure-main span {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.industry-exposure-symbols {
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.industry-exposure-row.light-text {
  color: #fff;
}

.industry-exposure-row.light-text .industry-exposure-symbols {
  color: rgba(255, 255, 255, 0.88);
}

.industry-exposure-row.dark-text {
  color: #17211d;
}

.industry-exposure-row.dark-text .industry-exposure-symbols {
  color: #3e4e48;
}

.industry-exposure-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  padding: 16px;
}

.form-grid,
.upload-grid {
  display: grid;
  gap: 12px;
}

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

.layer-builder {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.automation-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px);
  align-items: end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.layer-grid {
  display: grid;
  gap: 12px;
}

.layer-card {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.layer-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.layer-fields {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) repeat(3, minmax(90px, 0.7fr));
  gap: 10px;
}

.layer-description {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.source-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.member-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
}

.member-list-panel,
.member-editor-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.member-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.compact-member-table {
  min-width: 1060px;
}

.member-row {
  cursor: pointer;
}

.member-row.is-selected {
  background: rgba(0, 121, 109, 0.08);
}

.member-access-note {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  padding: 12px;
}

.member-access-note.strong-note {
  color: var(--teal);
}

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

.member-entitlement-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding-top: 12px;
}

.member-entitlement-heading strong {
  color: var(--ink);
  font-size: 15px;
}

.member-entitlement-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.member-entitlement-row input {
  margin-top: 3px;
  width: auto;
}

.member-entitlement-row strong,
.member-entitlement-row small {
  display: block;
}

.member-entitlement-row small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.research-note-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(460px, 1.05fr);
  gap: 18px;
}

.research-note-editor,
.research-note-preview-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.research-note-editor textarea {
  resize: vertical;
}

.research-chart-controls {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

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

.research-chart-list p {
  color: var(--muted);
  margin: 0;
}

.research-chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.research-chart-row strong,
.research-chart-row span {
  display: block;
}

.research-chart-row span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.research-note-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  max-height: 780px;
  overflow: auto;
}

.research-paper {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  padding: 28px;
}

.research-paper-header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
}

.research-paper-header span,
.research-paper-header strong {
  color: var(--teal);
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-right: 12px;
  text-transform: uppercase;
}

.research-paper-header h2 {
  font-size: 30px;
  line-height: 1.08;
  margin: 12px 0 10px;
}

.research-paper-header p {
  color: var(--steel);
  font-size: 17px;
  font-weight: 750;
  margin: 0;
  text-align: justify;
  text-align-last: left;
}

.research-paper-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}

.research-paper-section h3 {
  font-size: 17px;
  margin: 0 0 10px;
}

.research-paper-section p {
  margin: 0 0 10px;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.research-paper-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.research-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.research-dashboard-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.research-dashboard-grid span {
  color: var(--teal);
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.research-dashboard-grid p {
  margin: 6px 0 0;
  text-align: justify;
  text-align-last: left;
}

.research-paper-charts {
  display: grid;
  gap: 14px;
}

.research-paper-chart-block {
  display: grid;
  gap: 8px;
  margin: 0;
}

.research-paper-chart-block h4 {
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
}

.research-paper-chart,
.research-paper-chart-image img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.research-paper-chart {
  min-height: 260px;
}

.research-paper-chart-image img {
  display: block;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}

.chart-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.research-paper-chart-block figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: justify;
  text-align-last: left;
}

.research-paper-disclosure {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  margin-top: 22px;
  padding-top: 14px;
}

.research-paper-disclosure p {
  text-align: justify;
  text-align-last: left;
}

.compact-source-table {
  min-width: 960px;
}

.pillar-source-list {
  display: grid;
  gap: 10px;
}

.pillar-row,
.pillar-add-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 10px;
}

.pillar-add-row {
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) auto;
}

.pillar-row textarea {
  min-height: 68px;
  resize: vertical;
}

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

.upload-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.upload-card strong,
.upload-card span {
  display: block;
}

.upload-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.upload-card input {
  margin-top: 10px;
  background: var(--surface);
}

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

.file-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding-top: 9px;
}

.file-status strong {
  color: var(--ink);
}

.draft-metrics {
  margin-bottom: 18px;
}

.chart {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.chart.hidden {
  display: none;
}

.analytics-chart {
  min-height: 300px;
}

.analytics-subchart {
  min-height: 170px;
}

.chart-bar {
  cursor: pointer;
}

.chart-bar-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.chart-hover-bar:hover .chart-bar-tooltip,
.chart-hover-bar:focus .chart-bar-tooltip,
.chart-hover-hit:hover ~ .chart-bar-tooltip,
.chart-hover-hit:focus ~ .chart-bar-tooltip {
  opacity: 1;
}

.factsheet-equity-card {
  width: 100%;
  margin-bottom: 18px;
}

.factsheet-chart {
  min-height: min(440px, 56vh);
}

.chart-range-controls .small-button {
  min-height: 34px;
  padding: 8px 12px;
}

.analytics-view-controls {
  flex-wrap: nowrap;
  justify-content: flex-end;
  overflow-x: auto;
}

.analytics-view-controls .small-button {
  white-space: nowrap;
}

.monthly-return-block {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.monthly-return-block[hidden],
.monthly-return-block.hidden {
  display: none;
}

.monthly-table-heading {
  align-items: end;
}

.monthly-table-heading h3 {
  margin: 0;
}

.monthly-table-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.monthly-return-table-wrap {
  overflow-x: auto;
}

.monthly-return-table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 3px;
}

.monthly-return-table th,
.monthly-return-table td {
  border-bottom: 0;
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
}

.monthly-return-table th:first-child {
  color: var(--steel);
  min-width: 42px;
  text-align: left;
}

.monthly-return-table thead th {
  font-size: 11px;
  line-height: 1.05;
  text-transform: none;
}

.monthly-return-table thead th span {
  display: block;
}

.monthly-return-table tfoot th,
.monthly-return-table tfoot td {
  padding-top: 10px;
}

.monthly-return-cell,
.monthly-period-cell {
  border-radius: 5px;
  color: #17211d;
  font-size: 11px;
  font-weight: 850;
  min-width: 39px;
}

.monthly-period-cell {
  min-width: 58px;
}

.monthly-return-cell.empty,
.monthly-period-cell.empty {
  background: #edf1ef;
  color: var(--muted);
}

.monthly-return-cell.neutral,
.monthly-period-cell.neutral {
  background: #edf1ef;
}

.monthly-return-cell.positive.light,
.monthly-period-cell.positive.light {
  background: #cfeade;
}

.monthly-return-cell.positive.medium,
.monthly-period-cell.positive.medium {
  background: #78c9ab;
}

.monthly-return-cell.positive.strong,
.monthly-period-cell.positive.strong {
  background: #089872;
  color: #ffffff;
}

.monthly-return-cell.negative.light,
.monthly-period-cell.negative.light {
  background: #f2d6d6;
}

.monthly-return-cell.negative.medium,
.monthly-period-cell.negative.medium {
  background: #e59a9d;
}

.monthly-return-cell.negative.strong,
.monthly-period-cell.negative.strong {
  background: #bf4f55;
  color: #ffffff;
}

.monthly-period-cell.model-period {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22);
}

.monthly-period-cell.benchmark-period {
  box-shadow: inset 0 0 0 1px rgba(154, 104, 20, 0.24);
}

.factsheet-preview {
  display: grid;
  gap: 14px;
}

.factsheet-preview-block {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.factsheet-preview-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.factsheet-preview-block h3 {
  margin: 0 0 8px;
}

.factsheet-preview-block p {
  color: var(--muted);
  margin: 0;
}

.schema-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

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

@media (max-width: 1100px) {
  .hero-dashboard,
  .app-shell,
  .split-layout,
  .model-board-layout,
  .pricing-layout,
  .worksheet-layout,
  .holdings-workspace,
  .publication-grid,
  .chart-grid,
  .archive-grid,
  .source-layout,
  .member-admin-grid,
  .research-note-grid {
    grid-template-columns: 1fr;
  }

  .workbench-content.scores-layout {
    grid-template-columns: 1fr;
  }

  .portfolio-draft-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }

  .holdings-command-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .holdings-command-row .inline-status {
    grid-column: 1 / -1;
  }

  .chart-grid.analytics-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .process-grid,
  .factor-grid,
  .portfolio-build-flow,
  .pricing-grid,
  .metric-grid,
  .schema-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-build-flow article:nth-child(2) {
    border-right: 0;
  }

  .portfolio-build-flow article:nth-child(2)::after {
    display: none;
  }
}

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

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

  .analytics-performance-panel {
    min-height: auto;
  }

  .workspace-section > .section-heading.row-heading .portfolio-actions {
    align-self: stretch;
    justify-content: flex-start;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .chart-grid.analytics-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .footer,
  .row-heading,
  .feed-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    align-items: stretch;
    gap: 10px;
    min-height: auto;
    padding: 10px 14px;
  }

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

  .brand-mark {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 16px;
    line-height: 1.1;
  }

  .brand small {
    font-size: 11px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a,
  .nav-auth-button,
  .auth-chip {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .auth-nav-item {
    flex: 0 0 auto;
  }

  .hero-dashboard {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 36px;
  }

  .research-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding-bottom: 48px;
    padding-top: 48px;
  }

  .hero-dashboard > *,
  .research-hero > *,
  .research-build-board,
  .pillar-score-card,
  .portfolio-build-flow,
  .hero-copy {
    min-width: 0;
    max-width: 100%;
  }

  .terminal-preview {
    min-width: 0;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 13vw, 58px);
    line-height: 0.98;
  }

  .lead,
  .section-note {
    font-size: 17px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .pillar-score-card p,
  .score-row span,
  .visual-card-heading {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .visual-card-heading {
    flex-wrap: wrap;
  }

  .visual-card-heading > * {
    min-width: 0;
  }

  .model-board-layout,
  .process-grid,
  .factor-grid,
  .portfolio-build-flow,
  .pricing-grid,
  .auth-role-grid,
  .metric-grid,
  .factsheet-grid,
  .source-grid,
  .candidate-grid,
  .schema-grid,
  .definition-grid,
  .form-grid,
  .automation-card,
  .small-metrics,
  .performance-metrics-grid,
  .metric-strip,
  .research-dashboard-grid,
  .layer-fields,
  .pillar-row,
  .pillar-add-row {
    grid-template-columns: 1fr;
  }

  .score-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .score-row em {
    text-align: left;
  }

  .upgrade-gate {
    align-items: flex-start;
    flex-direction: column;
  }

  .portfolio-build-flow article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portfolio-build-flow article:last-child {
    border-bottom: 0;
  }

  .portfolio-build-flow article::after {
    display: none;
  }

  .workspace {
    gap: 16px;
    padding: 14px;
  }

  .standalone-workspace {
    padding-left: 14px;
    padding-right: 14px;
  }

  .section-heading h1,
  .section-heading h2 {
    font-size: clamp(25px, 8.5vw, 34px);
    line-height: 1.08;
  }

  .sidebar {
    padding: 14px;
  }

  .profile-block {
    padding-bottom: 12px;
  }

  .profile-block p {
    margin: 6px 0 0;
  }

  .side-nav,
  .portfolio-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .side-nav::-webkit-scrollbar,
  .portfolio-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav a,
  .portfolio-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    white-space: nowrap;
  }

  .portfolio-nav a {
    min-width: min(240px, 82vw);
  }

  .workspace-section > .section-heading.row-heading {
    gap: 12px;
  }

  .workspace-section > .section-heading.row-heading > div:first-child {
    flex-basis: auto;
    width: 100%;
  }

  .workspace-section > .section-heading.row-heading .portfolio-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .portfolio-actions .button,
  .portfolio-actions .portfolio-action-select {
    width: 100%;
    min-width: 0;
  }

  .portfolio-actions .portfolio-action-select {
    grid-column: 1 / -1;
  }

  .button,
  .small-button {
    min-height: 44px;
  }

  .button-row:not(.compact-actions) {
    align-items: stretch;
    width: 100%;
  }

  .button-row:not(.compact-actions) .button,
  .button-row:not(.compact-actions) .small-button {
    flex: 1 1 min(170px, 100%);
  }

  .factsheet-panel,
  .notice-panel,
  .activity-panel,
  .worksheet-controls,
  .worksheet-summary,
  .publication-form,
  .upload-panel,
  .chart-card,
  .pricing-card {
    padding: 14px;
  }

  .panel-heading,
  .preview-header {
    gap: 10px;
  }

  .filter-row {
    width: 100%;
  }

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

  select,
  input,
  textarea {
    min-height: 44px;
  }

  .table-wrap,
  .compact-table-wrap,
  .monthly-return-table-wrap {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 720px;
  }

  .chart {
    min-height: 220px;
  }

  .monthly-return-table {
    min-width: 720px;
  }

  .monthly-return-table th,
  .monthly-return-table td {
    padding: 5px 3px;
  }

  .holdings-toolbar,
  .holdings-actions,
  .holdings-command-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .prompt-box.holdings-adjustment-box textarea {
    max-width: none;
  }

  .prompt-box textarea {
    min-height: 160px;
  }

  .research-note-preview {
    max-height: none;
  }

  .research-paper {
    padding: 18px;
    font-size: 13px;
  }

  .research-paper-header h2 {
    font-size: 24px;
  }

  .research-paper-header p {
    font-size: 15px;
  }

  .research-paper-chart {
    min-height: 210px;
  }

  .analytics-industry-list {
    max-height: 240px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-dashboard,
  .band,
  .pricing-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 14vw, 48px);
  }

  .workspace-section > .section-heading.row-heading .portfolio-actions {
    grid-template-columns: 1fr;
  }

  .button-row:not(.compact-actions) .button,
  .button-row:not(.compact-actions) .small-button {
    flex-basis: 100%;
  }

  .data-table {
    min-width: 660px;
  }

  .holdings-table,
  .candidate-table {
    min-width: 600px;
  }

  .monthly-return-table {
    min-width: 660px;
  }

  .chart {
    min-height: 200px;
  }

  .research-paper {
    padding: 14px;
  }

  .research-paper-header h2 {
    font-size: 22px;
  }
}
