:root {
  color-scheme: dark;
  --canvas: #07100f;
  --canvas-raised: #0b1514;
  --surface: #111d1b;
  --surface-2: #162321;
  --surface-3: #1d2c29;
  --border: rgba(220, 239, 230, 0.13);
  --border-strong: rgba(220, 239, 230, 0.25);
  --text: #eef6f1;
  --muted: #9eb1aa;
  --muted-2: #738981;
  --green: #4ee6a8;
  --green-soft: rgba(78, 230, 168, 0.13);
  --cyan: #62d8e8;
  --cyan-soft: rgba(98, 216, 232, 0.12);
  --amber: #f4be62;
  --amber-soft: rgba(244, 190, 98, 0.14);
  --red: #ff7d78;
  --red-soft: rgba(255, 125, 120, 0.13);
  --purple: #bba8ff;
  --purple-soft: rgba(187, 168, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --max-width: 1500px;
  font-family:
    Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -10%, rgba(32, 117, 87, 0.28), transparent 34rem),
    radial-gradient(circle at 95% 8%, rgba(40, 109, 120, 0.18), transparent 28rem),
    var(--canvas);
  font-size: 15px;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

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

a {
  color: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(98, 216, 232, 0.75);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #03100c;
  background: var(--green);
  border-radius: 8px;
  transform: translateY(-150%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 15, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner,
.section-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup,
.preview-lockup,
.legend,
.theme-map-stats {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 13px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(78, 230, 168, 0.52);
  border-radius: 12px;
  color: var(--green);
  background: linear-gradient(145deg, rgba(78, 230, 168, 0.17), rgba(98, 216, 232, 0.04));
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.brand-lockup h1 {
  margin: 1px 0 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.preview-lockup {
  gap: 9px;
}

.preview-badge,
.mode-badge,
.health-badge,
.status-chip,
.axis-chip,
.code-chip,
.lifecycle-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  white-space: nowrap;
}

.preview-badge,
.mode-badge {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.preview-badge {
  color: #06100d;
  border-color: var(--amber);
  background: var(--amber);
}

.mode-badge {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.mode-badge.is-shadow {
  color: var(--purple);
  border-color: rgba(187, 168, 255, 0.4);
  background: var(--purple-soft);
}

.mode-badge.is-production {
  color: var(--green);
  border-color: rgba(78, 230, 168, 0.42);
  background: var(--green-soft);
}

.section-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.nav-scroll {
  min-height: 41px;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.section-nav a {
  padding: 5px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

main {
  padding-bottom: 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 64px;
  align-items: end;
  padding-block: 82px 54px;
}

.hero-copy h2 {
  max-width: 920px;
  margin: 12px 0 18px;
  font-size: clamp(42px, 5.6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.hero-copy h2 span {
  color: var(--green);
}

.hero-description {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
}

.run-stamp {
  margin: 0;
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(22, 35, 33, 0.95), rgba(11, 21, 20, 0.95));
  box-shadow: var(--shadow);
}

.run-stamp div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding-block: 13px;
  border-bottom: 1px solid var(--border);
}

.run-stamp div:last-child {
  border-bottom: 0;
}

.run-stamp dt {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.run-stamp dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-shell {
  margin-bottom: 30px;
}

.app-status,
.coverage-notice {
  border-radius: var(--radius-md);
}

.app-status {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.app-status.is-ready {
  color: #c7ecdc;
  border-color: rgba(78, 230, 168, 0.25);
  background: rgba(78, 230, 168, 0.07);
}

.app-status.is-error {
  color: #ffd0ce;
  border-color: rgba(255, 125, 120, 0.35);
  background: var(--red-soft);
}

.status-pulse {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(244, 190, 98, 0.45);
  animation: pulse 1.6s infinite;
}

.is-ready .status-pulse {
  background: var(--green);
  animation: none;
}

.is-error .status-pulse {
  background: var(--red);
  animation: none;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(244, 190, 98, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(244, 190, 98, 0);
  }
}

.coverage-notice {
  margin-top: 12px;
  padding: 16px 18px;
  color: #f7dfb6;
  border: 1px solid rgba(244, 190, 98, 0.34);
  background: var(--amber-soft);
}

.coverage-notice strong {
  color: var(--amber);
}

.blocker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.blocker-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 125, 120, 0.26);
  border-radius: var(--radius-sm);
  background: rgba(255, 125, 120, 0.07);
}

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

.blocker-card span {
  color: var(--red);
  font: 800 9px/1.3 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blocker-card strong {
  margin-top: 6px;
  color: #ffd0ce;
  font-size: 11px;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 24px;
}

.compact-heading {
  margin-bottom: 17px;
}

.section-heading h2 {
  margin: 5px 0 4px;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.section-heading p:not(.eyebrow),
.section-meta {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

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

.summary-card {
  position: relative;
  min-width: 0;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: auto -22px -28px auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--summary-accent, rgba(78, 230, 168, 0.14)), transparent 68%);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-card strong {
  display: block;
  margin-top: 11px;
  font-size: clamp(26px, 2.3vw, 38px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.summary-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 11px;
}

.workspace-section {
  margin-top: 82px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, rgba(22, 35, 33, 0.86), rgba(11, 21, 20, 0.94)),
    var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
}

.priority-section {
  margin-top: 28px;
  border-color: rgba(78, 230, 168, 0.28);
  background:
    radial-gradient(circle at 88% 0%, rgba(78, 230, 168, 0.12), transparent 30%),
    linear-gradient(140deg, rgba(20, 42, 36, 0.94), rgba(9, 20, 18, 0.98)),
    var(--surface);
}

.priority-counter {
  min-width: 118px;
  padding: 13px 16px;
  border: 1px solid rgba(78, 230, 168, 0.28);
  border-radius: 14px;
  background: rgba(78, 230, 168, 0.08);
  text-align: right;
}

.priority-counter strong,
.priority-counter span {
  display: block;
}

.priority-counter strong {
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.priority-counter span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
}

.priority-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.priority-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(5, 15, 13, 0.7);
}

.priority-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--green);
  content: "";
}

.priority-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px 12px 23px;
}

.priority-rank {
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.priority-identity {
  min-width: 0;
}

.priority-identity > span {
  display: block;
  overflow: hidden;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-identity h3 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.priority-identity p {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.priority-state {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.priority-state span {
  padding: 5px 10px;
  color: var(--green);
  border: 1px solid rgba(78, 230, 168, 0.3);
  border-radius: 999px;
  background: rgba(78, 230, 168, 0.1);
  font-size: 10px;
  font-weight: 900;
}

.priority-state small {
  color: var(--muted-2);
  font-size: 9px;
}

.priority-action {
  margin: 0 20px 15px 23px;
  padding: 12px 14px;
  color: #dce9e4;
  border-left: 2px solid var(--amber);
  border-radius: 0 10px 10px 0;
  background: rgba(244, 190, 98, 0.065);
  font-size: 12px;
  font-weight: 750;
}

.priority-geometry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.priority-geometry > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.priority-geometry > div:last-child {
  border-right: 0;
}

.priority-geometry span,
.priority-label {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.priority-geometry strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-evidence {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  gap: 18px;
  padding: 15px 20px 14px 23px;
}

.priority-evidence ul {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding-left: 16px;
  color: #b8cbc4;
  font-size: 10px;
}

.priority-evidence p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.priority-label.is-risk {
  color: var(--amber);
}

.priority-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 20px 13px 23px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.018);
}

.priority-card-foot > span {
  color: var(--muted-2);
  font-size: 9px;
}

.baseline-section {
  border-color: rgba(187, 168, 255, 0.2);
  background:
    linear-gradient(140deg, rgba(32, 29, 47, 0.52), rgba(11, 21, 20, 0.95)),
    var(--surface);
}

.baseline-section .section-heading strong {
  color: var(--amber);
}

.baseline-badge {
  display: inline-flex;
  padding: 7px 11px;
  color: var(--purple);
  border: 1px solid rgba(187, 168, 255, 0.32);
  border-radius: 999px;
  background: var(--purple-soft);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

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

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

.baseline-columns > section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.13);
}

.mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mini-heading h3 {
  margin: 0;
  font-size: 14px;
}

.mini-heading span {
  min-width: 27px;
  padding: 2px 7px;
  color: var(--purple);
  border-radius: 999px;
  background: var(--purple-soft);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.baseline-list {
  display: grid;
  gap: 6px;
}

.baseline-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
}

.baseline-row:hover {
  border-color: var(--border);
}

.baseline-row-primary {
  min-width: 0;
}

.baseline-row-primary strong,
.baseline-row-primary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.baseline-row-primary strong {
  font-size: 11px;
}

.baseline-row-primary small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9px;
}

.baseline-row-meta {
  text-align: right;
}

.baseline-row-meta strong,
.baseline-row-meta small {
  display: block;
}

.baseline-row-meta strong {
  color: var(--purple);
  font-size: 10px;
}

.baseline-row-meta small {
  color: var(--muted-2);
  font-size: 8px;
}

.legend {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.is-green {
  background: var(--green);
}

.is-amber {
  background: var(--amber);
}

.is-red {
  background: var(--red);
}

.action-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.17);
}

.action-tab {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.action-tab strong {
  min-width: 28px;
  padding: 2px 7px;
  color: var(--muted);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
}

.action-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.action-tab.is-active {
  color: var(--text);
  border-color: rgba(78, 230, 168, 0.22);
  background: rgba(78, 230, 168, 0.09);
}

.action-tab.is-active strong {
  color: var(--green);
  background: rgba(78, 230, 168, 0.12);
}

.action-toolbar,
.theme-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 18px 0;
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-label:first-child {
  flex: 1;
}

input,
select {
  min-height: 43px;
  padding: 9px 12px;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0b1514;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

input::placeholder {
  color: #64766f;
}

select {
  min-width: 160px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.action-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(8, 18, 16, 0.72);
}

.action-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--card-accent, var(--muted-2));
}

.action-card[data-tone="enter"] {
  --card-accent: var(--green);
}

.action-card[data-tone="wait"] {
  --card-accent: var(--amber);
}

.action-card[data-tone="watch"] {
  --card-accent: var(--cyan);
}

.action-card[data-tone="avoid"] {
  --card-accent: var(--red);
}

.action-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 13px 21px;
}

.symbol-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.symbol-code {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.status-chip {
  min-height: 26px;
  padding: 3px 9px;
  color: var(--card-accent, var(--muted));
  border-color: color-mix(in srgb, var(--card-accent, var(--muted)) 38%, transparent);
  background: color-mix(in srgb, var(--card-accent, var(--muted)) 10%, transparent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.035em;
}

.theme-path {
  min-height: 45px;
  margin: 0;
  padding: 0 18px 12px 21px;
  color: #bfd0ca;
  font-size: 12px;
}

.axis-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 18px 15px 21px;
}

.axis-chip {
  padding: 2px 7px;
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.025);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.trade-geometry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trade-geometry div {
  min-width: 0;
  padding: 11px 9px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.trade-geometry div:last-child {
  border-right: 0;
}

.trade-geometry span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trade-geometry strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px 14px 21px;
}

.action-card-footer span {
  color: var(--muted-2);
  font-size: 10px;
}

.text-button,
.stock-search-form button,
.search-result button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  font-weight: 800;
}

.text-button {
  padding: 7px 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 54px 22px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.1);
  text-align: center;
}

.empty-state strong {
  display: block;
  font-size: 18px;
}

.empty-state p {
  max-width: 620px;
  margin: 8px auto 0;
  color: var(--muted);
}

.theme-map-stats {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.theme-map-stats span {
  padding: 7px 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
}

.theme-map-stats strong {
  color: var(--text);
}

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

.theme-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(8, 18, 16, 0.68);
  overflow: hidden;
}

.theme-card summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 17px;
  cursor: pointer;
  list-style: none;
}

.theme-card summary::-webkit-details-marker {
  display: none;
}

.theme-card summary::after {
  content: "+";
  color: var(--muted-2);
  font-size: 22px;
  line-height: 1;
}

.theme-card[open] summary::after {
  content: "−";
  color: var(--green);
}

.theme-number {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.theme-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.theme-head-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.lifecycle-chip {
  padding: 2px 7px;
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 850;
}

.lifecycle-chip[data-life="EMERGING"],
.lifecycle-chip[data-life="BROADENING"],
.lifecycle-chip[data-life="LEADERSHIP"],
.lifecycle-chip[data-life="REENTRY"] {
  color: var(--green);
  border-color: rgba(78, 230, 168, 0.3);
  background: var(--green-soft);
}

.lifecycle-chip[data-life="CROWDED"],
.lifecycle-chip[data-life="COOLING"] {
  color: var(--amber);
  border-color: rgba(244, 190, 98, 0.3);
  background: var(--amber-soft);
}

.lifecycle-chip[data-life="DISTRIBUTION"] {
  color: var(--red);
  border-color: rgba(255, 125, 120, 0.3);
  background: var(--red-soft);
}

.theme-score {
  min-width: 33px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-align: right;
}

.theme-root-body {
  padding: 0 17px 17px;
  border-top: 1px solid var(--border);
}

.root-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}

.root-metrics div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.root-metrics span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.root-metrics strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.subtheme-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
}

.subtheme-item:hover {
  border-color: var(--border);
}

.subtheme-name {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtheme-member {
  color: var(--muted-2);
  font-size: 9px;
}

.subtheme-score {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.health-badge {
  padding: 6px 10px;
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  font-weight: 850;
}

.health-badge.is-good {
  color: var(--green);
  border-color: rgba(78, 230, 168, 0.32);
  background: var(--green-soft);
}

.health-badge.is-warn {
  color: var(--amber);
  border-color: rgba(244, 190, 98, 0.32);
  background: var(--amber-soft);
}

.health-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.health-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.12);
}

.health-item span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.health-item strong,
.health-item p {
  display: block;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.health-item strong {
  font-size: 13px;
}

.health-item p {
  color: var(--muted);
  font-size: 11px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.11);
}

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

th {
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.02);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 11px;
}

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

td strong {
  color: var(--text);
}

.stock-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  max-width: 860px;
}

.stock-search-form input {
  min-height: 50px;
  padding-inline: 16px;
  font-size: 15px;
}

.stock-search-form button {
  padding-inline: 22px;
  color: #07100f;
  background: var(--green);
}

.search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.search-result {
  min-width: 0;
}

.search-result button {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.14);
  text-align: left;
}

.search-result button:hover {
  border-color: rgba(78, 230, 168, 0.34);
  background: var(--green-soft);
}

.search-result-primary {
  min-width: 0;
}

.search-result-primary strong,
.search-result-primary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-primary small,
.search-result-market {
  color: var(--muted-2);
  font-size: 10px;
}

.stock-dialog {
  width: min(1120px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: #0b1514;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.stock-dialog::backdrop {
  background: rgba(0, 6, 5, 0.78);
  backdrop-filter: blur(8px);
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 21, 20, 0.95);
  backdrop-filter: blur(12px);
}

.dialog-header h2 {
  margin: 2px 0 0;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.icon-button {
  width: 38px;
  height: 38px;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  font-size: 25px;
  line-height: 1;
}

.dialog-body {
  padding: 22px;
}

.drilldown-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green-soft), rgba(0, 0, 0, 0.1));
}

.drilldown-hero h3 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.drilldown-hero p {
  margin: 5px 0 0;
  color: var(--muted);
}

.drilldown-price {
  text-align: right;
}

.drilldown-price strong,
.drilldown-price span {
  display: block;
}

.drilldown-price strong {
  font-size: 25px;
}

.drilldown-price span {
  color: var(--muted);
  font-size: 11px;
}

.drilldown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.drilldown-panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.drilldown-panel.is-wide {
  grid-column: 1 / -1;
}

.drilldown-panel h4 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.metric-box {
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.metric-box span,
.metric-box strong {
  display: block;
}

.metric-box span {
  color: var(--muted-2);
  font-size: 9px;
}

.metric-box strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.code-chip {
  padding: 3px 7px;
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.022);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.code-chip.is-risk {
  color: #ffb1ad;
  border-color: rgba(255, 125, 120, 0.26);
  background: var(--red-soft);
}

.price-chart {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.json-details {
  margin-top: 10px;
}

.json-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.json-details pre {
  max-height: 320px;
  margin: 9px 0 0;
  padding: 12px;
  overflow: auto;
  color: #bfd0ca;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #07100f;
  font: 10px/1.55 "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.noscript {
  position: fixed;
  z-index: 1000;
  inset: auto 20px 20px;
  padding: 14px 18px;
  color: #07100f;
  border-radius: 10px;
  background: var(--amber);
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-2);
}

.footer-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
}

.footer-inner a {
  color: var(--green);
}

@media (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 820px) {
  .header-inner,
  .section-shell {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-lockup .eyebrow {
    display: none;
  }

  .brand-lockup h1 {
    font-size: 15px;
  }

  .mode-badge {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 54px 34px;
  }

  .hero-copy h2 {
    font-size: clamp(38px, 12vw, 64px);
  }

  .run-stamp {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 9px;
  }

  .run-stamp div {
    display: block;
    padding: 10px;
    border-bottom: 0;
  }

  .run-stamp dd {
    margin-top: 3px;
  }

  .section-heading {
    display: block;
  }

  .legend,
  .theme-map-stats,
  .priority-counter {
    justify-content: flex-start;
    margin-top: 13px;
  }

  .priority-counter {
    width: fit-content;
    text-align: left;
  }

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

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

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

  .workspace-section {
    margin-top: 54px;
    padding: 20px;
  }

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

  .action-grid,
  .theme-grid,
  .search-results,
  .health-summary {
    grid-template-columns: 1fr;
  }

  .priority-evidence {
    grid-template-columns: 1fr;
  }

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

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

  .drilldown-panel.is-wide {
    grid-column: auto;
  }
}

@media (max-width: 540px) {
  .preview-lockup {
    gap: 0;
  }

  .preview-badge {
    font-size: 8px;
  }

  .hero-copy h2 {
    letter-spacing: -0.055em;
  }

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

  .action-toolbar,
  .theme-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .field-label,
  select {
    width: 100%;
  }

  .action-tabs {
    grid-template-columns: 1fr;
  }

  .priority-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .priority-state {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

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

  .priority-geometry > div:nth-child(2) {
    border-right: 0;
  }

  .priority-geometry > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .priority-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-tab {
    min-height: 44px;
  }

  .workspace-section {
    padding: 16px;
    border-radius: 16px;
  }

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

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

  .stock-search-form button {
    min-height: 46px;
  }

  .stock-dialog {
    width: 100%;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .dialog-body {
    padding: 14px;
  }

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

  .drilldown-price {
    text-align: left;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 22px;
  }
}

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