/* Dashboard components. Common tokens live in pmd-base.css. */
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Noto Sans KR",Arial,sans-serif}
[hidden] {
  display:none!important}
button,input,select {
  font:inherit}
.app {
  display:grid;
  grid-template-columns:248px 1fr;
  min-height:100vh}
.sidebar {
  background:var(--panel);
  border-right:1px solid var(--line);
  padding:24px 18px;
  position:sticky;
  top:0;
  height:100vh}
.brand {
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:28px}
.mark {
  width:42px;
  height:42px;
  border-radius:12px;
  background:var(--text);
  color:var(--bg);
  font-weight:800;
  display:grid;
  place-items:center}
.brand h3 {
  margin:0;
  font-size:var(--text-body)}
.brand p {
  margin:4px 0 0;
  color:var(--muted);
  font-size:var(--text-xs)}
.nav {
  display:grid;
  gap:5px;
  margin-bottom:26px}
.nav button,.watch-item {
  border:0;
  background:transparent;
  color:var(--muted);
  border-radius:10px;
  text-align:left;
  padding:11px 12px;
  cursor:pointer}
.nav button.active,.nav button:hover,.watch-item:hover {
  background:var(--panel);
  color:var(--text)}
.side-title {
  font-size:var(--text-xs);
  color:var(--muted);
  letter-spacing:.16em;
  margin:0 10px 10px}
.watchlist {
  border-top:1px solid var(--line);
  padding-top:20px}
.watch-item {
  width:100%;
  display:flex;
  justify-content:space-between;
  gap:10px}
.watch-item strong {
  font-size:var(--text-sm);
  color:var(--text)}
.watch-item small {
  font-size:var(--text-xs);
  color:var(--muted)}
.side-status {
  position:absolute;
  left:18px;
  right:18px;
  bottom:20px;
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:12px;
  padding:13px}
.side-status b {
  font-size:var(--text-xs)}
.side-status p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.5;
  margin:6px 0 0}
.main {
  width:100%;
  max-width:1500px;
  margin:0 auto;
  padding:34px 38px 56px}
.top {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:20px}
.eyebrow,.kicker {
  font-size:var(--text-xs);
  letter-spacing:.16em;
  color:var(--muted);
  font-weight:700}
.top h1 {
  font-size:var(--text-page);
  margin:7px 0 0}
.status {
  font-size:var(--text-xs);
  color:var(--muted);
  padding-top:6px}
.dot {
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--warn);
  margin-right:7px}
.card {
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:16px}
.search {
  padding:14px;
  margin-bottom:14px}
.search-grid {
  display:grid;
  grid-template-columns:1.5fr .72fr .72fr .72fr auto;
  gap:9px;
  align-items:end}
.field {
  display:grid;
  gap:6px;
  position:relative}
.field label {
  font-size:var(--text-xs);
  color:var(--muted)}
.field input,.field select {
  width:100%;
  background:var(--panel);
  border:1px solid var(--line);
  color:var(--text);
  border-radius:10px;
  padding:11px 12px;
  outline:none}
.primary {
  border:0;
  background:var(--text);
  color:var(--bg);
  border-radius:10px;
  padding:11px 16px;
  font-weight:800;
  min-height:42px;
  cursor:pointer}
.suggestions {
  position:absolute;
  top:calc(100% + 5px);
  left:0;
  right:0;
  z-index:20;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 16px 40px rgba(0,0,0,.35)}
.suggestions.hidden {
  display:none}
.suggestions button {
  width:100%;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  color:var(--text);
  padding:10px 12px;
  text-align:left;
  display:flex;
  gap:12px;
  cursor:pointer}
.suggestions button:last-child {
  border-bottom:0}
.suggestions button:hover {
  background:var(--panel2)}
.suggestions strong {
  width:58px;
  font-size:var(--text-xs)}
.suggestions span {
  font-size:var(--text-xs);
  color:var(--muted)}
.hero {
  padding:20px;
  margin-bottom:14px}
.hero-top {
  display:flex;
  justify-content:space-between;
  gap:18px}
.ticker-line {
  display:flex;
  gap:10px;
  align-items:baseline}
.ticker {
  font-size:var(--text-title);
  font-weight:800}
.company {
  font-size:var(--text-xs);
  color:var(--muted)}
.price-row {
  display:flex;
  gap:9px;
  align-items:baseline;
  margin-top:8px}
.price {
  font-size:var(--text-price);
  font-weight:800}
.change {
  font-size:var(--text-sm);
  font-weight:800}
.pos {
  color:var(--pos)}
.neg {
  color:var(--neg)}
.verdict {
  padding:8px 11px;
  border-radius:999px;
  height:max-content;
  font-size:var(--text-xs);
  font-weight:800;
  border:1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  color:var(--warn);
  background:color-mix(in srgb, var(--warn) 10%, transparent)}
.hero-bottom {
  display:grid;
  grid-template-columns:1.6fr 1fr;
  gap:18px;
  margin-top:18px}
.conclusion {
  margin:0;
  color:var(--text);
  font-size:var(--text-sm);
  line-height:1.65}
.mini-metrics {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px}
.mini {
  padding-left:12px;
  border-left:1px solid var(--line)}
.mini span {
  display:block;
  font-size:var(--text-xs);
  color:var(--muted);
  margin-bottom:6px}
.mini strong {
  font-size:var(--text-sm)}
.core-grid {
  display:grid;
  grid-template-columns:1.65fr .85fr;
  gap:14px;
  margin-bottom:14px}
.panel {
  padding:18px}
.panel-head {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:14px}
.panel-head h2 {
  font-size:var(--text-body);
  margin:5px 0 0}
.pill {
  border:1px solid var(--line);
  color:var(--muted);
  font-size:var(--text-xs);
  border-radius:999px;
  padding:6px 8px}
.chart-wrap {
  height:420px;
  background:var(--panel3);
  border:1px solid var(--line);
  border-radius:13px;
  position:relative;
  overflow:hidden}
.chart-toolbar {
  display:flex;
  gap:5px;
  flex-wrap:wrap}
.chart-toolbar button {
  border:1px solid var(--line);
  background:transparent;
  color:var(--muted);
  border-radius:8px;
  padding:6px 8px;
  font-size:var(--text-xs);
  cursor:pointer}
.chart-toolbar button.active {
  background:var(--text);
  color:var(--panel);
  border-color:var(--text)}
.chart-legend {
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:10px;
  font-size:var(--text-xs);
  color:var(--muted)}
.chart-legend span:before {
  content:"";
  display:inline-block;
  width:10px;
  height:2px;
  margin-right:5px;
  vertical-align:middle;
  background:var(--text)}
.chart-legend .avg:before {
  background:var(--blue)}
.chart-legend .support:before {
  background:var(--pos)}
.chart-legend .target:before {
  background:var(--warn)}
.chart-legend .invalid:before {
  background:var(--neg)}
#chartSvg {
  width:100%;
  height:100%;
  display:block}
.levels {
  display:grid;
  gap:8px}
.level {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid var(--line)}
.level span {
  font-size:var(--text-xs);
  color:var(--muted)}
.level strong {
  font-size:var(--text-sm)}
.why-grid {
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:14px;
  margin-bottom:14px}
.reason-list {
  display:grid;
  gap:8px}
.reason {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:12px}
.reason-top {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center}
.reason-title {
  font-size:var(--text-xs);
  font-weight:700}
.tag {
  font-size:var(--text-xs);
  font-weight:800;
  border-radius:999px;
  padding:4px 6px}
.tag.high {
  color:var(--neg);
  background:color-mix(in srgb, var(--neg) 12%, transparent)}
.tag.medium {
  color:var(--warn);
  background:color-mix(in srgb, var(--warn) 12%, transparent)}
.tag.low {
  color:var(--muted);
  background:var(--panel2)}
.reason p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.55;
  margin:7px 0 0}
.reason-meta {
  font-size:var(--text-xs);
  color:var(--muted);
  margin-top:7px}
.impact {
  display:grid;
  gap:9px}
.impact-box {
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:var(--panel3)}
.impact-box span {
  font-size:var(--text-xs);
  color:var(--muted)}
.impact-box strong {
  display:block;
  font-size:var(--text-title);
  margin:7px 0 4px}
.impact-box p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.5;
  margin:0}
.splitbar {
  height:8px;
  border-radius:999px;
  background:var(--line);
  overflow:hidden;
  display:flex;
  margin-top:10px}
.splitbar i:first-child {
  background:var(--blue)}
.splitbar i:last-child {
  background:var(--muted)}
.reason-tabs {
  display:flex;
  gap:7px;
  margin-bottom:12px;
  padding:4px;
  background:var(--panel3);
  border:1px solid var(--line);
  border-radius:11px;
  width:max-content;
  max-width:100%}
.reason-tab {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:8px 12px;
  border-radius:8px;
  font-size:var(--text-xs);
  font-weight:800;
  cursor:pointer}
.reason-tab.active.up {
  background:color-mix(in srgb, var(--pos) 12%, transparent);
  color:var(--pos)}
.reason-tab.active.down {
  background:color-mix(in srgb, var(--neg) 12%, transparent);
  color:var(--neg)}
.reason-tab.active.all {
  background:color-mix(in srgb, var(--blue) 12%, transparent);
  color:var(--blue)}
.reason.up {
  border-left:2px solid color-mix(in srgb, var(--pos) 65%, transparent)}
.reason.down {
  border-left:2px solid color-mix(in srgb, var(--neg) 65%, transparent)}
.reason.all {
  border-left:2px solid color-mix(in srgb, var(--blue) 65%, transparent)}
.reason-empty {
  border:1px dashed var(--line);
  border-radius:12px;
  padding:18px;
  color:var(--muted);
  font-size:var(--text-xs);
  text-align:center}
.reason-count {
  opacity:.72;
  margin-left:4px}
.tag.high {
  color:var(--text);
  background:var(--panel2)}
.reason-direction {
  font-size:var(--text-xs);
  font-weight:800;
  margin-right:6px}
.reason-direction.up {
  color:var(--pos)}
.reason-direction.down {
  color:var(--neg)}
.reason-direction.all {
  color:var(--blue)}
.analysis-viewbar {
  padding:12px 14px;
  margin-bottom:10px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center}
.analysis-view-copy {
  display:grid;
  gap:3px}
.analysis-view-copy strong {
  font-size:var(--text-sm)}
.analysis-view-copy span {
  font-size:var(--text-xs);
  color:var(--muted)}
.analysis-view-actions {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end}
.analysis-mode-switch {
  display:flex;
  gap:4px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel3)}
.analysis-mode-switch button {
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--muted);
  padding:7px 10px;
  font-size:var(--text-xs);
  font-weight:800;
  cursor:pointer}
.analysis-mode-switch button.active {
  background:var(--text);
  color:var(--bg)}
.analysis-feedback {
  display:flex;
  gap:5px;
  align-items:center}
.analysis-feedback span {
  font-size:var(--text-xs);
  color:var(--muted);
  margin-right:2px}
.analysis-feedback button {
  border:1px solid var(--line);
  background:transparent;
  color:var(--muted);
  border-radius:8px;
  padding:6px 8px;
  font-size:var(--text-xs);
  cursor:pointer}
.analysis-feedback button.selected {
  border-color:var(--line);
  color:var(--text);
  background:var(--panel2)}
.compare-panel {
  margin-bottom:14px}
.compare-summary {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:13px;
  margin-bottom:10px}
.compare-summary span {
  display:block;
  color:var(--muted);
  font-size:var(--text-xs);
  margin-bottom:6px}
.compare-summary strong {
  font-size:var(--text-body)}
.compare-summary p {
  color:var(--muted);
  font-size:var(--text-xs);
  line-height:1.6;
  margin:6px 0 0}
.compare-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px}
.compare-column {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:13px;
  padding:12px}
.compare-column-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:10px}
.compare-column-head strong {
  font-size:var(--text-sm)}
.compare-column-head span {
  font-size:var(--text-xs);
  color:var(--muted)}
.compare-column.up .compare-column-head strong {
  color:var(--pos)}
.compare-column.down .compare-column-head strong {
  color:var(--neg)}
.compare-list {
  display:grid;
  gap:8px}
.compare-list .reason {
  padding:11px}
.compare-list .reason-title {
  font-size:var(--text-xs)}
.compare-list .reason p {
  font-size:var(--text-xs)}
.compare-list .reason-meta {
  font-size:var(--text-xs)}
.strategy-lab {
  margin-top:14px}
.strategy-overview {
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:10px}
.strategy-decision,.strategy-validation {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:13px;
  padding:15px}
.strategy-label {
  font-size:var(--text-xs);
  color:var(--muted)}
.strategy-decision-row {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
  margin-top:8px}
.strategy-decision strong {
  font-size:var(--text-title);
  line-height:1.25}
.strategy-score {
  font-size:var(--text-page);
  font-weight:800;
  color:var(--blue);
  white-space:nowrap}
.strategy-score small {
  font-size:var(--text-xs);
  color:var(--muted)}
.strategy-meter {
  height:8px;
  background:var(--line);
  border-radius:999px;
  overflow:hidden;
  margin-top:12px}
.strategy-meter i {
  display:block;
  height:100%;
  width:0;
  background:linear-gradient(90deg,var(--neg),var(--warn),var(--pos));
  border-radius:inherit}
.strategy-blockers {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.6;
  margin-top:10px}
.strategy-blockers strong {
  color:var(--neg)}
.strategy-validation-head {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start}
.strategy-validation-head strong {
  display:block;
  font-size:var(--text-title);
  margin-top:6px}
.strategy-validation-head span:last-child {
  font-size:var(--text-xs);
  color:var(--muted);
  text-align:right;
  line-height:1.5}
.strategy-validation p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.6;
  margin:10px 0 0}
.strategy-criteria {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
  margin-top:10px}
.strategy-criterion {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:12px}
.strategy-criterion-top {
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center}
.strategy-criterion strong {
  font-size:var(--text-sm)}
.strategy-criterion em {
  font-style:normal;
  font-size:var(--text-xs);
  font-weight:800}
.strategy-criterion.pass em {
  color:var(--pos)}
.strategy-criterion.warn em {
  color:var(--warn)}
.strategy-criterion.fail em,.strategy-criterion.missing em {
  color:var(--neg)}
.strategy-criterion p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.5;
  margin:9px 0 4px}
.strategy-criterion small {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.45}
.strategy-method {
  border-top:1px solid var(--line);
  margin-top:12px;
  padding-top:11px;
  font-size:var(--text-xs);
  line-height:1.6;
  color:var(--muted)}
.timeframe-panel {
  margin-bottom:14px}
.timeframe-summary {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:12px 13px;
  margin-bottom:10px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center}
.timeframe-summary span {
  font-size:var(--text-xs);
  color:var(--muted)}
.timeframe-summary strong {
  font-size:var(--text-xs);
  line-height:1.5;
  text-align:right}
.timeframe-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px}
.timeframe-card {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:13px;
  padding:14px;
  transition:.18s ease}
.timeframe-card.focus {
  border-color:var(--line);
  background:var(--panel);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--blue) 8%, transparent)}
.timeframe-card.dim {
  opacity:.62}
.tf-top {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center}
.tf-label {
  font-size:var(--text-xs);
  font-weight:800}
.tf-horizon {
  font-size:var(--text-xs);
  color:var(--muted);
  margin-top:3px}
.tf-stance {
  font-size:var(--text-xs);
  font-weight:800;
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 7px}
.tf-stance.positive {
  color:var(--pos);
  border-color:color-mix(in srgb, var(--pos) 28%, transparent);
  background:color-mix(in srgb, var(--pos) 8%, transparent)}
.tf-stance.neutral {
  color:var(--warn);
  border-color:color-mix(in srgb, var(--warn) 28%, transparent);
  background:color-mix(in srgb, var(--warn) 8%, transparent)}
.tf-stance.negative {
  color:var(--neg);
  border-color:color-mix(in srgb, var(--neg) 28%, transparent);
  background:color-mix(in srgb, var(--neg) 8%, transparent)}
.timeframe-card p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.6;
  margin:11px 0}
.tf-points {
  display:grid;
  gap:6px}
.tf-point {
  font-size:var(--text-xs);
  color:var(--muted);
  padding-top:6px;
  border-top:1px solid var(--line)}
.tf-point:before {
  content:"•";
  color:var(--blue);
  margin-right:6px}
.tf-focus-note {
  margin-top:10px;
  font-size:var(--text-xs);
  color:var(--muted)}
.tf-focus-note b {
  color:var(--muted)}
.play-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px}
.playbook {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px}
.play-step {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:12px}
.play-step span {
  display:block;
  color:var(--muted);
  font-size:var(--text-xs);
  margin-bottom:7px}
.play-step strong {
  font-size:var(--text-xs);
  line-height:1.45}
.position-summary {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px}
.position-metric {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:12px}
.position-metric span {
  display:block;
  font-size:var(--text-xs);
  color:var(--muted);
  margin-bottom:7px}
.position-metric strong {
  font-size:var(--text-sm)}
.position-actions {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:9px}
.position-actions .field input {
  padding:10px}
.position-actions .current-position input {
  border-color:var(--line);
  background:var(--panel2)}
.lab {
  grid-column:1/-1;
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:11px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px}
.lab span {
  font-size:var(--text-xs);
  color:var(--muted);
  display:block;
  margin-bottom:5px}
.lab strong {
  font-size:var(--text-xs)}
.save-row {
  display:flex;
  justify-content:flex-end;
  margin-top:9px}
.save-btn {
  border:1px solid var(--line);
  background:var(--panel2);
  color:var(--text);
  border-radius:9px;
  padding:8px 10px;
  font-size:var(--text-xs);
  cursor:pointer}
.footer-note {
  margin-top:14px;
  border:1px dashed var(--line);
  border-radius:12px;
  padding:12px;
  color:var(--muted);
  font-size:var(--text-xs);
  line-height:1.6}
.api-badge {
  color:var(--warn)}
.whale-panel {
  margin-bottom:14px}
.whale-header-note {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.5;
  text-align:right;
  max-width:360px}
.whale-summary {
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:10px;
  margin-bottom:12px}
.whale-summary-main,.whale-summary-side {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:13px;
  padding:14px}
.whale-summary-main span,.whale-summary-side span {
  display:block;
  font-size:var(--text-xs);
  color:var(--muted);
  margin-bottom:7px}
.whale-summary-main strong {
  font-size:var(--text-title)}
.whale-summary-main p,.whale-summary-side p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.55;
  margin:7px 0 0}
.whale-summary-side strong {
  font-size:var(--text-xs);
  line-height:1.45}
.whale-tabs {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:12px;
  padding:4px;
  background:var(--panel3);
  border:1px solid var(--line);
  border-radius:11px;
  width:max-content;
  max-width:100%}
.whale-tab {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:8px 11px;
  border-radius:8px;
  font-size:var(--text-xs);
  font-weight:800;
  cursor:pointer}
.whale-tab.active {
  background:var(--text);
  color:var(--bg)}
.whale-list {
  display:grid;
  gap:8px}
.whale-item {
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:12px;
  padding:12px}
.whale-item-top {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start}
.whale-name {
  font-size:var(--text-xs);
  font-weight:800}
.whale-sub {
  font-size:var(--text-xs);
  color:var(--muted);
  margin-top:4px}
.whale-move {
  text-align:right}
.whale-move strong {
  display:block;
  font-size:var(--text-xs)}
.whale-move span {
  font-size:var(--text-xs);
  color:var(--muted)}
.whale-item p {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.55;
  margin:9px 0}
.whale-dates {
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  padding-top:8px;
  border-top:1px solid var(--line)}
.whale-date {
  font-size:var(--text-xs);
  color:var(--muted)}
.whale-date b {
  color:var(--muted);
  font-weight:700;
  margin-right:5px}
.whale-disclaimer {
  margin-top:10px;
  border:1px dashed var(--line);
  border-radius:10px;
  padding:10px 11px;
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.55}
.whale-empty {
  border:1px dashed var(--line);
  border-radius:12px;
  padding:18px;
  text-align:center;
  color:var(--muted);
  font-size:var(--text-xs)}
.signal-buy {
  color:var(--pos)}
.signal-sell {
  color:var(--neg)}
.signal-neutral {
  color:var(--warn)}
.data-strip {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin-bottom:14px}
.data-chip {
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center}
.data-chip span {
  font-size:var(--text-xs);
  color:var(--muted)}
.data-chip strong {
  font-size:var(--text-xs)}
.data-chip .ok {
  color:var(--pos)}
.data-chip .warn {
  color:var(--warn)}
.data-chip .off {
  color:var(--neg)}
.settings-btn {
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text);
  border-radius:9px;
  padding:7px 10px;
  font-size:var(--text-xs);
  cursor:pointer;
  margin-left:10px}
.top-actions {
  display:flex;
  align-items:center;
  gap:8px}
.modal-backdrop {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.65);
  z-index:90;
  display:grid;
  place-items:center;
  padding:20px}
.modal-backdrop.hidden {
  display:none}
.settings-modal {
  width:min(620px,100%);
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:16px;
  padding:20px;
  box-shadow:0 24px 70px rgba(0,0,0,.5)}
.settings-modal h2 {
  font-size:var(--text-title);
  margin:5px 0 6px}
.settings-modal>p {
  color:var(--muted);
  font-size:var(--text-xs);
  line-height:1.6;
  margin:0 0 15px}
.settings-grid {
  display:grid;
  gap:11px}
.setting-row {
  display:grid;
  gap:6px}
.setting-row label {
  font-size:var(--text-xs);
  color:var(--muted)}
.setting-row input,.setting-row select {
  width:100%;
  background:var(--panel3);
  border:1px solid var(--line);
  color:var(--text);
  border-radius:9px;
  padding:10px 11px;
  outline:none}
.setting-help {
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.5}
.modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px}
.secondary {
  border:1px solid var(--line);
  background:transparent;
  color:var(--text);
  border-radius:9px;
  padding:9px 12px;
  font-size:var(--text-xs);
  cursor:pointer}
.live-source {
  font-size:var(--text-xs);
  color:var(--pos);
  margin-left:7px}
.loading-line {
  height:2px;
  background:linear-gradient(90deg,transparent,var(--blue),transparent);
  background-size:200% 100%;
  animation:loading 1.2s linear infinite;
  position:fixed;
  left:0;
  right:0;
  top:0;
  z-index:120;
  display:none}
.loading-line.on {
  display:block}
@keyframes loading {
  to {
  background-position:-200% 0}
}
.help {
  display:inline-grid;
  place-items:center;
  width:15px;
  height:15px;
  border:1px solid var(--line);
  border-radius:50%;
  background:transparent;
  color:var(--muted);
  font-size:var(--text-xs);
  font-weight:800;
  padding:0;
  margin-left:3px;
  vertical-align:middle;
  cursor:help;
  position:relative}
.help:hover,.help:focus {
  color:var(--text);
  border-color:var(--blue);
  outline:none}
.help:hover:after,.help:focus:after {
  content:attr(data-tip);
  position:absolute;
  z-index:80;
  left:50%;
  bottom:calc(100% + 9px);
  transform:translateX(-50%);
  width:240px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--text);
  color:var(--bg);
  font-size:var(--text-xs);
  font-weight:500;
  line-height:1.5;
  box-shadow:0 12px 30px rgba(0,0,0,.4);
  white-space:normal;
  text-align:left}
.help:hover:before,.help:focus:before {
  content:"";
  position:absolute;
  z-index:81;
  bottom:calc(100% + 4px);
  left:50%;
  transform:translateX(-50%);
  border:5px solid transparent;
  border-top-color:var(--line)}
.reason-basis {
  margin:-3px 0 12px;
  padding:10px 12px;
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:10px;
  font-size:var(--text-xs);
  line-height:1.55;
  color:var(--muted)}
.reason-basis b {
  color:var(--text)}
.source-link {
  color:var(--blue);
  text-decoration:none}
.source-link:hover {
  text-decoration:underline}
.api-badge {
  color:var(--warn)}
.api-badge.ok {
  color:var(--pos)}
.load-note {
  font-size:var(--text-xs);
  color:var(--muted)}
.settings-modal .security-note {
  padding:9px 10px;
  border:1px solid var(--line);
  background:var(--panel3);
  border-radius:9px;
  font-size:var(--text-xs);
  color:var(--muted);
  line-height:1.55;
  margin-top:3px}
.toast {
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:150;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:11px;
  padding:11px 13px;
  font-size:var(--text-xs);
  color:var(--text);
  box-shadow:0 18px 45px rgba(0,0,0,.35);
  display:none}
.toast.on {
  display:block}
.live-error {
  color:var(--neg)!important}
.live-good {
  color:var(--pos)!important}
/* Readable type scale: supporting text → body → section title → primary number */
body {
  font-size:var(--text-body);
  line-height:1.5;
  -webkit-font-smoothing:antialiased}
.brand h3 {
  font-size:var(--text-body)}
.brand p,.side-status p {
  font-size:var(--text-sm);
  line-height:1.6}
.nav button,.watch-item {
  font-size:var(--text-sm)}
.side-title {
  font-size:var(--text-xs)}
.watch-item strong {
  font-size:var(--text-body)}
.watch-item small {
  font-size:var(--text-xs)}
.side-status b {
  font-size:var(--text-sm)}
.eyebrow,.kicker {
  font-size:var(--text-xs)}
.top h1 {
  font-size:var(--text-page);
  line-height:1.3}
.status {
  font-size:var(--text-sm)}
.settings-btn {
  font-size:var(--text-sm)}
.field label {
  font-size:var(--text-sm)}
.field input,.field select,.primary {
  font-size:var(--text-sm)}
.suggestions strong {
  font-size:var(--text-sm)}
.suggestions span {
  font-size:var(--text-sm)}
.data-chip span,.data-chip strong {
  font-size:var(--text-sm)}
.ticker {
  font-size:var(--text-title)}
.company {
  font-size:var(--text-sm)}
.live-source {
  font-size:var(--text-xs)}
.price {
  font-size:var(--text-price);
  line-height:1.15}
.change {
  font-size:var(--text-body)}
.verdict {
  font-size:var(--text-sm)}
.conclusion {
  font-size:var(--text-body);
  line-height:1.7}
.mini span {
  font-size:var(--text-xs)}
.mini strong {
  font-size:var(--text-body)}
.panel-head h2 {
  font-size:var(--text-title);
  line-height:1.35}
.pill {
  font-size:var(--text-xs)}
.chart-toolbar button,.chart-legend {
  font-size:var(--text-xs)}
.level span {
  font-size:var(--text-sm)}
.level strong {
  font-size:var(--text-body)}
.reason-basis {
  font-size:var(--text-sm);
  line-height:1.65}
.reason-tab {
  font-size:var(--text-sm)}
.reason-top {
  align-items:flex-start}
.reason-title {
  font-size:var(--text-body);
  line-height:1.45}
.reason-direction,.tag {
  font-size:var(--text-xs)}
.tag {
  white-space:nowrap;
  flex:0 0 auto}
.reason p {
  font-size:var(--text-sm);
  line-height:1.65}
.reason-meta {
  font-size:var(--text-xs);
  line-height:1.5}
.reason-empty {
  font-size:var(--text-sm);
  line-height:1.6}
.impact-box span {
  font-size:var(--text-xs)}
.impact-box strong {
  font-size:var(--text-title);
  line-height:1.35}
.impact-box p {
  font-size:var(--text-sm);
  line-height:1.6}
#impactBasis {
  font-size:var(--text-body)!important}
.analysis-view-copy strong {
  font-size:var(--text-body)}
.analysis-view-copy span,.analysis-feedback span {
  font-size:var(--text-xs)}
.analysis-mode-switch button,.analysis-feedback button {
  font-size:var(--text-xs)}
.compare-summary span {
  font-size:var(--text-xs)}
.compare-summary strong {
  font-size:var(--text-body)}
.compare-summary p {
  font-size:var(--text-sm)}
.compare-column-head strong {
  font-size:var(--text-body)}
.compare-column-head span {
  font-size:var(--text-xs)}
.compare-list .reason-title {
  font-size:var(--text-sm)}
.compare-list .reason p {
  font-size:var(--text-xs)}
.compare-list .reason-meta {
  font-size:var(--text-xs)}
.timeframe-summary span {
  font-size:var(--text-xs)}
.timeframe-summary strong {
  font-size:var(--text-sm)}
.tf-label {
  font-size:var(--text-body)}
.tf-horizon {
  font-size:var(--text-xs)}
.tf-stance {
  font-size:var(--text-xs)}
.timeframe-card p {
  font-size:var(--text-sm);
  line-height:1.65}
.tf-point {
  font-size:var(--text-sm);
  line-height:1.5}
.tf-focus-note {
  font-size:var(--text-xs)}
.play-step span,.position-metric span,.lab span {
  font-size:var(--text-xs)}
.play-step strong,.position-metric strong,.lab strong {
  font-size:var(--text-sm)}
.save-btn {
  font-size:var(--text-sm)}
.footer-note {
  font-size:var(--text-xs);
  line-height:1.7}
.strategy-label {
  font-size:var(--text-xs)}
.strategy-decision strong {
  font-size:var(--text-title)}
.strategy-score {
  font-size:var(--text-page)}
.strategy-validation-head strong {
  font-size:var(--text-title)}
.strategy-validation-head span:last-child,.strategy-method {
  font-size:var(--text-xs)}
.strategy-validation p,.strategy-blockers {
  font-size:var(--text-sm)}
.strategy-criterion strong {
  font-size:var(--text-sm)}
.strategy-criterion em,.strategy-criterion small {
  font-size:var(--text-xs)}
.strategy-criterion p {
  font-size:var(--text-sm)}
.whale-header-note {
  font-size:var(--text-xs);
  line-height:1.6}
.whale-summary-main span,.whale-summary-side span {
  font-size:var(--text-xs)}
.whale-summary-main strong {
  font-size:var(--text-title)}
.whale-summary-side strong {
  font-size:var(--text-sm)}
.whale-summary-main p,.whale-summary-side p {
  font-size:var(--text-sm);
  line-height:1.6}
.whale-tab {
  font-size:var(--text-sm)}
.whale-name,.whale-move strong {
  font-size:var(--text-body)}
.whale-sub,.whale-move span,.whale-date {
  font-size:var(--text-xs)}
.whale-item p {
  font-size:var(--text-sm);
  line-height:1.6}
.whale-disclaimer,.whale-empty {
  font-size:var(--text-xs);
  line-height:1.65}
.settings-modal h2 {
  font-size:var(--text-title)}
.settings-modal>p {
  font-size:var(--text-sm)}
.setting-row label {
  font-size:var(--text-sm)}
.setting-help,.settings-modal .security-note {
  font-size:var(--text-xs);
  line-height:1.6}
.secondary {
  font-size:var(--text-sm)}
.toast {
  font-size:var(--text-sm)}
.help {
  width:17px;
  height:17px;
  font-size:var(--text-xs)}
.help:hover:after,.help:focus:after {
  font-size:var(--text-xs);
  line-height:1.6}

/* Layout and interaction contract. Breakpoints: 48rem / 75rem. */
.pmd-dashboard .app { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.pmd-dashboard .main { min-width: 0; max-width: var(--content-max); padding: var(--page-padding); padding-bottom: 3rem; }
.pmd-dashboard .sidebar { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem 1rem; height: 100dvh; overflow-y: auto; }
.pmd-dashboard .sidebar .brand { margin-bottom: .5rem; }
.pmd-dashboard .side-status { position: static; margin-top: auto; }
.pmd-dashboard .nav { margin-bottom: 0; }
.pmd-dashboard .nav a { display: flex; align-items: center; min-height: var(--control-height); padding: .625rem .75rem; border-radius: var(--radius-sm); color: var(--muted); font-size: var(--text-sm); text-decoration: none; }
.pmd-dashboard .nav a.active, .pmd-dashboard .nav a:hover { color: var(--text); background: var(--panel); }
.pmd-dashboard .watch-item { align-items: center; flex-wrap: wrap; }
.pmd-dashboard .side-title { letter-spacing: .04em; }
.pmd-dashboard .top { flex-wrap: wrap; }
.pmd-dashboard .top-actions { flex-wrap: wrap; margin-left: auto; }
.pmd-dashboard .top h1 { font-size: var(--text-page); }
.pmd-dashboard .card { border-radius: var(--radius-lg); }
.pmd-dashboard .panel, .pmd-dashboard .hero { padding: var(--space-6); }
.pmd-dashboard .main > section { margin-bottom: var(--space-4); }
.pmd-dashboard :is(.core-grid,.why-grid,.play-grid,.timeframe-grid,.whale-summary,.strategy-overview,.compare-grid,.hero-bottom) { gap: var(--space-4); }
.pmd-dashboard :is(.search-grid,.core-grid,.why-grid,.play-grid,.timeframe-grid,.whale-summary,.strategy-overview,.compare-grid,.hero-bottom,.position-actions,.strategy-criteria) > * { min-width: 0; }
.pmd-dashboard .search-grid { grid-template-columns: minmax(10rem, 1.4fr) repeat(3, minmax(5rem, .8fr)) auto; gap: var(--space-3); }
.pmd-dashboard .field input, .pmd-dashboard .field select { min-height: var(--control-height); font-size: var(--text-body); padding: .625rem .75rem; }
.pmd-dashboard .field label { font-size: var(--text-sm); }
.pmd-dashboard :is(input, select, button, a):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.pmd-dashboard :is(.primary,.secondary,.save-btn,.settings-btn,.chart-toolbar button,.reason-tab,.whale-tab,.analysis-mode-switch button,.analysis-feedback button) { min-height: var(--control-height); font-size: var(--text-sm); }
.pmd-dashboard .chart-toolbar button { min-width: var(--control-height); }
.pmd-dashboard .panel-head { align-items: flex-start; flex-wrap: wrap; gap: var(--space-3); }
.pmd-dashboard .panel-head h2 { font-size: var(--text-title); }
.pmd-dashboard .ticker-line { flex-wrap: wrap; gap: .25rem .75rem; }
.pmd-dashboard .ticker { font-size: var(--text-title); }
.pmd-dashboard .price { font-size: var(--text-price); }
.pmd-dashboard .verdict { max-width: 100%; }
.pmd-dashboard .data-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pmd-dashboard .data-chip { min-width: 0; flex-wrap: wrap; gap: .25rem .5rem; }
.pmd-dashboard .data-chip strong { font-size: var(--text-sm); }
.pmd-dashboard .data-chip span { font-size: var(--text-xs); }
.pmd-dashboard .chart-wrap { height: clamp(20rem, 28vw, 26.25rem); }
.pmd-dashboard .chart-legend { gap: .25rem .75rem; align-items: center; }
.pmd-dashboard .reason-tabs { flex-wrap: wrap; width: fit-content; }
.pmd-dashboard .reason-title, .pmd-dashboard .conclusion { font-size: var(--text-body); }
.pmd-dashboard .reason-meta, .pmd-dashboard .tf-focus-note, .pmd-dashboard .strategy-criterion small { color: var(--muted); }
.pmd-dashboard .reason-top, .pmd-dashboard .level, .pmd-dashboard .whale-item-top { flex-wrap: wrap; }
.pmd-dashboard .level strong { margin-left: auto; }
.pmd-dashboard .mini-metrics, .pmd-dashboard .position-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pmd-dashboard .playbook { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pmd-dashboard .position-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pmd-dashboard .strategy-criteria { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pmd-dashboard .whale-header-note { text-align: left; }
.pmd-dashboard .help { width: var(--control-height); height: var(--control-height); min-height: var(--control-height); flex-shrink: 0; font-size: var(--text-xs); margin-left: .25rem; }
.pmd-dashboard .help:hover:after, .pmd-dashboard .help:focus:after { width: min(15rem, 65vw); }
.pmd-dashboard .settings-modal { max-height: calc(100dvh - 2rem); overflow-y: auto; }
.pmd-dashboard .settings-btn { margin-left: 0; }
.pmd-dashboard .toast { max-width: calc(100vw - 2rem); right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); }
.pmd-dashboard .analysis-view-actions { min-width: 0; }
.pmd-dashboard #calendarUpcoming { gap: var(--space-4) !important; }
.pmd-dashboard :is(#mainContent,#positionSection) { scroll-margin-top: 5rem; }
@media (max-width: 74.999rem) {
  .pmd-dashboard .app { grid-template-columns: minmax(0, 1fr); }
  .pmd-dashboard .sidebar { position: static; height: auto; }
  .pmd-shell-ready .pmd-dashboard .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
    width: min(20rem, calc(100vw - 2.5rem)); height: 100dvh; box-shadow: 1rem 0 3rem #0005;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .pmd-dashboard .search-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pmd-dashboard .ticker-field { grid-column: span 2; }
  .pmd-dashboard .mode-field { grid-column: span 2; }
  .pmd-dashboard .search-grid .primary { grid-column: span 2; }
  .pmd-dashboard .core-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .pmd-dashboard .why-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .pmd-dashboard .play-grid, .pmd-dashboard .hero-bottom { grid-template-columns: minmax(0, 1fr); }
  .pmd-dashboard .position-summary, .pmd-dashboard .mini-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 47.999rem) {
  .pmd-dashboard .main { padding: var(--space-4); }
  .pmd-dashboard .panel, .pmd-dashboard .hero { padding: var(--space-4); }
  .pmd-dashboard .top { gap: var(--space-3); }
  .pmd-dashboard .top-actions { margin-left: 0; width: 100%; justify-content: space-between; }
  .pmd-dashboard .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pmd-dashboard :is(.ticker-field,.mode-field) { grid-column: 1 / -1; }
  .pmd-dashboard .search-grid .primary { grid-column: 1 / -1; }
  .pmd-dashboard :is(.core-grid,.why-grid,.play-grid,.timeframe-grid,.whale-summary,.strategy-overview,.compare-grid,.hero-bottom) { grid-template-columns: minmax(0, 1fr); }
  .pmd-dashboard .hero-top { display: block; }
  .pmd-dashboard .verdict { display: inline-block; margin-top: var(--space-3); }
  .pmd-dashboard .data-strip, .pmd-dashboard .mini-metrics, .pmd-dashboard .position-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pmd-dashboard .chart-wrap { height: 20rem; }
  .pmd-dashboard .chart-toolbar { width: 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pmd-dashboard .chart-toolbar button { min-width: 0; padding-inline: .25rem; }
  .pmd-dashboard .analysis-viewbar { flex-direction: column; align-items: stretch; }
  .pmd-dashboard .analysis-view-actions { justify-content: flex-start; gap: var(--space-3); }
  .pmd-dashboard .analysis-mode-switch { width: 100%; }
  .pmd-dashboard .analysis-mode-switch button { flex: 1; }
  .pmd-dashboard .strategy-criteria { grid-template-columns: minmax(0, 1fr); }
  .pmd-dashboard .timeframe-summary, .pmd-dashboard .strategy-validation-head { flex-wrap: wrap; gap: var(--space-2); }
  .pmd-dashboard .timeframe-summary strong, .pmd-dashboard .strategy-validation-head span:last-child { text-align: left; }
  .pmd-dashboard .strategy-decision-row { flex-wrap: wrap; }
  .pmd-dashboard .lab { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pmd-dashboard .lab > :last-child { grid-column: 1 / -1; }
  .pmd-dashboard .reason-tabs { width: 100%; gap: .25rem; }
  .pmd-dashboard .reason-tab { padding-inline: .5rem; flex: 1; }
}
@media (max-width: 23.999rem) {
  .pmd-dashboard .chart-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
