:root {
  --ink: #17211b;
  --muted: #66716b;
  --line: #d9e2dc;
  --paper: #f7faf7;
  --panel: rgba(255, 255, 255, 0.86);
  --green: #1f6f4a;
  --green-soft: #e7f3ec;
  --blue: #2f5d7c;
  --gold: #a97724;
  --red: #b94343;
  --accent: var(--green);
  --shadow: 0 18px 48px rgba(39, 61, 47, 0.12);
}

* {
  box-sizing: border-box;
}

button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 93, 124, 0.42);
  outline-offset: 3px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(180deg, rgba(238, 246, 241, 0.72), rgba(247, 250, 247, 0.96)),
    #f7faf7;
}

body.auth-pending .app-shell,
body.auth-pending .market-brief-launcher,
body.auth-pending .market-brief-dialog {
  display: none !important;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(390px, 0.75fr);
  min-height: 100vh;
  background: #edf3ef;
}

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

.auth-landscape {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(226, 239, 232, 0.15), rgba(15, 49, 39, 0.32)),
    linear-gradient(145deg, #dfece5 0%, #9ebfaf 47%, #315d52 100%);
}

.auth-landscape::before,
.auth-landscape::after,
.auth-landscape span {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -18%;
  width: 86%;
  height: 72%;
  background: #173f36;
  clip-path: polygon(0 100%, 21% 42%, 36% 66%, 55% 18%, 72% 59%, 88% 31%, 100% 100%);
}

.auth-landscape::after {
  right: 18%;
  bottom: -28%;
  width: 92%;
  height: 76%;
  background: rgba(49, 96, 80, 0.74);
}

.auth-landscape span:nth-child(1) {
  right: -18%;
  bottom: -40%;
  width: 125%;
  height: 74%;
  background: rgba(224, 238, 230, 0.74);
  clip-path: ellipse(68% 48% at 53% 100%);
}

.auth-landscape span:nth-child(2) {
  right: -26%;
  bottom: -46%;
  width: 140%;
  height: 78%;
  background: rgba(247, 251, 248, 0.74);
  clip-path: ellipse(68% 48% at 53% 100%);
}

.auth-landscape span:nth-child(3) {
  top: 12%;
  right: 12%;
  bottom: auto;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(220, 171, 84, 0.78);
  clip-path: none;
}

.auth-panel {
  display: grid;
  align-content: center;
  gap: 54px;
  padding: 9vh clamp(38px, 6vw, 88px);
  background: rgba(251, 253, 251, 0.98);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.auth-brand > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: #245744;
  font-size: 20px;
  font-weight: 800;
}

.auth-brand div {
  display: grid;
  gap: 3px;
}

.auth-brand strong {
  font-size: 19px;
}

.auth-brand small,
.auth-form > div > span,
.auth-form > div > p {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 18px;
  width: min(100%, 420px);
}

.auth-form[hidden] {
  display: none;
}

.auth-form > div {
  margin-bottom: 10px;
}

.auth-form h1 {
  max-width: 380px;
  margin: 9px 0 0;
  font-size: 30px;
  line-height: 1.3;
}

.auth-form > div > p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.7;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 13px;
  color: var(--ink);
  background: white;
  font-size: 15px;
}

.auth-form button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: #245744;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-form button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.logout-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--muted);
  background: white;
  cursor: pointer;
}

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

.sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  background: rgba(250, 253, 250, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(145deg, var(--green), var(--blue));
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.hero-copy h3,
.hero-copy p {
  margin: 0;
}

.brand h1 {
  font-size: 21px;
}

.brand p,
.eyebrow,
.metric span,
.panel-head span,
.account-card span,
.market-state span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.strategy-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 26px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3ef;
}

.is-hidden {
  display: none !important;
}

.domain-switcher {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}

.domain-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.domain-mode span {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}

.domain-mode small {
  color: inherit;
  font-size: 11px;
}

.domain-mode.active,
.domain-mode:hover {
  border-color: var(--line);
  color: var(--ink);
  background: white;
}

.system-overview {
  display: none;
}

.system-overview.active-view {
  display: block;
}

.system-intro,
.domain-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.system-intro > div,
.domain-head > div {
  max-width: 760px;
}

.system-intro span,
.domain-head > div > span {
  color: var(--muted);
  font-size: 12px;
}

.system-intro h3,
.domain-head h3 {
  margin: 8px 0;
  font-size: 32px;
  letter-spacing: 0;
}

.system-intro p,
.domain-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.attention-questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.attention-questions article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  min-height: 78px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.attention-questions article:last-child {
  border-right: 0;
}

.attention-questions span {
  color: var(--gold);
  font-size: 12px;
}

.attention-questions strong {
  font-size: 14px;
}

.domain-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 18px;
}

.domain-overview-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.domain-overview-card.research {
  border-top: 4px solid #333b37;
}

.domain-overview-card.active {
  border-top: 4px solid var(--green);
}

.domain-card-title,
.domain-overview-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.domain-card-title span,
.domain-overview-card small {
  color: var(--muted);
  font-size: 12px;
}

.domain-card-title em,
.domain-status {
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-style: normal;
}

.domain-card-title h3,
.domain-overview-card h3 {
  margin: 28px 0 8px;
  font-size: 24px;
  letter-spacing: 0;
}

.domain-overview-card > p {
  min-height: 50px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.domain-strategy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.domain-strategy-list span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-size: 12px;
}

.domain-overview-card footer {
  margin-top: auto;
  padding-top: 22px;
}

.domain-overview-card footer button {
  min-width: 54px;
  min-height: 36px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  color: white;
  background: var(--ink);
  cursor: pointer;
}

.shared-constitution-preview,
.domain-constitution {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shared-constitution-preview > summary,
.domain-constitution > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.shared-constitution-preview > summary::-webkit-details-marker,
.domain-constitution > summary::-webkit-details-marker {
  display: none;
}

.shared-constitution-preview summary span,
.domain-constitution summary span {
  color: var(--muted);
  font-size: 12px;
}

.constitution-principle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.constitution-principle-grid article {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.constitution-principle-grid article span {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.constitution-principle-grid article p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.a-share-head {
  align-items: center;
  margin-bottom: 20px;
  padding: 22px 0;
}

.a-share-head .domain-constitution {
  width: min(340px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
}

.a-share-head .domain-constitution[open] {
  width: 100%;
}

.a-share-head .domain-constitution[open] .constitution-principle-grid {
  margin-bottom: 14px;
}

.black-cat-view.active-view {
  display: block;
}

.black-cat-head {
  align-items: center;
}

.domain-status.research {
  color: #4b4d49;
  background: #ecece8;
}

.black-cat-research-overview {
  margin: 24px 0;
  border-top: 1px solid var(--ink);
}

.black-cat-loading {
  min-height: 180px;
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
}

.black-cat-loading button {
  min-height: 40px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.black-cat-snapshot-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.black-cat-snapshot-head > div:first-child {
  max-width: 760px;
}

.black-cat-snapshot-head span,
.black-cat-region header > span,
.black-cat-metrics span,
.black-cat-metrics small {
  color: var(--muted);
  font-size: 12px;
}

.black-cat-snapshot-head h3 {
  margin: 6px 0;
  font-size: 22px;
  letter-spacing: 0;
}

.black-cat-snapshot-head p,
.black-cat-region header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.black-cat-decision-chain {
  padding: 22px 0 4px;
  border-bottom: 1px solid var(--line);
}

.black-cat-decision-chain > header {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.black-cat-decision-chain > header span,
.black-cat-decision-chain article span,
.black-cat-decision-chain article p {
  color: var(--muted);
  font-size: 12px;
}

.black-cat-decision-chain > header strong {
  font-size: 16px;
}

.black-cat-decision-chain > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.black-cat-decision-chain article {
  min-height: 150px;
  padding: 15px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
}

.black-cat-decision-chain article h4 {
  margin: 12px 0 4px;
  font-size: 17px;
}

.black-cat-decision-chain article strong {
  color: var(--green);
  font-size: 12px;
}

.black-cat-decision-chain article p {
  margin: 10px 0 0;
  line-height: 1.55;
}

.black-cat-decision-chain article.collecting,
.black-cat-decision-chain article.partial,
.black-cat-decision-chain article.research,
.black-cat-decision-chain article.stale {
  background: #f3f2ee;
}

.growth-log {
  position: fixed;
  z-index: 30;
  bottom: 18px;
  left: 18px;
  width: 236px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(250, 253, 250, .97);
  box-shadow: 0 10px 28px rgba(24, 44, 32, .12);
}

.growth-log summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  cursor: pointer;
}

.growth-log summary small,
.growth-log-list time,
.growth-log-list p {
  color: var(--muted);
  font-size: 11px;
}

.growth-log-list {
  max-height: min(56vh, 520px);
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding: 0 12px;
}

.growth-log-list article {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.growth-log-list article:last-child {
  border-bottom: 0;
}

.growth-log-list p {
  margin: 0;
  line-height: 1.5;
}

.black-cat-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.black-cat-legend span,
.black-cat-region header > strong {
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.black-cat-legend .visible {
  color: var(--green);
  background: var(--green-soft);
}

.black-cat-legend .blocked,
.black-cat-region header > strong {
  color: #765c21;
  background: #f5edda;
}

.black-cat-region {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.black-cat-region > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.black-cat-region header h4 {
  margin: 0 0 5px;
  font-size: 18px;
  letter-spacing: 0;
}

.black-cat-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.black-cat-metrics > div {
  min-height: 94px;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.black-cat-metrics > div.unavailable {
  background: #f3f2ee;
}

.black-cat-metrics strong,
.black-cat-metrics small {
  display: block;
}

.black-cat-metrics strong {
  margin-top: 10px;
  font-size: 17px;
}

.black-cat-metrics small {
  min-height: 16px;
  margin-top: 5px;
}

.black-cat-asset-table {
  margin-top: 14px;
  overflow-x: auto;
}

.black-cat-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.black-cat-sources > span,
.black-cat-sources small {
  color: var(--muted);
  font-size: 11px;
}

.black-cat-sources small {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.black-cat-sources small.active {
  color: var(--green);
  border-color: rgba(58, 104, 75, 0.35);
  background: var(--green-soft);
}

.black-cat-sources small.planned,
.black-cat-sources small.stale,
.black-cat-sources small.unresolved {
  background: #f3f2ee;
}

.black-cat-asset-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, minmax(90px, 1fr));
  min-width: 690px;
  border-bottom: 1px solid var(--line);
}

.black-cat-asset-row > * {
  padding: 11px 12px;
  color: var(--ink);
  font-size: 13px;
}

.black-cat-asset-row.table-head > * {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.black-cat-asset-row strong small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.strategy-mode {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  padding: 9px 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.strategy-mode.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 2px 8px rgba(39, 61, 47, 0.10);
  font-weight: 700;
}

.strategy-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.72);
}

.strategy-status-line p,
.strategy-status-line strong {
  margin: 0;
}

.strategy-status-line p {
  color: var(--muted);
  font-size: 13px;
}

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

.strategy-rule-grid .panel {
  min-height: 180px;
}

.strategy-rule-grid h3,
.strategy-rule-grid p {
  margin-top: 0;
}

.global-framework {
  margin-bottom: 18px;
}

.global-framework .panel-head > strong {
  color: var(--green);
}

.framework-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
}

.framework-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.framework-tabs {
  display: grid;
  grid-template-columns: repeat(4, 64px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.framework-tab {
  height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: #f3f7f4;
  cursor: pointer;
}

.framework-tab:last-child {
  border-right: 0;
}

.framework-tab.active {
  color: white;
  background: var(--green);
  font-weight: 700;
}

.global-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fbfdfb;
}

.global-framework-chart {
  display: block;
  max-width: 100%;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.chart-empty[hidden] {
  display: none;
}

.framework-market-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.framework-market-cards article {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 6px 8px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: white;
}

.framework-market-cards i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.framework-market-cards small {
  grid-column: 2 / -1;
  color: var(--muted);
}

.framework-conclusion {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 12px;
  border-left: 4px solid var(--green);
  padding: 12px 14px;
  background: var(--green-soft);
}

.framework-conclusion strong {
  flex: 0 0 auto;
}

.framework-conclusion p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.strategy-rule-matrix-panel {
  margin-top: 18px;
}

.strategy-rule-matrix {
  margin-top: 14px;
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
}

.strategy-rule-matrix table {
  min-width: 940px;
}

.strategy-rule-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4f0;
}

.strategy-rule-matrix th span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.strategy-rule-matrix td:first-child {
  min-width: 170px;
}

.strategy-rule-matrix td:first-child strong {
  display: block;
  margin-top: 4px;
}

.matrix-category {
  color: var(--muted);
  font-size: 11px;
}

.matrix-used {
  color: var(--ink);
  background: rgba(231, 243, 236, 0.45);
}

.matrix-unused {
  color: #9aa39e;
  background: #fafbfa;
}

.partner-stock-check {
  margin-top: 18px;
}

.partner-stock-check > p {
  margin: 4px 0 16px;
  color: var(--muted);
}

.stock-check-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 210px auto;
  gap: 12px;
  align-items: end;
}

.stock-check-form > label,
.stock-check-choice legend {
  color: var(--muted);
  font-size: 13px;
}

.stock-check-form input[type="text"],
.stock-check-form input[name="code"] {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.stock-check-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border: 0;
  padding: 0;
}

.stock-check-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
}

.stock-check-choice label {
  cursor: pointer;
}

.stock-check-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.stock-check-choice span {
  display: grid;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #f2f6f3;
}

.stock-check-choice label:first-of-type span {
  border-radius: 6px 0 0 6px;
}

.stock-check-choice label:last-of-type span {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.stock-check-choice input:checked + span {
  color: white;
  border-color: var(--green);
  background: var(--green);
  font-weight: 700;
}

.stock-check-form .primary-btn {
  height: 42px;
  white-space: nowrap;
}

.stock-check-empty {
  margin-top: 14px;
  border: 1px dashed var(--line);
  padding: 14px;
  color: var(--muted);
  background: rgba(247, 250, 247, 0.72);
}

.stock-check-error {
  color: var(--red);
}

.stock-check-result {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.stock-check-conclusion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-left: 4px solid var(--red);
  padding: 10px 14px;
  background: #fff7f7;
}

.stock-check-conclusion.is-actionable {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.stock-check-conclusion h4 {
  margin: 4px 0 0;
  font-size: 16px;
}

.stock-check-conclusion > strong {
  flex: 0 0 auto;
}

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

.stock-check-metrics span {
  border: 1px solid var(--line);
  padding: 10px;
  color: var(--muted);
  background: white;
  font-size: 13px;
}

.stock-check-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.stock-check-table {
  margin-top: 12px;
  overflow-x: auto;
}

.stock-check-table table {
  min-width: 760px;
}

.stock-check-pass {
  color: var(--green);
}

.stock-check-fail {
  color: var(--red);
}

.nav-item {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  color: var(--green);
  background: var(--green-soft);
}

.account-card {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.account-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.account-card p strong {
  display: inline;
  margin-top: 0;
  font-size: 13px;
}

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

.capital-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.capital-input span {
  color: var(--muted);
  font-size: 18px;
}

.capital-input input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 22px;
  font-weight: 750;
}

.capital-input button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

.capital-input button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.capital-save-status {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.capital-save-status.error {
  color: #a13d36;
}

.mode-card {
  display: grid;
  gap: 10px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  color: var(--muted);
  background: white;
  cursor: pointer;
}

.mode-btn.active {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.logic-hidden {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.content {
  min-width: 0;
  padding: 28px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar h2 {
  margin-top: 4px;
  font-size: 30px;
}

.capital-flow-principle {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.capital-flow-principle span {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.capital-flow-principle strong {
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: 0;
}

.market-state {
  min-width: 136px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.market-state strong {
  display: block;
  margin-top: 4px;
  color: var(--green);
}

.phase-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.phase-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--green);
  background: white;
  cursor: pointer;
}

.phase-link:hover {
  background: var(--green-soft);
}

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

.agent-understanding {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.agent-understanding summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 18px;
  color: var(--green);
  cursor: pointer;
  list-style: none;
}

.agent-understanding summary::-webkit-details-marker {
  display: none;
}

.agent-understanding summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--green);
  font-size: 22px;
}

.agent-understanding[open] summary::after {
  content: "−";
}

.agent-understanding summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.agent-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.agent-guide-section {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.agent-guide-section:nth-child(2n) {
  border-right: 0;
}

.agent-guide-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.agent-guide-section p,
.agent-guide-section li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.agent-guide-section p {
  margin: 6px 0 0;
}

.agent-guide-section ul {
  margin: 0;
  padding-left: 18px;
}

.agent-guide-section strong {
  color: var(--ink);
}

.agent-guide-status {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.flow-card {
  display: grid;
  gap: 8px;
  min-height: 188px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.flow-card span {
  color: var(--muted);
  font-size: 13px;
}

.flow-card h3,
.flow-card p {
  margin: 0;
}

.flow-card h3 {
  font-size: 18px;
}

.flow-card strong {
  color: var(--green);
  font-size: 28px;
}

.flow-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.flow-card .phase-link {
  align-self: end;
  justify-self: start;
}

.hero-panel {
  position: relative;
  min-height: 210px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef7f1, #f8fbf8);
  box-shadow: var(--shadow);
}

.mountain-scene {
  position: absolute;
  inset: 0;
}

.sun {
  position: absolute;
  right: 13%;
  top: 22px;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: rgba(230, 171, 84, 0.44);
}

.mountain {
  position: absolute;
  bottom: 42px;
  width: 58%;
  height: 160px;
  clip-path: polygon(0 100%, 48% 0, 100% 100%);
}

.mountain.back {
  left: 18%;
  background: rgba(74, 112, 91, 0.22);
}

.mountain.mid {
  right: -5%;
  background: rgba(47, 93, 124, 0.2);
}

.water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  background: repeating-linear-gradient(0deg, rgba(47, 93, 124, 0.12), rgba(47, 93, 124, 0.12) 1px, transparent 1px, transparent 12px);
}

.hero-copy {
  position: relative;
  max-width: 620px;
  padding: 34px;
}

.hero-copy span {
  color: var(--gold);
  font-weight: 700;
}

.hero-copy h3 {
  margin-top: 10px;
  font-size: 32px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-panel.compact-strategy .hero-copy {
  max-width: 760px;
}

.hero-panel.compact-strategy .hero-copy h3 {
  font-size: 26px;
  line-height: 1.4;
}

.hero-copy p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.constitution-link {
  margin-top: 14px;
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  cursor: pointer;
}

.constitution-link:hover {
  background: var(--green-soft);
}

.view {
  display: none;
  min-width: 0;
  margin-top: 24px;
}

.active-view {
  display: block;
}

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

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(39, 61, 47, 0.06);
}

.metric {
  padding: 18px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.metric p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-top: 16px;
  min-width: 0;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-head h3,
.strategy-card h3 {
  margin: 0;
  font-size: 18px;
}

.stock-list,
.sector-list {
  display: grid;
  gap: 10px;
}

.stock-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.stock-card h4 {
  margin: 0;
  font-size: 17px;
}

.stock-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.score {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-size: 20px;
  font-weight: 800;
}

.sector-row {
  display: grid;
  grid-template-columns: 88px 1fr 42px;
  align-items: center;
  gap: 10px;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8eee9;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.table {
  width: 100%;
  max-width: 100%;
  overflow: auto;
}

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

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

th {
  color: var(--muted);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 700;
}

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

.strategy-card p,
.memory-box p {
  color: var(--muted);
  line-height: 1.7;
}

.constitution-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.constitution-pillars article {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}

.constitution-pillars strong {
  color: var(--ink);
  font-size: 16px;
}

.constitution-pillars span,
.constitution-hierarchy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .auth-gate { grid-template-columns: 1fr; }
  .auth-landscape { display: none; }
  .auth-panel { min-height: 100vh; padding: 32px 24px; }
  .auth-form h1 { font-size: 26px; }

  .constitution-pillars {
    grid-template-columns: 1fr;
  }
}

.strategy-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.8;
}

.review-form {
  display: grid;
  gap: 14px;
}

.form-context {
  width: fit-content;
  max-width: 100%;
  padding: 6px 9px;
  border-left: 3px solid var(--green);
  background: rgba(38, 103, 82, 0.07);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.review-list-panel {
  margin-top: 16px;
}

.strategy-race-panel {
  margin-top: 16px;
}

.strategy-race-table {
  overflow-x: auto;
}

.strategy-race-table table {
  min-width: 1080px;
}

.strategy-race-table th,
.strategy-race-table td {
  vertical-align: top;
}

.strategy-race-table th {
  white-space: nowrap;
}

.strategy-race-table td:nth-child(2) {
  min-width: 150px;
}

.strategy-race-table td:nth-child(3) {
  min-width: 260px;
}

.strategy-race-table td:nth-child(8) {
  min-width: 260px;
}

.strategy-race-table td:last-child {
  min-width: 210px;
}

.strategy-race-table td > p,
.strategy-race-table td:last-child p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.strategy-race-table td > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.race-candidates {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

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

.race-candidates p {
  margin: 4px 0 0;
  line-height: 1.5;
}

.race-lane {
  display: inline-block;
  padding-left: 8px;
  border-left: 3px solid #9aa69f;
  white-space: nowrap;
  font-weight: 700;
}

.race-row.incumbent .race-lane {
  border-left-color: var(--green);
}

.race-row.challenger .race-lane {
  border-left-color: var(--blue);
}

.race-row.experiment .race-lane {
  border-left-color: var(--gold);
}

.race-status {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

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

.strategy-race-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 3px solid #9aa69f;
  border-radius: 8px;
  background: #fff;
}

.strategy-race-card.incumbent {
  border-top-color: var(--green);
}

.strategy-race-card.challenger {
  border-top-color: var(--blue);
}

.strategy-race-card.experiment {
  border-top-color: var(--gold);
}

.strategy-race-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.strategy-race-head span {
  font-weight: 700;
}

.strategy-race-card h4 {
  margin: 10px 0 6px;
  font-size: 17px;
}

.strategy-race-card p {
  min-height: 66px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.strategy-race-card strong,
.strategy-race-card > small {
  display: block;
  overflow-wrap: anywhere;
}

.strategy-race-card strong {
  font-size: 13px;
  line-height: 1.6;
}

.strategy-race-card > small {
  margin-top: 9px;
  color: var(--muted);
}

.strategy-race-card .strategy-race-note {
  min-height: 0;
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--gold);
  background: rgba(178, 133, 52, 0.08);
}

.strategy-race-rules {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.strategy-race-rules summary {
  cursor: pointer;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.strategy-race-rules div {
  margin-top: 10px;
}

.strategy-race-rules span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.strategy-race-rules div p {
  min-height: 0;
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.portfolio-panel {
  margin-top: 16px;
}

.portfolio-metrics {
  margin-top: 0;
}

.portfolio-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.portfolio-workspace h4 {
  margin: 0 0 10px;
}

.equity-chart-wrap {
  min-width: 0;
}

#equity-chart {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 36 / 11;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.portfolio-panel .compact-form {
  margin-top: 16px;
}

.transaction-history-head {
  margin-top: 18px;
}

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

.secondary-action {
  border-color: var(--line);
  color: var(--green);
  background: white;
}

.detail-table {
  margin-top: 16px;
}

.sync-progress-panel {
  margin-bottom: 16px;
}

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

.sync-metrics div {
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.sync-metrics span,
.progress-note,
.backtest-equity-wrap p {
  color: var(--muted);
  font-size: 13px;
}

.sync-metrics strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e6ece8;
}

.progress-track i {
  display: block;
  height: 100%;
  background: var(--green);
}

.progress-note,
.backtest-equity-wrap p {
  margin: 9px 0 0;
}

.audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.audit-row:last-child {
  border-bottom: 0;
}

.pipeline-stages {
  display: grid;
  gap: 8px;
}

.pipeline-stage {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.pipeline-stage > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #edf1ef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pipeline-stage.completed > span {
  background: var(--green);
  color: white;
}

.pipeline-stage.interrupted > span,
.pipeline-stage.failed > span {
  background: var(--red);
  color: white;
}

.pipeline-stage p,
.pipeline-next p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pipeline-next {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: #faf9f4;
}

.pipeline-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pipeline-task span,
.pipeline-task p {
  color: var(--muted);
  font-size: 12px;
}

.pipeline-task em {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
}

.pipeline-task p {
  grid-column: 2 / -1;
  margin: 0;
}

.ok-text {
  color: var(--green);
}

.danger-text {
  color: var(--red);
}

.estimate-text {
  color: #9a6a24;
}

#automatic-review-dimensions,
#next-day-action-matrix,
#active-risk-version {
  margin-top: 16px;
}

#trade-review-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
}

#next-day-action-matrix {
  overflow-x: auto;
}

.risk-version-card {
  border-left: 3px solid var(--green);
}

.optional-review-panel > summary {
  padding: 18px 20px;
  color: var(--green);
  cursor: pointer;
  font-weight: 700;
}

.optional-review-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.fixed-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

#execution-feedback-form .form-grid {
  grid-template-columns: 1fr;
}

.fixed-target strong {
  color: var(--text);
  font-size: 18px;
}

.fixed-target span,
.decision-explanation-panel summary span,
.advanced-reconciliation summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.fixed-target-tag,
.observe-only-tag {
  display: inline-block;
  margin-top: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.observe-only-tag {
  color: var(--muted);
}

.decision-explanation-panel {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.decision-explanation-panel > summary,
.advanced-reconciliation > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  color: var(--green);
  cursor: pointer;
  font-weight: 700;
}

.explanation-principle,
.explanation-foot {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.decision-flow {
  display: grid;
  margin: 14px 0 18px;
}

.decision-flow-node {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.decision-flow-node > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 12px;
}

.decision-flow-node p,
.decision-flow-node em {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.decision-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.score-bars {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.score-bar {
  display: grid;
  grid-template-columns: 64px minmax(80px, 1fr) 38px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.score-bar i {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5ebe7;
}

.score-bar b {
  display: block;
  height: 100%;
  background: var(--green);
}

.evidence-table {
  margin-top: 12px;
  max-height: 250px;
  overflow: auto;
}

.inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.advanced-reconciliation {
  padding: 0 18px 18px;
}

@media (max-width: 760px) {
  .decision-evidence-grid {
    grid-template-columns: 1fr;
  }

  .fixed-target {
    align-items: flex-start;
    flex-direction: column;
  }
}

.backtest-result-metrics {
  margin-top: 16px;
}

.backtest-equity-wrap {
  margin-top: 16px;
}

.strategy-diagnosis-panel {
  margin-top: 16px;
}

.diagnosis-subhead {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

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

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

.diagnosis-grid h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.diagnosis-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.diagnosis-row span,
.diagnosis-row p {
  color: var(--muted);
  font-size: 12px;
}

.diagnosis-row strong {
  display: block;
  margin-top: 3px;
}

.diagnosis-row p {
  margin: 4px 0 0;
}

@media (max-width: 760px) {
  .diagnosis-grid {
    grid-template-columns: 1fr;
  }
}

#backtest-equity-chart {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 36 / 11;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

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

.link-btn {
  border: 0;
  padding: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

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

.review-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.review-item strong {
  display: block;
}

.review-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

.review-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

select,
input,
textarea,
.primary-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}

.secondary-btn {
  border: 1px solid #b9cbc2;
  background: #f7faf8;
  color: #245846;
  padding: 9px 14px;
  cursor: pointer;
}

.secondary-btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

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

#dca-cashflow-form .form-grid {
  margin: 14px 0;
}

#dca-cashflow-form .primary-btn {
  max-width: 240px;
}

.field-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.permission-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

.permission-check input {
  width: auto;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.6;
}

.primary-btn {
  border-color: var(--green);
  color: white;
  background: var(--green);
  cursor: pointer;
  font-weight: 700;
}

.primary-btn.secondary-action {
  border-color: var(--line);
  color: var(--green);
  background: white;
}

.answer-box {
  margin-top: 14px;
}

.decision-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.decision-confirm-actions .primary-btn {
  width: auto;
}

.decision-state-line {
  color: var(--muted);
  font-size: 12px;
}

.no-trade-reasons {
  display: grid;
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.no-trade-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.no-trade-row:last-child {
  border-bottom: 0;
}

.no-trade-row p,
.no-trade-row span {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .form-grid,
  .permission-editor,
  .portfolio-workspace,
  .validation-actions,
  .agent-guide,
  .strategy-race-grid {
    grid-template-columns: 1fr;
  }

  .agent-guide-section,
  .agent-guide-section:nth-child(2n) {
    border-right: 0;
  }
}

.kpi-card p {
  min-height: 58px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

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

  .content {
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .metric-grid,
  .layout-two,
  .strategy-grid,
  .strategy-rule-grid,
  .sync-metrics {
    grid-template-columns: 1fr;
  }

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

  .stock-check-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .framework-toolbar,
  .framework-conclusion {
    align-items: flex-start;
    flex-direction: column;
  }

  .framework-toolbar p {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .content,
  .sidebar {
    padding: 18px;
  }

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

  .capital-flow-principle {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .capital-flow-principle strong {
    font-size: 18px;
  }

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

  .hero-copy h3 {
    font-size: 25px;
  }

  .agent-understanding summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
  }

  .agent-understanding summary span {
    margin-left: 0;
  }

  .stock-check-conclusion {
    align-items: flex-start;
    flex-direction: column;
  }

  .stock-check-metrics {
    grid-template-columns: 1fr;
  }

  .framework-tabs {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .framework-market-cards {
    grid-template-columns: 1fr;
  }

  .home-market-overview {
    grid-template-columns: 1fr;
  }

  .market-overview-periods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-overview-periods span {
    display: grid;
    gap: 3px;
  }
}
.candidate-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.candidate-result-grid em {
  color: var(--muted-color, #5f6d64);
  font-style: normal;
  font-size: 13px;
}

.home-command-center {
  position: sticky;
  z-index: 12;
  top: -1px;
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(520px, 1.8fr);
  border: 1px solid var(--line);
  background: rgba(250, 252, 250, .97);
  box-shadow: 0 8px 24px rgba(24, 44, 32, .08);
  backdrop-filter: blur(16px);
}

.home-market-overview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 18px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.market-overview-primary {
  display: grid;
  align-content: center;
}

.market-overview-primary span,
.market-overview-primary em,
.market-overview-periods small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.market-overview-primary strong {
  color: var(--ink);
  font-size: 27px;
  line-height: 1.1;
}

.market-overview-primary em {
  margin-top: 4px;
  color: #9a632d;
  font-weight: 700;
}

.market-overview-periods {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 4px;
}

.market-overview-periods span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.market-overview-periods strong {
  font-size: 12px;
}

.home-market-overview > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.home-strategy-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strategy-day-card {
  min-width: 0;
  padding: 15px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

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

.strategy-day-card:hover {
  background: #f3f7f4;
}

.strategy-day-card > span {
  color: var(--muted);
  font-size: 12px;
}

.strategy-day-card > strong {
  display: block;
  margin-top: 5px;
  color: #8a3f39;
  font-size: 16px;
}

.strategy-day-card.is-actionable > strong {
  color: #1f6b49;
}

.strategy-day-card p {
  min-height: 35px;
  margin: 8px 0 5px;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.45;
}

.strategy-day-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.market-brief-launcher {
  position: fixed;
  z-index: 40;
  left: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  background: #203d31;
  box-shadow: 0 10px 28px rgba(18, 35, 27, .24);
  color: white;
  text-align: left;
  cursor: pointer;
}

.market-brief-launcher span:last-child {
  display: grid;
}

.market-brief-launcher strong {
  font-size: 13px;
}

.market-brief-launcher small {
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
}

.brief-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7a74b;
  box-shadow: 0 0 0 4px rgba(215, 167, 75, .14);
}

.market-brief-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.market-brief-dialog[hidden] {
  display: none;
}

.market-brief-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(18, 29, 23, .48);
  cursor: default;
}

.market-brief-sheet {
  position: absolute;
  inset: 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-width: 1180px;
  margin: auto;
  overflow: hidden;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  background: #f8faf8;
  box-shadow: 0 24px 70px rgba(11, 25, 17, .28);
}

.market-brief-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.market-brief-sheet h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.market-brief-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.market-brief-content {
  overflow-y: auto;
  padding: 24px;
}

.brief-lead {
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--line);
}

.brief-lead > span {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background: #efe4cc;
  color: #7b5628;
  font-size: 11px;
  font-weight: 700;
}

.brief-lead h3 {
  margin: 10px 0 6px;
  font-size: 25px;
}

.brief-lead p,
.brief-market-item p,
.brief-watch-group p,
.brief-risks p,
.market-brief-content footer p {
  color: var(--muted);
  line-height: 1.65;
}

.brief-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.brief-section-title h3,
.brief-watch-group h3,
.brief-risks h3 {
  margin: 0;
  font-size: 16px;
}

.brief-section-title span {
  color: var(--muted);
  font-size: 11px;
}

.brief-market-grid,
.brief-watch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.brief-market-item,
.brief-watch-group {
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
}

.brief-market-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brief-market-item > div span {
  color: #89602f;
  font-size: 11px;
}

.brief-market-item p,
.brief-watch-group p,
.brief-watch-group small {
  margin: 7px 0 0;
  font-size: 12px;
}

.brief-market-item b {
  display: inline-block;
  width: 34px;
  color: var(--ink);
}

.brief-watch-group article {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.brief-watch-group article:last-child {
  border-bottom: 0;
}

.brief-watch-group strong span,
.brief-watch-group small {
  color: var(--muted);
}

.brief-risks {
  margin-top: 22px;
  padding: 16px;
  border-left: 3px solid #c49345;
  background: #f5f0e6;
}

.brief-risks p {
  margin: 7px 0 0;
  font-size: 12px;
}

.market-brief-content footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.market-brief-content footer a {
  margin-right: 14px;
  color: #276145;
  font-size: 12px;
}

.market-brief-content footer p {
  margin-bottom: 0;
  font-size: 11px;
}

body.brief-open {
  overflow: hidden;
}

.brief-empty {
  display: grid;
  min-height: 280px;
  place-content: center;
  text-align: center;
}

.brief-empty p {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .home-command-center { grid-template-columns: 1fr; position: static; }
  .home-market-overview { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .system-intro,
  .domain-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .system-intro h3,
  .domain-head h3 {
    font-size: 26px;
  }

  .attention-questions,
  .domain-overview-grid,
  .constitution-principle-grid,
  .black-cat-metrics {
    grid-template-columns: 1fr;
  }

  .attention-questions article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .constitution-principle-grid article {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .black-cat-snapshot-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .black-cat-decision-chain > div {
    grid-template-columns: 1fr 1fr;
  }

  .growth-log {
    right: 74px;
    bottom: 14px;
    left: auto;
    width: 150px;
  }

  .growth-log[open] {
    right: 14px;
    width: min(360px, calc(100vw - 28px));
  }

  .black-cat-legend {
    justify-content: flex-start;
  }

  .black-cat-region > header {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .black-cat-region header > strong {
    grid-column: 2;
    justify-self: start;
  }

  .home-strategy-overview,
  .brief-market-grid,
  .brief-watch-grid { grid-template-columns: 1fr; }
  .strategy-day-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .strategy-day-card:last-child { border-bottom: 0; }
  .strategy-day-card p { min-height: 0; }
  .market-brief-launcher { left: 14px; bottom: 14px; min-width: 132px; }
  .market-brief-sheet { inset: 8px; }
  .market-brief-sheet > header,
  .market-brief-content { padding: 16px; }
  .brief-lead h3 { font-size: 21px; }
}

@media (max-width: 620px) {
  .market-brief-launcher {
    right: 14px;
    left: auto;
    width: 52px;
    min-width: 52px;
    height: 52px;
    justify-content: center;
    padding: 0;
  }

  .market-brief-launcher > span {
    display: none;
  }

  .market-brief-launcher::after {
    content: "新闻";
    color: white;
    font-size: 12px;
    font-weight: 700;
  }
}

@media (max-width: 720px) {
  .candidate-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .sidebar {
    padding: 18px;
  }

  .strategy-switcher {
    margin-top: 18px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
  }

  .nav-item {
    min-height: 44px;
    padding: 10px 8px;
    text-align: center;
  }

  .account-card {
    margin-top: 18px;
    padding: 14px;
  }

  .strategy-mode,
  .capital-input button,
  .framework-tab {
    min-height: 44px;
  }

  .home-market-overview {
    grid-template-columns: 1fr;
  }

  .market-overview-periods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-overview-periods span {
    display: grid;
    gap: 3px;
  }
}
