:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  background: #f4f6f8;
  color: #18212f;
}

* {
  box-sizing: border-box;
}

body {
  background:
    linear-gradient(180deg, #eef3f6 0, #f7f8fa 280px),
    #f7f8fa;
  margin: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #d8e0e8;
  display: flex;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
a {
  color: #125475;
  font-weight: 750;
  text-decoration: none;
}

.brand {
  color: #17212f;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  color: #516070;
  font-size: 15px;
}

.nav-form {
  margin: 0;
}

.nav-form button {
  background: transparent;
  border: 0;
  color: #516070;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  padding: 0;
}

.account-pill {
  background: #eef6fb;
  border: 1px solid #c8dbe8;
  border-radius: 999px;
  color: #415b70;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px 20px 72px;
}

.risk-footer {
  background: #17212f;
  border-top: 4px solid #d9a441;
  color: #ffffff;
  margin-top: 20px;
  padding: 22px max(20px, calc((100vw - 1180px) / 2 + 20px));
}

.risk-footer strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.risk-footer p {
  color: #d8e0e8;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.page-head,
.detail-head {
  align-items: end;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto;
  margin-bottom: 22px;
}

.page-title p,
.detail-title p {
  color: #516070;
  font-size: 19px;
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.eyebrow {
  color: #647282;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1 {
  color: #111a26;
  font-size: 50px;
  line-height: 1.04;
  margin: 0 0 14px;
}

h2 {
  color: #17212f;
  font-size: 21px;
  line-height: 1.25;
  margin: 0;
}

.page-meta {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  min-width: 190px;
  padding: 16px 18px;
}

.page-meta span,
.summary-label,
small {
  color: #647282;
  display: block;
  font-size: 14px;
}

.page-meta strong {
  color: #17212f;
  display: block;
  font-size: 18px;
  margin-top: 6px;
}

.summary-band {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.summary-card {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  min-height: 132px;
  padding: 18px;
}

.summary-card.primary {
  border-top: 4px solid #125475;
}

.summary-card.danger {
  border-top: 4px solid #b42318;
}

.summary-card strong {
  color: #111a26;
  display: block;
  font-size: 36px;
  line-height: 1;
  margin: 14px 0 8px;
}

.lookup-panel {
  align-items: end;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1.5fr;
  margin-bottom: 16px;
  padding: 20px;
}

.lookup-panel p {
  color: #516070;
  line-height: 1.6;
  margin: 8px 0 0;
}

.lookup-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 130px 1fr 120px;
}

.lookup-form label {
  display: grid;
  gap: 7px;
}

.lookup-form label span {
  color: #647282;
  font-size: 14px;
  font-weight: 800;
}

.lookup-form input,
.lookup-form select {
  background: #f8fafb;
  border: 1px solid #c9d5df;
  border-radius: 6px;
  color: #17212f;
  font: inherit;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.lookup-form button {
  background: #125475;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  min-height: 42px;
  padding: 0 14px;
}

.lookup-form button:hover {
  background: #0d405d;
}

.watchlist-manager {
  margin-bottom: 16px;
}

.watchlist-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 18px 20px 0;
}

.watchlist-card {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: grid;
  overflow: hidden;
  position: relative;
}

.watchlist-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  gap: 12px;
  min-height: 74px;
  padding: 12px 44px 12px 12px;
}

.watchlist-toggle input[type="checkbox"] {
  accent-color: #125475;
  height: 20px;
  width: 20px;
}

.watchlist-toggle strong {
  color: #17212f;
  display: block;
}

.watchlist-remove {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #8290a0;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 30px;
}

.watchlist-remove:hover {
  background: #fff1f0;
  border-color: #ffd6d1;
  color: #b42318;
}

.watchlist-remove:focus-visible {
  outline: 3px solid rgba(18, 84, 117, 0.22);
  outline-offset: 2px;
}

.watch-action-panel {
  margin: 14px 0;
}

.watch-action-panel span,
.watch-action-panel button {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  min-height: 38px;
  padding: 0 12px;
}

.watch-action-panel span {
  background: #ecfdf3;
  color: #14723d;
}

.watch-action-panel button {
  background: #125475;
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.watchlist-save {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px 20px;
}

.watchlist-save button {
  background: #125475;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  min-height: 40px;
  padding: 0 16px;
}

.auth-shell {
  align-items: start;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 420px;
  margin-top: 36px;
}

.auth-copy p {
  color: #516070;
  font-size: 19px;
  line-height: 1.65;
  margin: 0;
  max-width: 620px;
}

.auth-card {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.auth-card label {
  display: grid;
  gap: 8px;
}

.auth-card label span {
  color: #647282;
  font-size: 14px;
  font-weight: 800;
}

.auth-card input,
.admin-user-form select {
  background: #f8fafb;
  border: 1px solid #c9d5df;
  border-radius: 6px;
  color: #17212f;
  font: inherit;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.auth-card button,
.admin-user-form button {
  background: #125475;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  min-height: 42px;
  padding: 0 14px;
}

.auth-switch {
  color: #516070;
  margin: 0;
}

.form-alert {
  background: #fff4ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  color: #9a3412;
  font-size: 15px;
  padding: 12px;
}

.admin-user-form {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 100px 110px 130px 100px 140px 100px 80px;
}

.inline-check {
  align-items: center;
  color: #516070;
  display: inline-flex;
  font-size: 14px;
  gap: 6px;
}

.inline-check input {
  accent-color: #125475;
}

.rule-list {
  display: grid;
  gap: 14px;
}

.rule-list div {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 14px 16px;
}

.weekly-hero {
  align-items: start;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1.1fr;
  margin-bottom: 18px;
  padding: 22px;
}

.weekly-hero p {
  color: #516070;
  line-height: 1.7;
  margin: 10px 0 0;
}

.weekly-hero ol {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  margin: 0;
  padding: 18px 18px 18px 38px;
}

.weekly-hero li {
  color: #344054;
  line-height: 1.65;
}

.weekly-hero li + li {
  margin-top: 8px;
}

.weekly-scoreboard {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px;
}

.weekly-scoreboard div {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  min-height: 118px;
  padding: 18px;
}

.weekly-scoreboard strong {
  color: #111a26;
  display: block;
  font-size: 36px;
  line-height: 1;
  margin: 12px 0 8px;
}

.weekly-run-panel {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 20px;
}

.weekly-run-panel h2 {
  margin-bottom: 8px;
}

.weekly-run-panel p {
  color: #516070;
  line-height: 1.65;
  margin: 0;
}

.weekly-run-panel form {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  margin: 0;
}

.weekly-run-panel button {
  background: #125475;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  min-height: 42px;
  padding: 0 16px;
}

.weekly-run-panel .secondary-button {
  background: #edf4f7;
  color: #125475;
}

.weekly-board,
.weekly-topic-board,
.weekly-rules-compact,
.weekly-history {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  margin-bottom: 18px;
  overflow: hidden;
}

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

.topic-grid article {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-left: 4px solid #125475;
  border-radius: 8px;
  padding: 14px;
}

.topic-grid span {
  color: #125475;
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.topic-grid strong {
  color: #17212f;
  display: block;
  font-size: 20px;
  margin: 6px 0;
}

.topic-grid p {
  color: #516070;
  line-height: 1.55;
  margin: 0;
}

.topic-recommendations {
  border-top: 1px solid #d8e0e8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
}

.topic-recommendations b {
  color: #516070;
  flex-basis: 100%;
  font-size: 12px;
}

.topic-recommendations em {
  background: #ffffff;
  border: 1px solid #c9d5df;
  border-radius: 999px;
  color: #17212f;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 9px;
}

.weekly-candidate-list {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.candidate-card {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.candidate-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.candidate-head h3 {
  color: #111a26;
  font-size: 24px;
  margin: 6px 0 6px;
}

.candidate-head p {
  color: #516070;
  margin: 0;
}

.candidate-head > strong {
  align-items: center;
  background: #125475;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 34px;
  justify-content: center;
  min-height: 64px;
  min-width: 74px;
  padding: 0 12px;
}

.rank {
  color: #125475;
  font-size: 13px;
  font-weight: 900;
}

.candidate-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
}

.candidate-metrics div {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 12px;
}

.candidate-metrics span {
  color: #647282;
  display: block;
  font-size: 13px;
  font-weight: 850;
}

.candidate-metrics strong {
  color: #17212f;
  display: block;
  font-size: 18px;
  margin-top: 6px;
}

.candidate-metrics small,
.candidate-data-note {
  color: #647282;
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.candidate-data-note {
  background: #eef6fb;
  border: 1px solid #cfe1ec;
  border-radius: 8px;
  margin: 0;
  padding: 10px 12px;
}

.filter-status {
  display: grid;
  gap: 8px;
}

.filter-status h4,
.entry-plan h4 {
  color: #17212f;
  font-size: 16px;
  margin: 0;
}

.filter-row {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left-width: 4px;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 80px 90px 1fr;
  padding: 11px 12px;
}

.filter-row span,
.filter-row strong {
  font-size: 14px;
  font-weight: 850;
}

.filter-row p {
  color: #516070;
  line-height: 1.55;
  margin: 0;
}

.status-pass {
  border-left-color: #14723d;
}

.status-partial {
  border-left-color: #d9a441;
}

.status-pending {
  border-left-color: #647282;
}

.status-fail {
  border-left-color: #b42318;
}

.capital-flow-evidence {
  background: #f2f7f5;
  border: 1px solid #bfd8cc;
  border-left-width: 4px;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.capital-flow-head {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.capital-flow-head span {
  color: #14723d;
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}

.capital-flow-head h4 {
  color: #17212f;
  font-size: 16px;
  margin: 0;
}

.capital-flow-head small {
  color: #516070;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.capital-flow-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, 1fr);
}

.capital-flow-item {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left-width: 4px;
  border-radius: 8px;
  min-width: 0;
  padding: 10px;
}

.capital-flow-item strong {
  color: #17212f;
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.capital-flow-item p {
  color: #516070;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.entry-plan {
  background: #fffaf0;
  border: 1px solid #e6c66a;
  border-radius: 8px;
  padding: 14px;
}

.entry-plan > span {
  color: #9a6a00;
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}

.entry-plan p {
  color: #344054;
  line-height: 1.65;
  margin: 8px 0;
}

.entry-plan small {
  color: #8a5a00;
}

.advanced-quant {
  background: #f4f7fb;
  border: 1px solid #cdd8e5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.advanced-quant-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.advanced-quant-head span,
.market-defense > span {
  color: #125475;
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.advanced-quant-head h4 {
  color: #17212f;
  font-size: 18px;
  margin: 3px 0 0;
}

.advanced-quant-head > strong {
  background: #17212f;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  padding: 7px 11px;
  white-space: nowrap;
}

.advanced-quant > p,
.market-defense small,
.quant-reading p,
.attack-filter p {
  color: #516070;
  line-height: 1.55;
  margin: 0;
}

.market-defense {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.quant-reading-grid,
.attack-filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.quant-reading,
.attack-filter {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left-width: 4px;
  border-radius: 8px;
  padding: 11px;
}

.quant-reading strong,
.attack-filter span {
  color: #17212f;
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.quant-reading em,
.attack-filter strong {
  color: #125475;
  display: block;
  font-style: normal;
  font-size: 13px;
  font-weight: 850;
  margin: 5px 0;
}

.topic-evidence {
  background: #eef7fb;
  border: 1px solid #c7dbe5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.topic-evidence > span {
  color: #125475;
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.topic-evidence a {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  display: block;
  padding: 10px 12px;
}

.topic-evidence strong {
  color: #125475;
  display: block;
  font-size: 13px;
}

.topic-evidence p {
  color: #17212f;
  font-weight: 800;
  line-height: 1.5;
  margin: 4px 0;
}

.topic-evidence small {
  color: #647282;
}

.compact-rule-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px;
}

.compact-rule-grid article {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 14px;
}

.compact-rule-grid strong,
.compact-rule-grid span {
  display: block;
}

.compact-rule-grid strong {
  color: #17212f;
  font-size: 16px;
}

.compact-rule-grid p {
  color: #516070;
  line-height: 1.6;
  margin: 8px 0;
}

.compact-rule-grid span {
  color: #125475;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  margin-top: 8px;
}

.advanced-rule-band {
  border-top: 1px solid #d8e0e8;
  padding-top: 18px;
}

.advanced-rule-band > div:first-child {
  padding: 0 20px;
}

.advanced-rule-band h3 {
  color: #17212f;
  font-size: 20px;
  margin: 3px 0 0;
}

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

.funnel-card,
.script-panel {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
}

.funnel-card {
  padding: 20px;
}

.funnel-card h2 {
  margin-bottom: 10px;
}

.funnel-card > p:not(.eyebrow) {
  color: #516070;
  line-height: 1.7;
  margin: 0 0 14px;
}

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

.criterion-list div {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 14px;
}

.criterion-list strong,
.criterion-list span {
  display: block;
}

.criterion-list strong {
  color: #17212f;
  font-size: 16px;
}

.criterion-list span {
  color: #125475;
  font-weight: 850;
  margin: 6px 0;
}

.criterion-list p {
  color: #516070;
  line-height: 1.65;
  margin: 0;
}

.script-panel {
  overflow: hidden;
}

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

.script-grid article {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 18px;
}

.script-grid article > span {
  color: #125475;
  display: block;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 8px;
}

.script-grid h3 {
  color: #17212f;
  font-size: 20px;
  margin: 0 0 10px;
}

.script-grid p {
  color: #344054;
  line-height: 1.7;
  margin: 0 0 14px;
}

.script-grid dl {
  gap: 10px;
}

.rule-list h3 {
  color: #17212f;
  font-size: 16px;
  margin: 0 0 8px;
}

.rule-list p {
  margin: 0;
}

.ma-reference {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 14px 16px;
}

.ma-reference h3 {
  color: #17212f;
  font-size: 16px;
  margin: 0 0 8px;
}

.ma-reference p {
  margin: 0 0 6px;
}

.ma-reference small {
  color: #647282;
}

.pipeline-strip {
  background: #17212f;
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 22px;
  overflow: hidden;
}

.pipeline-strip div {
  background: #1d2938;
  min-height: 92px;
  padding: 18px;
}

.pipeline-strip strong,
.pipeline-strip small {
  display: block;
}

.pipeline-strip small {
  color: #b8c3ce;
  margin-top: 6px;
}

.step-index {
  align-items: center;
  background: #d9a441;
  border-radius: 50%;
  color: #17212f;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  margin-bottom: 10px;
  width: 24px;
}

.report-panel {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  overflow: hidden;
}

.section-head {
  align-items: center;
  border-bottom: 1px solid #d8e0e8;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

.section-head .eyebrow,
.section-head h2,
.section-head p {
  margin: 0;
}

.section-head p {
  color: #647282;
  font-size: 15px;
}

.table-wrap {
  overflow-x: auto;
}

.market-tabs {
  padding: 0;
}

.market-tabs > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-labels {
  background: #f8fafb;
  border-bottom: 1px solid #d8e0e8;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 20px;
}

.tab-labels label {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  color: #516070;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 850;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.tab-labels label span {
  align-items: center;
  background: #edf4f8;
  border-radius: 999px;
  color: #125475;
  display: inline-flex;
  font-size: 13px;
  justify-content: center;
  min-width: 24px;
  padding: 2px 7px;
}

.tab-panel {
  display: none;
}

#tab-TW:checked ~ #market-TW,
#tab-US:checked ~ #market-US,
#tab-CRYPTO:checked ~ #market-CRYPTO,
#tab-OTHER:checked ~ #market-OTHER {
  display: block;
}

.tab-summary {
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 20px;
}

.tab-summary strong {
  color: #17212f;
}

.tab-summary span,
.empty-state {
  color: #647282;
  font-size: 15px;
}

.empty-state {
  padding: 22px 20px;
}

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

th,
td {
  border-bottom: 1px solid #edf1f5;
  padding: 15px 20px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: #f8fafb;
  color: #647282;
  font-size: 13px;
  font-weight: 800;
}

tbody tr:hover {
  background: #f8fafb;
}

td small {
  margin-top: 4px;
}

.ticker-link {
  color: #17212f;
  display: block;
  font-size: 18px;
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.row-actions form {
  margin: 0;
}

.row-actions button {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  color: #8a2d21;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  min-height: 34px;
  padding: 0 10px;
}

.row-actions button:hover {
  background: #fff4ed;
  border-color: #fed7aa;
}

.market-snapshot {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  min-width: 96px;
}

.market-snapshot strong {
  color: #17212f;
  font-size: 16px;
  line-height: 1.1;
}

.market-change {
  border-radius: 6px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  padding: 3px 7px;
  white-space: nowrap;
}

.market-change.is-up {
  background: #ffe9e7;
  color: #b42318;
}

.market-change.is-down {
  background: #e5f6ed;
  color: #14723d;
}

.market-change.is-flat {
  background: #f2f4f7;
  color: #647282;
}

.tag,
.pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
}

.signal-buy {
  background: #e5f6ed;
  color: #14723d;
}

.signal-watch {
  background: #e7f2fb;
  color: #125475;
}

.signal-hold {
  background: #f2f4f7;
  color: #475467;
}

.signal-reduce,
.signal-sell {
  background: #ffe9e7;
  color: #b42318;
}

.risk-low {
  background: #e5f6ed;
  color: #14723d;
}

.risk-medium {
  background: #fff2d5;
  color: #8a5a00;
}

.risk-high {
  background: #ffe9e7;
  color: #b42318;
}

.score {
  background: #e7edf2;
  border-radius: 999px;
  display: inline-flex;
  height: 7px;
  margin-right: 10px;
  overflow: hidden;
  vertical-align: middle;
  width: 82px;
}

.score span {
  background: linear-gradient(90deg, #d9a441, #125475);
  display: block;
}

.row-action {
  border: 1px solid #c9d5df;
  border-radius: 6px;
  color: #125475;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  min-height: 32px;
  padding: 7px 10px;
}

.row-action:hover {
  background: #e7f2fb;
}

.primary-action {
  background: #125475;
  border-color: #125475;
  color: #ffffff;
}

.primary-action:hover {
  background: #0d405d;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.back {
  color: #516070;
  display: inline-block;
  font-size: 15px;
  margin-bottom: 16px;
}

.decision-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 300px 1fr;
}

.decision-panel,
.content-section {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
}

.decision-panel {
  padding: 22px;
  position: sticky;
  top: 82px;
}

.decision-panel h2 {
  color: #111a26;
  font-size: 18px;
  letter-spacing: 0;
  margin: 6px 0 0;
}

.decision-score {
  color: #111a26;
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  margin: 18px 0 14px;
}

.score-note {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 12px;
}

.score-note strong {
  color: #17212f;
  display: block;
  margin-bottom: 8px;
}

.score-note p {
  color: #516070;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.score-input-list {
  color: #344256;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0 0;
  padding-left: 18px;
}

.score-input-list li + li {
  margin-top: 4px;
}

.strategy-score-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.strategy-score-list h3 {
  color: #17212f;
  font-size: 15px;
  letter-spacing: 0;
  margin: 0;
}

.strategy-card {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 12px;
}

.strategy-card-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.strategy-card-head strong {
  color: #111a26;
  font-size: 14px;
}

.strategy-card-head span {
  color: #b42318;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.strategy-card p {
  color: #465465;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.strategy-card p b {
  color: #17212f;
  display: inline-block;
  margin-right: 6px;
}

.strategy-card small {
  color: #647282;
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
}

.strategy-bias {
  color: #17212f !important;
  font-weight: 700;
}

.decision-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

dt {
  color: #647282;
  font-size: 14px;
  font-weight: 700;
}

dd {
  color: #17212f;
  font-weight: 800;
  margin: 4px 0 0;
}

.detail-content {
  display: grid;
  gap: 14px;
}

.content-section {
  padding: 22px;
}

.content-section h2 {
  margin-bottom: 14px;
}

.content-section p,
.content-section li {
  color: #344054;
  line-height: 1.7;
}

.content-section p {
  margin: 0 0 10px;
}

.action-first {
  border-left: 4px solid #125475;
}

.action-list,
.content-section ul {
  margin: 0;
  padding-left: 20px;
}

.action-list li + li,
.content-section li + li {
  margin-top: 8px;
}

.section-kicker {
  color: #125475;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.data-section {
  background: #f6fbfc;
  border-color: #b8dfe7;
}

.data-section .section-kicker {
  color: #0f6f7e;
}

.insight-section {
  background: #fffaf0;
  border-color: #e6c66a;
}

.insight-section .section-kicker {
  color: #9a6a00;
}

.pro-mode-section {
  background: #f7fbfd;
  border-color: #b8dfe7;
}

.pro-mode-section.is-locked {
  background: #fafafa;
  border-color: #e3e8ef;
}

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

.pro-mode-head h2 {
  margin-bottom: 0;
}

.pro-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  min-height: 30px;
  padding: 6px 10px;
}

.pro-badge.active {
  background: #ecfdf3;
  color: #14723d;
}

.pro-badge.locked {
  background: #fff7e6;
  color: #946200;
}

.inline-action-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

.inline-action-form button {
  min-height: 38px;
  padding: 8px 13px;
}

.inline-action-form small {
  color: #5b6a7a;
  font-weight: 650;
}

.pro-feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pro-feature-grid span {
  background: #ffffff;
  border: 1px solid #b8dfe7;
  border-radius: 999px;
  color: #125475;
  font-size: 13px;
  font-weight: 850;
  padding: 6px 10px;
}

.pro-feature-grid.muted span {
  border-color: #d8e0e8;
  color: #667085;
}

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

.pro-indicator-grid div {
  background: #ffffff;
  border: 1px solid #b8dfe7;
  border-radius: 8px;
  padding: 14px;
}

.pro-indicator-grid span {
  color: #647282;
  display: block;
  font-size: 13px;
  font-weight: 850;
}

.pro-indicator-grid strong {
  color: #17212f;
  display: block;
  font-size: 18px;
  margin: 6px 0;
}

.pro-indicator-grid p {
  margin: 0;
}

.stock-chart-section {
  overflow: hidden;
}

.after-hours-section {
  display: grid;
  gap: 18px;
}

.after-hours-head {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 120px;
}

.after-hours-head p {
  color: #465465;
  line-height: 1.6;
  margin: 8px 0 0;
}

.after-hours-score {
  background: #f8fafc;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.after-hours-score span,
.after-hours-score small {
  color: #647282;
  display: block;
  font-size: 12px;
  font-weight: 850;
}

.after-hours-score strong {
  color: #17212f;
  display: block;
  font-size: 34px;
  line-height: 1;
  margin: 8px 0;
}

.after-hours-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.after-hours-card {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left-width: 4px;
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.after-hours-card.stance-bullish {
  border-left-color: #dc2626;
}

.after-hours-card.stance-neutral {
  border-left-color: #d9a441;
}

.after-hours-card.stance-bearish {
  border-left-color: #16a34a;
}

.after-hours-card-head {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.after-hours-card h3,
.after-hours-priority h3,
.after-hours-section h3,
.after-hours-gaps h3,
.tracking-group h4 {
  color: #17212f;
  font-size: 15px;
  margin: 0 0 8px;
}

.after-hours-card-head span {
  color: #125475;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.after-hours-card p,
.after-hours-card li,
.after-hours-card small,
.after-hours-gaps li,
.after-hours-section > small {
  color: #465465;
  font-size: 13px;
  line-height: 1.55;
}

.after-hours-card ul,
.after-hours-gaps ul,
.after-hours-priority ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.after-hours-priority {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.after-hours-priority > div {
  background: #f8fafc;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 14px;
}

.tracking-section-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.tracking-section-head p {
  color: #647282;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}

.tracking-groups {
  display: grid;
  gap: 14px;
}

.tracking-group {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  overflow: hidden;
}

.tracking-group-supplement {
  background: #fbfcfd;
}

.tracking-group-head {
  align-items: start;
  background: #f8fafc;
  border-bottom: 1px solid #d8e0e8;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
}

.tracking-group-head h4 {
  margin-bottom: 4px;
}

.tracking-group-head p {
  color: #647282;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.tracking-group-head > span {
  background: #e8f1f5;
  border: 1px solid #cfe1ec;
  border-radius: 999px;
  color: #125475;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
}

.tracking-list {
  display: grid;
}

.tracking-row {
  border-left: 4px solid #d9a441;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(110px, 160px) minmax(210px, 0.9fr) minmax(260px, 1.2fr);
  min-width: 0;
  padding: 14px 16px;
}

.tracking-row + .tracking-row {
  border-top: 1px solid #e8edf2;
}

.tracking-row.status-ok {
  border-left-color: #125475;
}

.tracking-row.status-missing {
  border-left-color: #d9a441;
}

.tracking-label {
  color: #647282;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.tracking-value {
  min-width: 0;
}

.tracking-value strong {
  color: #17212f;
  display: block;
  font-size: 21px;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.tracking-components {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tracking-components span {
  background: #f1f5f9;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  color: #344054;
  display: inline-flex;
  gap: 6px;
  line-height: 1.25;
  padding: 6px 8px;
}

.tracking-components b {
  color: #647282;
  font-size: 12px;
}

.tracking-components em {
  color: #647282;
  font-style: normal;
}

.tracking-row p {
  color: #465465;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.after-hours-gaps {
  background: #fffaf0;
  border: 1px solid #e6c66a;
  border-radius: 8px;
  padding: 14px;
}

.chart-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.chart-section-head h2 {
  margin-bottom: 6px;
}

.chart-source {
  color: #516070;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.stock-chart-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 170px;
  border: 1px solid #d9e2ea;
  min-height: 560px;
  background: #fbfcfd;
}

.chart-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 16px 14px;
  background: #ffffff;
}

.chart-panel-left {
  border-right: 1px solid #d9e2ea;
}

.chart-panel-right {
  border-left: 1px solid #d9e2ea;
}

.chart-panel-label {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.chart-button-row {
  display: flex;
  gap: 8px;
}

.chart-button-row.stacked {
  display: grid;
}

.chart-tool {
  min-height: 34px;
  border: 1px solid #c9d5df;
  background: #ffffff;
  color: #125475;
  font-weight: 850;
  cursor: pointer;
}

.chart-tool.is-active,
.chart-tool:hover {
  background: #125475;
  border-color: #125475;
  color: #ffffff;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.chart-legend-item i {
  display: inline-block;
  width: 17px;
  height: 4px;
  border-radius: 8px;
  background: var(--legend-color);
}

.signal-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #ffffff;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.signal-buy {
  background: #22c55e;
}

.signal-watch {
  background: #f59e0b;
}

.signal-sell {
  background: #ef4444;
}

.chart-main {
  min-width: 0;
  padding: 14px;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 620px;
  border: 1px solid #d9e2ea;
  background: #f8fafc;
}

.stock-chart-svg {
  display: block;
  width: 100%;
  height: 620px;
  touch-action: none;
}

.chart-grid-line {
  stroke: #e5ebf0;
  stroke-width: 1;
}

.macd-zero-line {
  stroke: #cbd5df;
}

.chart-axis-label {
  fill: #667085;
  font-size: 12px;
}

.chart-signal-text {
  font-size: 15px;
  font-weight: 900;
}

.chart-user-line {
  stroke: #0f172a;
  stroke-width: 2.5;
  cursor: grab;
}

.chart-user-line.support-line {
  stroke: #dc2626;
}

.chart-user-marker {
  fill: #0f172a;
  cursor: grab;
}

.chart-drawing-handle {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 2.5;
  cursor: grab;
}

.chart-drawing-handle:hover,
.chart-user-line:hover,
.chart-user-marker:hover {
  filter: drop-shadow(0 0 4px rgba(18, 84, 117, 0.35));
  stroke-width: 3;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 128px;
  max-width: min(260px, calc(100% - 16px));
  padding: 8px 10px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: normal;
  pointer-events: none;
  white-space: nowrap;
}

.chart-volume-title {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.chart-hover-values p,
.chart-signal-list p,
.chart-level-list p,
.chart-drawing-list {
  margin: 6px 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.chart-empty-state {
  padding: 18px;
  border: 1px solid #d9e2ea;
  background: #f8fafc;
}

.dashboard-chart-row td {
  background: #f8fafc;
  padding: 0 18px 18px;
}

.dashboard-stock-chart {
  border: 1px solid #d9e2ea;
  background: #ffffff;
  padding: 12px;
}

.dashboard-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dashboard-chart-head strong {
  color: #125475;
}

.dashboard-chart-head span {
  color: #516070;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-chart-svg {
  display: block;
  width: 100%;
  height: 230px;
  background: #fbfcfd;
}

.dashboard-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 8px;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

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

.dashboard-chart-legend i {
  display: inline-block;
  width: 14px;
  height: 4px;
  border-radius: 8px;
  background: var(--legend-color);
}

.dashboard-chart-action {
  margin-left: auto;
  color: #125475;
  font-weight: 850;
  text-decoration: none;
}

.dashboard-chart-action:hover {
  text-decoration: underline;
}

.dashboard-chart-empty {
  display: grid;
  gap: 4px;
  min-height: 120px;
  place-content: center;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5df;
  color: #516070;
}

.dashboard-chart-empty strong {
  color: #344054;
}

.chart-workspace-head {
  align-items: flex-start;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 28px 32px 0;
}

.chart-workspace-head h1 {
  margin: 0 0 8px;
}

.chart-workspace-section {
  margin: 22px 32px 44px;
}

.chart-workspace-shell {
  grid-template-columns: 210px minmax(0, 1fr) 220px;
}

.chart-workspace-section .stock-chart-svg {
  height: 780px;
}

.chart-workspace-section .chart-canvas-wrap {
  min-height: 780px;
}

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

.metric-grid div,
.insight-grid div {
  border-radius: 8px;
  padding: 14px;
}

.metric-grid div {
  background: #ffffff;
  border: 1px solid #b8dfe7;
}

.insight-grid div {
  background: #ffffff;
  border: 1px solid #e6d49b;
}

.metric-grid span,
.insight-grid span {
  color: #647282;
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.metric-grid strong,
.insight-grid strong {
  color: #17212f;
  display: block;
  font-size: 18px;
  margin: 6px 0;
}

.metric-grid p,
.insight-grid p {
  margin: 0;
}

.score-breakdown {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.score-breakdown div {
  background: #f8fafb;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 14px;
}

.score-breakdown span,
.score-breakdown small {
  color: #647282;
  display: block;
}

.score-breakdown strong {
  color: #17212f;
  display: block;
  font-size: 22px;
  margin: 6px 0;
}

.score-breakdown p {
  margin-top: 10px;
}

.source-list a {
  color: #125475;
  font-weight: 800;
  text-decoration: none;
}

.source-list span {
  color: #647282;
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

.agent-grid,
.two-col {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}

.agent-grid div {
  background: #f8fafb;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: 14px;
}

.agent-grid span {
  color: #647282;
  display: block;
  font-size: 14px;
}

.agent-grid strong {
  display: block;
  margin-top: 6px;
}

.status-panel {
  margin-top: 18px;
}

.status-list {
  display: grid;
}

.status-list a {
  border-bottom: 1px solid #edf1f5;
  display: grid;
  gap: 5px;
  padding: 18px 20px;
}

.status-list a:last-child {
  border-bottom: 0;
}

.status-list strong {
  color: #17212f;
}

.status-list span {
  color: #516070;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  :root {
    font-size: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  nav {
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    width: 100%;
  }

  main {
    padding: 22px 14px 56px;
  }

  h1 {
    font-size: 34px;
  }

  .page-head,
  .detail-head,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .summary-band,
  .pipeline-strip,
  .lookup-panel,
  .lookup-form,
  .watchlist-grid,
  .metric-grid,
  .insight-grid,
  .agent-grid,
  .weekly-scoreboard,
  .topic-grid,
  .candidate-metrics,
  .compact-rule-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .pro-indicator-grid {
    grid-template-columns: 1fr;
  }

  .weekly-run-panel,
  .weekly-run-panel form,
  .candidate-head,
  .capital-flow-head,
  .decision-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-run-panel button {
    width: 100%;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

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

  .after-hours-head,
  .after-hours-grid,
  .after-hours-priority {
    grid-template-columns: 1fr;
  }

  .after-hours-score {
    text-align: left;
  }

  .tracking-section-head,
  .tracking-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tracking-row {
    grid-template-columns: 1fr;
  }

  .capital-flow-head small {
    text-align: left;
  }

  .candidate-head > strong {
    align-self: flex-start;
  }

  .decision-panel {
    position: static;
  }

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

  .page-title p,
  .detail-title p {
    font-size: 16px;
  }

  .page-meta,
  .summary-card {
    min-width: 0;
  }

  .tab-labels {
    padding: 10px 14px;
  }

  .tab-labels label {
    min-height: 44px;
    padding: 0 14px;
  }

  .watchlist-toggle {
    min-height: 82px;
  }

  .watchlist-toggle input[type="checkbox"] {
    height: 24px;
    width: 24px;
  }

  .watchlist-save {
    padding: 14px;
  }

  .watchlist-save button,
  .lookup-form button {
    min-height: 48px;
    width: 100%;
  }

  .report-panel .table-wrap {
    overflow: visible;
  }

  .report-panel table,
  .report-panel thead,
  .report-panel tbody,
  .report-panel tr,
  .report-panel th,
  .report-panel td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .report-panel thead {
    display: none;
  }

  .report-panel tbody {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .report-panel tbody tr {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    padding: 12px;
  }

  .report-panel tbody tr:hover {
    background: #ffffff;
  }

  .report-panel td {
    border-bottom: 1px solid #edf1f5;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 0;
    white-space: normal;
  }

  .report-panel td:last-child {
    border-bottom: 0;
  }

  .report-panel td::before {
    color: #647282;
    content: attr(data-label);
    flex: 0 0 72px;
    font-size: 13px;
    font-weight: 850;
  }

  .report-panel td:first-child,
  .report-panel td:last-child {
    display: block;
  }

  .report-panel td:first-child::before,
  .report-panel td:last-child::before {
    display: none;
  }

  .ticker-link {
    font-size: 20px;
  }

  .row-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .row-actions a,
  .row-actions button {
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .chart-section-head {
    display: block;
  }

  .stock-chart-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chart-source {
    display: block;
    margin-top: 8px;
    white-space: normal;
  }

  .chart-panel-left,
  .chart-panel-right {
    border: 0;
    border-bottom: 1px solid #d9e2ea;
  }

  .chart-panel-left {
    order: 2;
  }

  .chart-panel-right {
    order: 3;
  }

  .chart-main {
    order: 1;
    padding: 10px;
  }

  .stock-chart-svg {
    height: 620px;
  }

  .chart-canvas-wrap {
    min-height: 620px;
  }

  .chart-workspace-head {
    display: block;
    padding: 18px 14px 0;
  }

  .chart-workspace-head .row-action {
    display: inline-flex;
    margin-top: 12px;
  }

  .chart-workspace-section {
    margin: 16px 14px 32px;
  }

  .chart-workspace-section .stock-chart-svg {
    height: 700px;
  }

  .chart-workspace-section .chart-canvas-wrap {
    min-height: 700px;
  }
}
