/* Fixed read-only Bravo Stock Screener. */
:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #050a12;
  color: #eaf1fb;
  font-synthesis: none;
  --ink: #eaf1fb;
  --muted: #8fa0b8;
  --line: rgba(151, 170, 197, 0.16);
  --panel: rgba(12, 24, 41, 0.78);
  --panel-strong: #0c1829;
  --accent: #4be1a8;
  --accent-soft: rgba(75, 225, 168, 0.12);
  --blue: #66a7ff;
  --gold: #f5c96c;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background:
    radial-gradient(circle at 18% -10%, rgba(55, 116, 190, 0.25), transparent 34rem),
    radial-gradient(circle at 90% 5%, rgba(35, 177, 128, 0.12), transparent 30rem),
    #050a12;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

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

a {
  color: inherit;
}

.shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(75, 225, 168, 0.36);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(75, 225, 168, 0.2), rgba(102, 167, 255, 0.08));
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.brand strong {
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.snapshot-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(245, 201, 108, 0.08);
}

.snapshot-status.ready .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(75, 225, 168, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.75fr);
  gap: 72px;
  align-items: end;
  padding: 78px 0 58px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 6vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: -0.068em;
}

.lede {
  max-width: 770px;
  margin-bottom: 28px;
  color: #aebbd0;
  font-size: clamp(1.05rem, 1.65vw, 1.35rem);
  line-height: 1.62;
}

.as-of-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  color: var(--muted);
  font-size: 0.83rem;
}

.as-of-line strong {
  margin-left: 5px;
  color: var(--ink);
  font-weight: 650;
}

.strategy-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(102, 167, 255, 0.2);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(20, 41, 67, 0.78), rgba(8, 19, 34, 0.92)),
    var(--panel-strong);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}

.strategy-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -80px;
  top: -80px;
  border-radius: 999px;
  background: rgba(75, 225, 168, 0.08);
  filter: blur(2px);
}

.strategy-card-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.locked-pill {
  padding: 5px 9px;
  border: 1px solid rgba(75, 225, 168, 0.24);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.strategy-card h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.strategy-card p,
.strategy-card li {
  color: #9daec5;
  font-size: 0.88rem;
  line-height: 1.6;
}

.strategy-card ul {
  margin: 18px 0 0;
  padding: 16px 0 0 19px;
  border-top: 1px solid var(--line);
}

.strategy-card li + li {
  margin-top: 7px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(7, 16, 29, 0.55);
}

.summary-card {
  min-height: 145px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.summary-card:last-child {
  border-right: 0;
}

.summary-card span,
.summary-card small {
  display: block;
  color: var(--muted);
}

.summary-card span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.summary-card small {
  font-size: 0.78rem;
}

.summary-card-primary {
  background: linear-gradient(145deg, rgba(75, 225, 168, 0.12), rgba(75, 225, 168, 0.02));
}

.summary-card-primary strong {
  color: var(--accent);
}

.results-panel {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.panel-heading h2 {
  margin-bottom: 0;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.universe-summary {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.tab-list {
  display: flex;
  gap: 8px;
  margin: 28px 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover,
.tab:focus-visible {
  color: var(--ink);
  outline: none;
}

.tab.active {
  border-color: rgba(75, 225, 168, 0.24);
  background: var(--accent-soft);
  color: var(--accent);
}

.display-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 0.42fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}

.display-filters label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #091424;
  color: var(--ink);
}

input:focus,
select:focus {
  border-color: rgba(102, 167, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(102, 167, 255, 0.1);
}

input::placeholder {
  color: #65758b;
}

.visible-count {
  min-width: 120px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(4, 11, 20, 0.58);
}

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

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0a1525;
}

th button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f91aa;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

th button:hover,
th button:focus-visible,
th[aria-sort] button {
  color: var(--ink);
  outline: none;
}

th[aria-sort="ascending"] button::after {
  content: " ↑";
  color: var(--accent);
}

th[aria-sort="descending"] button::after {
  content: " ↓";
  color: var(--accent);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(102, 167, 255, 0.04);
}

td {
  color: #aebbd0;
  font-size: 0.82rem;
}

td.ticker {
  color: #fff;
  font-weight: 780;
  letter-spacing: 0.02em;
}

td.company {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grade {
  display: inline-flex;
  min-width: 40px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 201, 108, 0.1);
  color: var(--gold);
  font-weight: 750;
}

.score {
  color: var(--accent);
  font-weight: 760;
}

.empty-state {
  min-height: 210px;
  padding: 54px 24px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state:not([hidden]) {
  display: grid;
}

.empty-state strong {
  font-size: 1rem;
}

.empty-state span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
}

.method-grid article {
  min-height: 230px;
  padding: 28px;
  background: #081321;
}

.method-number {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}

.method-grid h2 {
  margin: 52px 0 12px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.method-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.disclaimer {
  margin: 28px 0 56px;
  padding: 20px 22px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(245, 201, 108, 0.06);
  color: #9daac0;
  font-size: 0.84rem;
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--gold);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: #73839a;
  font-size: 0.76rem;
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 60px;
  }

  .strategy-card {
    max-width: 720px;
  }

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

  .summary-card:nth-child(2) {
    border-right: 0;
  }

  .summary-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1480px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }

  .hero {
    padding: 46px 0 38px;
  }

  h1 {
    font-size: clamp(2.75rem, 15vw, 4.8rem);
  }

  .summary-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-card:last-child {
    border-bottom: 0;
  }

  .results-panel {
    padding: 20px 14px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .universe-summary {
    text-align: left;
  }

  .display-filters {
    grid-template-columns: 1fr;
  }

  .visible-count {
    margin: 0;
    text-align: left;
  }

  .method-grid article {
    min-height: 0;
  }

  .method-grid h2 {
    margin-top: 28px;
  }

  footer {
    flex-direction: column;
  }
}
