/*
 * Desktop UI refresh
 * Presentation-only overrides: no market, scoring, selection or trading rules live here.
 */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fa;
  --ink: #17242c;
  --muted: #667680;
  --line: #e1e7ea;
  --accent: #08776e;
  --accent-strong: #05645d;
  --accent-soft: #e9f5f2;
  --accent-2: #b85d38;
  --accent-3: #315f8c;
  --good: #13865b;
  --warn: #b77919;
  --bad: #b64249;
  --shadow: 0 1px 2px rgba(22, 36, 44, 0.04), 0 10px 30px rgba(22, 36, 44, 0.045);
  --shadow-raised: 0 18px 45px rgba(22, 36, 44, 0.09);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-ui: "Segoe UI Variable Text", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-display: "Segoe UI Variable Display", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-number: "Bahnschrift", "Segoe UI Variable Display", "Microsoft YaHei UI", sans-serif;
}


html {
  background: var(--bg);
}

body {
  min-width: 0;
  background:
    radial-gradient(circle at 80% -20%, rgba(8, 119, 110, 0.07), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

::selection {
  background: rgba(8, 119, 110, 0.18);
}

button,
a,
input,
select,
textarea,
summary {
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(8, 119, 110, 0.2);
  outline-offset: 2px;
}

/* ===== Application shell ===== */

@media (min-width: 821px) {
  .app-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    gap: 18px;
    padding: 22px 16px 18px;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background:
      radial-gradient(circle at 10% 0%, rgba(35, 167, 154, 0.13), transparent 28%),
      #101d25;
    box-shadow: 8px 0 28px rgba(11, 25, 33, 0.08);
  }

  .main {
    min-width: 0;
    padding: 0 32px 48px;
  }

  .main > section[data-view],
  .main > .external-core-alert {
    width: min(100%, 1500px);
    margin-right: auto;
    margin-left: auto;
  }

  .main > section[data-view]:not(.view-hidden) {
    animation: ui-view-in 220ms ease both;
  }
}

@keyframes ui-view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  gap: 11px;
  min-height: 48px;
  padding: 0 7px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(145deg, #169a8f, #08776e);
  box-shadow: 0 8px 18px rgba(8, 119, 110, 0.24);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.brand strong {
  color: #f7fbfc;
  font-size: 15px;
  font-weight: 700;
}

.brand small {
  margin-top: 2px;
  color: #8fa4af;
  font-size: 10.5px;
}

.nav-stack {
  display: block;
  min-height: 0;
  padding: 2px 4px 12px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.nav-group-label {
  display: block;
  margin: 15px 10px 6px;
  color: #627985;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.nav-group-label:first-child {
  margin-top: 2px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  min-height: 41px;
  margin: 2px 0;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aebfc8;
  font-size: 13px;
  font-weight: 600;
}

.nav-item .nav-index {
  color: #5f7681;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.045);
  color: #eef7f7;
}

.nav-item.active {
  border-color: rgba(52, 191, 176, 0.18);
  background: linear-gradient(90deg, rgba(20, 144, 133, 0.24), rgba(20, 144, 133, 0.08));
  color: #ffffff;
  box-shadow: inset 3px 0 0 #34bfb0;
}

.nav-item.active .nav-index {
  color: #7ee0d3;
}

.sidebar-note {
  margin-top: 0;
  padding: 13px 14px;
  border-color: rgba(125, 224, 211, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-note span {
  margin-bottom: 5px;
  color: #79d8cc;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.sidebar-note p {
  color: #aebfc8;
  font-size: 11px;
  line-height: 1.55;
}

.workspace-topbar {
  display: none;
}

@media (min-width: 821px) {
  .workspace-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    margin: 0 -32px 22px;
    padding: 10px 32px;
    border-bottom: 1px solid rgba(218, 226, 230, 0.84);
    background: rgba(247, 249, 250, 0.91);
    backdrop-filter: blur(14px);
  }
}

.workspace-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.workspace-title span {
  color: #7d8b94;
  font-size: 11px;
  font-weight: 700;
}

.workspace-title strong {
  color: #1b2c35;
  font-size: 15px;
}

.workspace-context {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #7b8991;
  font-size: 11px;
}

.workspace-device {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #dbe5e5;
  border-radius: 999px;
  background: #fff;
  color: #36555b;
  font-weight: 700;
}

.workspace-device i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #18a376;
  box-shadow: 0 0 0 4px rgba(24, 163, 118, 0.11);
}

/* ===== Typography and common surfaces ===== */

.section {
  margin-top: 0;
  margin-bottom: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: #172932;
  font-size: clamp(25px, 2.2vw, 32px);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 9px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.panel,
.system-card,
.playbook-item {
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
}

.panel-title-row {
  align-items: flex-start;
  margin-bottom: 13px;
}

.panel-title-row h3,
.panel > h3 {
  margin: 0;
  color: #20343d;
  font-size: 15.5px;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.4;
}

.panel-title-row p {
  max-width: 820px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.panel-title-row > span,
.panel-title-row > div + span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f1f4f6;
  color: #6c7d86;
  font-size: 10.5px;
  font-weight: 700;
}

.topic-board-panel .panel-title-row > span {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 760px) {
  .topic-board-panel .panel-title-row {
    flex-wrap: wrap;
  }

  .topic-board-panel .panel-title-row > span {
    flex-basis: 100%;
    text-align: left;
  }
}

.decision-note,
.empty-state {
  border-color: #d9e2e6;
  border-radius: 11px;
  background: #f8fafb;
  color: #718089;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  width: auto;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, #0b8177, #086e66);
  box-shadow: 0 7px 16px rgba(8, 119, 110, 0.17);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #08766d, #055f59);
  box-shadow: 0 9px 20px rgba(8, 119, 110, 0.22);
  transform: translateY(-1px);
}

.secondary-btn,
.ghost-btn {
  border-color: #d7e1e4;
  background: #fff;
  color: #355862;
}

.secondary-btn:hover,
.ghost-btn:hover {
  border-color: #a9cbc6;
  background: #f0f8f6;
  color: var(--accent-strong);
}

form .primary-btn,
.score-form .primary-btn,
.stock-form .primary-btn,
.preplan-form .primary-btn {
  width: 100%;
}

input,
select,
textarea {
  border-color: #dce4e8;
  border-radius: 10px;
  background: #fbfcfd;
  color: #20343d;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c6d3d8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #5baaa2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 119, 110, 0.11);
}

label {
  color: #41545e;
  font-size: 12px;
  font-weight: 600;
}

table {
  border-spacing: 0;
  overflow: hidden;
  border-radius: 11px;
}

th {
  background: #f4f7f8;
  color: #52656e;
  font-size: 11px;
  font-weight: 600;
}

td {
  border-color: #e9edef;
}

/* ===== High-priority workspace views ===== */

.decision-toolbar {
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.decision-toolbar .fetch-status-badge {
  margin-left: auto;
}

.decision-grid {
  gap: 14px;
  margin-bottom: 14px;
}

.decision-block {
  margin-bottom: 14px;
  padding: 20px;
}

.decision-block > h3,
.decision-block .panel-title-row h3 {
  padding-bottom: 11px;
  border-bottom: 1px solid #edf0f2;
}

.decision-body {
  color: #42555f;
  font-size: 13px;
  line-height: 1.65;
}

.external-core-alert {
  position: relative;
  top: auto;
  z-index: 1;
  display: block;
  margin-bottom: 16px;
  padding: 14px 15px 11px;
  border-width: 1px 1px 1px 4px;
  border-radius: 13px;
  box-shadow: none;
}

.external-core-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(176, 33, 54, 0.14);
}

.external-core-alert-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.external-core-alert-head strong {
  margin: 0;
  color: #8f1f2d;
  font-size: 14px;
}

.external-core-alert-head span {
  color: #865961;
  font-size: 11px;
}

.external-core-alert-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.external-core-alert-stats b {
  padding: 4px 8px;
  border: 1px solid #ead9dd;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #684a51;
  font-size: 10.5px;
  font-weight: 700;
}

.external-core-alert-stats b.is-triggered {
  border-color: #efb9c1;
  background: #ffe6e9;
  color: #a11f32;
}

.external-core-alert-stats b.is-missing {
  border-color: #e4ddd2;
  background: #f6f2eb;
  color: #776a58;
}

.external-core-market-groups {
  display: grid;
  gap: 7px;
  padding-top: 9px;
}

.external-core-market-group {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.external-core-market-group > header {
  display: grid;
  gap: 2px;
  padding: 5px 0;
}

.external-core-market-group > header strong {
  color: #3b4d55;
  font-size: 11px;
}

.external-core-market-group > header span {
  color: #8a6b70;
  font-size: 9.5px;
}

.external-core-market-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.external-core-alert-item {
  display: inline-grid;
  grid-template-columns: max-content minmax(72px, max-content) max-content;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid #eadde0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.64);
  color: #5d454a;
  font-size: 11px;
}

.external-core-alert-item b {
  color: #333f45;
  font-size: 10.5px;
}

.external-core-alert-item em {
  overflow: hidden;
  color: #8a7377;
  font-size: 9.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-core-alert-item strong {
  color: #3c776b;
  font-size: 10.5px;
  white-space: nowrap;
}

.external-core-alert-item.is-alert {
  border-color: #efb7bf;
  background: #ffe6e9;
}

.external-core-alert-item.is-alert strong {
  color: #a31d31;
}

.external-core-alert-item.is-anchor {
  border-color: #b9d8d1;
  background: #edf8f5;
}

.external-core-alert-item.is-anchor.is-alert {
  border-color: #e6a4ae;
  background: #ffe4e8;
}

.external-core-alert-item.is-missing {
  border-style: dashed;
  background: #f7f4ef;
}

.external-core-alert-item.is-missing strong {
  color: #827260;
}

.external-core-alert-note {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(176, 33, 54, 0.13);
  color: #82666b;
  font-size: 10.5px;
}

.decision-verdict strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.decision-verdict span {
  min-width: 0;
}

.market-emotion-hero,
.review-conclusion-hero,
.event-inference-hero {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.market-emotion-metric,
.event-inference-metrics > div,
.journal-stat-card,
.us-index-card {
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.market-review-grid > section,
.market-emotion-group,
.review-conclusion-pick,
.sell-advisor-card,
.stock-pick-card,
.archive-card {
  border-color: var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.sell-advisor-layout,
.journal-layout,
.picker-layout,
.selection-grid,
.watchlist-layout,
.preplan-layout,
.realtime-layout,
.anchor-grid,
.us-framework-grid,
.us-bridge-grid {
  gap: 14px;
}

.hero-section {
  position: relative;
  min-height: 300px;
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 20%, rgba(55, 196, 180, 0.22), transparent 25%),
    linear-gradient(135deg, #122630 0%, #173b43 60%, #1d5052 100%);
  box-shadow: var(--shadow-raised);
}

.hero-section-us {
  background:
    radial-gradient(circle at 82% 18%, rgba(86, 132, 206, 0.25), transparent 26%),
    linear-gradient(135deg, #14243d 0%, #1b3456 60%, #244b66 100%);
}

.status-board div {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.095);
}

/* ===== Event radar: clear natural-language timing ===== */

.event-inference-section {
  --event-teal: var(--accent);
  --event-ink: #1b3139;
  --event-gold: #936414;
  --event-soft: var(--accent-soft);
}

.event-inference-heading,
.market-emotion-heading,
.review-conclusion-heading {
  align-items: flex-end;
}

.event-inference-toolbar,
.market-emotion-toolbar,
.review-conclusion-toolbar {
  gap: 9px;
}

.event-source-status {
  gap: 7px;
  margin: -4px 0 14px;
}

.event-source-chip {
  min-height: 31px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 10.5px;
}

.event-calendar-panel,
.event-future-panel,
.event-inference-panel,
.event-landed-panel {
  margin-bottom: 14px;
}

.event-calendar-list {
  max-height: none;
  overflow: visible;
  border-color: #e3e9eb;
  border-radius: 12px;
  background: #fbfcfd;
}

.event-calendar-date {
  background: #f3f7f7;
}

.event-calendar-item {
  grid-template-columns: 108px minmax(250px, 1.1fr) minmax(220px, 0.9fr) minmax(210px, 0.8fr);
  min-height: 52px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.event-calendar-item > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.event-calendar-item > div strong {
  min-width: 0;
}

.event-calendar-item > div b {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  background: #e7f4f1;
  color: #29796f;
  font-size: 9px;
  white-space: nowrap;
}

.event-calendar-item small {
  text-align: left;
}

.event-calendar-item > em {
  color: #809095;
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}

.event-calendar-item.is-risk-calendar {
  background: #fffbf1;
}

.event-calendar-item.is-risk-calendar > span {
  background: #fff0c9;
  color: #8a5d09;
}

.event-calendar-item.is-risk-calendar > div b {
  background: #fff0c9;
  color: #8a5d09;
}

.event-future-list {
  gap: 10px;
  margin-top: 14px;
}

.event-future-card {
  overflow: hidden;
  border: 1px solid #dce5e6;
  border-left: 4px solid #9aabae;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 46, 52, 0.04);
}

.event-future-card.is-observe { border-left-color: #278d84; }
.event-future-card.is-warming { border-left-color: #4687b7; }
.event-future-card.is-cashout { border-left-color: #c08420; }
.event-future-card.is-landed { border-left-color: #7c8790; }
.event-future-card.is-prepare { border-left-color: #6e9a91; }
.event-future-card.is-risk-calendar { border-left-color: #b47b1f; }

.event-future-title > div span.is-risk-calendar-label {
  border-color: #efd49c;
  background: #fff3d8;
  color: #8a5b08;
}

.event-future-summary {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(280px, 1fr) minmax(160px, 0.42fr) 100px 86px;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 15px 17px;
  list-style: none;
  cursor: pointer;
  background: #fff;
}

.event-future-summary::-webkit-details-marker,
.ui-disclosure > summary::-webkit-details-marker {
  display: none;
}

.event-future-card[open] > .event-future-summary {
  border-bottom: 1px solid #e7ecee;
  background: linear-gradient(105deg, #fbfdfd, #fffdf8);
}

.event-future-card:hover {
  border-color: #c8d7d9;
  box-shadow: 0 8px 25px rgba(30, 57, 63, 0.07);
}

.event-future-date,
.event-future-pricing {
  gap: 3px;
  padding: 9px;
  border-radius: 10px;
}

.event-future-date {
  background: #f2f6f7;
  color: #294750;
}

.event-future-date strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.event-future-date span {
  color: #687a82;
  font-size: 10px;
  line-height: 1.4;
}

.event-future-title > div {
  gap: 5px;
}

.event-future-title > div span {
  padding: 3px 7px;
  border-radius: 6px;
  background: #f0f4f5;
  color: #60737b;
  font-size: 9.5px;
}

.event-future-title > div span:first-child {
  background: #eef7f5;
  color: #18736b;
}

.event-future-title h4 {
  margin: 7px 0 3px;
  color: #193039;
  font-size: 16px;
  line-height: 1.38;
}

.event-future-title p {
  color: #718088;
  font-size: 11px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
}

.event-stage-pill {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 72px;
  padding: 10px 11px;
  border: 1px solid #d9e4e3;
  border-radius: 11px;
  background: #f5f9f8;
}

.event-stage-pill small {
  color: #71828a;
  font-size: 9px;
}

.event-stage-pill strong {
  color: #216f68;
  font-size: 12px;
  line-height: 1.35;
}

.event-stage-pill span {
  color: #718089;
  font-size: 9.5px;
}

.event-stage-pill.is-warming {
  border-color: #ccdfed;
  background: #f2f7fb;
}

.event-stage-pill.is-warming strong { color: #356f9a; }

.event-stage-pill.is-cashout {
  border-color: #ead9b4;
  background: #fff9ec;
}

.event-stage-pill.is-cashout strong { color: #936414; }

.event-stage-pill.is-landed {
  border-color: #dde2e5;
  background: #f5f6f7;
}

.event-stage-pill.is-landed strong { color: #5b6870; }

.event-future-pricing {
  background: #eef7f5;
}

.event-future-pricing strong {
  font-size: 22px;
}

.event-future-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #dce4e6;
  border-radius: 8px;
  color: #65777f;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.event-future-card[open] .event-future-toggle {
  border-color: #bcd8d4;
  background: #edf7f5;
  color: #176e67;
}

.event-future-card[open] .event-future-toggle::before { content: "收起"; }
.event-future-card[open] .event-future-toggle { font-size: 0; }
.event-future-card[open] .event-future-toggle::before { font-size: 10px; }

.event-future-body {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 12px;
  padding: 14px;
  background: #fbfcfd;
}

.event-calendar-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 11px 14px;
  padding: 14px 15px;
  border: 1px solid #ead9b5;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0 0%, #fffdf8 56%, #f8fbfa 100%);
}

.event-calendar-detail-head,
.event-calendar-detail dl {
  grid-column: 1 / -1;
}

.event-calendar-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(155, 112, 33, 0.15);
}

.event-calendar-detail-head b {
  color: #795411;
  font-size: 13px;
}

.event-calendar-detail-head span {
  color: #7c6b4b;
  font-size: 10.5px;
}

.event-calendar-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.event-calendar-detail dl > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(169, 139, 80, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.event-calendar-detail dl > div.is-wide {
  grid-column: 1 / -1;
}

.event-calendar-detail dt {
  color: #8b7650;
  font-size: 10px;
  font-weight: 800;
}

.event-calendar-detail dd {
  margin: 0;
  color: #3d5057;
  font-size: 10.5px;
  line-height: 1.5;
}

.event-calendar-detail section {
  padding: 11px 12px;
  border: 1px solid rgba(169, 139, 80, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.event-calendar-detail section > b {
  display: block;
  margin-bottom: 7px;
  color: #694d19;
  font-size: 11px;
}

.event-calendar-detail section p {
  position: relative;
  margin: 5px 0;
  padding-left: 12px;
  color: #4b5d64;
  font-size: 10.5px;
  line-height: 1.55;
}

.event-calendar-detail section p::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ba842a;
  content: "";
}

.event-calendar-detail section > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.event-calendar-detail section span {
  padding: 5px 7px;
  border-radius: 6px;
  background: #f4eee2;
  color: #67583d;
  font-size: 9.5px;
  line-height: 1.35;
}

.event-timing-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 7px 18px;
  padding: 13px 15px;
  border: 1px solid #d9e5e3;
  border-radius: 12px;
  background: #f2f9f7;
}

.event-timing-copy {
  grid-row: 1 / 3;
}

.event-timing-copy span,
.event-timing-copy strong,
.event-timing-copy em {
  display: block;
}

.event-timing-copy span {
  color: #71838a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.event-timing-copy strong {
  margin-top: 3px;
  color: #176f67;
  font-size: 15px;
}

.event-timing-copy em {
  margin-top: 2px;
  color: #60727a;
  font-size: 10.5px;
  font-style: normal;
}

.event-timing-track {
  position: relative;
  align-self: end;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7e6;
}

.event-timing-track i {
  display: block;
  width: var(--timing-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #48aa9e, #0b776e);
}

.event-timing-labels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.event-timing-labels span {
  color: #8a989f;
  font-size: 9px;
  text-align: center;
}

.event-timing-labels span.is-active {
  color: #156d65;
  font-weight: 850;
}

.event-timing-card > p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 9px;
  border-top: 1px solid rgba(35, 115, 106, 0.11);
  color: #4e626a;
  font-size: 11.5px;
  line-height: 1.55;
}

.event-timing-card > p b {
  color: #1c5f59;
}

.event-timing-card > p em {
  display: inline-flex;
  margin-left: 9px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #fff;
  color: #976719;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 800;
}

.event-timing-card.is-warming {
  border-color: #d2e1ec;
  background: #f2f7fb;
}

.event-timing-card.is-cashout {
  border-color: #ead9b6;
  background: #fff9ed;
}

.event-timing-card.is-cashout .event-timing-copy strong { color: #936414; }
.event-timing-card.is-cashout .event-timing-track i { background: linear-gradient(90deg, #d4a13f, #b67817); }
.event-timing-card.is-landed { border-color: #dde3e6; background: #f5f7f8; }
.event-timing-card.is-landed .event-timing-copy strong { color: #5b6971; }
.event-timing-card.is-landed .event-timing-track i { background: #7d8a91; }

.event-future-section {
  display: block;
  padding: 13px 14px;
  border: 1px solid #e1e7e9;
  border-radius: 11px;
  background: #fff;
}

.event-future-section > b {
  display: block;
  margin-bottom: 8px;
  color: #2c4650;
  font-size: 11.5px;
}

.event-future-section.is-stock-section {
  grid-column: 1 / -1;
}

.event-impact-sector-list span {
  padding: 4px 7px;
  border-radius: 6px;
  background: #f0edf8;
  color: #5d4d7d;
  font-size: 10px;
}

.event-impact-paths p {
  font-size: 11.5px;
}

.event-impact-stocks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.event-impact-stock {
  padding: 10px;
  border-color: #e2e8ea;
  border-radius: 9px;
  background: #fafcfc;
}

.event-impact-stock.is-qualified {
  border-color: #b8d8d1;
  background: #f0f8f6;
}

.event-future-gate {
  grid-column: 1 / -1;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid #e9dfc8;
  border-radius: 10px;
  background: #fffbf3;
}

.event-future-gate p {
  font-size: 11px;
}

.ui-disclosure {
  padding: 0;
  overflow: hidden;
}

.ui-disclosure > summary {
  position: relative;
  align-items: center;
  min-height: 70px;
  margin: 0;
  padding: 16px 52px 16px 18px;
  list-style: none;
  cursor: pointer;
}

.ui-disclosure > summary::after {
  position: absolute;
  top: 50%;
  right: 18px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #f1f4f5;
  color: #61727a;
  content: "+";
  font-size: 16px;
  transform: translateY(-50%);
}

.ui-disclosure[open] > summary {
  border-bottom: 1px solid #e7ecee;
  background: #fbfcfd;
}

.ui-disclosure[open] > summary::after {
  content: "−";
}

.ui-disclosure > :not(summary) {
  margin: 0;
  padding: 16px 18px 18px;
}

.ui-disclosure .event-inference-list,
.ui-disclosure .event-landed-list,
.ui-disclosure .event-filtered-list {
  margin-top: 0;
}

/* ===== Responsive protection ===== */

@media (max-width: 1240px) {
  .external-core-alert-head,
  .external-core-alert-head > div:first-child {
    align-items: flex-start;
  }

  .external-core-alert-head > div:first-child {
    display: grid;
    gap: 3px;
  }

  .external-core-market-group {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .external-core-alert-item {
    grid-template-columns: max-content minmax(60px, max-content) max-content;
  }

  .event-future-summary {
    grid-template-columns: 110px minmax(260px, 1fr) minmax(150px, 0.5fr) 88px;
  }

  .event-future-toggle {
    display: none;
  }

  .event-impact-stocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-calendar-day {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .event-calendar-item {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .event-calendar-item small,
  .event-calendar-item > em {
    grid-column: 2;
  }
}

@media (max-width: 980px) {
  .event-future-summary {
    grid-template-columns: 105px minmax(0, 1fr) 150px;
  }

  .event-future-pricing {
    display: none;
  }

  .event-future-body {
    grid-template-columns: 1fr;
  }

  .event-future-section,
  .event-future-section.is-stock-section,
  .event-future-gate {
    grid-column: 1;
  }

  .event-calendar-detail {
    grid-template-columns: 1fr;
  }

  .event-calendar-detail section {
    grid-column: 1;
  }

  .event-impact-stocks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .external-core-alert-head,
  .external-core-market-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .external-core-alert-stats {
    justify-content: flex-start;
  }

  .external-core-market-group > header {
    grid-template-columns: max-content max-content;
    align-items: center;
  }

  .external-core-alert-item {
    width: 100%;
    grid-template-columns: minmax(84px, max-content) minmax(0, 1fr) max-content;
  }

  .workspace-topbar,
  .nav-group-label,
  .nav-index {
    display: none;
  }

  .nav-item {
    display: flex;
  }

  .event-future-summary,
  .event-timing-card {
    grid-template-columns: 1fr;
  }

  .event-stage-pill {
    min-height: 0;
  }

  .event-timing-copy {
    grid-row: auto;
  }

  .event-timing-labels {
    grid-template-columns: 1fr;
  }

  .event-timing-labels span {
    display: none;
    text-align: left;
  }

  .event-calendar-day,
  .event-calendar-item {
    grid-template-columns: 1fr;
  }

  .event-calendar-item small,
  .event-calendar-item > em {
    grid-column: 1;
  }

  .event-timing-labels span.is-active {
    display: block;
  }
}

@media (min-width: 821px) and (max-height: 820px) {
  .sidebar {
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .nav-item {
    min-height: 35px;
    font-size: 12px;
  }

  .nav-group-label {
    margin-top: 8px;
    margin-bottom: 3px;
  }

  .sidebar-note {
    display: none;
  }
}

/* ===== Typography upgrade =====
 * Presentation only. Keep the original data, scoring and decision logic untouched.
 */

.brand strong,
.workspace-title strong,
.section-heading h2,
.panel-title-row h3,
.panel > h3,
.super-expectation-heading h2,
.super-expectation-hero-copy h3,
.super-expectation-stage-head h3,
.super-candidate-title h4,
.super-validation-card > header h4 {
  font-family: var(--font-display);
  text-wrap: balance;
}

.section-heading h2 {
  letter-spacing: -0.012em;
}

.nav-item,
.workspace-context,
.panel,
.system-card,
.playbook-item {
  letter-spacing: 0;
}

.super-expectation-section {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.super-expectation-heading > div:first-child > p:last-child {
  font-size: 13px;
  line-height: 1.75;
}

.super-expectation-toolbar > span {
  font-size: 12px;
}

.super-expectation-hero-copy > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
}

.super-expectation-hero-copy h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.super-expectation-hero-copy p {
  font-size: 13px;
  line-height: 1.75;
}

.super-expectation-gates span {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}

.super-expectation-gates b,
.super-expectation-counts strong,
.super-candidate-rank b,
.super-validation-score strong,
.super-comparison b {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0;
}

.super-expectation-counts span {
  font-size: 11px;
  font-weight: 600;
}

.super-expectation-counts strong {
  font-size: 22px;
}

.super-expectation-counts small {
  font-size: 10px;
  line-height: 1.45;
}

.super-expectation-stage-head h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.super-expectation-stage-head p {
  font-size: 12.5px;
  line-height: 1.6;
}

.super-stage-index {
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.super-expectation-empty strong {
  font-size: 15px;
  font-weight: 700;
}

.super-expectation-empty span {
  font-size: 12px;
  line-height: 1.65;
}

.super-rejected-head strong {
  font-size: 15px;
  font-weight: 700;
}

.super-rejected-head span {
  font-size: 11.5px;
  line-height: 1.55;
}

.super-rejected-head > b {
  font-size: 11px;
  font-weight: 600;
}

.super-rejected-card {
  padding: 14px;
}

.super-rejected-card h4 {
  font-size: 14px;
  font-weight: 700;
}

.super-rejected-card header small {
  font-size: 10.5px;
}

.super-rejected-card header > span {
  font-size: 10.5px;
  font-weight: 700;
}

.super-rejected-facts span {
  font-size: 10.5px;
  line-height: 1.4;
}

.super-rejected-gates > div {
  gap: 8px;
  padding: 9px 10px;
}

.super-rejected-gates i {
  font-size: 10px;
  font-weight: 700;
}

.super-rejected-gates b {
  font-size: 11.5px;
  font-weight: 600;
}

.super-rejected-gates small {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.55;
}

.super-rejected-card > p {
  font-size: 10.8px;
  line-height: 1.55;
}

.super-candidate-rank span {
  font-size: 10px;
  font-weight: 700;
}

.super-candidate-rank b {
  font-size: 18px;
}

.super-candidate-title h4 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.super-candidate-title small {
  font-size: 11px;
}

.super-candidate-title > span {
  font-size: 11px;
  font-weight: 700;
}

.super-candidate-state span {
  font-size: 10px;
}

.super-candidate-state b {
  font-size: 13px;
  font-weight: 700;
}

.super-candidate-thesis span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.super-candidate-thesis strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.super-candidate-thesis p,
.super-candidate-thesis ul {
  font-size: 11.5px;
  line-height: 1.65;
}

.super-candidate-thesis small {
  font-size: 11px;
  line-height: 1.55;
}

.super-baseline span {
  font-size: 11px;
  font-weight: 600;
}

.super-baseline strong {
  font-size: 13px;
  font-weight: 700;
}

.super-baseline em {
  font-size: 10.5px;
}

.super-next-checks > div {
  padding: 11px;
}

.super-next-checks strong {
  font-size: 11.5px;
  font-weight: 600;
}

.super-next-checks small {
  font-size: 10.5px;
  line-height: 1.55;
}

.super-candidate-card > footer p {
  font-size: 11.5px;
  line-height: 1.6;
}

.super-validation-card > header span {
  font-size: 11px;
  font-weight: 700;
}

.super-validation-card > header h4 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.super-validation-card > header h4 small {
  font-size: 11px;
  font-weight: 400;
}

.super-validation-score strong {
  font-size: 26px;
}

.super-validation-score small {
  font-size: 10px;
}

.super-nature-note {
  font-size: 12px;
  line-height: 1.65;
}

.super-comparison span {
  font-size: 10.5px;
}

.super-comparison b {
  font-size: 13px;
}

.super-check-grid b {
  font-size: 11px;
  font-weight: 600;
}

.super-check-grid small {
  font-size: 10px;
  line-height: 1.45;
}

.super-action-grid section > div:first-child span {
  font-size: 10.5px;
  font-weight: 700;
}

.super-action-grid section > div:first-child b {
  font-size: 13px;
  font-weight: 700;
}

.super-action-grid section > p,
.super-action-grid ul {
  font-size: 11.5px;
  line-height: 1.65;
}

.super-entry-routes b {
  font-size: 11px;
  font-weight: 700;
}

.super-entry-routes span,
.super-action-grid .is-outsider > small {
  font-size: 10.5px;
  line-height: 1.55;
}

.super-validation-card > footer {
  font-size: 11.5px;
  line-height: 1.6;
}

.super-expectation-rules summary {
  font-size: 13px;
  font-weight: 700;
}

.super-expectation-rule-grid b {
  font-size: 12px;
  font-weight: 700;
}

.super-expectation-rule-grid span,
.super-expectation-rules > p {
  font-size: 11.5px;
  line-height: 1.6;
}

/* ===== Theme library ===== */

.theme-library-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body[data-mode="theme-library"] #externalCoreAlert {
  display: none !important;
}

.theme-library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.theme-library-heading > div:first-child > p:last-child {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.theme-library-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.theme-library-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 176px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.theme-library-toolbar select {
  min-height: 38px;
  padding: 7px 34px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.theme-library-status-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 1.4fr);
  align-items: center;
  gap: 24px;
  padding: 16px 18px;
}

.theme-library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.theme-library-meta > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.theme-library-meta strong {
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.theme-library-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-library-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.theme-library-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.theme-library-summary span {
  color: var(--muted);
  font-size: 11px;
}

.theme-library-summary strong {
  color: var(--accent-strong);
  font-family: var(--font-number);
  font-size: 20px;
}

.theme-library-list {
  display: grid;
  gap: 12px;
}

.theme-library-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.theme-library-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #c5d2d6;
  content: "";
}

.theme-library-card.is-mainline::before {
  background: var(--accent);
}

.theme-library-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.theme-library-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.theme-library-rank {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-number);
  font-size: 12px;
  font-weight: 700;
}

.theme-library-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.01em;
}

.theme-library-title p {
  max-width: 820px;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-library-card-tags,
.theme-stock-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.theme-state-tag,
.theme-history-badge,
.theme-stock-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.theme-state-tag.is-mainline {
  border-color: rgba(8, 119, 110, 0.18);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.theme-history-badge.is-new,
.theme-history-badge.is-up {
  border-color: rgba(19, 134, 91, 0.2);
  background: rgba(19, 134, 91, 0.08);
  color: var(--good);
}

.theme-history-badge.is-down {
  border-color: rgba(182, 66, 73, 0.18);
  background: rgba(182, 66, 73, 0.07);
  color: var(--bad);
}

.theme-library-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin: 14px 0 12px 46px;
  color: var(--muted);
  font-size: 11px;
}

.theme-library-metrics b {
  color: var(--ink);
  font-family: var(--font-number);
}

.theme-library-metrics .is-up,
.theme-stock-change.is-up {
  color: var(--good);
}

.theme-library-metrics .is-down,
.theme-stock-change.is-down {
  color: var(--bad);
}

.theme-role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.theme-market-cycle,
.theme-cycle-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  min-width: 0;
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px solid rgba(8, 119, 110, 0.16);
  border-radius: 11px;
  background: rgba(233, 245, 242, 0.58);
}

.theme-market-cycle {
  margin: 0 0 12px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.theme-market-cycle > span,
.theme-cycle-context > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.theme-market-cycle > strong,
.theme-cycle-context > strong {
  color: var(--ink);
  font-size: 15px;
}

.theme-market-cycle > b,
.theme-cycle-context > b {
  color: var(--accent-strong);
  font-size: 12px;
}

.theme-market-cycle > small,
.theme-cycle-context > small {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.theme-role-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.theme-role-evidence-section,
.theme-role-evidence-card {
  min-width: 0;
}

.theme-role-evidence-section {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.theme-role-evidence-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.theme-role-evidence-section > header small {
  color: var(--muted);
  font-size: 10px;
}

.role-cycleLeader .theme-role-tag { background: rgba(182, 66, 73, 0.09); color: #a83a42; }
.role-dailyLeader .theme-role-tag { background: rgba(49, 95, 140, 0.1); color: #315f8c; }
.role-heightRisk .theme-role-tag { background: rgba(190, 125, 22, 0.11); color: #986311; }

.theme-role-evidence-list {
  display: grid;
  gap: 8px;
}

.theme-role-evidence-card {
  padding: 10px;
  border: 1px solid rgba(225, 231, 234, 0.95);
  border-radius: 9px;
  background: var(--surface);
}

.theme-role-evidence-card.is-challenged {
  border-color: rgba(182, 66, 73, 0.3);
  background: #fff8f8;
}

.theme-role-evidence-stock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.theme-role-evidence-stock-head > div {
  display: grid;
  min-width: 0;
}

.theme-role-evidence-stock-head strong {
  color: var(--ink);
  font-size: 12px;
}

.theme-role-evidence-stock-head span {
  color: var(--muted);
  font-size: 9.5px;
}

.theme-role-evidence-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.theme-role-evidence-labels span,
.theme-role-evidence-boundary {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 9px;
  font-weight: 750;
}

.theme-role-evidence-labels .is-status {
  background: #fff2dc;
  color: #8b5a0a;
}

.theme-role-evidence-warning {
  margin: 8px 0 0;
  color: var(--bad);
  font-size: 10px;
  line-height: 1.5;
}

.theme-role-evidence-boundary {
  display: inline-flex;
  margin: 8px 0 0;
  background: #f2f4f5;
  color: var(--muted);
}

.theme-role-evidence-details {
  margin-top: 8px;
  border-top: 1px dashed var(--line);
}

.theme-role-evidence-details summary {
  padding-top: 8px;
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.theme-role-evidence-body,
.theme-role-evidence-empty {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.theme-role-evidence-body ul,
.theme-role-evidence-gaps ul {
  margin: 7px 0;
  padding-left: 17px;
}

.theme-role-evidence-body li {
  margin: 3px 0;
}

.theme-role-evidence-body li b,
.theme-role-evidence-body li span,
.theme-role-evidence-body li small {
  display: block;
}

.theme-role-evidence-body li small,
.theme-role-evidence-source,
.theme-role-evidence-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.theme-role-evidence-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 7px;
  padding: 7px;
  border-radius: 7px;
  background: #f3f6f7;
}

.theme-role-evidence-gaps {
  margin-top: 7px;
}

.theme-role-evidence-empty {
  display: grid;
  gap: 5px;
  padding: 12px 7px;
  text-align: center;
}

.theme-role-evidence-empty strong {
  color: var(--ink);
}

.theme-role-evidence-empty p,
.theme-role-evidence-empty small {
  margin: 0;
  overflow-wrap: anywhere;
}

.theme-role-secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 9px;
}

.theme-role-column {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.theme-role-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.theme-role-column > header small {
  color: var(--muted);
  font-size: 10px;
}

.theme-role-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.role-leader .theme-role-tag { background: rgba(182, 66, 73, 0.09); color: #a83a42; }
.role-height .theme-role-tag { background: rgba(190, 125, 22, 0.11); color: #986311; }
.role-pioneer .theme-role-tag { background: rgba(183, 121, 25, 0.11); color: #96600f; }
.role-capacity .theme-role-tag { background: rgba(49, 95, 140, 0.1); color: #315f8c; }
.role-catchup .theme-role-tag { background: rgba(19, 134, 91, 0.09); color: #14734f; }

.theme-role-stocks {
  display: grid;
  gap: 7px;
}

.theme-role-stocks > p {
  margin: 0;
  padding: 14px 6px;
  color: #8a969d;
  font-size: 10.5px;
  text-align: center;
}

.theme-stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  padding: 9px;
  border: 1px solid rgba(225, 231, 234, 0.9);
  border-radius: 9px;
  background: var(--surface);
}

.theme-stock-main {
  display: grid;
  min-width: 0;
}

.theme-stock-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-stock-main span,
.theme-stock-data small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-stock-data {
  display: grid;
  justify-items: end;
  align-content: start;
}

.theme-stock-data b {
  font-family: var(--font-number);
  font-size: 12px;
}

.theme-stock-tags {
  grid-column: 1 / -1;
}

.theme-stock-tags span {
  min-height: 19px;
  padding: 2px 6px;
  font-size: 8.5px;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .theme-library-heading,
  .theme-library-status-panel {
    align-items: stretch;
  }

  .theme-library-heading {
    flex-direction: column;
  }

  .theme-library-status-panel {
    grid-template-columns: 1fr;
  }

  .theme-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .theme-library-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .theme-library-toolbar label {
    grid-column: 1 / -1;
  }

  .theme-library-summary,
  .theme-role-grid {
    grid-template-columns: 1fr 1fr;
  }

  .theme-role-evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .theme-market-cycle,
  .theme-cycle-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-market-cycle > small,
  .theme-cycle-context > small {
    margin-left: 0;
  }

  .theme-library-card-head,
  .theme-library-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-library-title p,
  .theme-library-meta span {
    white-space: normal;
  }

  .theme-library-metrics {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .theme-library-summary,
  .theme-role-grid {
    grid-template-columns: 1fr;
  }

  .theme-library-toolbar {
    grid-template-columns: 1fr;
  }

  .theme-library-toolbar label {
    grid-column: auto;
  }
}

/* ===== Index opportunity: strict five-day evidence ===== */
#index-opportunity .premarket-index-evidence {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(22, 36, 44, 0.06);
}

#index-opportunity .premarket-index-evidence-heading,
#index-opportunity .premarket-index-chart-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#index-opportunity .premarket-index-evidence-heading span,
#index-opportunity .premarket-index-chart-card header span,
#index-opportunity .premarket-index-action-card > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#index-opportunity .premarket-index-evidence-heading h3,
#index-opportunity .premarket-index-chart-card h4 {
  margin: 4px 0 0;
  color: var(--ink);
}

#index-opportunity .premarket-index-evidence-heading h3 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
}

#index-opportunity .premarket-index-evidence-heading mark {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #07675f;
  background: #e8f5f1;
  font-size: 12px;
  font-weight: 700;
}

#index-opportunity .premarket-index-quality-note {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid #c98213;
  border-radius: 8px;
  color: #76510f;
  background: #fff8e8;
  font-size: 13px;
  line-height: 1.6;
}

#index-opportunity .premarket-index-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 12px;
}

#index-opportunity .premarket-index-chart-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

#index-opportunity .premarket-index-chart-card h4 {
  font-size: 17px;
  line-height: 1.4;
}

#index-opportunity .premarket-index-chart-card header small {
  max-width: 48%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

#index-opportunity .premarket-index-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
  overflow: visible;
}

#index-opportunity .premarket-index-grid-line {
  stroke: #dfe7e7;
  stroke: color-mix(in srgb, var(--line) 82%, transparent);
  stroke-width: 1;
}

#index-opportunity .premarket-index-axis-label,
#index-opportunity .premarket-index-date-label,
#index-opportunity .premarket-index-bar-value {
  fill: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
}

#index-opportunity .premarket-index-bar-value {
  fill: var(--ink);
  font-size: 9px;
  font-weight: 700;
}

#index-opportunity .premarket-index-candle line {
  stroke-width: 1.5;
}

#index-opportunity .premarket-index-candle.is-up line,
#index-opportunity .premarket-index-candle.is-up rect {
  stroke: #cf4d55;
  fill: #df6870;
}

#index-opportunity .premarket-index-candle.is-down line,
#index-opportunity .premarket-index-candle.is-down rect {
  stroke: #07826f;
  fill: #24a58f;
}

#index-opportunity .premarket-index-candle.is-flat line,
#index-opportunity .premarket-index-candle.is-flat rect {
  stroke: #7d8d94;
  fill: #9aa7ad;
}

#index-opportunity .premarket-index-turnover-bar rect {
  fill: #2a9b8b;
  opacity: 0.82;
}

#index-opportunity .premarket-index-missing-slot line {
  stroke: #c98213;
  stroke-width: 1;
  stroke-dasharray: 0.08 0.08;
  opacity: 0.72;
}

#index-opportunity .premarket-index-missing-slot > text:not(.premarket-index-date-label) {
  fill: #9a680d;
  font-size: 9px;
  font-weight: 700;
}

#index-opportunity .premarket-index-chart-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

#index-opportunity .premarket-index-chart-card > .empty-state {
  min-height: 176px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  text-align: center;
}

#index-opportunity .premarket-conclusion-card.is-index-only {
  grid-template-columns: minmax(0, 1fr);
}

#index-opportunity .premarket-index-action-card {
  padding: 17px 18px;
  border: 1px solid #b9ddd7;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: #f2faf8;
}

#index-opportunity .premarket-index-action-card.is-conditional {
  border-color: #ead5a9;
  border-left-color: #c98213;
  background: #fffaf0;
}

#index-opportunity .premarket-index-action-card.is-blocked,
#index-opportunity .premarket-index-action-card.is-waiting {
  border-color: #e7c5c5;
  border-left-color: #b54a4a;
  background: #fff5f5;
}

#index-opportunity .premarket-index-action-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
}

#index-opportunity .premarket-index-action-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 820px) {
  #index-opportunity .premarket-index-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  #index-opportunity .premarket-index-evidence,
  #index-opportunity .premarket-index-chart-card {
    padding: 12px;
  }

  #index-opportunity .premarket-index-evidence-heading,
  #index-opportunity .premarket-index-chart-card > header {
    flex-direction: column;
  }

  #index-opportunity .premarket-index-chart-card header small {
    max-width: 100%;
    text-align: left;
  }

  #index-opportunity .premarket-index-missing-slot > text:not(.premarket-index-date-label),
  #index-opportunity .premarket-index-bar-value {
    font-size: 8px;
  }
}

/* ===== Strict-core emotion stage path ===== */
.emotion-stage-path {
  min-width: 0;
  max-width: 100%;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d7e4e4;
  border-radius: 16px;
  background: linear-gradient(135deg, #fbfefe, #f5f9f8);
}

.emotion-stage-path-heading,
.emotion-stage-risk-context > header,
.emotion-stage-path-node > header,
.emotion-stage-core-state > header,
.emotion-stage-risk-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.emotion-stage-path-heading {
  margin-bottom: 12px;
}

.emotion-stage-path-heading div {
  display: grid;
  gap: 3px;
}

.emotion-stage-path-heading span,
.emotion-stage-path-node > header span,
.emotion-stage-risk-context > header span {
  color: #60757b;
  font-size: 12px;
  font-weight: 750;
}

.emotion-stage-path-heading strong {
  color: #17343a;
  font-size: 18px;
}

.emotion-stage-path-heading p,
.emotion-stage-path-node p,
.emotion-stage-core-state p,
.emotion-stage-risk-card p {
  margin: 0;
  color: #60757b;
  font-size: 13px;
  line-height: 1.55;
}

.emotion-stage-path-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.emotion-stage-path-summary article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d4e2e2;
  border-radius: 12px;
  background: #fff;
  overflow-wrap: anywhere;
}

.emotion-stage-path-summary article.is-ready {
  border-color: #91cdc2;
  background: #f3fbf9;
  box-shadow: inset 0 3px #158879;
}

.emotion-stage-path-summary article.is-pending {
  border-style: dashed;
  border-color: #c5d0d2;
  background: #f6f8f8;
}

.emotion-stage-path-summary article.is-baseline {
  border-color: #dcc38e;
  background: #fff9ed;
  box-shadow: inset 0 3px #c18b24;
}

.emotion-stage-path-summary span,
.emotion-stage-path-summary small {
  display: block;
  color: #687d83;
  font-size: 11.5px;
  line-height: 1.45;
}

.emotion-stage-path-summary strong {
  display: block;
  margin: 5px 0 4px;
  color: #17343a;
  font-size: 15px;
  line-height: 1.4;
}

.emotion-stage-risk-context {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #edd9be;
  border-radius: 13px;
  background: #fffaf1;
}

.emotion-stage-risk-context > header {
  margin-bottom: 9px;
}

.emotion-stage-risk-context > header strong {
  color: #78551d;
}

.emotion-stage-risk-context > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.emotion-stage-risk-card {
  overflow-wrap: anywhere;
  min-width: 0;
  padding: 10px;
  border: 1px solid #ead9c2;
  border-radius: 11px;
  background: #fff;
}

.emotion-stage-risk-card small,
.emotion-stage-core-state small,
.emotion-stage-path-node > header small {
  color: #71858b;
  font-size: 11px;
}

.emotion-stage-risk-card mark,
.emotion-stage-core-state mark {
  display: inline-block;
  margin: 7px 0;
  padding: 3px 7px;
  border-radius: 999px;
  color: #775019;
  background: #fff0d7;
  font-size: 11px;
  font-weight: 750;
}

.emotion-stage-path-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.emotion-stage-path-node {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 13px;
  border: 1px solid #cddede;
  border-radius: 13px;
  background: #fff;
}

.emotion-stage-path-node > strong {
  display: block;
  margin: 8px 0;
  color: #17343a;
  font-size: 16px;
  line-height: 1.35;
}

.emotion-stage-path-node.is-ready {
  border-color: #92cdc3;
  box-shadow: inset 0 3px #158879;
}

.emotion-stage-path-node.is-insufficient {
  border-color: #e5cb9d;
  background: #fffaf2;
}

.emotion-stage-insufficient-evidence {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #dcc79f;
}

.emotion-stage-insufficient-evidence > b {
  color: #76551f;
  font-size: 12px;
}

.emotion-stage-path-node.is-unavailable {
  border-style: dashed;
  border-color: #bdc9cc;
  background: #f4f7f7;
}

.emotion-stage-path-node.is-tomorrow {
  border-color: #d7bb81;
  background: #fffaf0;
}

.emotion-scenario-inference {
  min-width: 0;
  margin-top: 11px;
  padding: 11px;
  border: 1px solid #dfcfaa;
  border-radius: 11px;
  background: #fff;
}

.emotion-scenario-inference > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.emotion-scenario-inference > header span,
.emotion-scenario-inference > header strong {
  display: block;
}

.emotion-scenario-inference > header span {
  color: #86682c;
  font-size: 11px;
  font-weight: 800;
}

.emotion-scenario-inference > header strong {
  margin-top: 2px;
  color: #3f3420;
  font-size: 14px;
}

.emotion-scenario-inference > header em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #74541a;
  background: #fff0cf;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.emotion-scenario-grid {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.emotion-scenario-grid > article {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e6dfcf;
  border-radius: 9px;
  background: #fffdf8;
}

.emotion-scenario-grid > article.is-primary {
  border-color: #82c5b8;
  background: #f3fbf8;
  box-shadow: inset 3px 0 #158879;
}

.emotion-scenario-grid > article > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: #fff;
  background: #8a7751;
  font-size: 10px;
  font-weight: 900;
}

.emotion-scenario-grid > article.is-primary > span {
  background: #158879;
}

.emotion-scenario-grid strong,
.emotion-scenario-grid small {
  display: block;
  overflow-wrap: anywhere;
}

.emotion-scenario-grid strong {
  color: #263f45;
  font-size: 12.5px;
  line-height: 1.35;
}

.emotion-scenario-grid small {
  margin-top: 2px;
  color: #6a7b80;
  font-size: 11px;
}

.emotion-scenario-boundary {
  margin-top: 9px !important;
  padding-top: 8px;
  border-top: 1px dashed #ded2b8;
  color: #735823 !important;
  font-size: 11.5px !important;
}

.emotion-scenario-details {
  margin-top: 9px;
  border-top: 1px dashed #ded2b8;
}

.emotion-scenario-details summary {
  padding-top: 8px;
  color: #70551f;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 800;
}

.emotion-scenario-details > div {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.emotion-scenario-details article {
  padding: 8px;
  border: 1px solid #eee5d4;
  border-radius: 8px;
  background: #fffdf9;
}

.emotion-scenario-details article header {
  display: flex;
  justify-content: space-between;
  gap: 7px;
}

.emotion-scenario-details article header strong {
  color: #344d53;
  font-size: 11.5px;
}

.emotion-scenario-details article header small {
  color: #7b8c90;
  font-size: 10px;
}

.emotion-scenario-details article p,
.emotion-scenario-details article ul {
  margin: 5px 0 0;
  color: #5d7075;
  font-size: 10.5px;
  line-height: 1.5;
}

.emotion-scenario-details article ul {
  padding-left: 17px;
}

.emotion-scenario-inference.is-unavailable {
  border-style: dashed;
  border-color: #c7d0d2;
  background: #f6f8f8;
}

.emotion-stage-core-state {
  overflow-wrap: anywhere;
  min-width: 0;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #dbe7e6;
  border-radius: 10px;
  background: #f8fbfa;
}

.emotion-stage-core-state mark {
  color: #0b7165;
  background: #e6f5f1;
}

.emotion-stage-core-state ul,
.emotion-stage-path-conditions ul {
  margin: 5px 0 0;
  padding-left: 18px;
  color: #536a70;
  font-size: 12px;
  line-height: 1.55;
}

.emotion-stage-path-conditions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.emotion-stage-path-conditions section {
  padding-top: 8px;
  border-top: 1px dashed #ded5c4;
}

.emotion-stage-path-conditions b {
  color: #654d23;
  font-size: 12px;
}

@media (max-width: 820px) {
  .emotion-stage-path {
    padding: 12px;
  }

  .emotion-stage-path-track {
    grid-template-columns: minmax(0, 1fr);
  }

  .emotion-stage-risk-context > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .emotion-stage-path-heading,
  .emotion-stage-risk-context > header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .emotion-stage-path-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Canonical decision state: cycle, tradable sentiment and evidence stay on one generation. */
.direct-canonical-state {
  display: grid;
  gap: 12px;
  margin: 14px 22px 0;
}

.direct-canonical-state .direct-state-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.direct-cycle-context {
  margin: 10px 2px 0;
  color: #60747a;
  font-size: 13px;
  line-height: 1.55;
}

.direct-forecast-card.is-baseline-unconfirmed {
  border-color: rgba(194, 132, 20, 0.28);
  background: linear-gradient(135deg, rgba(255, 250, 238, 0.96), rgba(247, 251, 250, 0.94));
}

.direct-forecast-card.is-baseline-unconfirmed p {
  margin: 9px 0 0;
  color: #66757b;
  font-size: 14px;
  line-height: 1.55;
}

.direct-evidence-diagnosis {
  display: grid;
  gap: 7px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid rgba(194, 132, 20, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.direct-forecast-card.is-baseline-unconfirmed .direct-evidence-diagnosis > p {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  color: #596e73;
  font-size: 12px;
}

.direct-evidence-diagnosis b {
  color: #74551c;
}

@media (max-width: 1180px) {
  .direct-canonical-state .direct-state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.direct-canonical-state .direct-state-grid > div {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(37, 96, 94, 0.1);
  border-radius: 13px;
  background: rgba(247, 251, 250, 0.92);
  overflow-wrap: anywhere;
}

.direct-canonical-state .direct-state-grid span {
  font-size: 12px;
}

.direct-canonical-state .direct-state-grid .direct-state-label-note {
  display: block;
  margin-top: 2px;
  color: #819196;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
}

.direct-canonical-state .direct-state-grid strong {
  margin-top: 5px;
  color: #183d42;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.35;
}

.direct-canonical-state .direct-state-grid > div > small {
  margin-top: 5px;
  color: #71858b;
  font-size: 10px;
  line-height: 1.4;
}

.direct-speculation-context {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(37, 96, 94, 0.12);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(247, 251, 250, 0.96), rgba(252, 249, 240, 0.9));
  overflow-wrap: anywhere;
}

.direct-speculation-context > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.direct-speculation-context > header > span {
  color: #536d73;
  font-size: 12px;
  font-weight: 800;
}

.direct-speculation-context > header > small {
  color: #7d8d91;
  font-size: 10px;
}

.direct-speculation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.direct-speculation-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(38, 108, 98, 0.14);
  border-radius: 999px;
  color: #345c61;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.direct-speculation-tags > span.is-confirmed {
  border-color: rgba(12, 126, 109, 0.24);
  color: #0b7064;
  background: #e7f5f1;
}

.direct-speculation-tags > span.is-observed {
  border-color: rgba(190, 125, 22, 0.2);
  color: #805a18;
  background: #fff7e8;
}

.direct-speculation-tags > span > small {
  color: inherit;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.72;
}

.direct-speculation-context > p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px dashed rgba(37, 96, 94, 0.14);
  color: #526b71;
  font-size: 12px;
  line-height: 1.6;
}

.direct-speculation-context > p > b {
  color: #294d53;
  white-space: nowrap;
}

.direct-big-cycle-evidence details {
  margin-top: 10px;
  border-top: 1px dashed rgba(16, 72, 80, 0.18);
  padding-top: 9px;
}

.direct-big-cycle-evidence summary {
  color: #23666a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.direct-big-cycle-evidence details p {
  margin: 8px 0 0;
  color: #526a70;
  font-size: 12px;
  line-height: 1.6;
}

.direct-evidence-gap-panel {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(194, 132, 20, 0.22);
  border-radius: 13px;
  color: #536b70;
  background: rgba(255, 249, 235, 0.74);
  overflow-wrap: anywhere;
}

.direct-evidence-gap-panel > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.direct-evidence-gap-panel > header strong {
  color: #5f481c;
  font-size: 13px;
}

.direct-evidence-gap-panel > header span {
  color: #7d8581;
  font-size: 10px;
}

.direct-evidence-gap-panel > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed rgba(194, 132, 20, 0.18);
  font-size: 12px;
  line-height: 1.55;
}

.direct-evidence-gap-panel > div > b {
  color: #6b5220;
}

.direct-evidence-gap-panel ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 18px;
}

.direct-emotion-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.direct-emotion-evidence-grid > section {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(37, 96, 94, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
}

.direct-emotion-evidence-grid > section.is-consensus {
  border-color: rgba(194, 138, 44, 0.2);
  background: rgba(255, 250, 241, 0.92);
}

.direct-emotion-evidence-grid > section.is-tradable {
  border-color: rgba(21, 144, 119, 0.2);
  background: rgba(245, 251, 249, 0.94);
}

.direct-emotion-evidence-grid > section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(34, 77, 79, 0.1);
}

.direct-emotion-evidence-grid > section > header strong {
  color: #183d42;
  font-size: 15px;
}

.direct-emotion-evidence-grid > section > header span {
  color: #718188;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.direct-emotion-evidence-grid > section > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.direct-emotion-evidence-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(34, 77, 79, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.direct-emotion-evidence-grid article > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.direct-emotion-evidence-grid article strong {
  color: #183d42;
  font-size: 14px;
}

.direct-emotion-evidence-grid article small,
.direct-emotion-evidence-grid article span {
  color: #76888d;
  font-size: 11px;
}

.direct-emotion-evidence-grid article mark {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #0b7064;
  background: #e7f4f0;
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.direct-emotion-evidence-grid article p {
  margin: 7px 0 2px;
  color: #29464d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.direct-emotion-evidence-grid article span {
  display: block;
  line-height: 1.45;
}

.direct-emotion-evidence-empty {
  margin: 9px 0 0;
  color: #718188;
  font-size: 13px;
  line-height: 1.55;
}

.direct-core-evidence-board {
  display: grid;
  gap: 10px;
}

.direct-core-audit-boundary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(49, 95, 140, 0.15);
  border-radius: 10px;
  color: #47616c;
  background: rgba(244, 248, 251, 0.92);
  font-size: 12px;
  line-height: 1.5;
}

.direct-core-audit-boundary strong {
  color: #315f8c;
}

.direct-core-audit-boundary span {
  color: #9a6714;
  font-weight: 700;
}

.direct-current-theme-cycles {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(45, 91, 137, 0.15);
  border-radius: 14px;
  background: rgba(247, 250, 253, 0.94);
}

.direct-current-theme-cycles > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.direct-current-theme-cycles > header strong {
  color: #24475a;
  font-size: 14px;
}

.direct-current-theme-cycles > header span {
  color: #74858c;
  font-size: 11px;
}

.direct-current-theme-cycles > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) auto minmax(180px, 1.35fr) auto minmax(140px, 1fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 9px;
}

.direct-current-theme-cycles > div > span,
.direct-current-theme-cycles > div > div > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(45, 91, 137, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
  overflow-wrap: anywhere;
}

.direct-current-theme-cycles > div > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.direct-current-theme-cycles > div > i {
  align-self: center;
  color: #71909b;
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
}

.direct-current-theme-cycles b {
  color: #264c58;
  font-size: 12px;
}

.direct-current-theme-cycles small {
  color: #788b91;
  font-size: 10px;
  line-height: 1.4;
}

.direct-current-theme-cycles .is-core b {
  color: #0b7064;
}

.direct-core-transition {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(45, 91, 137, 0.14);
  color: #31545a;
  font-size: 12px;
  font-weight: 750;
}

.direct-core-transition.is-unavailable {
  color: #83691e;
  font-weight: 650;
}

.direct-core-evidence-pool {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(37, 96, 94, 0.14);
  border-radius: 14px;
  background: rgba(247, 252, 250, 0.94);
}

.direct-core-evidence-pool.is-risk {
  border-color: rgba(177, 76, 83, 0.18);
  background: rgba(255, 248, 248, 0.94);
}

.direct-core-evidence-pool > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(34, 77, 79, 0.1);
}

.direct-core-evidence-pool > header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.direct-core-evidence-pool > header strong {
  color: #183d42;
  font-size: 16px;
}

.direct-core-evidence-pool > header span {
  color: #718188;
  font-size: 12px;
  line-height: 1.45;
}

.direct-core-evidence-pool > header em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0b7064;
  background: #e5f4ef;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.direct-core-evidence-pool.is-risk > header em {
  color: #a33d47;
  background: #fcecee;
}

.direct-core-evidence-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 10px 0 0;
  color: #31545a;
  font-size: 13px;
  line-height: 1.5;
}

.direct-core-evidence-summary strong {
  font-weight: 800;
}

.direct-core-evidence-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.direct-core-evidence-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(34, 77, 79, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.86);
  overflow-wrap: anywhere;
}

.direct-core-evidence-card.is-risk {
  border-color: rgba(177, 76, 83, 0.13);
}

.direct-core-evidence-card > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.direct-core-evidence-card > header > div {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 6px;
}

.direct-core-evidence-card > header strong {
  color: #183d42;
  font-size: 14px;
}

.direct-core-evidence-card > header small,
.direct-core-evidence-card > header em {
  color: #718188;
  font-size: 11px;
  font-style: normal;
}

.direct-core-evidence-card > mark {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #0b7064;
  background: #e7f4f0;
  font-size: 11px;
  font-weight: 750;
}

.direct-core-evidence-card.is-risk > mark {
  color: #9c414a;
  background: #faecee;
}

.direct-core-evidence-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 8px;
  color: #62767c;
  font-size: 12px;
}

.direct-core-evidence-metrics b {
  color: #29464d;
}

.direct-core-evidence-card > p {
  margin: 8px 0 0;
  color: #29464d;
  font-size: 12px;
  line-height: 1.55;
}

.direct-core-evidence-card > footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 11px;
  margin-top: 7px;
  color: #7a8a8f;
  font-size: 10px;
  line-height: 1.45;
}

.direct-core-evidence-unavailable {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 10px 12px;
  border: 1px dashed rgba(194, 138, 44, 0.3);
  border-radius: 11px;
  color: #7e641f;
  background: rgba(255, 250, 240, 0.84);
  font-size: 12px;
}

.direct-core-evidence-unavailable small {
  color: #8a7645;
  font-size: 11px;
}

.direct-state-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 0 2px;
  color: #718188;
  font-size: 11px;
}

.direct-state-meta code {
  min-width: 0;
  color: #597078;
  font: inherit;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .direct-canonical-state {
    margin: 12px 16px 0;
  }

  .direct-canonical-state .direct-state-grid,
  .direct-emotion-evidence-grid,
  .direct-emotion-evidence-grid > section > div,
  .direct-core-evidence-cards {
    grid-template-columns: 1fr;
  }

  .direct-core-evidence-pool > header,
  .direct-core-evidence-unavailable,
  .direct-current-theme-cycles > header,
  .direct-speculation-context > header,
  .direct-evidence-gap-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .direct-speculation-context > p,
  .direct-forecast-card.is-baseline-unconfirmed .direct-evidence-diagnosis > p,
  .direct-evidence-gap-panel > div {
    grid-template-columns: 1fr;
  }

  .direct-current-theme-cycles > div {
    grid-template-columns: 1fr;
  }

  .direct-current-theme-cycles > div > i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .direct-emotion-evidence-grid > section > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .direct-emotion-evidence-grid > section > header span {
    text-align: left;
  }
}
/* ===== Post-close opportunity: concise first screen + preserved legacy analysis ===== */

#auto-picker,
.post-close-opportunity,
.auto-picker-full-analysis,
.auto-picker-full-analysis-body {
  min-width: 0;
  max-width: 100%;
}

.post-close-opportunity {
  --post-close-good: #08715d;
  --post-close-warn: #9a6714;
  --post-close-bad: #a33d47;
  display: grid;
  gap: 15px;
  color: var(--ink);
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

.post-close-opportunity-empty,
.post-close-opportunity-hero {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
  box-shadow: 0 12px 28px rgba(22, 36, 44, 0.06);
}

.post-close-opportunity-empty > span,
.post-close-opportunity-hero [data-role="eyebrow"] {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.post-close-opportunity-empty > strong,
.post-close-opportunity [data-role="opportunity-headline"] {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 850;
  line-height: 1.22;
}

.post-close-opportunity-empty > p,
.post-close-opportunity [data-role="opportunity-reason"] {
  max-width: 900px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.post-close-opportunity[data-state="actionable"] .post-close-opportunity-hero {
  border-left-color: var(--post-close-good);
}

.post-close-opportunity[data-state="observe_only"] .post-close-opportunity-hero {
  border-left-color: var(--post-close-warn);
}

.post-close-opportunity[data-state="blocked"] .post-close-opportunity-hero,
.post-close-opportunity[data-state="unavailable"] .post-close-opportunity-hero {
  border-left-color: var(--post-close-bad);
}

.post-close-opportunity-layer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.post-close-opportunity-layer-summary > article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.post-close-opportunity-layer-summary span,
.post-close-opportunity-layer-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.post-close-opportunity-layer-summary span { font-weight: 800; }
.post-close-opportunity-layer-summary strong { color: var(--ink); font-size: 21px; line-height: 1.25; }
.post-close-opportunity-layer-summary .is-observation { border-color: rgba(8, 113, 93, 0.34); background: #f1faf7; }
.post-close-opportunity-layer-summary .is-observation strong { color: var(--post-close-good); }
.post-close-opportunity-layer-summary .is-validation { border-color: rgba(154, 103, 20, 0.3); background: #fff9ed; }

.post-close-opportunity-observation-section {
  padding: 16px;
  border: 1px solid rgba(8, 113, 93, 0.28);
  border-left: 4px solid var(--post-close-good);
  border-radius: 15px;
  background: linear-gradient(145deg, #f2faf8, var(--surface));
}

.post-close-opportunity-observation-card {
  box-shadow: 0 8px 22px rgba(8, 91, 75, 0.055);
}

.post-close-opportunity-observation-card .post-close-opportunity-card-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--post-close-good);
  background: #e4f5ef;
  font-weight: 750;
  white-space: nowrap;
}

.post-close-opportunity-observation-card [data-field="next-day"] { color: #8a5d0b; }
.post-close-opportunity-observation-card [data-field="cancel"] { color: var(--post-close-bad); }

.post-close-opportunity-source-note {
  margin: 8px 0 2px !important;
  color: #7b621f !important;
  font-size: 12px !important;
  font-weight: 700;
}

.post-close-opportunity-observation-empty {
  display: grid;
  gap: 5px;
  border-style: dashed;
  text-align: center;
}

.post-close-opportunity-observation-empty > strong { color: var(--ink); font-size: 17px; }
.post-close-opportunity-observation-empty > p { margin: 0; }

.post-close-opportunity-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.post-close-opportunity-section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.post-close-opportunity-section > header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
}

.post-close-opportunity-section > header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.post-close-opportunity-theme-grid,
.post-close-opportunity-core-grid,
.post-close-opportunity-relation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.post-close-opportunity-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.post-close-opportunity-theme-card,
.post-close-opportunity-core-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.post-close-opportunity-theme-card > strong,
.post-close-opportunity-core-card > header strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
}

.post-close-opportunity-theme-card > p,
.post-close-opportunity-core-card > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.post-close-opportunity-core-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.post-close-opportunity-core-card > header > div {
  min-width: 0;
}

.post-close-opportunity-core-card > header small,
.post-close-opportunity-card-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.post-close-opportunity-core-card [data-field] {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 9px;
  margin-top: 8px;
  color: #405b63;
  font-size: 15px;
  line-height: 1.55;
}

.post-close-opportunity-core-card [data-field] > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.post-close-opportunity-core-card [data-field="risk-exit"] {
  color: var(--post-close-bad);
}

.post-close-opportunity-today-change,
.post-close-opportunity-relation-day,
.post-close-opportunity-setup-card,
.post-close-opportunity-layer-empty,
.post-close-opportunity-height-note,
.post-close-opportunity-confirm-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

.post-close-opportunity-today-change,
.post-close-opportunity-relation-day,
.post-close-opportunity-setup-card,
.post-close-opportunity-layer-empty {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.post-close-opportunity-analysis-details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.post-close-opportunity-analysis-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 14px 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.post-close-opportunity-analysis-details > summary::-webkit-details-marker { display: none; }
.post-close-opportunity-analysis-details > summary > span { font-size: 15px; font-weight: 800; }
.post-close-opportunity-analysis-details > summary > small { color: var(--muted); font-size: 12px; }
.post-close-opportunity-analysis-details > summary::after {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  content: "＋";
  color: var(--accent-strong);
  font-size: 20px;
}
.post-close-opportunity-analysis-details[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.post-close-opportunity-analysis-details[open] > summary::after { content: "－"; }
.post-close-opportunity-analysis-body { display: grid; gap: 15px; padding: 16px; }

.post-close-opportunity-today-change {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px 14px;
  border-left: 4px solid var(--post-close-warn);
}

.post-close-opportunity-today-change > span,
.post-close-opportunity-relation-day > span,
.post-close-opportunity-setup-card > header > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.post-close-opportunity-today-change > strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.post-close-opportunity-today-change > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.post-close-opportunity-today-facts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  min-width: 0;
}

.post-close-opportunity-today-facts > span {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: #405b63;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.post-close-opportunity-relation-day {
  display: grid;
  gap: 5px;
}

.post-close-opportunity-relation-day > strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.post-close-opportunity-confirm-note,
.post-close-opportunity-height-note {
  margin: 0;
  padding: 1px 2px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.post-close-opportunity-setup-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.post-close-opportunity-setup-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.post-close-opportunity-setup-card > header > strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.4;
}

.post-close-opportunity-setup-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.post-close-opportunity-setup-card [data-field] {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  color: #405b63;
  font-size: 15px;
  line-height: 1.55;
}

.post-close-opportunity-setup-card [data-field] > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.post-close-opportunity-layer-empty {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.auto-picker-full-analysis {
  width: 100%;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.auto-picker-full-analysis-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 14px;
  min-height: 52px;
  padding: 10px 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
}

.auto-picker-full-analysis-summary::-webkit-details-marker {
  display: none;
}

.auto-picker-full-analysis-summary > span {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.auto-picker-full-analysis-summary > small {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.auto-picker-full-analysis-summary::after {
  grid-column: 2;
  grid-row: 1 / 3;
  content: "＋";
  color: var(--accent-strong);
  font-size: 20px;
  font-weight: 700;
}

.auto-picker-full-analysis[open] > .auto-picker-full-analysis-summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.auto-picker-full-analysis[open] > .auto-picker-full-analysis-summary::after {
  content: "－";
}

.auto-picker-full-analysis-body {
  width: 100%;
  padding: 18px;
  overflow-x: hidden;
}

.auto-picker-full-analysis-body > :first-child {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .post-close-opportunity-theme-grid,
  .post-close-opportunity-core-grid,
  .post-close-opportunity-relation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .post-close-opportunity-empty,
  .post-close-opportunity-hero {
    padding: 18px;
  }

  .post-close-opportunity-empty > strong,
  .post-close-opportunity [data-role="opportunity-headline"] {
    font-size: clamp(24px, 7vw, 28px);
  }

  .post-close-opportunity-empty > p,
  .post-close-opportunity [data-role="opportunity-reason"] {
    font-size: 15px;
  }

  .post-close-opportunity-section > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .post-close-opportunity-layer-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .post-close-opportunity-layer-summary > article { padding: 11px; }
  .post-close-opportunity-layer-summary strong { font-size: 19px; }
  .post-close-opportunity-layer-summary small { display: none; }

  .post-close-opportunity-theme-grid,
  .post-close-opportunity-core-grid,
  .post-close-opportunity-relation-grid,
  .post-close-opportunity-setup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-close-opportunity-theme-card,
  .post-close-opportunity-core-card {
    padding: 15px;
  }

  .post-close-opportunity-core-card [data-field] {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    font-size: 15px;
  }

  .post-close-opportunity-today-change {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-close-opportunity-today-change > p {
    grid-column: 1;
  }

  .post-close-opportunity-today-facts {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
  }

  .post-close-opportunity-setup-card [data-field] {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .auto-picker-full-analysis-summary {
    min-height: 56px;
    padding: 10px 14px;
  }

  .auto-picker-full-analysis-body {
    padding: 14px;
  }
}

@media (max-width: 520px) {
  .post-close-opportunity-layer-summary { grid-template-columns: 1fr; }
  .post-close-opportunity-layer-summary small { display: block; }
  .post-close-opportunity-observation-section { padding: 12px; }
  .post-close-opportunity-analysis-details > summary { grid-template-columns: minmax(0, 1fr); }
  .post-close-opportunity-analysis-details > summary::after { grid-column: 1; grid-row: auto; justify-self: end; }
}


/* ===== Trading lifecycle workflow ===== */

.workflow-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.nav-stack.workflow-stage-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 0 3px 10px 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.workflow-home-item {
  min-height: 43px;
  margin: 0;
  border-color: rgba(125, 224, 211, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.workflow-home-item.active {
  border-color: rgba(89, 210, 197, 0.22);
}

.workflow-stage {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.workflow-stage[open] {
  border-color: rgba(125, 224, 211, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.workflow-stage.is-active,
.workflow-stage:has(.nav-item.active) {
  border-color: rgba(89, 210, 197, 0.23);
  background: linear-gradient(135deg, rgba(20, 144, 133, 0.13), rgba(255, 255, 255, 0.018));
  box-shadow: inset 3px 0 0 rgba(89, 210, 197, 0.86);
}

.workflow-stage-toggle {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  min-height: 49px;
  padding: 6px 9px;
  color: #dce8eb;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.workflow-stage-toggle::-webkit-details-marker {
  display: none;
}

.workflow-stage-toggle:hover {
  background: rgba(255, 255, 255, 0.035);
}

.workflow-stage-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-stage-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-stage-copy strong {
  color: inherit;
  font-size: 12.5px;
  font-weight: 700;
}

.workflow-stage-chevron {
  color: #647d88;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  transform: rotate(-90deg);
  transition: transform 160ms ease, color 160ms ease;
}

.workflow-stage[open] .workflow-stage-chevron {
  color: #7ad9cd;
  transform: rotate(0deg);
}

.workflow-stage-items {
  display: grid;
  gap: 2px;
  padding: 0 6px 7px 37px;
}

.workflow-stage-items .nav-item {
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 34px;
  margin: 0;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11.5px;
}

.workflow-stage-items .nav-item .nav-index {
  font-size: 8px;
}

@media (max-width: 820px) {
  .workflow-nav {
    min-height: auto;
  }

  .nav-stack.workflow-stage-list {
    overflow: visible;
  }

}

@media (min-width: 821px) and (max-height: 820px) {
  .workflow-nav {
    gap: 7px;
  }

  .workflow-stage-toggle {
    min-height: 40px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .workflow-stage-items .nav-item {
    min-height: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-stage,
  .workflow-stage-chevron {
    transition: none;
  }
}

/* ===== iOS Settings-style navigation ===== */

.sidebar {
  border-right: 1px solid #d1d1d6;
  background: #f2f2f7;
  color: #1c1c1e;
  box-shadow: none;
}

.sidebar .brand {
  padding: 0 7px 2px;
}

.sidebar .brand-mark {
  border: 0;
  background: #007aff;
  color: #ffffff;
  box-shadow: none;
}

.sidebar .brand strong {
  color: #1c1c1e;
}

.sidebar .brand small {
  color: #8e8e93;
}

.sidebar-note {
  display: none !important;
}

.workflow-nav {
  gap: 0;
}

.nav-stack.workflow-stage-list {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0 2px 14px;
  scrollbar-color: #c7c7cc transparent;
}

.workflow-home-item {
  grid-template-columns: minmax(0, 1fr);
  min-height: 48px;
  margin: 0 0 14px;
  padding: 0 13px;
  border: 1px solid #e1e1e6;
  border-radius: 12px;
  background: #ffffff;
  color: #1c1c1e;
  box-shadow: none;
}

.workflow-home-item:hover {
  border-color: #d1d1d6;
  background: #f8f8fa;
  color: #1c1c1e;
}

.workflow-stage-list .workflow-home-item.active {
  border-color: #cfe4ff;
  background: #eaf3ff;
  color: #007aff;
  box-shadow: none;
}

.workflow-stage-index,
.workflow-stage-copy small,
.workflow-home-item .nav-index,
.workflow-stage-items .nav-item .nav-index {
  display: none;
}

.workflow-stage {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #e1e1e6;
  border-left: 1px solid #e1e1e6;
  border-radius: 0;
  background: #ffffff;
  box-shadow: inset 0 -1px #e5e5ea;
  transition: background 140ms ease;
}

.workflow-home-item + .workflow-stage {
  border-top: 1px solid #e1e1e6;
  border-radius: 12px 12px 0 0;
}

.workflow-stage:last-child {
  border-bottom: 1px solid #e1e1e6;
  border-radius: 0 0 12px 12px;
  box-shadow: none;
}

.workflow-stage[open],
.workflow-stage.is-active,
.workflow-stage:has(.nav-item.active) {
  border-right-color: #e1e1e6;
  border-left-color: #e1e1e6;
  background: #ffffff;
  box-shadow: inset 0 -1px #e5e5ea;
}

.workflow-stage:last-child[open],
.workflow-stage:last-child.is-active,
.workflow-stage:last-child:has(.nav-item.active) {
  box-shadow: none;
}

.workflow-stage-toggle {
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 12px;
  min-height: 54px;
  padding: 6px 14px;
  color: #1c1c1e;
}

.workflow-stage-toggle:hover {
  background: #f8f8fa;
}

.workflow-stage.is-active > .workflow-stage-toggle,
.workflow-stage:has(.nav-item.active) > .workflow-stage-toggle {
  background: #f4f8ff;
  color: #007aff;
}

.workflow-stage-copy strong {
  color: inherit;
  font-size: 13px;
}

.workflow-stage-chevron,
.workflow-stage[open] .workflow-stage-chevron {
  color: #c7c7cc;
}

.workflow-stage[open] .workflow-stage-chevron {
  color: #8e8e93;
}

.workflow-stage-items {
  gap: 0;
  padding: 0 0 4px 16px;
  background: #ffffff;
}

.workflow-stage-items .nav-item {
  grid-template-columns: minmax(0, 1fr);
  min-height: 42px;
  margin: 0;
  padding: 0 12px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3a3a3c;
  box-shadow: inset 0 1px #ececf0;
  font-size: 12px;
}

.workflow-stage-items .nav-item:hover {
  border-color: transparent;
  background: #f7f7f9;
  color: #1c1c1e;
}

.workflow-stage-list .nav-item.active {
  border-color: transparent;
  background: #eaf3ff;
  color: #007aff;
  box-shadow: inset 0 1px #dbeaff;
}

.workflow-stage-toggle:focus-visible,
.workflow-stage-list .nav-item:focus-visible {
  outline: 2px solid rgba(0, 122, 255, 0.38);
  outline-offset: -2px;
}

@media (max-width: 820px) {
  .sidebar {
    gap: 14px;
    padding: 16px;
  }

  .nav-stack.workflow-stage-list {
    overflow-y: auto;
  }
}

@media (min-width: 821px) and (max-height: 820px) {
  .workflow-stage-toggle {
    min-height: 44px;
  }

  .workflow-stage-items .nav-item {
    min-height: 36px;
  }
}

/* ===== Premarket decision funnel ===== */

body:not([data-mode="decision"]) #externalCoreAlert {
  display: none !important;
}

body[data-workflow-stage="selection"] .main {
  overflow-anchor: none;
}

.premarket-step-section {
  display: grid;
  gap: 18px;
}

.premarket-step-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.premarket-step-heading h2 {
  margin: 5px 0 7px;
}

.premarket-step-heading p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.premarket-step-status {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.premarket-step-status.is-confirmed {
  border-color: #b9ddd7;
  background: #e9f5f2;
  color: #05645d;
}

.premarket-step-status.is-conditional {
  border-color: #ead5a9;
  background: #fff8e8;
  color: #8a5a08;
}

.premarket-step-status.is-blocked {
  border-color: #e7c5c5;
  background: #fff2f2;
  color: #a33d3d;
}

.premarket-step-body,
.premarket-inline-flow {
  display: grid;
  gap: 14px;
}

.premarket-inline-flow:empty {
  display: none;
}

.premarket-inline-flow {
  margin-bottom: 18px;
}

.premarket-conclusion-card {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 0.75fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(22, 36, 44, 0.06);
}

.premarket-conclusion-main,
.premarket-next-output {
  padding: 20px 22px;
}

.premarket-conclusion-main > span,
.premarket-next-output > span,
.premarket-card-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.premarket-conclusion-main h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1.22;
}

.premarket-conclusion-main p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.premarket-next-output {
  border-left: 1px solid var(--line);
  background: var(--surface-soft);
}

.premarket-next-output strong {
  display: block;
  color: var(--accent-strong);
  font-size: 15px;
  line-height: 1.65;
}

.premarket-conclusion-card.is-conditional {
  border-left-color: #c98213;
}

.premarket-conclusion-card.is-blocked {
  border-left-color: #b54a4a;
}

.premarket-conclusion-card.is-waiting {
  border-left-color: #87969d;
}

.premarket-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.premarket-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.premarket-metric,
.premarket-item-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.premarket-metric span,
.premarket-item-card > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.premarket-metric strong,
.premarket-item-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.premarket-metric p,
.premarket-item-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.premarket-step-body .premarket-projection {
  display: grid;
  gap: 9px;
  padding-top: 2px;
}

.premarket-step-body .premarket-projection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.premarket-step-body .premarket-projection-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.premarket-step-body .premarket-projection-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.premarket-step-body .premarket-projection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.premarket-step-body .premarket-projection-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-top: 3px solid #a8b4ba;
  border-radius: 12px;
  background: var(--surface);
}

.premarket-step-body .premarket-projection-card.is-good {
  border-top-color: var(--accent);
}

.premarket-step-body .premarket-projection-card.is-warn {
  border-top-color: #c98213;
}

.premarket-step-body .premarket-projection-card.is-danger {
  border-top-color: #b54a4a;
}

.premarket-step-body .premarket-projection-card > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.premarket-step-body .premarket-projection-card > strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.premarket-step-body .premarket-projection-card > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.premarket-step-body .premarket-card-evidence {
  margin-top: 9px;
  border-top: 1px dashed var(--line);
}

.premarket-step-body .premarket-card-evidence summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.premarket-step-body .premarket-card-evidence summary span {
  font-size: 10px;
  font-weight: 600;
}

.premarket-step-body .premarket-card-evidence ul {
  margin: 7px 0 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.premarket-evidence,
.premarket-guard-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.premarket-evidence summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.premarket-evidence summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.premarket-evidence ul,
.premarket-guard-card ul {
  margin: 0;
  padding: 0 18px 16px 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.premarket-guard-card {
  padding: 15px 16px;
}

.premarket-guard-card strong {
  color: #9f4141;
  font-size: 12px;
}

.premarket-guard-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.premarket-feedback-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #edf7f5;
  color: #37645f;
  font-size: 12px;
  line-height: 1.65;
}

.premarket-feedback-note::before {
  content: "↺";
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

#preplan .premarket-direct-buy {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid #87969d;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(22, 36, 44, 0.055);
}

#preplan .premarket-direct-buy.is-ready {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, rgba(232, 247, 243, 0.94), rgba(255, 255, 255, 0.98) 58%);
}

#preplan .premarket-direct-buy.is-empty {
  border-left-color: #b54a4a;
  background: linear-gradient(135deg, rgba(255, 246, 246, 0.96), rgba(255, 255, 255, 0.98) 58%);
}

#preplan .premarket-direct-buy > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#preplan .premarket-direct-buy > header span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

#preplan .premarket-direct-buy h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.28;
}

#preplan .premarket-direct-buy > header em {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #9f4141;
  background: #fff0f0;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

#preplan .premarket-direct-buy.is-ready > header em {
  color: #086a61;
  background: #e2f4ef;
}

#preplan .premarket-direct-buy > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

#preplan .premarket-direct-buy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

#preplan .premarket-direct-buy-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(21, 128, 116, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
}

#preplan .premarket-direct-buy-card > span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #086a61;
  background: #e2f4ef;
  font-size: 11px;
  font-weight: 800;
}

#preplan .premarket-direct-buy-card h4 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
}

#preplan .premarket-direct-buy-card h4 small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#preplan .premarket-direct-buy-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

#preplan .premarket-direct-buy-card b {
  color: var(--ink);
}

#preplan .premarket-direct-buy .premarket-direct-buy-boundary {
  padding-top: 11px;
  border-top: 1px dashed rgba(21, 128, 116, 0.24);
  color: #37645f;
}

#preplan .preplan-focus-board {
  display: grid;
  gap: 12px;
}

#preplan .preplan-focus-board > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
}

#preplan .preplan-focus-board > header span,
#preplan .preplan-focus-board > header h3 {
  display: block;
}

#preplan .preplan-focus-board > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

#preplan .preplan-focus-board > header h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.25;
}

#preplan .preplan-focus-board > header em {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #176d62;
  background: #e7f5f1;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

#preplan .preplan-focus-note,
#preplan .preplan-focus-boundary {
  margin: 0;
  color: #5e7378;
  font-size: 12px;
  line-height: 1.55;
}

#preplan .preplan-focus-note {
  padding: 0 3px;
}

#preplan .preplan-focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 11px;
}

#preplan .preplan-focus-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(22, 36, 44, 0.045);
}

#preplan .preplan-focus-card > header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

#preplan .preplan-focus-card > header > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 900;
}

#preplan .preplan-focus-card > header strong,
#preplan .preplan-focus-card > header small {
  display: block;
  overflow-wrap: anywhere;
}

#preplan .preplan-focus-card > header strong {
  color: var(--ink);
  font-size: 17px;
}

#preplan .preplan-focus-card > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

#preplan .preplan-focus-card > header em {
  color: #176d62;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}

#preplan .preplan-focus-card > p {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  margin: 10px 0 0;
  color: #52696f;
  font-size: 12px;
  line-height: 1.55;
}

#preplan .preplan-focus-card > p b {
  color: var(--ink);
}

#preplan .preplan-focus-card > footer {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: #785f2d;
  font-size: 11px;
}

#preplan .preplan-focus-boundary {
  padding: 10px 12px;
  border-radius: 9px;
  background: #edf7f5;
}

#preplan .preplan-focus-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  #preplan .preplan-focus-board > header {
    align-items: flex-start;
    flex-direction: column;
  }

  #preplan .preplan-focus-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

#preplan .preplan-workbench {
  display: grid;
  gap: 14px;
}

#preplan .preplan-workbench > header,
#preplan .preplan-scenario-panel > header,
#preplan .preplan-script-section > header,
#preplan .preplan-holding-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#preplan .preplan-workbench > header {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(238, 249, 246, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 28px rgba(22, 36, 44, 0.055);
}

#preplan .preplan-workbench > header span,
#preplan .preplan-scenario-panel > header span,
#preplan .preplan-script-section > header span,
#preplan .preplan-holding-link span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

#preplan .preplan-workbench > header h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: clamp(23px, 2.2vw, 32px);
  line-height: 1.25;
}

#preplan .preplan-workbench > header p,
#preplan .preplan-scenario-panel > p,
#preplan .preplan-workbench.is-unavailable > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

#preplan .preplan-workbench > header em,
#preplan .preplan-scenario-panel > header em {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #8a541f;
  background: #fff0d9;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

#preplan .preplan-workbench-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#preplan .preplan-workbench-metrics article,
#preplan .preplan-scenario-panel,
#preplan .preplan-script-section,
#preplan .preplan-holding-link,
#preplan .preplan-diagnostic-panel,
#preplan .preplan-formal-panel,
#preplan .preplan-hard-blocks {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

#preplan .preplan-workbench-metrics article {
  padding: 14px 15px;
}

#preplan .preplan-workbench-metrics span,
#preplan .preplan-workbench-metrics strong {
  display: block;
}

#preplan .preplan-workbench-metrics span {
  color: var(--muted);
  font-size: 11px;
}

#preplan .preplan-workbench-metrics strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
}

#preplan .preplan-scenario-panel,
#preplan .preplan-script-section {
  padding: 15px 16px;
}

#preplan .preplan-scenario-panel > header strong,
#preplan .preplan-script-section > header strong,
#preplan .preplan-holding-link strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
}

#preplan .preplan-scenario-panel > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

#preplan .preplan-scenario-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

#preplan .preplan-scenario-card.is-primary {
  border-color: rgba(21, 128, 116, 0.34);
  background: #eff9f6;
  box-shadow: inset 3px 0 var(--accent);
}

#preplan .preplan-scenario-card > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: #7c8b90;
  font-size: 10px;
  font-weight: 900;
}

#preplan .preplan-scenario-card.is-primary > span {
  background: var(--accent);
}

#preplan .preplan-scenario-card strong,
#preplan .preplan-scenario-card small {
  display: block;
  overflow-wrap: anywhere;
}

#preplan .preplan-scenario-card strong {
  color: var(--ink);
  font-size: 13px;
}

#preplan .preplan-scenario-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

#preplan .preplan-holding-link {
  align-items: center;
  padding: 14px 16px;
}

#preplan .preplan-holding-link a,
#preplan .preplan-workbench.is-unavailable > a {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 9px;
  color: #086a61;
  background: #e3f4ef;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

#preplan .preplan-script-section > header small {
  color: var(--muted);
  font-size: 11px;
}

#preplan .preplan-script-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 11px;
  margin-top: 12px;
}

#preplan .preplan-script-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  background: #fff;
}

#preplan .preplan-script-card > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#preplan .preplan-script-card > header strong,
#preplan .preplan-script-card > header small {
  display: block;
}

#preplan .preplan-script-card > header strong {
  color: var(--ink);
  font-size: 17px;
}

#preplan .preplan-script-card > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

#preplan .preplan-script-card > header em {
  color: #86601f;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

#preplan .preplan-script-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

#preplan .preplan-script-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #176d62;
  background: #e7f5f1;
  font-size: 10px;
  font-weight: 750;
}

#preplan .preplan-script-card > p {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

#preplan .preplan-script-card > p b {
  color: var(--ink);
}

#preplan .preplan-checkpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

#preplan .preplan-checkpoint-grid section {
  padding: 9px;
  border: 1px dashed #cad8d6;
  border-radius: 9px;
  background: #f8fbfa;
}

#preplan .preplan-checkpoint-grid strong,
#preplan .preplan-checkpoint-grid small {
  display: block;
}

#preplan .preplan-checkpoint-grid strong {
  color: var(--ink);
  font-size: 11.5px;
}

#preplan .preplan-checkpoint-grid small {
  margin-top: 2px;
  color: #a16a1d;
  font-size: 10px;
}

#preplan .preplan-checkpoint-grid ul,
#preplan .preplan-script-card details ul,
#preplan .preplan-diagnostic-panel ul,
#preplan .preplan-hard-blocks ul {
  margin: 6px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

#preplan .preplan-script-card details,
#preplan .preplan-diagnostic-panel,
#preplan .preplan-formal-panel,
#preplan .preplan-hard-blocks {
  margin-top: 9px;
}

#preplan .preplan-script-card details summary,
#preplan .preplan-diagnostic-panel > summary,
#preplan .preplan-formal-panel > summary,
#preplan .preplan-hard-blocks > summary {
  color: #50676c;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

#preplan .preplan-script-card > footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: #76602d;
  font-size: 10.5px;
}

#preplan .preplan-diagnostic-panel,
#preplan .preplan-formal-panel,
#preplan .preplan-hard-blocks {
  padding: 13px 15px;
}

#preplan .preplan-diagnostic-panel > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 9px;
}

#preplan .preplan-diagnostic-panel article {
  padding: 9px;
  border: 1px solid #ead9c4;
  border-radius: 9px;
  background: #fffaf4;
}

#preplan .preplan-diagnostic-panel strong small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 10px;
}

#preplan .preplan-workbench-boundary {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  color: #556d72;
  background: #edf7f5;
  font-size: 11.5px;
  line-height: 1.55;
}

#preplan .preplan-workbench.is-unavailable {
  padding: 18px 20px;
  border: 1px dashed #bfcacc;
  border-radius: 15px;
  background: #f5f8f8;
}

@media (max-width: 820px) {
  #preplan .preplan-workbench > header,
  #preplan .preplan-scenario-panel > header,
  #preplan .preplan-script-section > header,
  #preplan .preplan-holding-link {
    flex-direction: column;
  }

  #preplan .preplan-workbench-metrics,
  #preplan .preplan-scenario-panel > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #preplan .preplan-workbench-metrics,
  #preplan .preplan-scenario-panel > div,
  #preplan .preplan-checkpoint-grid {
    grid-template-columns: 1fr;
  }

  #preplan .preplan-script-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .premarket-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .premarket-step-heading,
  .premarket-conclusion-card {
    grid-template-columns: 1fr;
  }

  .premarket-step-heading {
    display: grid;
  }

  .premarket-step-status {
    justify-self: start;
  }

  .premarket-next-output {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .premarket-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .premarket-conclusion-main,
  .premarket-next-output {
    padding: 16px;
  }

  .premarket-metric-grid,
  .premarket-item-grid {
    grid-template-columns: 1fr;
  }

  #preplan .premarket-direct-buy {
    padding: 16px;
  }

  #preplan .premarket-direct-buy > header {
    align-items: flex-start;
  }

  #preplan .premarket-direct-buy-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== Premium frosted glass navigation ===== */

:root {
  --nav-glass-accent: #08776e;
  --nav-glass-accent-strong: #05645d;
  --nav-glass-highlight: #36b9aa;
  --nav-glass-ink: #17242c;
  --nav-glass-muted: #566176;
  --nav-glass-line: rgba(210, 221, 225, 0.84);
  --nav-glass-panel: rgba(255, 255, 255, 0.62);
  --nav-glass-shadow: 0 10px 28px rgba(22, 36, 44, 0.065);
}

@media (min-width: 821px) {
  .sidebar {
    isolation: isolate;
    overflow: hidden;
    border-right: 1px solid rgba(207, 217, 221, 0.82);
    background:
      radial-gradient(circle at 4% 6%, rgba(37, 160, 146, 0.09), transparent 34%),
      linear-gradient(155deg, rgba(247, 250, 250, 0.91), rgba(239, 244, 245, 0.8));
    -webkit-backdrop-filter: blur(26px) saturate(118%);
    backdrop-filter: blur(26px) saturate(118%);
    box-shadow: inset -1px 0 rgba(255, 255, 255, 0.7), 10px 0 30px rgba(22, 36, 44, 0.045);
  }

  .sidebar::before,
  .sidebar::after {
    display: none;
  }

  .sidebar > * {
    position: relative;
    z-index: 1;
  }

}

.sidebar .brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(145deg, #1aa497, #08776e 68%, #05645d);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.38), 0 8px 18px rgba(8, 119, 110, 0.18);
}

.sidebar .brand strong {
  color: var(--nav-glass-ink);
  text-shadow: 0 1px rgba(255, 255, 255, 0.68);
}

.sidebar .brand small {
  color: var(--nav-glass-muted);
}

.workflow-home-item,
.workflow-stage {
  border-color: var(--nav-glass-line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(247, 250, 250, 0.46));
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  backdrop-filter: blur(22px) saturate(120%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), inset 0 -1px rgba(211, 221, 225, 0.24);
}

.workflow-home-item {
  color: var(--nav-glass-ink);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.96), inset 0 -1px rgba(255, 255, 255, 0.24), var(--nav-glass-shadow);
}

.workflow-home-item:hover,
.workflow-stage-toggle:hover,
.workflow-stage-items .nav-item:hover {
  background-color: rgba(255, 255, 255, 0.48);
}

.workflow-stage {
  border-right-color: var(--nav-glass-line);
  border-left-color: var(--nav-glass-line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(246, 249, 249, 0.42));
  box-shadow: inset 0 -1px rgba(210, 221, 225, 0.4);
}

.workflow-home-item + .workflow-stage {
  border-top-color: var(--nav-glass-line);
}

.workflow-stage:last-child {
  border-bottom-color: var(--nav-glass-line);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.7), var(--nav-glass-shadow);
}

.workflow-stage[open],
.workflow-stage.is-active,
.workflow-stage:has(.nav-item.active),
.workflow-stage:last-child[open],
.workflow-stage:last-child.is-active,
.workflow-stage:last-child:has(.nav-item.active) {
  border-right-color: rgba(195, 215, 212, 0.9);
  border-left-color: rgba(195, 215, 212, 0.9);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(240, 247, 246, 0.52));
  box-shadow: inset 0 -1px rgba(195, 215, 212, 0.46);
}

.workflow-stage-toggle {
  position: relative;
  overflow: hidden;
  color: var(--nav-glass-ink);
}

.workflow-stage.is-active > .workflow-stage-toggle,
.workflow-stage:has(.nav-item.active) > .workflow-stage-toggle {
  background:
    linear-gradient(100deg, rgba(8, 119, 110, 0.13), rgba(255, 255, 255, 0.2) 78%);
  color: var(--nav-glass-accent-strong);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.76), 0 6px 16px rgba(8, 119, 110, 0.055);
}

.workflow-stage.is-active > .workflow-stage-toggle::before,
.workflow-stage:has(.nav-item.active) > .workflow-stage-toggle::before,
.workflow-stage-list .workflow-home-item.active::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--nav-glass-highlight), var(--nav-glass-accent));
  box-shadow: 0 0 10px rgba(8, 119, 110, 0.34);
  content: "";
  pointer-events: none;
}

.workflow-stage-list .workflow-home-item.active {
  position: relative;
  overflow: hidden;
  border-color: rgba(188, 213, 209, 0.88);
  background: linear-gradient(105deg, rgba(8, 119, 110, 0.14), rgba(255, 255, 255, 0.38));
  color: var(--nav-glass-accent-strong);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 10px 24px rgba(8, 119, 110, 0.075);
}

.workflow-stage[open] .workflow-stage-chevron,
.workflow-stage.is-active .workflow-stage-chevron,
.workflow-stage:has(.nav-item.active) .workflow-stage-chevron {
  color: var(--nav-glass-accent);
}

.workflow-stage-items {
  background: rgba(255, 255, 255, 0.08);
}

.workflow-stage-items .nav-item {
  color: #34484f;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.58);
}

.workflow-stage-list .nav-item.active {
  background: linear-gradient(90deg, rgba(8, 119, 110, 0.13), rgba(255, 255, 255, 0.14));
  color: var(--nav-glass-accent-strong);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.62);
}

.workflow-stage-toggle:focus-visible,
.workflow-stage-list .nav-item:focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid var(--nav-glass-accent-strong);
  outline-offset: -3px;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sidebar {
    background: #f1f5f5;
  }

  .workflow-home-item,
  .workflow-stage {
    background: #f9fbfb;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar {
    background: #f1f5f5;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .workflow-home-item,
  .workflow-stage {
    background: #f9fbfb;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ===== Premarket decision readability and progressive disclosure ===== */
.premarket-step-body,
.premarket-inline-flow {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.premarket-conclusion-main > span,
.premarket-next-output > span,
.premarket-card-label,
.premarket-metric span,
.premarket-item-card > span,
.premarket-step-body .premarket-projection-card > span {
  font-size: 12px;
}

.premarket-conclusion-main h3 {
  font-size: clamp(27px, 2.15vw, 32px);
}

.premarket-conclusion-main p,
.premarket-next-output strong,
.premarket-metric p,
.premarket-item-card p,
.premarket-step-body .premarket-projection-heading p,
.premarket-step-body .premarket-projection-card > p,
.premarket-guard-card p,
.premarket-feedback-note {
  font-size: 14px;
}

.premarket-metric strong,
.premarket-item-card strong,
.premarket-step-body .premarket-projection-card > strong {
  font-size: 16px;
}

.premarket-step-body .premarket-projection-heading h4 {
  font-size: 18px;
}

.premarket-step-body .premarket-projection-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.premarket-stock-theme {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0b7064;
  background: #e8f5f1;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}

.premarket-detail-disclosure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.premarket-detail-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 17px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}

.premarket-detail-disclosure > summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.premarket-detail-disclosure-body {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.premarket-step-body .premarket-card-evidence summary,
.premarket-evidence summary {
  font-size: 13px;
}

.premarket-step-body .premarket-card-evidence ul,
.premarket-evidence ul,
.premarket-guard-card ul {
  font-size: 14px;
}

@media (max-width: 1180px) {
  .premarket-step-body .premarket-projection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .premarket-conclusion-main h3 {
    font-size: 26px;
  }

  .premarket-step-body .premarket-projection-grid {
    grid-template-columns: 1fr;
  }

  .premarket-detail-disclosure > summary {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 12px;
  }
}

/* ===== Observation / decision layer navigation ===== */
.nav-stack.workflow-stage-list > .workflow-layer,
.nav-stack.workflow-stage-list > .workflow-layer:last-child {
  margin: 0 0 14px;
  border: 1px solid var(--nav-glass-line);
  border-radius: 12px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), var(--nav-glass-shadow);
}

.nav-stack.workflow-stage-list > .workflow-layer:last-child {
  margin-bottom: 0;
}

.workflow-layer-note {
  margin: 0 10px 7px 0;
  padding: 8px 10px;
  border: 1px solid rgba(8, 119, 110, 0.13);
  border-radius: 9px;
  color: #4e686b;
  background: rgba(235, 247, 245, 0.82);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.5;
}

.workflow-layer-note.is-decision {
  border-color: rgba(178, 121, 30, 0.16);
  color: #6d592c;
  background: rgba(255, 248, 233, 0.88);
}

@media (max-width: 820px) {
  .workflow-layer .workflow-stage-items .nav-item {
    min-height: 44px;
  }
}
