*, *::before, *::after { box-sizing: border-box; }

:root {
  color-scheme: light;
  --bg: oklch(0.972 0.012 252);
  --surface: oklch(1 0 0);
  --surface-soft: oklch(0.965 0.016 252);
  --surface-strong: oklch(0.94 0.025 252);
  --ink: oklch(0.245 0.032 255);
  --ink-secondary: oklch(0.39 0.028 255);
  --muted: oklch(0.5 0.025 255);
  --line: oklch(0.9 0.014 252);
  --blue: oklch(0.58 0.19 255);
  --blue-dark: oklch(0.48 0.18 255);
  --blue-soft: oklch(0.95 0.035 253);
  --green: oklch(0.55 0.14 154);
  --green-dark: oklch(0.41 0.11 154);
  --green-soft: oklch(0.95 0.045 154);
  --red: oklch(0.58 0.19 24);
  --red-soft: oklch(0.95 0.04 24);
  --amber: oklch(0.62 0.13 73);
  --amber-soft: oklch(0.96 0.045 84);
  --shadow-panel: 0 2px 8px oklch(0.3 0.045 255 / 0.08);
  --shadow-row: 0 1px 6px oklch(0.3 0.04 255 / 0.065);
  --radius-panel: 16px;
  --radius-control: 10px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; }
button { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.app-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px 16px 16px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 22px; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue);
  color: white;
}
.brand-mark svg { width: 21px; height: 21px; stroke-width: 2; }
.brand strong { display: block; font-size: 1rem; letter-spacing: -0.01em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 0.69rem; letter-spacing: 0.025em; }

.sidebar-section { padding: 16px 6px; border-top: 1px solid var(--line); }
.search-section { padding-top: 18px; }
.field-label, .section-label {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.search-field, .select-field { position: relative; }
.search-field svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.search-field input, .select-field select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.search-field input { padding: 0 12px 0 36px; }
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field input:hover, .select-field select:hover { border-color: oklch(0.8 0.035 252); }
.search-field input:focus, .select-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.select-field select {
  appearance: none;
  padding: 0 34px 0 12px;
  cursor: pointer;
}
.select-field > svg {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.filter-list { display: flex; flex-direction: column; gap: 3px; }
.filter-button {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.filter-button:hover { background: var(--surface-soft); }
.filter-button:focus-visible, .stock-nav-button:focus-visible, .watchlist-row:focus-visible, .primary-button:focus-visible {
  outline: 3px solid oklch(0.75 0.12 255 / 0.45);
  outline-offset: 2px;
}
.filter-button.is-active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 650; }
.filter-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.filter-icon svg { width: 17px; height: 17px; }
.filter-button.is-active .filter-icon { background: var(--surface); color: var(--blue); }
.filter-count { color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }

.sidebar-stocks { min-height: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; }
.section-heading-row > span { margin-bottom: 9px; color: var(--muted); font-size: 0.71rem; }
.stock-nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.stock-nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}
.stock-nav-button:hover { background: var(--surface-soft); }
.stock-nav-button.is-selected { background: var(--blue-soft); color: var(--blue-dark); font-weight: 650; }
.stock-nav-button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-nav-button small { flex: 0 0 auto; color: var(--muted); font-size: 0.68rem; font-variant-numeric: tabular-nums; }

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 13px 8px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}
.status-dot, .live-indicator { width: 7px; height: 7px; border-radius: 999px; background: var(--green); }

.main-content { min-width: 0; padding: 10px 0 32px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.today-label { margin: 0 0 5px; color: var(--blue-dark); font-size: 0.75rem; font-weight: 700; }
.page-header h1 { margin: 0; font-size: 1.75rem; line-height: 1.25; letter-spacing: -0.025em; text-wrap: balance; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 0.88rem; text-wrap: pretty; }
.header-actions { display: flex; align-items: center; gap: 14px; padding-top: 5px; }
.update-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.live-indicator { box-shadow: 0 0 0 4px var(--green-soft); }
.live-indicator.is-loading { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.live-indicator.has-error { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }

.primary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  box-shadow: 0 2px 6px oklch(0.4 0.14 255 / 0.22);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.primary-button svg { width: 17px; height: 17px; }
.primary-button:hover { background: var(--blue-dark); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: 0.58; cursor: wait; transform: none; }

.summary-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 18px;
  padding: 0 5px;
}
.summary-bar > div { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.summary-bar span { color: var(--muted); font-size: 0.75rem; }
.summary-bar strong { font-size: 0.94rem; font-variant-numeric: tabular-nums; }
.summary-bar p { margin: 0 0 0 auto; color: var(--muted); font-size: 0.72rem; text-align: right; }

.notice {
  margin: 0 0 18px;
  padding: 10px 13px;
  border-radius: 9px;
  background: var(--amber-soft);
  color: oklch(0.4 0.09 73);
  font-size: 0.78rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  grid-template-rows: minmax(194px, auto) minmax(194px, auto);
  gap: 16px;
  margin-bottom: 32px;
}
.panel {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.overview-panel { grid-row: 1 / span 2; min-height: 404px; padding: 24px; }
.trend-panel, .compare-panel { min-height: 194px; padding: 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.panel-heading h2 { margin: 0; font-size: 0.96rem; letter-spacing: -0.01em; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 0.7rem; }

.company-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.company-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.company-name-line h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.015em; }
.stock-code-badge { padding: 2px 7px; border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 0.68rem; font-variant-numeric: tabular-nums; }
.company-meta { margin: 5px 0 0; color: var(--muted); font-size: 0.76rem; }
.status-tag { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 650; white-space: nowrap; }
.status-tag.good { background: var(--green-soft); color: var(--green-dark); }
.status-tag.neutral { background: var(--blue-soft); color: var(--blue-dark); }
.status-tag.watch { background: var(--amber-soft); color: oklch(0.42 0.1 73); }

.overview-focus { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 30px; padding: 30px 4px 25px; }
.yield-reading > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.76rem; }
.yield-reading strong { display: block; font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.yield-reading p { max-width: 38ch; margin: 9px 0 0; color: var(--ink-secondary); font-size: 0.78rem; text-wrap: pretty; }
.yield-reading p b { color: var(--ink); font-weight: 650; }

.percentile-wrap { display: flex; align-items: center; gap: 13px; }
.percentile-ring {
  --value: 0;
  --ring-color: var(--blue);
  width: 104px;
  height: 104px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--value) * 1%), var(--surface-strong) 0);
}
.percentile-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.percentile-ring-value { position: relative; display: flex; align-items: baseline; font-weight: 750; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.percentile-ring-value small { font-size: 0.65rem; font-weight: 650; color: var(--muted); }
.percentile-copy { max-width: 15ch; }
.percentile-copy span { display: block; color: var(--muted); font-size: 0.7rem; }
.percentile-copy strong { display: block; margin-top: 4px; font-size: 0.86rem; line-height: 1.4; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-item { padding: 16px 13px; }
.metric-item + .metric-item { border-left: 1px solid var(--line); }
.metric-item span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 0.69rem; }
.metric-item strong { font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.change-up { color: var(--red); }
.change-down { color: var(--green-dark); }
.change-flat { color: var(--muted); }

.range-section { padding: 20px 4px 0; }
.range-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.range-heading span { color: var(--muted); font-size: 0.72rem; }
.range-heading strong { font-size: 0.78rem; }
.range-track { position: relative; height: 7px; border-radius: 999px; background: linear-gradient(90deg, var(--amber-soft), var(--blue-soft) 48%, var(--green-soft)); }
.range-track::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px oklch(0.82 0.025 252 / 0.5); }
.range-marker { position: absolute; top: 50%; width: 13px; height: 13px; border: 3px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 1px 5px oklch(0.3 0.08 255 / 0.3); transform: translate(-50%, -50%); }
.range-labels { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 0.66rem; font-variant-numeric: tabular-nums; }
.range-labels span:nth-child(2) { text-align: center; }
.range-labels span:last-child { text-align: right; }

.trend-chart { height: 100px; margin-top: 2px; }
.trend-chart svg { width: 100%; height: 100%; overflow: visible; }
.trend-line { fill: none; stroke: var(--blue); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.trend-median { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.trend-dot { fill: var(--blue); stroke: white; stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-stats { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.chart-stats span { color: var(--muted); font-size: 0.66rem; }
.chart-stats strong { display: block; color: var(--ink-secondary); font-size: 0.72rem; font-variant-numeric: tabular-nums; }

.compare-list { display: flex; flex-direction: column; gap: 10px; }
.compare-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px; align-items: center; gap: 9px; font-size: 0.7rem; }
.compare-row > span:first-child { overflow: hidden; color: var(--ink-secondary); text-overflow: ellipsis; white-space: nowrap; }
.compare-row.is-selected > span:first-child { color: var(--blue-dark); font-weight: 700; }
.compare-track { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-strong); }
.compare-fill { height: 100%; border-radius: inherit; background: oklch(0.78 0.07 254); }
.compare-row.is-selected .compare-fill { background: var(--blue); }
.compare-value { text-align: right; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }

.empty-panel { min-height: 110px; display: grid; place-items: center; padding: 18px; color: var(--muted); font-size: 0.74rem; text-align: center; }
.panel-skeleton { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 13px; }
.overview-skeleton { padding-top: 8px; }
.compact-skeleton { min-height: 110px; }
.skeleton-line, .skeleton-block {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-strong) 25%, var(--surface-soft) 50%, var(--surface-strong) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton-line { width: 65%; height: 12px; }
.skeleton-line.large { height: 34px; margin-top: 18px; }
.skeleton-block { width: 100%; min-height: 100px; flex: 1 1 auto; margin-top: 8px; }
.width-24 { width: 24%; } .width-40 { width: 40%; } .width-50 { width: 50%; } .width-55 { width: 55%; } .width-70 { width: 70%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.watchlist-section { min-width: 0; }
.watchlist-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.watchlist-toolbar h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.015em; }
.watchlist-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 0.72rem; }
.sort-control { display: flex; align-items: center; gap: 9px; }
.sort-control > label { color: var(--muted); font-size: 0.72rem; }
.select-field.compact { width: 176px; }
.select-field.compact select { height: 38px; font-size: 0.75rem; }

.watchlist-head, .watchlist-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) minmax(90px, 0.72fr) minmax(90px, 0.76fr) minmax(180px, 1.35fr) 0.5fr 0.68fr 0.62fr 26px;
  align-items: center;
  column-gap: 14px;
}
.watchlist-head { min-height: 38px; padding: 0 18px; color: var(--muted); font-size: 0.68rem; }
.watchlist { display: flex; flex-direction: column; gap: 9px; }
.watchlist-row {
  width: 100%;
  min-height: 70px;
  padding: 11px 18px;
  border: 0;
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-row);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.watchlist-row:hover { box-shadow: 0 3px 8px oklch(0.3 0.04 255 / 0.1); transform: translateY(-1px); }
.watchlist-row.is-selected { background: var(--blue-soft); box-shadow: inset 0 0 0 1px oklch(0.75 0.08 255 / 0.58); }
.stock-identity strong { display: block; font-size: 0.85rem; }
.stock-identity span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.68rem; font-variant-numeric: tabular-nums; }
.cell-label { display: none; color: var(--muted); font-size: 0.66rem; }
.cell-value { display: block; color: var(--ink-secondary); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.price-value, .yield-value { color: var(--ink); font-size: 0.86rem; font-weight: 700; }
.yield-value { color: var(--blue-dark); }
.cell-subvalue { display: block; margin-top: 2px; font-size: 0.67rem; font-variant-numeric: tabular-nums; }
.percentile-cell { min-width: 0; }
.percentile-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.percentile-topline strong { font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.percentile-topline span { color: var(--muted); font-size: 0.65rem; white-space: nowrap; }
.percentile-mini-track { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-strong); }
.percentile-mini-fill { height: 100%; border-radius: inherit; }
.row-arrow { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.row-arrow svg { width: 14px; height: 14px; }
.watchlist-row.is-selected .row-arrow { background: var(--surface); color: var(--blue); }
.loading-copy, .unavailable-copy { color: var(--muted); font-size: 0.7rem; }

.empty-list {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 32px;
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-row);
  color: var(--muted);
  text-align: center;
}
.empty-list strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 0.9rem; }

.skeleton-row { cursor: default; }
.skeleton-row:hover { transform: none; box-shadow: var(--shadow-row); }
.skeleton-row .skeleton-line { height: 10px; }

.footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 18px 4px 0; border-top: 1px solid var(--line); }
.footer p { max-width: 70ch; margin: 0; color: var(--muted); font-size: 0.68rem; line-height: 1.65; }
.footer p:last-child { max-width: 34ch; text-align: right; }

@media (max-width: 1220px) {
  .watchlist-head, .watchlist-row { grid-template-columns: minmax(145px, 1.1fr) minmax(85px, .72fr) minmax(85px, .76fr) minmax(170px, 1.3fr) .5fr .6fr 26px; }
  .optional-cap, .col-cap { display: none; }
}

@media (max-width: 1060px) {
  .app-shell { grid-template-columns: 226px minmax(0, 1fr); gap: 18px; padding: 18px; }
  .sidebar { top: 18px; height: calc(100vh - 36px); }
  .insight-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .overview-panel { grid-column: 1 / -1; grid-row: auto; min-height: auto; }
  .metric-strip { grid-template-columns: repeat(4, 1fr); }
  .watchlist-head, .watchlist-row { grid-template-columns: minmax(140px, 1.1fr) minmax(85px, .7fr) minmax(85px, .72fr) minmax(160px, 1.2fr) .55fr 26px; }
  .optional-pe, .col-pe, .optional-years, .col-years { display: none; }
}

@media (max-width: 820px) {
  .app-shell { display: block; padding: 14px; }
  .sidebar { position: static; width: 100%; height: auto; margin-bottom: 20px; padding: 16px; }
  .brand { padding-bottom: 15px; }
  .search-section { border-top: 1px solid var(--line); }
  .filter-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .filter-button { grid-template-columns: 24px minmax(0, 1fr); padding-right: 8px; }
  .filter-count { display: none; }
  .sidebar-section { padding: 13px 6px; }
  .sidebar-stocks, .sidebar-foot { display: none; }
  .main-content { padding-top: 2px; }
  .page-header { margin-bottom: 12px; }
}

@media (max-width: 640px) {
  .app-shell { padding: 10px; }
  .sidebar {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px 12px;
    margin-bottom: 17px;
    padding: 14px;
    border-radius: 14px;
  }
  .brand { padding: 0; }
  .brand-mark { width: 36px; height: 36px; }
  .brand small { display: none; }
  .search-section { padding: 0; border-top: 0; }
  .search-section .field-label { display: none; }
  nav.sidebar-section { grid-column: 1 / -1; padding: 10px 0 5px; }
  nav.sidebar-section .section-label { display: none; }
  .sector-section { grid-column: 1 / -1; padding: 0; border-top: 0; }
  .sector-section .field-label { display: none; }
  .filter-list { grid-template-columns: 1fr 1fr; }
  .filter-button { min-height: 40px; }
  .page-header { align-items: flex-start; }
  .page-header h1 { font-size: 1.45rem; }
  .page-subtitle { max-width: 28ch; }
  .header-actions { flex-direction: column-reverse; align-items: flex-end; gap: 8px; padding-top: 0; }
  .primary-button { min-height: 38px; padding-inline: 12px; }
  .update-meta { font-size: 0.68rem; }
  .summary-bar { gap: 16px; min-height: 44px; overflow-x: auto; padding: 0 2px; }
  .summary-bar > div:nth-child(3) { display: none; }
  .summary-bar p { display: none; }
  .insight-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
  .overview-panel { padding: 19px 16px; }
  .trend-panel, .compare-panel { padding: 17px 16px; }
  .overview-focus { grid-template-columns: 1fr; gap: 18px; padding: 24px 2px 20px; }
  .yield-reading strong { font-size: 2.15rem; }
  .percentile-wrap { justify-content: flex-start; }
  .percentile-ring { width: 88px; height: 88px; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-item + .metric-item { border-left: 0; }
  .metric-item:nth-child(even) { border-left: 1px solid var(--line); }
  .metric-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric-item { padding: 13px 10px; }
  .watchlist-toolbar { align-items: flex-start; }
  .sort-control { align-items: flex-end; flex-direction: column; gap: 4px; }
  .select-field.compact { width: 152px; }
  .watchlist-head { display: none; }
  .watchlist-row {
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    padding: 16px;
  }
  .col-stock, .col-percentile { grid-column: 1 / -1; }
  .col-pe, .col-cap, .col-years { display: none; }
  .row-arrow { position: absolute; right: 14px; top: 15px; }
  .watchlist-row { position: relative; }
  .cell-label { display: block; margin-bottom: 2px; }
  .stock-identity { padding-right: 34px; }
  .footer { display: block; }
  .footer p:last-child { margin-top: 8px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
