:root {
  --ink: #172019;
  --ink-muted: #556057;
  --paper: #f3f0e6;
  --paper-deep: #e7e1d2;
  --card: #faf8f1;
  --line: rgba(23, 32, 25, 0.16);
  --line-strong: rgba(23, 32, 25, 0.32);
  --saffron: #e7652b;
  --saffron-soft: #f2b38d;
  --green: #1d6f53;
  --green-soft: #cfe2d7;
  --ochre: #c99428;
  --red: #a8392e;
  --shadow: 0 24px 70px rgba(37, 43, 35, 0.09);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 3%, rgba(231, 101, 43, 0.12), transparent 24rem),
    linear-gradient(180deg, #f6f3eb 0%, var(--paper) 44%, #eeeadf 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

.shell {
  width: min(1440px, calc(100% - 64px));
  margin-inline: auto;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 243, 235, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1;
}

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

.brand strong {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.025em;
}

.brand small {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.nav-link {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--paper);
  background: var(--ink);
}

.local-badge {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(29, 111, 83, 0.1);
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
  animation: view-in 420ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: 505px;
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 505px;
  padding: 64px clamp(40px, 6vw, 92px);
  overflow: hidden;
}

.hero-copy::after {
  content: "Q2";
  position: absolute;
  right: -18px;
  bottom: -58px;
  color: rgba(23, 32, 25, 0.035);
  font-family: var(--serif);
  font-size: 240px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--saffron);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.info-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(56px, 6.7vw, 108px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.83;
}

.hero h1 em,
.info-hero h1 em {
  color: var(--saffron);
  font-weight: 500;
}

.hero-intro {
  max-width: 590px;
  margin: 30px 0 0;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease, color 170ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 rgba(23, 32, 25, 0.13);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.button-primary {
  color: #fffaf0;
  background: var(--ink);
}

.button-primary:hover {
  background: var(--green);
}

.button-secondary {
  background: transparent;
}

.button-secondary:hover {
  color: #fffaf0;
  background: var(--ink);
}

.button.compact {
  min-height: 42px;
  white-space: nowrap;
}

.text-action {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.hero-aside {
  display: grid;
  grid-template-rows: auto 1fr;
  border-left: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}

.source-stamp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 25px 30px;
  border-bottom: 1px solid rgba(243, 240, 230, 0.16);
}

.source-stamp-label,
.source-stamp span:last-child,
.pulse-caption span {
  color: rgba(243, 240, 230, 0.54);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-stamp strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.pulse-graphic {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 36px 30px;
  overflow: hidden;
}

.pulse-graphic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 40%, rgba(231, 101, 43, 0.16), transparent 48%);
}

.pulse-graphic svg {
  position: relative;
  width: 100%;
  overflow: visible;
}

.grid-line {
  fill: none;
  stroke: rgba(243, 240, 230, 0.1);
  stroke-width: 1;
}

.signal-line {
  fill: none;
  stroke: var(--saffron-soft);
  stroke-linecap: round;
  stroke-width: 3;
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: draw-signal 1.6s 300ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

.signal-fill {
  fill: url("#signal-gradient");
  opacity: 0.08;
}

@keyframes draw-signal {
  to {
    stroke-dashoffset: 0;
  }
}

.pulse-caption {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
}

.pulse-caption strong {
  color: var(--saffron-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.workspace {
  padding-block: 34px 90px;
}

.dataset-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ochre);
  background: rgba(250, 248, 241, 0.65);
}

.dataset-banner strong,
.dataset-kicker {
  display: block;
}

.dataset-banner strong {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.dataset-kicker,
.dataset-meta {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dataset-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--red);
  border-color: var(--red);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.coverage-rail {
  display: grid;
  grid-template-columns: 0.85fr repeat(3, 1fr);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(23, 32, 25, 0.035);
}

.coverage-heading,
.coverage-item {
  min-height: 88px;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.coverage-item:last-child {
  border-right: 0;
}

.coverage-heading,
.coverage-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.coverage-heading span,
.coverage-item span,
.coverage-item small {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.coverage-heading strong {
  color: var(--green);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.coverage-item strong {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.coverage-item small {
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}

.benchmark-strip {
  display: grid;
  grid-template-columns: 1fr 1.8fr auto;
  align-items: center;
  gap: 24px;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(227, 101, 42, 0.055);
}

.benchmark-strip div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.benchmark-strip span,
.benchmark-strip p,
.benchmark-strip a {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
}

.benchmark-strip span,
.benchmark-strip p {
  color: var(--ink-muted);
}

.benchmark-strip strong {
  color: var(--green);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.benchmark-strip p {
  margin: 0;
}

.benchmark-strip a {
  color: var(--ink);
  white-space: nowrap;
}

.metric-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 168px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 241, 0.58);
  overflow: hidden;
}

.metric-card-dark {
  color: var(--paper);
  background: var(--ink);
}

.accent-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 95px;
  height: 95px;
  border: 22px solid rgba(231, 101, 43, 0.14);
  border-radius: 50%;
}

.metric-label,
.metric-note {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-label {
  color: var(--ink-muted);
}

.metric-card-dark .metric-label,
.metric-card-dark .metric-note {
  color: rgba(243, 240, 230, 0.55);
}

.metric-value {
  position: relative;
  z-index: 1;
  margin-block: auto;
  padding-top: 10px;
  font-family: var(--serif);
  font-size: 54px;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.metric-note {
  color: var(--ink-muted);
  letter-spacing: 0;
  text-transform: none;
}

.screen-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 60px;
  margin-top: 74px;
}

.screen-section-heading h2,
.results-toolbar h2,
.watchlist-section h2,
.data-policy h2,
.formula-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.section-note {
  max-width: 410px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.7;
}

.screen-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
  border: 1px solid var(--line);
}

.screen-tab {
  position: relative;
  min-height: 138px;
  padding: 18px;
  border: 0;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: color 220ms ease, background 220ms ease;
}

.screen-tab::after {
  content: "↗";
  position: absolute;
  right: 16px;
  bottom: 13px;
  color: var(--line-strong);
  font-family: var(--mono);
}

.screen-tab:hover,
.screen-tab.is-active {
  color: var(--paper);
  background: var(--green);
}

.screen-tab.is-active::after,
.screen-tab:hover::after {
  color: var(--saffron-soft);
}

.screen-number,
.screen-count {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-number {
  color: #a43c17;
}

.screen-tab.is-active .screen-number,
.screen-tab:hover .screen-number {
  color: #ffe4d2;
}

.screen-tab strong {
  display: block;
  max-width: 150px;
  margin: 16px 0 9px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}

.screen-count {
  color: var(--ink-muted);
  letter-spacing: 0;
  text-transform: none;
}

.screen-tab.is-active .screen-count,
.screen-tab:hover .screen-count {
  color: rgba(255, 255, 255, 0.88);
}

.results-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: rgba(250, 248, 241, 0.72);
  box-shadow: var(--shadow);
}

.results-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  padding: 30px;
  border-bottom: 1px solid var(--line);
}

.results-toolbar h2 {
  font-size: 37px;
}

#active-screen-description {
  max-width: 580px;
  margin: 9px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
}

.toolbar-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.search-control,
.select-control {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.search-control {
  gap: 8px;
  min-width: 235px;
  padding-inline: 12px;
}

.search-control svg {
  width: 16px;
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1.7;
}

.search-control input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.select-control {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 4px 9px;
}

.select-control span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 7px;
  text-transform: uppercase;
}

.select-control select {
  min-width: 125px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
}

.logic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(23, 32, 25, 0.035);
}

.logic-chip {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.filter-panel {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.2);
}

.filter-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 30px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel summary::before {
  content: "+";
  color: var(--saffron);
  font-size: 14px;
}

.filter-panel[open] summary::before {
  content: "−";
}

.filter-panel summary > span:first-child {
  margin-right: auto;
}

.filter-count {
  color: var(--ink-muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  padding: 8px 30px 24px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-grid label > span,
.universe-picker > span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: rgba(255, 255, 255, 0.45);
  font-family: var(--mono);
  font-size: 9px;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--green);
}

.filter-grid .filter-check {
  flex-direction: row;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.filter-grid .filter-check input {
  width: 15px;
  height: 15px;
  padding: 0;
  accent-color: var(--green);
}

.filter-grid .filter-check span {
  color: var(--ink);
  font-size: 8px;
  line-height: 1.35;
}

.filter-reset {
  align-self: end;
  justify-self: start;
  min-height: 38px;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
}

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

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}

th:first-child,
td:first-child {
  padding-left: 30px;
  text-align: left;
}

th:last-child,
td:last-child {
  padding-right: 30px;
}

th {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

tbody tr {
  transition: background 150ms ease;
}

tbody tr:hover {
  background: rgba(231, 101, 43, 0.055);
}

tbody tr.is-context-only {
  opacity: 0.62;
}

tbody tr.is-context-only:hover {
  opacity: 0.9;
}

.company-cell strong,
.company-cell span {
  display: block;
}

.company-cell .filing-meta {
  display: inline-block;
  margin-top: 5px;
  color: var(--green);
  font-size: 7px;
  text-decoration: none;
  text-transform: uppercase;
}

.company-cell .filing-meta:hover {
  text-decoration: underline;
}

.company-cell strong {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
}

.company-cell span {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 8px;
}

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

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

.muted-value {
  color: #8e938c;
}

.delta-source {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 7px;
  text-transform: uppercase;
}

.holding-value {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 7px;
  white-space: nowrap;
}

.signal-score {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 26px;
  padding-inline: 7px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-weight: 500;
}

.quality-stack {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 3px;
}

.market-stack {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 3px;
  white-space: nowrap;
}

.market-stack small {
  color: var(--ink-muted);
  font-size: 7px;
}

.quality-stack small {
  color: var(--ink-muted);
  font-size: 7px;
}

.watch-button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.watch-button:hover,
.watch-button.is-active {
  border-color: var(--saffron);
  color: var(--paper);
  background: var(--saffron);
}

.empty-state {
  padding: 72px 30px;
  text-align: center;
}

.empty-glyph {
  color: var(--saffron);
  font-family: var(--serif);
  font-size: 58px;
}

.empty-state h3 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.empty-state p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.watchlist-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  margin-top: 70px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.watchlist-section h2 {
  font-size: 34px;
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.watch-card,
.watch-placeholder {
  min-height: 122px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(250, 248, 241, 0.54);
}

.watch-card {
  position: relative;
}

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

.watch-card strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.watch-card span {
  margin-top: 6px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 8px;
}

.watch-card button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  cursor: pointer;
}

.watch-placeholder {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

.info-view {
  min-height: calc(100vh - 76px);
  padding-block: 80px 110px;
}

.info-hero {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: end;
  gap: 50px;
  padding-bottom: 70px;
  border-bottom: 1px solid var(--line);
}

.info-hero .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -15px;
}

.info-hero h1 {
  font-size: clamp(55px, 7vw, 105px);
}

.info-hero > p:last-child {
  max-width: 440px;
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.8;
}

.source-ladder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--line);
}

.source-card {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 28px;
  background: var(--card);
}

.source-card-primary {
  color: var(--paper);
  background: var(--ink);
}

.rank {
  color: var(--saffron);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-card-primary .rank {
  color: var(--saffron-soft);
}

.source-card h2 {
  max-width: 270px;
  margin: 80px 0 18px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.source-card p,
.source-card li {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.7;
}

.source-card-primary p,
.source-card-primary li {
  color: rgba(243, 240, 230, 0.65);
}

.source-card ul {
  margin: 12px 0 28px;
  padding-left: 18px;
}

.source-card a {
  width: fit-content;
  margin-top: auto;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 9px;
  text-decoration: none;
  text-transform: uppercase;
}

.data-policy {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
  margin-top: 34px;
  padding: 45px;
  border: 1px solid var(--line);
  background: var(--green-soft);
}

.data-policy h2 {
  font-size: 36px;
}

.data-policy > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
}

.method-hero {
  display: block;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 34px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.method-grid article {
  min-height: 300px;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-grid span {
  color: var(--saffron);
  font-family: var(--mono);
  font-size: 10px;
}

.method-grid h2 {
  margin: 90px 0 14px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.method-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.75;
}

.formula-card {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 34px;
  padding: 40px;
  color: var(--paper);
  background: var(--ink);
}

.formula-card h2 {
  font-size: 34px;
}

.formula-card code {
  padding: 20px;
  border: 1px solid rgba(243, 240, 230, 0.2);
  color: var(--saffron-soft);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
}

.formula-card > p {
  margin: 0;
  color: rgba(243, 240, 230, 0.64);
  font-size: 12px;
  line-height: 1.8;
}

.import-dialog {
  width: min(620px, calc(100% - 32px));
  padding: 0;
  border: 0;
  background: transparent;
}

.import-dialog::backdrop {
  background: rgba(15, 21, 16, 0.7);
  backdrop-filter: blur(5px);
}

.dialog-card {
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.dialog-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.dialog-close {
  align-self: flex-start;
  border: 0;
  background: transparent;
  font-size: 25px;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.field > span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: var(--card);
}

.field textarea {
  min-height: 92px;
  padding: 11px 12px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
}

.check-grid {
  display: grid;
  gap: 9px;
  margin-top: 19px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.24);
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.check-field input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}

.sync-progress {
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--saffron);
  background: rgba(231, 101, 43, 0.07);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.55;
}

.field small {
  color: var(--ink-muted);
  font-size: 10px;
}

.universe-picker {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.24);
}

.universe-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.universe-picker small {
  display: block;
  margin-top: 9px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin-top: 20px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.26);
  text-align: center;
  cursor: pointer;
  transition: border 160ms ease, background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--saffron);
  background: rgba(231, 101, 43, 0.06);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-zone strong,
.drop-zone span {
  display: block;
}

.drop-zone strong {
  margin-top: 6px;
  font-size: 13px;
}

.drop-zone span:last-child {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
}

.drop-icon {
  color: var(--saffron);
  font-family: var(--serif);
  font-size: 34px;
}

.dialog-note {
  margin-top: 16px;
  padding: 12px;
  color: var(--ink-muted);
  background: var(--green-soft);
  font-size: 10px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.form-error {
  min-height: 16px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  max-width: 360px;
  padding: 13px 16px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 7px 7px 0 rgba(231, 101, 43, 0.3);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1120px) {
  .screen-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .coverage-rail {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .coverage-heading,
  .coverage-item:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

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

  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-controls {
    width: 100%;
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .search-control {
    flex: 1;
  }

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

  .formula-card {
    grid-template-columns: 1fr 1fr;
  }

  .formula-card > p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 28px, 1440px);
  }

  .app-header {
    grid-template-columns: 1fr auto;
    padding-inline: 16px;
    background: rgba(246, 243, 235, 0.97);
    backdrop-filter: none;
  }

  .top-nav {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 50;
    justify-content: center;
    background: rgba(23, 32, 25, 0.94);
    border-color: rgba(255,255,255,.12);
  }

  .nav-link {
    color: rgba(243, 240, 230, 0.62);
  }

  .nav-link.is-active {
    color: var(--ink);
    background: var(--paper);
  }

  .local-badge {
    display: none;
  }

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

  .hero-copy {
    min-height: 480px;
    padding: 52px 28px;
  }

  .hero-aside {
    min-height: 350px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .screen-section-heading,
  .info-hero,
  .data-policy,
  .watchlist-section {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .screen-section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .screen-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar-controls {
    flex-wrap: wrap;
  }

  .search-control {
    width: 100%;
    min-width: 100%;
  }

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

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

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

  .source-card {
    min-height: 380px;
  }

  .info-hero {
    display: block;
  }

  .info-hero > p:last-child {
    margin-top: 30px;
  }
}

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

  .hero h1,
  .info-hero h1 {
    font-size: 52px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .text-action {
    align-self: center;
  }

  .summary-grid,
  .coverage-rail,
  .benchmark-strip,
  .screen-tabs,
  .watchlist-grid,
  .method-grid,
  .formula-card {
    grid-template-columns: 1fr;
  }

  .coverage-heading,
  .coverage-item {
    min-height: 76px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .screen-tab {
    min-height: 115px;
  }

  .results-toolbar {
    padding: 22px;
  }

  .filter-panel summary {
    align-items: flex-start;
    padding-inline: 22px;
  }

  .filter-count {
    max-width: 120px;
    text-align: right;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    padding: 8px 22px 22px;
  }

  .select-control {
    flex: 1;
  }

  .formula-card > p {
    grid-column: auto;
  }

  .dialog-card {
    padding: 22px;
  }
}

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