:root {
  --bg: #071014;
  --surface: #0d171d;
  --surface-2: #111d23;
  --surface-3: #14242b;
  --line: #263740;
  --line-soft: #1b2a31;
  --text: #f4f7f8;
  --muted: #9aadb6;
  --brand: #34d6a0;
  --blue: #46b7ff;
  --red: #ff6c6c;
  --amber: #efb64f;
  --header-h: 62px;
  --nav-h: 54px;
  font-family: Pretendard, "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { min-width: 320px; margin: 0; background: var(--bg); font-size: 14px; letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1500px, calc(100% - 40px)); margin: 0 auto; }

.app-header {
  position: sticky; z-index: 40; top: 0; height: var(--header-h);
  border-bottom: 1px solid var(--line); background: rgba(7,16,20,.97);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #2f6f5c;
  border-radius: 6px; background: #123b30; font-size: 12px; font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.header-status { display: flex; align-items: center; gap: 9px; }
.connection { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.connection i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(239,182,79,.1); }
.connection.ok i { background: var(--brand); box-shadow: 0 0 0 4px rgba(52,214,160,.1); }
.connection.error i { background: var(--red); box-shadow: 0 0 0 4px rgba(255,108,108,.1); }
.header-status time { color: var(--muted); font-size: 11px; }
.icon-button {
  width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-button:hover { border-color: var(--brand); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.spin svg { animation: spin .8s linear infinite; }

.primary-nav {
  position: sticky; z-index: 35; top: var(--header-h); height: var(--nav-h);
  border-bottom: 1px solid var(--line); background: #091318;
}
.nav-inner { height: 100%; display: flex; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-button {
  position: relative; min-width: max-content; display: flex; align-items: center; gap: 8px;
  padding: 0 18px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.nav-button::after { position: absolute; right: 18px; bottom: 0; left: 18px; height: 2px; background: var(--brand); content: ""; opacity: 0; }
.nav-button.active { color: var(--text); }
.nav-button.active::after { opacity: 1; }
.nav-button svg { width: 17px; height: 17px; }
.nav-button b { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: var(--surface-3); color: var(--brand); font-size: 10px; }

.strategy-filter { border-bottom: 1px solid var(--line-soft); background: #0a1419; }
.filter-inner { min-height: 48px; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filter-inner::-webkit-scrollbar { display: none; }
.filter-inner button {
  min-width: max-content; display: flex; align-items: center; gap: 7px; padding: 7px 11px;
  border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px;
}
.filter-inner button.active { border-color: #2c6454; background: #11352d; color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.dot.us { background: var(--blue); }

main { padding: 28px 0 64px; }
.view { display: none; }
.view.active { display: block; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-heading p { margin: 0 0 5px; color: var(--brand); font-size: 10px; font-weight: 900; }
.page-heading h1 { margin: 0; font-size: 26px; line-height: 1.25; }
.page-heading > span { color: var(--muted); font-size: 12px; }

.market-band {
  min-height: 92px; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr);
  overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
}
.market-cell { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-left: 1px solid var(--line); }
.market-cell:first-child { border-left: 0; }
.market-cell span { display: block; color: var(--muted); font-size: 10px; }
.market-cell b { display: block; margin-top: 5px; font-size: 18px; }
.market-cell strong { font-size: 15px; }
.market-date { justify-content: flex-start; }
.market-date svg { width: 21px; color: var(--brand); }

.panel { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.panel-heading { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 16px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.pill { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 800; }

.strategy-board { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); }
.strategy-board.filtered { grid-template-columns: minmax(0,1fr); }
.strategy-board.filtered .strategy-card { border-left: 0; }
.strategy-card { min-width: 0; padding: 17px; border-left: 1px solid var(--line); cursor: pointer; }
.strategy-card:first-child { border-left: 0; }
.strategy-card:hover { background: var(--surface-2); }
.strategy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 48px; }
.strategy-name span, .strategy-name strong, .strategy-name small { display: block; }
.strategy-name span { color: var(--brand); font-size: 9px; font-weight: 900; }
.strategy-name span.us { color: var(--blue); }
.strategy-name strong { margin-top: 5px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.strategy-name small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.state-badge { flex: none; padding: 4px 6px; border-radius: 4px; background: rgba(52,214,160,.1); color: var(--brand); font-size: 9px; font-weight: 900; }
.state-badge.warn { background: rgba(239,182,79,.1); color: var(--amber); }
.state-badge.error { background: rgba(255,108,108,.1); color: var(--red); }
.strategy-value { margin: 14px 0 12px; }
.strategy-value span { color: var(--muted); font-size: 10px; }
.strategy-value strong { display: block; margin-top: 4px; font-size: 21px; }
.strategy-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--line-soft); }
.strategy-metrics div { min-width: 0; padding: 11px 5px 0 0; }
.strategy-metrics span { display: block; color: var(--muted); font-size: 9px; }
.strategy-metrics b { display: block; margin-top: 4px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.strategy-reason { min-height: 34px; margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.health-list, .attention-list { padding: 4px 17px; }
.health-row, .attention-row { min-height: 58px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line-soft); }
.health-row:last-child, .attention-row:last-child { border-bottom: 0; }
.row-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(52,214,160,.1); color: var(--brand); }
.row-icon.warn { background: rgba(239,182,79,.1); color: var(--amber); }
.row-icon.error { background: rgba(255,108,108,.1); color: var(--red); }
.row-icon svg { width: 14px; height: 14px; }
.row-copy b, .row-copy small { display: block; }
.row-copy b { font-size: 13px; }
.row-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.row-value { font-size: 11px; font-weight: 900; }

.detail-panel { min-height: 420px; }
.history-toolbar {
  min-height: 58px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
}
.history-toolbar[hidden] { display: none; }
.history-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.history-toolbar label svg { width: 16px; height: 16px; }
.history-toolbar input {
  height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--surface-2); color: var(--text); color-scheme: dark;
}
.history-icon-button, .history-today-button {
  height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 5px;
  background: var(--surface-2); color: var(--text); cursor: pointer;
}
.history-icon-button { width: 36px; }
.history-icon-button svg { width: 16px; height: 16px; }
.history-today-button { padding: 0 13px; font-weight: 800; }
.history-state { margin-left: auto; color: var(--muted); font-size: 11px; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 960px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; white-space: nowrap; }
.data-table th { color: var(--muted); font-size: 10px; font-weight: 800; }
.data-table td { font-size: 12px; }
.data-table td b, .data-table td small { display: block; }
.data-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.trade-account-summary { border-bottom: 1px solid var(--line); }
.trade-account-summary-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-soft); }
.trade-account-summary-head span { color: var(--accent); font-size: 9px; font-weight: 900; }
.trade-account-summary-head h3 { margin: 3px 0 0; font-size: 16px; }
.trade-account-summary-head small { max-width: 520px; color: var(--muted); font-size: 10px; text-align: right; }
.trade-account-summary .data-table { min-width: 1120px; }
.trade-account-summary + .data-table-wrap { margin-top: 18px; border-top: 1px solid var(--line); }
.trade-kpis { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.trade-kpi { min-height: 102px; padding: 16px; border-left: 1px solid var(--line-soft); }
.trade-kpi:first-child { border-left: 0; }
.trade-kpi span, .trade-kpi b, .trade-kpi small { display: block; }
.trade-kpi span { color: var(--muted); font-size: 10px; }
.trade-kpi b { margin-top: 8px; font-size: 18px; }
.trade-kpi small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.trade-ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 11px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); }
.trade-ledger-head h3 { margin: 0; font-size: 15px; }
.trade-ledger-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.trade-ledger-head span { color: var(--brand); font-size: 10px; font-weight: 900; }
.strategy-tag { display: inline-flex; padding: 4px 7px; border: 1px solid #315047; border-radius: 4px; color: var(--brand); font-size: 9px; font-weight: 900; }
.strategy-tag.us { border-color: #28536a; color: var(--blue); }
.empty-state { min-height: 160px; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }
.skeleton { min-height: 88px; background: linear-gradient(90deg,var(--surface),var(--surface-2),var(--surface)); background-size: 220% 100%; animation: shimmer 1.4s infinite; }

.dashboard-menu { width: min(500px,calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 25px 80px rgba(0,0,0,.45); }
.dashboard-menu::backdrop { background: rgba(1,7,10,.76); }
.dashboard-menu header { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--line); }
.dashboard-menu header span { color: var(--brand); font-size: 10px; font-weight: 900; }
.dashboard-menu h2 { margin: 4px 0 0; font-size: 18px; }
.menu-list { display: grid; gap: 8px; padding: 12px; }
.menu-list a { min-height: 64px; display: grid; grid-template-columns: minmax(0,1fr) 20px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: inherit; text-decoration: none; }
.menu-list a:hover, .menu-list a.current { border-color: var(--brand); }
.menu-list b, .menu-list small { display: block; }
.menu-list small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.menu-list svg { width: 16px; color: var(--brand); }
.toast { position: fixed; z-index: 80; right: 18px; bottom: 18px; max-width: calc(100vw - 36px); padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; background: #14232a; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.tone-up { color: var(--red) !important; }
.tone-down { color: var(--blue) !important; }
.tone-ok { color: var(--brand) !important; }
.tone-warn { color: var(--amber) !important; }
.tone-error { color: var(--red) !important; }

/* V3 readability pass: operational text must remain legible at a glance. */
body { font-size: 15px; }
.brand strong { font-size: 17px; }
.brand small, .header-status time { font-size: 12px; }
.connection, .nav-button, .filter-inner button { font-size: 13px; }
.nav-button b, .pill { font-size: 11px; }
.page-heading p, .market-cell span, .strategy-value span, .panel-heading p { font-size: 12px; }
.page-heading > span, .history-toolbar label, .history-state { font-size: 13px; }
.panel-heading h2 { font-size: 17px; }
.strategy-name span, .state-badge, .strategy-metrics span, .strategy-now span,
.decision-guide-copy span, .section-copy span, .strategy-explain-grid header small,
.strategy-explain-grid dt, .strategy-tag, .trade-account-summary-head span,
.trade-kpi small, .data-table td small { font-size: 11px; }
.strategy-name strong { font-size: 16px; }
.strategy-name small, .strategy-reason, .strategy-now p, .strategy-guide span,
.decision-guide-copy p, .section-copy p, .decision-steps small,
.strategy-explain-grid dd, .row-copy small, .trade-ledger-head p { font-size: 12px; }
.strategy-metrics b, .row-value, .data-table td { font-size: 14px; }
.row-copy b, .decision-steps b { font-size: 14px; }
.data-table th, .trade-kpi span { font-size: 12px; }
.trade-kpi b { font-size: 19px; }

[hidden] { display: none !important; }
.decision-guide { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 18px; margin-top: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.decision-guide-copy span, .section-copy span { color: var(--brand); font-size: 9px; font-weight: 900; }
.decision-guide-copy h2, .section-copy h3 { margin: 5px 0 0; font-size: 17px; }
.decision-guide-copy p, .section-copy p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.decision-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.decision-steps li { display: flex; gap: 9px; align-items: center; min-width: 0; padding: 10px; border: 1px solid var(--line-soft); background: var(--surface-2); }
.decision-steps svg { flex: none; width: 17px; color: var(--brand); }
.decision-steps b, .decision-steps small { display: block; }
.decision-steps b { font-size: 11px; }
.decision-steps small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.strategy-now { min-height: 52px; margin-top: 12px; padding: 9px 10px; border-left: 2px solid var(--brand); background: rgba(52,214,160,.035); }
.strategy-now span { color: var(--brand); font-size: 9px; font-weight: 900; }
.strategy-now p { margin: 4px 0 0; color: var(--text); font-size: 10px; line-height: 1.45; }
.strategy-guide { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.strategy-guide span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.strategy-guide b { display: inline-block; min-width: 43px; color: var(--text); }
.strategy-explain-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); background: rgba(4,13,17,.34); }
.strategy-explain-grid article { padding: 12px; border: 1px solid var(--line-soft); background: var(--surface-2); }
.strategy-explain-grid header { display: flex; gap: 9px; align-items: center; }
.strategy-explain-grid header b, .strategy-explain-grid header small { display: block; }
.strategy-explain-grid header small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.strategy-explain-grid dl { display: grid; gap: 6px; margin: 11px 0 0; }
.strategy-explain-grid dl div { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 8px; }
.strategy-explain-grid dt { color: var(--brand); font-size: 9px; font-weight: 800; }
.strategy-explain-grid dd { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.system-overview { padding: 17px; border-bottom: 1px solid var(--line); }
.system-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.system-card-grid article { min-height: 94px; padding: 12px; border: 1px solid var(--line-soft); border-top: 3px solid var(--brand); background: var(--surface-2); }
.system-card-grid article[data-level="warn"] { border-top-color: var(--amber); }
.system-card-grid article[data-level="error"] { border-top-color: var(--red); }
.system-card-grid span, .system-card-grid b, .system-card-grid small { display: block; }
.system-card-grid span { color: var(--muted); font-size: 9px; }
.system-card-grid b { margin-top: 7px; font-size: 17px; }
.system-card-grid small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.roadmap-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--line); }
.roadmap-summary-grid article { min-height: 96px; padding: 16px; border-left: 1px solid var(--line-soft); }
.roadmap-summary-grid article:first-child { border-left: 0; }
.roadmap-summary-grid span, .roadmap-summary-grid b, .roadmap-summary-grid small { display: block; }
.roadmap-summary-grid span { color: var(--muted); font-size: 9px; }
.roadmap-summary-grid b { margin-top: 7px; font-size: 19px; }
.roadmap-summary-grid small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.roadmap-list-v3 { display: grid; gap: 10px; padding: 12px; }
.roadmap-list-v3 > section { overflow: hidden; border: 1px solid var(--line-soft); background: var(--surface-2); }
.roadmap-list-v3 > section > header { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 13px; border-bottom: 1px solid var(--line-soft); }
.roadmap-list-v3 > section > header > span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); font-size: 10px; font-weight: 900; }
.roadmap-list-v3 h3 { margin: 0; font-size: 13px; }
.roadmap-list-v3 header p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.roadmap-list-v3 [data-status] { color: var(--amber); font-size: 9px; }
.roadmap-list-v3 [data-status="completed"] { color: var(--brand); }
.roadmap-list-v3 [data-status="in_progress"], .roadmap-list-v3 [data-status="tracking"] { color: var(--blue); }
.roadmap-list-v3 section article { display: grid; grid-template-columns: 70px minmax(0,1fr) 70px; gap: 12px; align-items: start; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.roadmap-list-v3 section article:last-child { border-bottom: 0; }
.roadmap-list-v3 article b { font-size: 11px; }
.roadmap-list-v3 article p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.roadmap-list-v3 article > small { color: var(--muted); font-size: 9px; text-align: right; }
.patch-list-v3 { display: grid; gap: 10px; padding: 12px; }
.patch-list-v3 > article { padding: 16px; border: 1px solid var(--line-soft); background: var(--surface-2); }
.patch-list-v3 > article.latest { border-color: #2d6a59; }
.patch-list-v3 > article > header { display: flex; justify-content: space-between; align-items: center; }
.patch-list-v3 time { color: var(--brand); font-size: 10px; font-weight: 800; }
.patch-list-v3 header span { color: var(--muted); font-size: 9px; }
.patch-list-v3 h3 { margin: 8px 0 0; font-size: 15px; }
.patch-list-v3 > article > p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.patch-list-v3 section { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.patch-list-v3 h4 { margin: 0; font-size: 11px; }
.patch-list-v3 ul { display: grid; gap: 5px; margin: 7px 0 0; padding-left: 17px; }
.patch-list-v3 li { color: var(--muted); font-size: 9px; line-height: 1.5; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -220% 0; } }

@media (max-width: 1180px) {
  .strategy-board { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .strategy-card:nth-child(4) { border-top: 1px solid var(--line); border-left: 0; }
  .strategy-card:nth-child(5) { border-top: 1px solid var(--line); }
  .decision-guide { grid-template-columns: 1fr; }
  .system-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .shell { width: min(100% - 24px,1500px); }
  .strategy-board { grid-template-columns: 1fr 1fr; }
  .strategy-card { border-top: 1px solid var(--line); }
  .strategy-card:nth-child(odd) { border-left: 0; }
  .strategy-card:first-child, .strategy-card:nth-child(2) { border-top: 0; }
  .strategy-card:nth-child(4) { border-left: 1px solid var(--line); }
  .two-column { grid-template-columns: 1fr; }
  .market-band { grid-template-columns: 1fr 1fr; }
  .market-cell:first-child { grid-column: 1/-1; border-bottom: 1px solid var(--line); }
  .market-cell:nth-child(2) { border-left: 0; }
  .trade-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .trade-kpi:nth-child(5) { border-top: 1px solid var(--line-soft); border-left: 0; }
  .trade-kpi:nth-child(n+6) { border-top: 1px solid var(--line-soft); }
  .decision-steps { grid-template-columns: 1fr 1fr; }
  .roadmap-summary-grid { grid-template-columns: 1fr 1fr; }
  .roadmap-summary-grid article:nth-child(3) { border-top: 1px solid var(--line-soft); border-left: 0; }
  .roadmap-summary-grid article:nth-child(4) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 600px) {
  .trade-account-summary-head { align-items: flex-start; flex-direction: column; }
  .trade-account-summary-head small { text-align: left; }
  :root { --header-h: 58px; --nav-h: 50px; }
  body { font-size: 13px; }
  .shell { width: 100%; }
  .header-inner { padding: 0 12px; }
  .brand small, .header-status time, .connection b { display: none; }
  .brand strong { font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; }
  .nav-button { padding: 0 13px; }
  .nav-button::after { right: 13px; left: 13px; }
  .filter-inner { padding: 0 12px; }
  main { padding: 20px 10px 46px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 22px; }
  .page-heading > span { display: none; }
  .market-band { grid-template-columns: 1fr 1fr; }
  .market-cell { min-height: 74px; padding: 13px; }
  .market-cell b { font-size: 16px; }
  .strategy-board { grid-template-columns: 1fr; }
  .strategy-card, .strategy-card:nth-child(2), .strategy-card:nth-child(4), .strategy-card:nth-child(5) { border-top: 1px solid var(--line); border-left: 0; }
  .strategy-card:first-child { border-top: 0; }
  .strategy-head { min-height: 42px; }
  .strategy-value { margin: 10px 0; }
  .strategy-value strong { font-size: 19px; }
  .panel-heading { min-height: 62px; padding: 13px; }
  .health-list, .attention-list { padding: 3px 13px; }
  .data-table { min-width: 760px; }
  .data-table th, .data-table td { padding: 10px; }
  .history-toolbar { flex-wrap: wrap; }
  .history-toolbar label { width: 100%; }
  .history-toolbar input { flex: 1; min-width: 0; }
  .history-state { margin-left: 0; }
  .trade-kpis { grid-template-columns: 1fr 1fr; }
  .trade-kpi, .trade-kpi:nth-child(5), .trade-kpi:nth-child(n+6) { min-height: 88px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
  .trade-kpi:nth-child(odd) { border-left: 0; }
  .trade-kpi:first-child, .trade-kpi:nth-child(2) { border-top: 0; }
  .trade-kpi b { font-size: 16px; }
  .decision-guide { padding: 13px; }
  .decision-steps { grid-template-columns: 1fr; }
  .system-card-grid { grid-template-columns: 1fr 1fr; }
  .roadmap-list-v3 section article { grid-template-columns: 62px minmax(0,1fr); }
  .roadmap-list-v3 article > small { display: none; }
}

/* Keep the readability rules last so later component declarations cannot shrink them. */
.decision-guide-copy span, .section-copy span, .strategy-now span,
.strategy-explain-grid header small, .strategy-explain-grid dt,
.system-card-grid span, .roadmap-summary-grid span, .patch-list-v3 header span {
  font-size: 11px;
}
.decision-guide-copy p, .section-copy p, .decision-steps small,
.strategy-now p, .strategy-guide span, .strategy-explain-grid dd,
.system-card-grid small, .roadmap-summary-grid small,
.roadmap-list-v3 header p, .roadmap-list-v3 [data-status],
.roadmap-list-v3 article p, .roadmap-list-v3 article > small,
.patch-list-v3 > article > p, .patch-list-v3 li {
  font-size: 12px;
}
.decision-steps b, .roadmap-list-v3 article b, .patch-list-v3 h4 {
  font-size: 14px;
}
.roadmap-list-v3 h3 { font-size: 16px; }
.patch-list-v3 time { font-size: 12px; }
.patch-list-v3 h3 { font-size: 17px; }

@media (max-width: 600px) {
  body { font-size: 14px; }
  .brand strong { font-size: 15px; }
  .nav-button, .filter-inner button { font-size: 13px; }
  .decision-guide-copy p, .section-copy p, .decision-steps small,
  .strategy-now p, .strategy-guide span, .strategy-explain-grid dd,
  .system-card-grid small, .roadmap-summary-grid small,
  .roadmap-list-v3 header p, .roadmap-list-v3 article p,
  .patch-list-v3 > article > p, .patch-list-v3 li {
    font-size: 12px;
  }
}
