:root {
  color: #172033;
  background: #eef2f6;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* -------------------------------------------------------------------------
   Product shell V2: the daily trading workflow, not the engineering console.
   All selectors are scoped so the archived components remain render-safe.
   ------------------------------------------------------------------------- */

:root {
  --product-ink: #101827;
  --product-muted: #647084;
  --product-line: #dde3ec;
  --product-soft: #f4f6f9;
  --product-paper: #ffffff;
  --product-navy: #0c1729;
  --product-red: #c83d45;
  --product-red-soft: #fff2f2;
  --product-green: #168161;
  --product-green-soft: #edf9f4;
  --product-amber: #a96816;
  --product-amber-soft: #fff7e8;
  --product-blue: #315fbd;
  --product-blue-soft: #eef4ff;
  color: var(--product-ink);
  background: #f0f3f7;
}

body {
  background:
    radial-gradient(circle at 10% 0, rgba(49, 95, 189, 0.08), transparent 28rem),
    #f0f3f7;
}

.app-shell {
  width: min(1460px, calc(100% - 40px));
  padding: 0 0 34px;
}

.product-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  min-height: 82px;
}

.product-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--product-ink);
  text-decoration: none;
}

.product-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: var(--product-navy);
  box-shadow: 0 10px 22px rgba(12, 23, 41, 0.2);
  font-size: 18px;
  font-weight: 900;
}

.product-brand > span:last-child,
.product-header-facts > div {
  display: grid;
  gap: 2px;
}

.product-brand b {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.product-brand small,
.product-header-facts small {
  color: var(--product-muted);
  font-size: 12px;
}

.product-header-facts {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--product-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.product-header-facts b {
  font-size: 13px;
}

.data-state-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #8d98a9;
}

.data-state-dot.live {
  background: var(--product-green);
  box-shadow: 0 0 0 4px rgba(22, 129, 97, 0.12);
}

.data-state-dot.historical {
  background: var(--product-blue);
}

.data-state-dot.delayed {
  background: var(--product-amber);
}

.product-refresh,
.battle-account-strip > button,
.today-learning-card > button,
.system-detail-card > header button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--product-navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.product-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.product-refresh:disabled,
.system-detail-card > header button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.product-nav {
  position: sticky;
  z-index: 20;
  top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(205, 214, 226, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(30, 44, 64, 0.1);
  backdrop-filter: blur(16px);
}

.product-nav button {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px 12px;
  border: 0;
  border-radius: 11px;
  color: #4e5a6d;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.product-nav button > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #536176;
  background: #eef1f5;
  font-size: 13px;
  font-weight: 900;
}

.product-nav button b {
  align-self: end;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-nav button small {
  align-self: start;
  overflow: hidden;
  color: #8993a3;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-nav button:hover {
  background: #f5f7fa;
}

.product-nav button.active {
  color: #fff;
  background: var(--product-navy);
}

.product-nav button.active > span {
  color: var(--product-navy);
  background: #fff;
}

.product-nav button.active small {
  color: #b7c2d2;
}

.freshness-ribbon {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 46px;
  margin-top: 12px;
  padding: 9px 14px;
  border: 1px solid var(--product-line);
  border-left: 4px solid #8d98a9;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--product-muted);
  font-size: 12px;
}

.freshness-ribbon.live {
  border-left-color: var(--product-green);
}

.freshness-ribbon.historical {
  border-left-color: var(--product-blue);
  background: #f7f9ff;
}

.freshness-ribbon.delayed {
  border-left-color: var(--product-amber);
  background: #fffbf4;
}

.freshness-ribbon > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.freshness-ribbon b {
  color: var(--product-ink);
}

.freshness-ribbon > div:last-child span:not(:first-child) {
  margin-left: 8px;
}

.product-alert {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #ecc9a0;
  border-radius: 11px;
  color: #7b4c12;
  background: var(--product-amber-soft);
  font-size: 13px;
}

.product-page {
  padding-top: 28px;
}

.product-page-lead {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
}

.product-page-lead > div > p {
  margin-bottom: 6px;
  color: var(--product-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.product-page-lead h1 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.product-page-lead > div > span {
  display: block;
  margin-top: 8px;
  color: var(--product-muted);
  font-size: 14px;
}

.page-date-badge,
.paper-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: #315fbd;
  background: var(--product-blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.page-date-badge.live,
.paper-status.online {
  color: var(--product-green);
  background: var(--product-green-soft);
}

.paper-status.building {
  color: var(--product-amber);
  background: var(--product-amber-soft);
}

.battle-command-grid,
.battle-flow-grid,
.full-flow-grid,
.paper-evidence-grid {
  display: grid;
  gap: 14px;
}

.battle-command-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.command-card,
.quick-flow-card,
.battle-account-strip,
.today-learning-card,
.full-flow-column,
.radar-board-overview article,
.auto-paper-hero,
.paper-section,
.paper-evidence-card,
.archive-section,
.learning-today,
.review-queue,
.outcome-matrix,
.system-status-grid article,
.system-detail-card,
.system-incidents,
.system-safety-note {
  border: 1px solid var(--product-line);
  border-radius: 16px;
  background: var(--product-paper);
  box-shadow: 0 12px 30px rgba(30, 44, 64, 0.055);
}

.command-card {
  position: relative;
  overflow: hidden;
  min-height: 204px;
  padding: 24px;
}

.command-card::after {
  position: absolute;
  top: -80px;
  right: -55px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(49, 95, 189, 0.08);
  content: "";
}

.command-step,
.quick-flow-card header span,
.battle-account-strip > div > span,
.today-learning-card > span,
.full-flow-column > header span,
.archive-section > header span,
.paper-section > header span,
.learning-today span,
.review-queue > header span,
.outcome-matrix > header span,
.system-status-grid article > span,
.system-detail-card > header span {
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.command-card h2 {
  margin-top: 14px;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.command-card > p {
  max-width: 680px;
  margin-top: 10px;
  color: var(--product-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auto-command {
  color: #fff;
  background: var(--product-navy);
  border-color: var(--product-navy);
}

.auto-command::after {
  background: rgba(255, 255, 255, 0.06);
}

.auto-command .command-step,
.auto-command > p {
  color: #b8c2d0;
}

.auto-action-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.auto-action-line i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--product-navy);
  background: #fff;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.auto-action-line h2 {
  margin: 0;
}

.auto-command.buy .auto-action-line i {
  color: #fff;
  background: var(--product-red);
}

.auto-command.sell .auto-action-line i,
.auto-command.risk .auto-action-line i {
  color: #fff;
  background: var(--product-green);
}

.auto-count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 18px;
  color: #aab6c7;
  font-size: 12px;
}

.auto-count-row b {
  color: #fff;
  font-size: 15px;
}

.board-mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.board-mini-row span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--product-soft);
  font-size: 12px;
}

.board-mini-row em {
  font-style: normal;
  font-weight: 800;
}

.battle-flow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.quick-flow-card {
  padding: 20px;
}

.quick-flow-card.inflow {
  border-top: 4px solid var(--product-red);
}

.quick-flow-card.outflow {
  border-top: 4px solid var(--product-green);
}

.quick-flow-card > header,
.paper-section > header,
.archive-section > header,
.review-queue > header,
.system-detail-card > header,
.system-incidents > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.quick-flow-card h2,
.paper-section h2,
.archive-section h2,
.review-queue h2,
.system-detail-card h2 {
  margin-top: 3px;
  font-size: 20px;
}

.quick-flow-card header button {
  padding: 6px 0;
  border: 0;
  color: var(--product-blue);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.quick-flow-list {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.quick-flow-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 7px 0;
  border-top: 1px solid #edf0f4;
}

.quick-flow-list li:first-child {
  border-top: 0;
}

.quick-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--product-red);
  background: var(--product-red-soft);
  font-size: 12px;
  font-weight: 900;
}

.quick-flow-list.outflow .quick-rank {
  color: var(--product-green);
  background: var(--product-green-soft);
}

.quick-flow-list li > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quick-flow-list b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-flow-list small {
  overflow: hidden;
  color: var(--product-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-flow-list strong {
  color: var(--product-red);
  font-size: 14px;
}

.quick-flow-list.outflow strong {
  color: var(--product-green);
}

.product-empty {
  display: grid;
  place-items: start;
  gap: 4px;
  padding: 18px;
  border-radius: 12px;
  color: var(--product-muted);
  background: var(--product-soft);
  font-size: 13px;
  line-height: 1.5;
}

.product-empty b {
  color: var(--product-ink);
}

.product-empty.large {
  place-items: center;
  min-height: 130px;
  text-align: center;
}

.battle-account-strip {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(540px, 2fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 14px;
  padding: 19px 20px;
}

.battle-account-strip > div h2 {
  margin: 3px 0;
  font-size: 25px;
}

.battle-account-strip > div small {
  color: var(--product-muted);
  font-size: 11px;
}

.battle-account-strip dl,
.auto-paper-metrics,
.new-position-card dl,
.archive-account-card dl,
.system-detail-card dl {
  display: grid;
  margin: 0;
}

.battle-account-strip dl {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.battle-account-strip dl > div {
  padding-left: 12px;
  border-left: 1px solid var(--product-line);
}

.battle-account-strip dt,
.auto-paper-metrics dt,
.new-position-card dt,
.archive-account-card dt,
.system-detail-card dt {
  color: var(--product-muted);
  font-size: 11px;
}

.battle-account-strip dd,
.auto-paper-metrics dd,
.new-position-card dd,
.archive-account-card dd,
.system-detail-card dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.today-learning-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 18px 20px;
  border-left: 5px solid var(--product-amber);
}

.today-learning-card > div b {
  font-size: 15px;
}

.today-learning-card > div p {
  margin-top: 4px;
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.5;
}

.today-learning-card > button {
  color: #7b4c12;
  background: var(--product-amber-soft);
}

.flow-explainer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #ecd9b6;
  border-radius: 12px;
  color: #6e531f;
  background: #fffbf1;
  font-size: 12px;
}

.flow-explainer span {
  flex: 1;
}

.flow-explainer em {
  color: #8b6b2e;
  font-style: normal;
  white-space: nowrap;
}

.product-filter {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--product-line);
  border-radius: 11px;
  background: #fff;
}

.product-filter button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: var(--product-muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.product-filter button.active {
  color: #fff;
  background: var(--product-navy);
}

.radar-board-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.radar-board-overview article {
  display: grid;
  gap: 5px;
  padding: 17px;
}

.radar-board-overview article > span,
.radar-board-overview small {
  color: var(--product-muted);
  font-size: 11px;
}

.radar-board-overview strong {
  font-size: 23px;
}

.full-flow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.full-flow-column {
  overflow: hidden;
}

.full-flow-column.inflow {
  border-top: 4px solid var(--product-red);
}

.full-flow-column.outflow {
  border-top: 4px solid var(--product-green);
}

.full-flow-column > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border-bottom: 1px solid var(--product-line);
}

.full-flow-column > header h2 {
  margin-top: 3px;
  font-size: 23px;
}

.full-flow-column > header p {
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 11px;
}

.full-flow-column > header > b {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--product-muted);
  background: var(--product-soft);
  font-size: 11px;
}

.full-flow-list {
  padding: 0 18px 10px;
}

.tdx-shadow-panel {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--product-line);
  border-top: 4px solid var(--product-navy);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 44, 64, 0.055);
}

.tdx-shadow-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding: 20px;
  border-bottom: 1px solid var(--product-line);
}

.tdx-shadow-panel > header span,
.tdx-shadow-panel > header p,
.tdx-shadow-panel footer,
.tdx-shadow-empty span,
.tdx-shadow-summary span,
.tdx-shadow-card header span,
.tdx-shadow-card small {
  color: var(--product-muted);
  font-size: 11px;
}

.tdx-shadow-panel > header h2 {
  margin-top: 3px;
  font-size: 23px;
}

.tdx-shadow-panel > header p {
  margin-top: 5px;
}

.tdx-shadow-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.tdx-shadow-badges b,
.tdx-shadow-badges em {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.tdx-shadow-badges b {
  color: #8a3f21;
  background: var(--product-amber-soft);
}

.tdx-shadow-badges em {
  color: var(--product-navy);
  background: var(--product-soft);
}

.tdx-shadow-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--product-line);
}

.tdx-shadow-summary > div {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  background: #fff;
}

.tdx-shadow-summary b {
  font-size: 15px;
}

.tdx-shadow-factor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 14px 18px 0;
}

.tdx-shadow-factor-row span,
.tdx-shadow-card i {
  padding: 5px 7px;
  border: 1px solid #dbe1e9;
  border-radius: 7px;
  color: #4f5d70;
  background: #f8fafc;
  font-size: 10px;
  font-style: normal;
}

.tdx-shadow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
}

.tdx-shadow-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--product-line);
  border-radius: 11px;
  background: #fbfcfe;
}

.tdx-shadow-card.risk {
  border-color: #e9c9c1;
  background: #fff8f6;
}

.tdx-shadow-card > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tdx-shadow-card h3 {
  font-size: 15px;
}

.tdx-shadow-card strong {
  color: var(--product-navy);
  font-size: 16px;
}

.tdx-shadow-card > p {
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.tdx-shadow-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tdx-shadow-empty {
  display: grid;
  gap: 5px;
  margin: 14px 18px;
  padding: 15px;
  border-radius: 10px;
  background: var(--product-soft);
}

.tdx-shadow-panel footer {
  display: flex;
  gap: 6px;
  padding: 13px 18px 16px;
  line-height: 1.55;
}

.tdx-shadow-panel footer b {
  flex: 0 0 auto;
  color: #485568;
}

.full-flow-row {
  display: grid;
  grid-template-columns: 34px minmax(120px, 1fr) minmax(105px, auto) minmax(145px, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid #edf0f4;
}

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

.flow-rank {
  color: #9aa4b2;
  font-size: 12px;
  font-weight: 900;
}

.flow-name,
.flow-money,
.flow-reading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.flow-name b,
.flow-reading b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-name span,
.flow-money span,
.flow-reading span {
  overflow: hidden;
  color: var(--product-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-money strong {
  color: var(--product-red);
  font-size: 14px;
}

.outflow .flow-money strong {
  color: var(--product-green);
}

.auto-paper-hero {
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.75fr;
  gap: 22px;
  padding: 22px;
  border-top: 4px solid var(--product-blue);
}

.auto-paper-hero.buy {
  border-top-color: var(--product-red);
}

.auto-paper-hero.sell,
.auto-paper-hero.risk {
  border-top-color: var(--product-green);
}

.auto-paper-action > span,
.auto-paper-hero > aside > span {
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 800;
}

.auto-paper-action > strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.auto-paper-action > p {
  margin-top: 8px;
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auto-paper-action > small {
  display: block;
  margin-top: 12px;
  color: #8b95a5;
  font-size: 10px;
}

.auto-paper-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 12px;
  background: var(--product-line);
}

.auto-paper-metrics > div {
  padding: 13px;
  background: #f9fafc;
}

.auto-paper-hero > aside {
  padding: 14px;
  border-radius: 12px;
  background: var(--product-soft);
}

.auto-paper-hero > aside b {
  display: block;
  margin: 5px 0 8px;
  font-size: 17px;
}

.auto-paper-hero > aside p {
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.45;
}

.paper-section,
.archive-section,
.review-queue {
  margin-top: 14px;
  padding: 20px;
}

.paper-section > header > b,
.review-queue > header > b,
.archive-section > header > b {
  color: var(--product-muted);
  font-size: 12px;
}

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

.new-position-card,
.archive-account-card {
  padding: 17px;
  border: 1px solid var(--product-line);
  border-radius: 13px;
  background: #fafbfd;
}

.new-position-card > header,
.archive-account-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.new-position-card > header h3,
.archive-account-card h3 {
  font-size: 17px;
}

.new-position-card > header span,
.archive-account-card header span {
  display: block;
  margin-top: 3px;
  color: var(--product-muted);
  font-size: 11px;
}

.new-position-card dl,
.archive-account-card dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.new-position-card dl > div,
.archive-account-card dl > div {
  padding: 9px;
  border-radius: 9px;
  background: #fff;
}

.new-position-card > p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--product-line);
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.55;
}

.new-position-card > p b {
  margin-right: 8px;
  color: var(--product-ink);
}

.new-position-card > p.invalidation b {
  color: var(--product-green);
}

.new-position-card > p.accounting {
  border-radius: 9px;
  padding: 10px;
  background: #f4f7fb;
}

.decision-audit-timeline {
  margin-top: 14px;
  border: 1px solid var(--product-line);
  border-radius: 14px;
  background: #fff;
}

.decision-audit-timeline > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  list-style-position: inside;
}

.decision-audit-timeline > summary span {
  display: inline-grid;
  gap: 4px;
  margin-left: 4px;
}

.decision-audit-timeline > summary small,
.decision-audit-timeline > summary em,
.decision-audit-timeline article span,
.decision-audit-timeline article em {
  color: var(--product-muted);
  font-size: 11px;
  font-style: normal;
}

.decision-audit-timeline > div {
  padding: 0 18px 16px;
}

.decision-audit-timeline article {
  display: grid;
  grid-template-columns: 90px minmax(120px, 0.5fr) minmax(240px, 1.5fr) minmax(140px, 0.7fr);
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-top: 1px solid var(--product-line);
}

.decision-audit-timeline article p {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.paper-evidence-card {
  padding: 17px;
}

.paper-evidence-card > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.paper-evidence-card > header h3 {
  font-size: 16px;
}

.paper-evidence-card > header span {
  color: var(--product-muted);
  font-size: 11px;
}

.paper-evidence-card > div > article {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--product-line);
}

.paper-evidence-card > div > article b {
  font-size: 13px;
}

.paper-evidence-card > div > article span,
.paper-evidence-card > div > article small {
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.4;
}

.archive-section > header p {
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 11px;
}

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

.archive-account-card > header > b {
  height: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: #6a7484;
  background: #edf0f4;
  font-size: 10px;
}

.learning-today {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-left: 5px solid var(--product-blue);
}

.learning-today h2 {
  margin-top: 5px;
  font-size: 24px;
}

.learning-today p {
  margin-top: 7px;
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.55;
}

.learning-today > b {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--product-blue);
  background: var(--product-blue-soft);
  font-size: 11px;
}

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

.learning-steps article {
  display: flex;
  gap: 14px;
  min-height: 128px;
  padding: 19px;
  border-radius: 15px;
  color: #fff;
  background: var(--product-navy);
}

.learning-steps article > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--product-navy);
  background: #fff;
  font-weight: 900;
}

.learning-steps h3 {
  font-size: 17px;
}

.learning-steps p {
  margin-top: 7px;
  color: #b8c2d0;
  font-size: 12px;
  line-height: 1.55;
}

.review-queue > article {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--product-soft);
}

.review-queue > article p {
  color: var(--product-muted);
  font-size: 12px;
}

.outcome-matrix {
  margin-top: 14px;
  padding: 20px;
}

.outcome-matrix > header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.outcome-matrix > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.outcome-matrix article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 11px;
  background: var(--product-soft);
}

.outcome-matrix article b {
  font-size: 13px;
}

.outcome-matrix article span {
  color: var(--product-muted);
  font-size: 11px;
}

.outcome-matrix article.good {
  background: var(--product-red-soft);
}

.outcome-matrix article.steady {
  background: var(--product-blue-soft);
}

.outcome-matrix article.warning {
  background: var(--product-amber-soft);
}

.outcome-matrix article.bad {
  background: var(--product-green-soft);
}

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

.system-status-grid article {
  padding: 18px;
}

.system-status-grid article h2 {
  margin-top: 7px;
  font-size: 20px;
}

.system-status-grid article p {
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.45;
}

.system-detail-card,
.system-incidents,
.system-safety-note {
  margin-top: 14px;
  padding: 20px;
}

.system-detail-card dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--product-line);
  border-radius: 12px;
  background: var(--product-line);
}

.system-detail-card dl > div {
  padding: 13px;
  background: #fafbfd;
}

.system-incidents > header h2 {
  font-size: 19px;
}

.system-incidents > header span {
  color: var(--product-muted);
  font-size: 11px;
}

.system-incidents > article {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--product-amber-soft);
}

.system-incidents > article p,
.system-incidents > article span {
  color: var(--product-muted);
  font-size: 11px;
}

.system-safety-note {
  display: flex;
  gap: 12px;
  border-left: 5px solid var(--product-navy);
}

.system-safety-note p {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.55;
}

.system-page .history-strip,
.flow-radar-page .history-strip {
  margin: 14px 0 0;
  box-shadow: 0 12px 30px rgba(30, 44, 64, 0.055);
}

.positive {
  color: var(--product-red) !important;
}

.negative {
  color: var(--product-green) !important;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding: 18px 4px;
  border-top: 1px solid #d5dce6;
  color: var(--product-muted);
  font-size: 11px;
}

.product-footer b {
  color: #485568;
}

@media (max-width: 1120px) {
  .product-nav button {
    grid-template-columns: auto 1fr;
  }

  .product-nav button small {
    display: none;
  }

  .battle-account-strip {
    grid-template-columns: 1fr auto;
  }

  .battle-account-strip dl {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .auto-paper-hero {
    grid-template-columns: 1fr 1.5fr;
  }

  .auto-paper-hero > aside {
    grid-column: 1 / -1;
  }

  .full-flow-row {
    grid-template-columns: 30px minmax(100px, 1fr) minmax(90px, auto);
  }

  .flow-reading {
    grid-column: 2 / -1;
    padding-bottom: 8px;
  }

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

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

  .product-header {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .product-header-facts {
    display: none;
  }

  .product-refresh b {
    display: none;
  }

  .product-refresh {
    width: 42px;
    padding: 0;
  }

  .product-nav {
    top: 6px;
  }

  .product-nav button {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    min-height: 60px;
    padding: 6px 3px;
    text-align: center;
  }

  .product-nav button > span {
    grid-row: auto;
    width: 28px;
    height: 28px;
  }

  .product-nav button b {
    align-self: center;
    font-size: 11px;
  }

  .freshness-ribbon {
    align-items: start;
  }

  .freshness-ribbon > div:last-child {
    justify-content: flex-end;
  }

  .battle-command-grid,
  .battle-flow-grid,
  .full-flow-grid,
  .tdx-shadow-grid,
  .auto-paper-hero,
  .new-position-grid,
  .archive-section > div,
  .learning-steps,
  .system-status-grid {
    grid-template-columns: 1fr;
  }

  .battle-account-strip {
    grid-template-columns: 1fr auto;
  }

  .battle-account-strip dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .today-learning-card {
    grid-template-columns: 1fr auto;
  }

  .today-learning-card > span {
    grid-column: 1 / -1;
  }

  .auto-paper-hero > aside {
    grid-column: auto;
  }

  .paper-evidence-grid,
  .outcome-matrix > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-detail-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-audit-timeline article {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: 76px;
  }

  .app-shell {
    width: min(100% - 18px, 520px);
    padding-bottom: 12px;
  }

  .product-header {
    min-height: 68px;
  }

  .product-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .product-brand b {
    font-size: 17px;
  }

  .product-brand small {
    font-size: 10px;
  }

  .product-nav {
    position: fixed;
    z-index: 60;
    inset: auto 0 0;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 5px max(4px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    border-width: 1px 0 0;
    border-radius: 0;
  }

  .product-nav button {
    min-height: 57px;
    border-radius: 9px;
  }

  .product-nav button > span {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }

  .product-nav button b {
    font-size: 10px;
  }

  .freshness-ribbon {
    display: grid;
    gap: 6px;
    margin-top: 0;
  }

  .freshness-ribbon > div:last-child {
    justify-content: flex-start;
  }

  .product-page {
    padding-top: 22px;
  }

  .product-page-lead {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
  }

  .product-page-lead h1 {
    font-size: 31px;
  }

  .product-page-lead > div > span {
    font-size: 12px;
    line-height: 1.5;
  }

  .page-date-badge,
  .paper-status {
    width: fit-content;
  }

  .command-card {
    min-height: 180px;
    padding: 19px;
  }

  .command-card h2 {
    font-size: 27px;
  }

  .quick-flow-card,
  .paper-section,
  .archive-section,
  .review-queue,
  .outcome-matrix,
  .system-detail-card,
  .system-incidents {
    padding: 16px;
  }

  .battle-account-strip {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 17px;
  }

  .battle-account-strip dl {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-account-strip dl > div {
    padding: 9px;
    border: 0;
    border-radius: 9px;
    background: var(--product-soft);
  }

  .today-learning-card {
    grid-template-columns: 1fr;
    padding: 17px;
  }

  .today-learning-card > span {
    grid-column: auto;
  }

  .flow-explainer {
    display: grid;
    line-height: 1.5;
  }

  .flow-explainer em {
    white-space: normal;
  }

  .radar-board-overview {
    grid-template-columns: 1fr;
  }

  .tdx-shadow-panel > header {
    display: grid;
    padding: 16px;
  }

  .tdx-shadow-badges {
    justify-content: flex-start;
  }

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

  .tdx-shadow-factor-row,
  .tdx-shadow-grid {
    padding-right: 13px;
    padding-left: 13px;
  }

  .full-flow-column > header {
    padding: 16px;
  }

  .full-flow-list {
    padding: 0 13px 8px;
  }

  .full-flow-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .flow-reading {
    grid-column: 2 / -1;
  }

  .auto-paper-hero {
    padding: 17px;
  }

  .auto-paper-metrics,
  .system-detail-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .new-position-card dl,
  .archive-account-card dl,
  .paper-evidence-grid,
  .outcome-matrix > div {
    grid-template-columns: 1fr 1fr;
  }

  .archive-section > header {
    display: grid;
  }

  .learning-today {
    display: grid;
    padding: 18px;
  }

  .learning-today h2 {
    font-size: 21px;
  }

  .system-safety-note,
  .product-footer {
    display: grid;
  }

  .history-strip {
    grid-template-columns: 1fr;
  }

  .history-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .history-actions button {
    flex: 0 0 auto;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  width: min(1540px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 20px;
}

.title-block,
.header-actions,
.board-head,
.section-head,
.candidate-top,
.stock-line,
.direction-main,
.score-line,
.progress-row {
  display: flex;
  align-items: center;
}

.title-block {
  gap: 14px;
}

.brand-mark,
.metric-icon,
.head-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  background: #172033;
  font-weight: 800;
}

.head-icon {
  width: 38px;
  height: 38px;
  background: #2563eb;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.title-block p {
  margin-top: 5px;
  color: #657184;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #39465b;
  cursor: pointer;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: #d64545;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  color: #172033;
  background: #fff;
  cursor: pointer;
}

.icon-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.market-refresh-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-basis: 100%;
  min-height: 22px;
  color: #657184;
  font-size: 12px;
}

.market-refresh-status b {
  color: #172033;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8b95a5;
}

.market-refresh-status.open .status-dot {
  background: #d64545;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12);
}

.market-refresh-status.paused .status-dot {
  background: #8b95a5;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  color: #39465b;
}

.notice.warning {
  border-color: #edc471;
  color: #7a4f0a;
  background: #fff8e7;
}

.notice.danger {
  border-color: #e8a1a1;
  color: #9b2222;
  background: #fff1f1;
}

.notice.success {
  border-color: #95d5b2;
  color: #146c43;
  background: #f0fff6;
}

.notice.info {
  border-color: #a8c7fa;
  color: #1d4f91;
  background: #f2f7ff;
}

.remediation-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #d98f62;
  border-left: 6px solid #a93624;
  border-radius: 10px;
  background:
    linear-gradient(115deg, rgba(169, 54, 36, 0.08), transparent 55%),
    #fffaf4;
  box-shadow: 0 10px 28px rgba(105, 47, 31, 0.08);
}

.remediation-banner-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  color: #fff;
  background: #a93624;
  font-size: 20px;
  font-weight: 900;
}

.remediation-banner h2 {
  margin: 2px 0 5px;
  color: #7e271c;
  font-size: clamp(20px, 2.4vw, 28px);
}

.remediation-banner p:not(.eyebrow),
.remediation-banner-meta span,
.remediation-banner-meta em {
  color: #704b3e;
  font-size: 13px;
  line-height: 1.5;
}

.remediation-banner-meta {
  display: grid;
  gap: 3px;
  padding-left: 16px;
  border-left: 1px solid #e7c7b4;
}

.remediation-banner-meta b {
  color: #a93624;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.remediation-banner-meta em {
  font-style: normal;
}

.data-quality-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #dbe2ec;
  border-left: 6px solid #657184;
  border-radius: 8px;
  background: #dbe2ec;
  box-shadow: 0 10px 24px rgba(32, 46, 68, 0.05);
}

.data-quality-panel.quality-passed {
  border-left-color: #0f9f6e;
}

.data-quality-panel.quality-failed {
  border-left-color: #a93624;
}

.data-quality-panel > div {
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
}

.data-quality-panel span,
.data-quality-panel b {
  display: block;
}

.data-quality-panel span {
  margin-bottom: 4px;
  color: #657184;
  font-size: 12px;
}

.data-quality-panel b {
  overflow: hidden;
  color: #253147;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-account-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e1b99e;
  border-radius: 8px;
  color: #6f4332;
  background: #fff7ef;
  font-size: 13px;
}

.legacy-account-banner b {
  color: #a93624;
}

.pro-remediation .head-icon {
  background: #a93624;
}

.remediation-block-list {
  margin-top: 14px;
}

.history-strip {
  display: grid;
  grid-template-columns: minmax(180px, 270px) 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(32, 46, 68, 0.05);
}

.history-copy strong,
.history-copy span {
  display: block;
}

.history-copy strong {
  color: #172033;
  font-size: 15px;
}

.history-copy span {
  margin-top: 3px;
  color: #657184;
  font-size: 12px;
  line-height: 1.35;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.history-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  max-width: 150px;
  padding: 0 11px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  color: #39465b;
  background: #fbfcfe;
  cursor: pointer;
}

.history-actions button b,
.history-actions button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-actions button b {
  color: inherit;
  font-size: 13px;
}

.history-actions button span {
  color: inherit;
  font-size: 12px;
}

.history-actions button.active {
  border-color: #172033;
  color: #fff;
  background: #172033;
}

.history-actions button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.metrics-grid,
.board-grid,
.charts-grid,
.tables-grid,
.candidate-grid {
  display: grid;
  gap: 14px;
}

.metrics-grid,
.board-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.charts-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  margin-bottom: 14px;
}

.tables-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

.metric,
.board-card,
.panel,
.candidate-card {
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(32, 46, 68, 0.06);
}

.metric {
  display: flex;
  min-height: 112px;
  gap: 14px;
  padding: 18px;
}

.metric p,
.eyebrow,
.board-card p,
.direction-name span,
.signal-grid,
.candidate-card p,
.stock-line span,
.empty-triplet,
.empty-state {
  color: #657184;
}

.metric strong {
  display: block;
  margin: 5px 0;
  font-size: clamp(23px, 2.6vw, 34px);
  line-height: 1.05;
}

.metric span {
  color: #657184;
}

.metric-positive .metric-icon {
  background: #d64545;
}

.metric-negative .metric-icon {
  background: #0f9f6e;
}

.board-card,
.panel,
.candidate-card {
  padding: 18px;
}

.board-head,
.section-head,
.candidate-top {
  justify-content: space-between;
  gap: 12px;
}

.board-head h3,
.direction-name h3,
.candidate-top h3 {
  font-size: 18px;
  line-height: 1.2;
}

.board-flow {
  margin: 18px 0;
}

.board-flow strong,
.candidate-flow strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
}

.board-flow span,
.candidate-flow span {
  color: #657184;
}

.progress-row {
  gap: 9px;
  color: #657184;
}

.progress-row span,
.progress-row b {
  flex: 0 0 auto;
  font-size: 13px;
}

.track,
.score-track,
.bar-track {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e8edf4;
}

.track,
.score-track,
.bar-track {
  flex: 1;
}

.track i,
.score-track i,
.bar-track i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: inherit;
  background: #d64545;
}

.leader-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.board-provenance {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf0f5;
}

.board-provenance span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #657184;
  font-size: 12px;
}

.board-provenance b {
  overflow: hidden;
  color: #39465b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-strip span,
.tag-row i {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #39465b;
  background: #f1f5f9;
  font-size: 12px;
  font-style: normal;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
}

.flow-segmented {
  grid-template-columns: repeat(2, minmax(92px, 1fr));
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: #657184;
  background: transparent;
  cursor: pointer;
}

.segmented button.active {
  color: #fff;
  background: #172033;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  margin-top: 4px;
  font-size: 21px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.bar-chart {
  display: grid;
  gap: 14px;
  min-height: 290px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr 42px;
  align-items: center;
  gap: 10px;
}

.bar-row span {
  overflow: hidden;
  color: #39465b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row b {
  text-align: right;
}

.bar-track {
  height: 16px;
}

.bar-track i.hot {
  background: #d64545;
}

.bar-track i.warm {
  background: #b7791f;
}

.bar-track i.cool {
  background: #2563eb;
}

.bar-track i.outflow-score.hot,
.bar-track i.outflow-score.warm,
.direction-row.flow-outflow .score-track i,
.score-pill.outflow-score.hot,
.score-pill.outflow-score.warm {
  background: #0f9f6e;
}

.bar-track i.outflow-score.cool,
.score-pill.outflow-score.cool {
  background: #256f53;
}

.line-svg {
  width: 100%;
  min-height: 250px;
}

.line-svg line {
  stroke: #d9e0eb;
}

.line-svg polyline {
  fill: none;
  stroke: #d64545;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.line-svg circle {
  fill: #172033;
}

.line-svg text {
  fill: #657184;
  font-size: 18px;
}

.direction-list {
  display: grid;
  gap: 12px;
}

.direction-row {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.direction-row.flow-outflow,
.candidate-card.flow-outflow {
  border-color: #cde8d8;
  background: #fbfffd;
}

.direction-main {
  align-items: flex-start;
  gap: 12px;
}

.rank-box {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: #172033;
  font-weight: 800;
}

.direction-name {
  min-width: 0;
}

.direction-name div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.direction-name p {
  margin-top: 6px;
  color: #39465b;
  line-height: 1.45;
}

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

.signal-grid span {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.signal-grid b {
  display: block;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 15px;
  line-height: 1.25;
}

.positive {
  color: #d64545 !important;
}

.negative {
  color: #0f9f6e !important;
}

.neutral {
  color: #172033 !important;
}

.score-line {
  gap: 10px;
}

.score-pill {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: #657184;
}

.score-pill.hot {
  background: #d64545;
}

.score-pill.warm {
  background: #b7791f;
}

.score-pill.cool {
  background: #2563eb;
}

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

.stock-chip {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5e9f1;
  border-radius: 8px;
  background: #fff;
}

.stock-line {
  justify-content: space-between;
  gap: 8px;
}

.stock-line b,
.stock-line strong,
.stock-line span,
.stock-line em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.stock-line b {
  font-size: 14px;
}

.stock-line span {
  flex: 0 0 auto;
  font-size: 12px;
}

.stock-line strong {
  font-size: 15px;
}

.stock-line em {
  color: #39465b;
  font-size: 13px;
  font-style: normal;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.candidate-flow {
  margin: 16px 0 8px;
}

.candidate-reason {
  line-height: 1.45;
}

.strategy-panel {
  margin-bottom: 14px;
}

.strategy-summary {
  max-width: 980px;
  color: #39465b;
  line-height: 1.55;
}

.strategy-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.strategy-module {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.module-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: #172033;
  font-weight: 800;
}

.module-copy {
  min-width: 0;
}

.module-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.module-title h3 {
  font-size: 16px;
}

.module-title span {
  flex: 0 0 auto;
  color: #d64545;
  font-size: 13px;
  font-weight: 800;
}

.module-risk .module-title span {
  color: #0f9f6e;
}

.strategy-module code {
  display: block;
  overflow-wrap: anywhere;
  margin: 10px 0;
  color: #2563eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
}

.strategy-module p {
  color: #657184;
  font-size: 13px;
  line-height: 1.45;
}

.module-flow {
  border-color: #dbeafe;
}

.module-entry,
.module-cross,
.module-turn {
  border-color: #f2d1d1;
}

.module-risk {
  border-color: #cde8d8;
}

.kline-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.kline-meta-strip,
.chart-title-row,
.formula-legend,
.formula-legend span {
  display: flex;
  align-items: center;
}

.kline-meta-strip {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.kline-meta-strip strong {
  display: block;
  color: #172033;
  font-size: 18px;
  line-height: 1.25;
}

.kline-meta-strip span {
  color: #657184;
  font-size: 13px;
}

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

.kline-stats span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  color: #657184;
  background: #fff;
  font-size: 12px;
}

.kline-stats b {
  display: block;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 17px;
  line-height: 1.25;
}

.formula-legend {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.formula-legend span {
  gap: 6px;
  color: #657184;
  font-size: 12px;
  line-height: 1.25;
}

.formula-legend i {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.main-chart-block,
.formula-subchart {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e6ebf2;
}

.chart-title-row {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.chart-title-row h3 {
  color: #172033;
  font-size: 16px;
  line-height: 1.25;
}

.formula-chart {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  background: #fff;
}

.main-kline-svg {
  min-height: 360px;
}

.subchart-svg {
  min-height: 220px;
}

.chart-bg {
  fill: #fff;
}

.chart-grid-line,
.chart-tick-line {
  stroke: #e8edf4;
  stroke-width: 1;
}

.chart-axis-text {
  fill: #7a8596;
  font-size: 12px;
}

.reference-line {
  stroke: #c8d2df;
  stroke-dasharray: 5 5;
  stroke-width: 1.2;
}

.reference-label {
  fill: #657184;
  font-weight: 700;
}

.zero-line {
  stroke: #9aa6b8;
  stroke-width: 1.4;
}

.kline-wick {
  stroke-linecap: round;
  stroke-width: 2;
}

.kline-body {
  rx: 1.5px;
}

.trend-line,
.money-line,
.cc-line,
.cc1-line,
.main-buy-line,
.trend-force-line,
.bottom-assist-line,
.main-trend-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-up {
  stroke: #f59e0b;
  stroke-dasharray: 7 7;
  stroke-width: 1.8;
  opacity: 0.72;
}

.trend-mid-up {
  stroke: #f0b429;
  stroke-width: 2.5;
}

.trend-mid-down {
  stroke: #8b95a5;
  stroke-dasharray: 5 6;
  stroke-width: 1.7;
  opacity: 0.7;
}

.trend-down {
  stroke: #0f9f6e;
  stroke-width: 2.4;
}

.signal-marker,
.cash-marker {
  paint-order: stroke;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 4px;
  font-size: 15px;
  font-weight: 900;
}

.buy-marker,
.yuanxi-marker,
.quant-marker,
.main-long-marker {
  fill: #d64545;
}

.sell-marker {
  fill: #0f9f6e;
}

.cash-marker {
  fill: #b832c8;
}

.stage-build {
  fill: rgba(15, 159, 110, 0.38);
}

.stage-wash {
  fill: rgba(139, 149, 165, 0.36);
}

.stage-lift,
.main-enter-bar {
  fill: rgba(214, 69, 69, 0.62);
}

.stage-ship,
.main-retreat-bar {
  fill: rgba(15, 159, 110, 0.62);
}

.quant-bar {
  fill: rgba(240, 180, 41, 0.5);
}

.hotmoney-bar {
  fill: rgba(184, 50, 200, 0.48);
}

.money-line {
  stroke: #172033;
  stroke-width: 2.6;
}

.cc-positive {
  stroke: rgba(214, 69, 69, 0.55);
  stroke-linecap: round;
}

.cc-negative {
  stroke: rgba(15, 159, 110, 0.55);
  stroke-linecap: round;
}

.cc-line {
  stroke: #d64545;
  stroke-width: 2.5;
}

.cc1-line {
  stroke: #0f9f6e;
  stroke-width: 2.5;
}

.bottom-pressure-bar {
  fill: rgba(0, 166, 180, 0.18);
  stroke: rgba(0, 166, 180, 0.75);
  stroke-width: 1;
}

.accumulation-pressure-bar {
  fill: rgba(0, 166, 180, 0.2);
  stroke: rgba(0, 166, 180, 0.82);
  stroke-width: 1;
}

.accumulation-cyan-bar {
  fill: rgba(0, 204, 204, 0.52);
}

.accumulation-hot-bar,
.main-long-power-bar {
  fill: rgba(184, 50, 200, 0.64);
}

.bottom-assist-bar {
  fill: rgba(37, 99, 235, 0.24);
  stroke: rgba(37, 99, 235, 0.62);
  stroke-width: 1;
}

.main-short-power-bar {
  fill: rgba(15, 159, 110, 0.6);
}

.main-buy-line {
  stroke: #d64545;
  stroke-width: 2.4;
}

.trend-force-line {
  stroke: #2563eb;
  stroke-dasharray: 6 6;
  stroke-width: 1.8;
  opacity: 0.8;
}

.bottom-assist-line {
  stroke: #2563eb;
  stroke-width: 2;
  opacity: 0.78;
}

.main-trend-line {
  stroke: #b832c8;
  stroke-dasharray: 5 6;
  stroke-width: 1.8;
  opacity: 0.86;
}

.wind-panel {
  margin-bottom: 14px;
  border-top: 4px solid #334155;
}

.wind-panel .head-icon {
  background: #334155;
}

.wind-hero {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wind-hero section,
.wind-box,
.wind-source,
.wind-factor,
.wind-point,
.wind-item {
  min-width: 0;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.wind-hero section {
  padding: 14px;
}

.wind-hero span,
.wind-hero em,
.wind-hero p,
.wind-source span,
.wind-source a,
.wind-factor em,
.wind-point p,
.wind-item span,
.wind-item a {
  color: #657184;
}

.wind-hero strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.08;
}

.wind-hero em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
}

.wind-hero p {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.45;
}

.wind-factor-row,
.wind-source-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.wind-factor {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  background: #fff;
  font-size: 12px;
}

.wind-factor b,
.wind-source b,
.wind-point b,
.wind-item b {
  color: #172033;
}

.wind-factor em {
  font-style: normal;
  font-weight: 800;
}

.wind-factor.positive,
.wind-item.positive {
  border-color: #f0c6c6;
  background: #fff8f8;
}

.wind-factor.negative,
.wind-item.negative {
  border-color: #bfe5ce;
  background: #f7fff9;
}

.wind-source {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 9px 10px;
  background: #fff;
  font-size: 12px;
}

.wind-source.ok {
  border-color: #b9e4cf;
}

.wind-source.limited {
  border-color: #edc471;
  background: #fffaf0;
}

.wind-source a,
.wind-item a {
  text-decoration: none;
}

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

.wind-box {
  padding: 14px;
}

.wind-list {
  display: grid;
  gap: 8px;
}

.wind-point,
.wind-item {
  padding: 10px;
  background: #fff;
}

.wind-point p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
}

.wind-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 8px;
}

.wind-item b,
.wind-item span {
  display: block;
  overflow-wrap: anywhere;
}

.wind-item span {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.wind-item em {
  color: #172033;
  font-style: normal;
  font-weight: 900;
}

.quant-panel {
  margin-bottom: 14px;
  border-top: 4px solid #7f1d1d;
}

.quant-panel .head-icon {
  background: #7f1d1d;
}

.quant-hero,
.quant-columns,
.quant-heat-grid {
  display: grid;
  gap: 14px;
}

.quant-hero {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.quant-hero section,
.quant-box,
.quant-source-row span,
.quant-item,
.quant-alert,
.quant-rule,
.quant-heat-grid article {
  min-width: 0;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.quant-hero section,
.quant-box {
  padding: 14px;
}

.quant-hero span,
.quant-hero em,
.quant-source-row em,
.quant-item span,
.quant-item p,
.quant-alert p,
.quant-rule p,
.quant-heat-grid span,
.quant-heat-grid p,
.quant-heat-grid em {
  color: #657184;
}

.quant-hero strong {
  display: block;
  margin-top: 6px;
  color: #172033;
  font-size: 29px;
  line-height: 1.08;
}

.quant-hero em {
  display: block;
  margin-top: 5px;
  font-style: normal;
  font-size: 12px;
}

.quant-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.quant-source-row span {
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 9px 10px;
  background: #fff;
  font-size: 12px;
}

.quant-source-row .ok {
  border-color: #b9e4cf;
}

.quant-source-row .limited {
  border-color: #edc471;
  background: #fffaf0;
}

.quant-source-row b,
.quant-item b,
.quant-alert b,
.quant-rule b,
.quant-heat-grid b {
  color: #172033;
}

.quant-source-row em,
.quant-heat-grid em {
  font-style: normal;
}

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

.quant-list {
  display: grid;
  gap: 8px;
}

.quant-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  background: #fff;
}

.quant-item strong {
  color: #7f1d1d;
  font-size: 22px;
  line-height: 1;
}

.quant-item span,
.quant-item p,
.quant-alert p,
.quant-rule p,
.quant-heat-grid span,
.quant-heat-grid p,
.quant-heat-grid em {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.quant-item.high,
.quant-alert.high {
  border-color: #ef9a9a;
  background: #fff1f1;
}

.quant-item.medium,
.quant-alert.medium {
  border-color: #edc471;
  background: #fffaf0;
}

.quant-alert,
.quant-rule,
.quant-heat-grid article {
  padding: 10px;
  background: #fff;
}

.quant-heat {
  margin-top: 14px;
}

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

.pro-panel {
  margin-bottom: 14px;
  border-top: 4px solid #334155;
}

.pro-panel .head-icon {
  background: #334155;
}

.pro-hero,
.pro-stage-grid,
.pro-columns {
  display: grid;
  gap: 14px;
}

.pro-hero {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.5fr);
  margin-bottom: 12px;
}

.pro-hero section,
.pro-stage,
.pro-box {
  min-width: 0;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.pro-hero section,
.pro-box,
.pro-stage {
  padding: 14px;
}

.pro-hero span,
.pro-hero em,
.pro-stage span,
.pro-stage p,
.pro-list p,
.pro-box p {
  color: #657184;
}

.pro-hero strong {
  display: block;
  margin-top: 6px;
  color: #172033;
  font-size: 29px;
  line-height: 1.08;
}

.pro-hero em {
  display: block;
  margin-top: 5px;
  font-style: normal;
  font-size: 12px;
}

.pro-stage-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.pro-stage {
  background: #fff;
}

.pro-stage b,
.pro-box b {
  display: block;
  color: #172033;
}

.pro-stage span {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
}

.pro-stage p,
.pro-list p,
.pro-box p {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pro-stage.done {
  border-color: #b9e4cf;
  background: #f7fff9;
}

.pro-stage.partial {
  border-color: #edc471;
  background: #fffaf0;
}

.pro-stage.missing {
  border-color: #e8a1a1;
  background: #fff6f6;
}

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

.pro-list {
  display: grid;
  gap: 8px;
}

.pro-list p {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fff;
}

.pro-list.warning p {
  border-color: #edc471;
  background: #fff8e7;
}

.pro-list.limited p {
  border-color: #d1d9e6;
  background: #f8fafc;
}

.pro-list.policy p {
  border-color: #b9e4cf;
  background: #f7fff9;
}

.paper-panel {
  margin-top: 14px;
  border-top: 4px solid #172033;
}

.swing-panel {
  border-top-color: #0f766e;
}

.swing-panel .head-icon {
  background: #0f766e;
}

.swing-panel .paper-curve path {
  stroke: #0f766e;
}

.swing-panel .paper-rule-row span,
.swing-panel .paper-memory-stats span {
  background: #ecfdf5;
  color: #115e59;
}

.paper-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

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

.paper-summary-grid section,
.paper-box {
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.paper-summary-grid section {
  min-width: 0;
  padding: 14px;
  background: #fff;
}

.paper-summary-grid span,
.paper-summary-grid em,
.paper-row span,
.paper-row p,
.paper-trade span,
.paper-trade p,
.paper-action span,
.paper-action p,
.paper-disclaimer {
  color: #657184;
}

.paper-summary-grid strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 25px;
  line-height: 1.08;
}

.paper-summary-grid section:first-child strong {
  font-size: 31px;
}

.paper-summary-grid em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-weight: 800;
}

.paper-curve-wrap {
  display: grid;
  align-items: stretch;
  min-height: 118px;
  padding: 10px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fff;
}

.paper-curve {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 118px;
}

.paper-curve rect {
  fill: #fff;
}

.paper-curve path {
  fill: none;
  stroke: #d64545;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.paper-curve text {
  fill: #7a8596;
  font-size: 13px;
}

.paper-rule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.paper-rule-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #39465b;
  background: #f1f5f9;
  font-size: 12px;
}

.paper-guardrails {
  margin-bottom: 14px;
}

.guardrail-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.guardrail-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #334155;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 800;
}

.guardrail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.8fr) minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
}

.guardrail-columns h4 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 14px;
}

.guardrail-columns p {
  margin: 0 0 8px;
  color: #657184;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.correction-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: baseline;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}

.correction-summary span {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.correction-summary b {
  color: #0f172a;
  font-size: 18px;
}

.correction-summary em,
.correction-action em {
  color: #8a5a14;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.correction-action span {
  display: block;
  margin-top: 2px;
  color: #475569;
  font-size: 12px;
}

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

.paper-box {
  min-width: 0;
  padding: 14px;
}

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

.paper-box-head h3 {
  font-size: 17px;
}

.paper-box-head span {
  flex: 0 0 auto;
  color: #657184;
  font-size: 13px;
}

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

.paper-list.compact {
  gap: 8px;
}

.paper-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 0.9fr) minmax(90px, 0.7fr);
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fff;
}

.paper-row div {
  min-width: 0;
}

.paper-row b,
.paper-row strong,
.paper-row span,
.paper-row p,
.paper-trade b,
.paper-trade span,
.paper-trade strong,
.paper-trade p,
.paper-action b,
.paper-action span,
.paper-action p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.paper-row b,
.paper-row strong {
  display: block;
  color: #172033;
  font-size: 15px;
}

.paper-row span,
.paper-row p {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.paper-row em,
.paper-action em {
  font-style: normal;
  font-weight: 800;
}

.paper-row p {
  grid-column: 1 / -1;
  margin-top: 0;
}

.paper-trade,
.paper-action {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fff;
}

.paper-trade.buy {
  border-color: #f0c6c6;
  background: #fff8f8;
}

.paper-trade.sell {
  border-color: #bfe5ce;
  background: #f7fff9;
}

.paper-trade b,
.paper-action b {
  display: block;
  color: #172033;
}

.paper-trade span,
.paper-trade strong,
.paper-trade em,
.paper-trade p,
.paper-action span,
.paper-action p {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.paper-trade strong {
  color: #172033;
  font-size: 14px;
}

.paper-trade em {
  font-style: normal;
  font-weight: 800;
}

.paper-history {
  margin-top: 14px;
}

.paper-strategy-explain {
  margin-top: 14px;
}

.paper-section-lead {
  margin-bottom: 12px;
  color: #39465b;
  font-size: 13px;
  line-height: 1.5;
}

.paper-reason-grid,
.paper-plan-grid {
  display: grid;
  gap: 10px;
}

.paper-reason-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.paper-reason-card,
.paper-plan-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fff;
}

.paper-reason-card b,
.paper-plan-grid b {
  display: block;
  color: #172033;
}

.paper-reason-card span,
.paper-reason-card p,
.paper-reason-card em,
.paper-plan-grid p {
  display: block;
  margin-top: 5px;
  color: #657184;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.paper-reason-card em {
  color: #39465b;
  font-style: normal;
}

.paper-strategy-columns {
  align-items: stretch;
}

.paper-review-empty {
  min-height: 132px;
  border: 1px dashed #cfd7e3;
  border-radius: 8px;
  background: #fff;
}

.paper-next-strategy {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

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

.paper-memory-box {
  margin-top: 14px;
}

.paper-memory-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.paper-memory-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #39465b;
  background: #f1f5f9;
  font-size: 12px;
}

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

.paper-memory-columns h4 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 15px;
}

.paper-action.severity-high {
  border-color: #e8a1a1;
  background: #fff1f1;
}

.paper-action.severity-medium {
  border-color: #edc471;
  background: #fff8e7;
}

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

.paper-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.45;
}

.empty-state {
  padding: 20px;
  border: 1px dashed #cfd7e3;
  border-radius: 8px;
  background: #fbfcfe;
}

.skeleton {
  min-height: 112px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0) 60%),
    #e5ebf3;
  background-size: 220% 100%;
  animation: shimmer 1.2s infinite;
}

.learning-home {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #c9d3df;
  border-top: 6px solid #172033;
  border-radius: 12px;
  background:
    radial-gradient(circle at 92% 3%, rgba(214, 69, 69, 0.13), transparent 26%),
    linear-gradient(145deg, #ffffff 0%, #f6f8fb 62%, #eef3f7 100%);
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.09);
}

.learning-home::after {
  position: absolute;
  right: -52px;
  top: 112px;
  width: 150px;
  height: 150px;
  border: 18px solid rgba(23, 32, 51, 0.035);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.learning-home-head,
.learning-task,
.learning-comparison > header,
.learning-double-readiness > header,
.learning-account-card > header,
.learning-readiness-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.learning-home-head {
  margin-bottom: 18px;
}

.learning-home-head h2 {
  margin: 2px 0 7px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.learning-home-head > div:first-child > p:last-child {
  max-width: 720px;
  color: #536175;
  line-height: 1.55;
}

.learning-home-gate {
  min-width: 190px;
  padding: 13px 16px;
  border: 1px solid #e5a3a3;
  border-radius: 9px;
  background: #fff5f3;
}

.learning-home-gate span,
.learning-home-gate strong,
.learning-home-gate em {
  display: block;
}

.learning-home-gate span,
.learning-home-gate em {
  color: #855044;
  font-size: 12px;
}

.learning-home-gate strong {
  margin: 3px 0;
  color: #a93624;
  font-size: 24px;
}

.learning-home-gate em {
  font-style: normal;
}

.learning-message {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #9fd4ba;
  border-radius: 8px;
  color: #146c43;
  background: #f1fff7;
}

.learning-data-status {
  display: grid;
  grid-template-columns: 0.8fr 0.7fr 1.15fr 0.7fr 1.25fr;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #d7dfe9;
  border-radius: 9px;
  background: #d7dfe9;
  gap: 1px;
}

.learning-data-status > div {
  min-width: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.96);
}

.learning-data-status span,
.learning-data-status strong,
.learning-data-status b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.learning-data-status span {
  margin-bottom: 4px;
  color: #6b778a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.learning-data-status strong {
  color: #146c43;
  font-size: 18px;
}

.learning-data-status b {
  color: #243249;
  font-size: 13px;
  white-space: nowrap;
}

.learning-task {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  margin-bottom: 14px;
  padding: 22px;
  border-radius: 10px;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(214, 69, 69, 0.23), transparent 44%),
    #172033;
}

.learning-task::after {
  position: absolute;
  right: 28%;
  bottom: -68px;
  width: 150px;
  height: 150px;
  border: 24px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  content: "";
}

.learning-order-index {
  color: #f2c178;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1;
}

.learning-task > div:nth-child(2) {
  position: relative;
  z-index: 1;
  flex: 1;
}

.learning-task h3 {
  margin: 3px 0 8px;
  font-size: clamp(21px, 2.6vw, 30px);
}

.learning-task > div p:last-child {
  max-width: 720px;
  color: #cbd5e1;
  line-height: 1.5;
}

.learning-primary-action {
  position: relative;
  z-index: 1;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  color: #172033;
  background: #f2c178;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  font-weight: 900;
  cursor: pointer;
}

.learning-primary-action:hover {
  background: #ffd594;
}

.learning-primary-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.learning-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  margin-bottom: 14px;
}

.learning-status-card,
.learning-comparison,
.learning-double-readiness {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe2ec;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
}

.learning-status-card > span {
  color: #6a7688;
  font-size: 12px;
  font-weight: 800;
}

.learning-status-card > strong {
  display: block;
  margin: 5px 0 8px;
  color: #172033;
  font-size: 24px;
}

.learning-status-card > p,
.learning-empty,
.learning-review-row p {
  color: #657184;
  font-size: 13px;
  line-height: 1.5;
}

.learning-review-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #e7ebf1;
}

.learning-review-row b,
.learning-review-row span {
  display: block;
  overflow-wrap: anywhere;
}

.learning-review-row span {
  color: #8a4d1d;
  font-size: 11px;
}

.learning-comparison {
  margin-bottom: 14px;
}

.learning-comparison > header,
.learning-double-readiness > header {
  margin-bottom: 13px;
}

.learning-comparison h3,
.learning-double-readiness h3 {
  margin-top: 2px;
  font-size: 21px;
}

.learning-comparison > header > span,
.learning-double-readiness > header > strong {
  padding: 6px 9px;
  border-radius: 999px;
  color: #7a4f0a;
  background: #fff4d8;
  font-size: 12px;
}

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

.learning-account-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce3ec;
  border-top: 4px solid #172033;
  border-radius: 8px;
  background: #fbfcfe;
}

.learning-account-card[data-account-type="USER_TRAINING"] {
  border-top-color: #c87522;
}

.learning-account-card[data-account-type="BENCHMARK"] {
  border-top-color: #0f766e;
}

.learning-account-card header span,
.learning-account-card header b {
  color: #68758a;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.learning-account-card header h3 {
  margin-top: 2px;
  font-size: 18px;
}

.learning-account-card header b {
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf1f6;
}

.learning-account-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0 10px;
}

.learning-account-card dl div {
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: #f0f4f8;
}

.learning-account-card dt,
.learning-account-card dd {
  margin: 0;
}

.learning-account-card dt {
  color: #748095;
  font-size: 10px;
}

.learning-account-card dd {
  margin-top: 3px;
  color: #172033;
  font-size: 15px;
  font-weight: 800;
}

.learning-account-card > p {
  color: #6b7687;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.learning-double-readiness {
  margin-bottom: 14px;
}

.learning-double-readiness > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.learning-readiness-card {
  overflow: hidden;
  border: 1px solid #dbe2ec;
  border-left: 5px solid #8792a4;
  border-radius: 8px;
}

.learning-readiness-card.pass {
  border-left-color: #0f9f6e;
}

.learning-readiness-card.fail {
  border-left-color: #a93624;
}

.learning-readiness-card > header {
  padding: 12px;
  background: #f7f9fc;
}

.learning-readiness-card header span,
.learning-readiness-card header strong {
  display: block;
}

.learning-readiness-card header span,
.learning-readiness-card header b {
  color: #68758a;
  font-size: 11px;
}

.learning-readiness-card header strong {
  margin-top: 2px;
  font-size: 19px;
}

.learning-readiness-list p {
  display: grid;
  grid-template-columns: 100px 92px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 9px 12px;
  border-top: 1px solid #e7ebf1;
}

.learning-readiness-list b,
.learning-readiness-list span,
.learning-readiness-list em {
  font-size: 11px;
}

.learning-readiness-list span {
  padding: 3px 6px;
  border-radius: 999px;
  text-align: center;
  background: #edf1f6;
}

.learning-readiness-list span.pass {
  color: #146c43;
  background: #e7f8ef;
}

.learning-readiness-list span.fail {
  color: #9b2222;
  background: #fff0f0;
}

.learning-readiness-list em {
  color: #657184;
  font-style: normal;
  line-height: 1.4;
}

.learning-research-entry {
  padding: 11px 13px;
  border: 1px dashed #b9c3d0;
  border-radius: 8px;
  background: #f7f9fc;
}

.learning-research-entry summary {
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.learning-research-entry p,
.learning-disclaimer {
  margin-top: 8px;
  color: #657184;
  font-size: 12px;
  line-height: 1.5;
}

.research-workbench {
  margin-bottom: 14px;
  border: 1px solid #cfd7e3;
  border-radius: 10px;
  background: #fff;
}

.research-workbench > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  color: #172033;
  cursor: pointer;
}

.research-workbench > summary span {
  font-size: 17px;
  font-weight: 900;
}

.research-workbench > summary b {
  color: #68758a;
  font-size: 12px;
  font-weight: 600;
}

.research-workbench-content {
  padding: 0 14px 14px;
}

.learning-modal[hidden] {
  display: none !important;
}

.learning-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 19, 31, 0.72);
  backdrop-filter: blur(5px);
}

.learning-modal-card {
  width: min(760px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid #d4dbe5;
  border-top: 6px solid #c87522;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.learning-modal-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #e3e8ef;
}

.learning-modal-card > header h2 {
  margin-top: 2px;
}

.learning-modal-card > header button {
  padding: 6px 9px;
  border: 1px solid #d5dde8;
  border-radius: 6px;
  color: #425069;
  background: #f7f9fc;
  cursor: pointer;
}

.learning-form {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.learning-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.learning-form input,
.learning-form textarea,
.learning-form select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #172033;
  background: #fff;
}

.learning-form textarea {
  min-height: 76px;
  resize: vertical;
}

.learning-form input:focus,
.learning-form textarea:focus,
.learning-form select:focus {
  outline: 3px solid rgba(200, 117, 34, 0.18);
  border-color: #c87522;
}

.learning-market-proof,
.learning-disclosures {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #c6ded4;
  border-radius: 7px;
  color: #245b48;
  background: #f2fbf7;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.learning-disclosures.warning {
  border-color: #edc471;
  color: #7a4f0a;
  background: #fff8e7;
}

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

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

.learning-check-grid label,
.learning-confirm-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #dbe2ec;
  border-radius: 7px;
  background: #f8fafc;
}

.learning-check-grid input,
.learning-confirm-check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.learning-form-error {
  min-height: 18px;
  color: #a93624;
  font-size: 12px;
}

.learning-system-suggestion {
  padding: 10px 12px;
  border-left: 4px solid #2563eb;
  color: #294e86;
  background: #f1f6ff;
  font-size: 13px;
  line-height: 1.5;
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

@media (max-width: 1180px) {
  .learning-data-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learning-account-grid {
    grid-template-columns: 1fr;
  }

  .remediation-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .remediation-banner-meta {
    grid-column: 1 / -1;
    padding: 10px 0 0;
    border-top: 1px solid #e7c7b4;
    border-left: 0;
  }

  .metrics-grid,
  .board-grid,
  .candidate-grid,
  .tables-grid,
  .charts-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .paper-hero,
  .paper-columns,
  .wind-hero,
  .wind-columns,
  .quant-hero,
  .quant-columns,
  .quant-heat-grid,
  .pro-hero,
  .pro-columns,
  .guardrail-columns {
    grid-template-columns: 1fr;
  }

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

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

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

  .paper-reason-grid,
  .paper-plan-grid,
  .paper-follow-list,
  .paper-memory-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-kline-svg {
    min-height: 300px;
  }

  .subchart-svg {
    min-height: 190px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1540px);
    padding-top: 12px;
  }

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

  .learning-home {
    padding: 15px;
  }

  .learning-home-head,
  .learning-task,
  .learning-comparison > header,
  .learning-double-readiness > header,
  .research-workbench > summary {
    align-items: stretch;
    flex-direction: column;
  }

  .learning-home-gate {
    min-width: 0;
  }

  .learning-data-status,
  .learning-secondary-grid,
  .learning-double-readiness > div:last-child,
  .learning-form-grid,
  .learning-check-grid {
    grid-template-columns: 1fr;
  }

  .learning-task {
    min-height: 0;
  }

  .learning-order-index {
    font-size: 46px;
  }

  .learning-primary-action {
    width: 100%;
  }

  .learning-readiness-list p,
  .learning-review-row {
    grid-template-columns: 1fr;
  }

  .learning-modal {
    place-items: stretch;
    padding: 8px;
  }

  .learning-modal-card {
    max-height: calc(100vh - 16px);
  }

  .header-actions,
  .toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .history-strip {
    grid-template-columns: 1fr;
  }

  .data-quality-panel {
    grid-template-columns: 1fr;
  }

  .history-actions {
    justify-content: flex-start;
  }

  .history-actions button {
    flex: 1 1 112px;
    max-width: none;
  }

  .icon-button,
  .segmented {
    width: 100%;
  }

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

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

  .metric {
    min-height: auto;
  }

  .paper-summary-grid,
  .paper-row,
  .paper-trade-grid,
  .paper-reason-grid,
  .paper-plan-grid,
  .paper-follow-list,
  .paper-memory-columns,
  .pro-stage-grid,
  .pro-columns,
  .guardrail-columns,
  .wind-item,
  .quant-item {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: minmax(72px, 100px) 1fr 38px;
  }

  .strategy-flow {
    grid-template-columns: 1fr;
  }

  .kline-meta-strip,
  .chart-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .formula-legend span {
    max-width: 100%;
  }

  .main-kline-svg {
    min-height: 240px;
  }

  .subchart-svg {
    min-height: 170px;
  }
}

/* Keep the new shell dimensions authoritative after archived stylesheet rules. */
.app-shell {
  width: min(1460px, calc(100% - 40px));
  padding: 0 0 34px;
}

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

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 18px, 520px);
    padding-bottom: 12px;
  }
}

/* Public browser entry: read-only status must remain unmistakable on desktop and mobile. */
.product-header.public-read-only-mode {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  grid-template-areas: "brand readonly facts refresh";
  gap: 14px;
}

.product-header.public-read-only-mode .product-brand {
  grid-area: brand;
}

.product-header.public-read-only-mode .public-read-only-badge {
  grid-area: readonly;
}

.product-header.public-read-only-mode .product-header-facts {
  grid-area: facts;
}

.product-header.public-read-only-mode .product-refresh {
  grid-area: refresh;
}

.public-read-only-badge {
  display: inline-grid;
  gap: 1px;
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid #80a8ef;
  border-radius: 11px;
  color: #173f84;
  background: #eef4ff;
  white-space: nowrap;
}

.public-read-only-badge b {
  font-size: 13px;
}

.public-read-only-badge span {
  font-size: 10px;
}

.public-read-only-banner,
.learning-public-read-only {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid #80a8ef;
  border-left: 5px solid #315fbd;
  border-radius: 11px;
  color: #294e86;
  background: #eef4ff;
  font-size: 12px;
  line-height: 1.5;
}

.public-read-only-banner b,
.learning-public-read-only b {
  flex: 0 0 auto;
  color: #173f84;
  font-size: 13px;
}

.learning-public-read-only {
  margin: 0 0 14px;
}

[data-public-write-control]:disabled {
  pointer-events: none;
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .product-header.public-read-only-mode {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand refresh"
      "readonly readonly";
  }

  .product-header.public-read-only-mode .product-header-facts {
    display: none;
  }

  .public-read-only-badge {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 34px;
  }
}

@media (max-width: 560px) {
  .public-read-only-banner,
  .learning-public-read-only {
    display: grid;
    gap: 4px;
  }

  .public-read-only-badge {
    justify-content: center;
  }
}
