:root {
  color-scheme: light;
  --hero: #28216e;
  --hero-edge: #3b2c9e;
  --hero-text: #f9f6ff;
  --hero-muted: #e4ddff;
  --hero-warm: #ffb783;
}

[data-theme="dark"] {
  color-scheme: dark;
  --hero: #282050;
  --hero-edge: #392a70;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand-mark, .intro-logo { display: inline-flex; flex: none; width: 36px; height: 36px; }
.brand-mark svg, .intro-logo svg, .m-logo svg { display: block; width: 100%; height: 100%; }

.project-intro {
  width: min(440px, calc(100% - 32px));
  margin: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  box-shadow: 0 25px 80px #0d092b40;
}
.project-intro::backdrop { background: var(--overlay); }
.project-intro h2 { margin: 12px 0; line-height: 1.3; font-size: 23px; }
.project-intro p { color: var(--text-muted); }
.project-intro form { margin-top: 20px; }

.sector-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.37fr);
  align-items: center;
  gap: clamp(24px, 6vw, 90px);
  padding: clamp(24px, 4vw, 60px);
  border-radius: 22px 22px 4px 4px;
  overflow: hidden;
  background: linear-gradient(115deg, var(--hero), var(--hero-edge));
  color: var(--hero-text);
}
.sector-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.26;
  background:
    repeating-linear-gradient(90deg, #d9ceff28 0 1px, transparent 1px 36px),
    repeating-linear-gradient(0deg, #d9ceff28 0 1px, transparent 1px 36px);
  mask-image: linear-gradient(90deg, transparent 22%, #000 100%);
}
.sector-hero .hero-kicker {
  margin: 0 0 14px;
  color: var(--hero-warm);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.09em;
}
.sector-hero h1 {
  margin: 0;
  font-weight: 780;
  font-size: clamp(45px, 5.3vw, 78px);
  letter-spacing: -0.06em;
  line-height: 1.03;
}
.sector-hero p { max-width: 36em; margin: 17px 0; color: var(--hero-muted); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.hero-actions .btn { min-height: 36px; padding-inline: 14px; font-weight: 700; }
.hero-actions .btn:first-child { color: #281d65; background: #fcf9ff; border-color: #fcf9ff; }
.hero-actions .btn:last-child { color: #fff2e8; background: #ffffff15; border-color: #f2c6b2aa; }
.hero-actions .btn:first-child:hover { background: #e6dfff; }
.hero-actions .btn:last-child:hover { background: #ffffff30; }
.hero-actions .btn:focus-visible { outline-color: var(--hero-warm); }
.hero-metrics { margin: 0; }
.hero-metrics div { padding: 12px 0 12px 17px; border-left: 2px solid #cbbef47a; }
.hero-metrics div:first-child { border-color: var(--hero-warm); }
.hero-metrics dt { color: var(--hero-muted); font-size: 12px; }
.hero-metrics dd { margin: 2px 0 0; font-size: clamp(19px, 2.6vw, 32px); font-weight: 650; white-space: nowrap; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
}
.overview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--accent);
}
.overview-heading h2 { margin: 0; font-size: 21px; }
.overview-heading > span { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.watch-search { display: grid; gap: 4px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.watch-search input {
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.sector-lane, .queue-item { padding: 13px 0; border-bottom: 1px solid var(--border); }
.sector-lane h3, .queue-item h3 { margin: 0 0 7px; font-size: 14px; }
.sector-symbols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 6px; }
.sector-quote {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 6px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}
.sector-quote:hover { border-color: var(--accent); background: var(--accent-soft); }
.sector-quote span { font-size: 11px; }
.queue-item > span { display: inline-block; margin-bottom: 5px; font-size: 11px; color: var(--warning-fg); }
.queue-item p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.65; }
.research-queue .btn { margin-top: 12px; }
.research-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 32px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .sector-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hero-metrics { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .hero-metrics div { padding: 2px 0 2px 9px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
