:root {
  color-scheme: light;
  --bg: #f3f1ec;
  --bg-deep: #e9e5dd;
  --surface: #fffdf9;
  --surface-soft: #f8f6f1;
  --ink: #14243a;
  --ink-soft: #45556a;
  --muted: #6f7a88;
  --line: #d9d7d0;
  --line-strong: #b9b8b1;
  --up: #c84432;
  --up-soft: #f8ddd7;
  --down: #16816b;
  --down-soft: #d9eee8;
  --gold: #9c782d;
  --gold-soft: #eee2c5;
  --navy: #15263d;
  --shadow: 0 18px 44px rgb(28 39 51 / 7%);
  --radius: 18px;
  --radius-small: 12px;
  --content-width: 1440px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 4%, rgb(180 147 82 / 10%), transparent 24rem),
    linear-gradient(180deg, #f8f6f1 0, var(--bg) 38rem);
  font-family:
    "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--navy);
  color: white;
  clip-path: inset(50%);
}

.skip-link:focus {
  transform: translateY(0);
  clip-path: none;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  align-items: center;
  width: min(calc(100% - 48px), var(--content-width));
  min-height: 82px;
  margin: 0 auto;
  border-bottom: 1px solid rgb(20 36 58 / 14%);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 35px;
  height: 35px;
  gap: 3px;
  padding: 7px;
  border-radius: 50%;
  background: var(--navy);
}

.brand-mark span {
  display: block;
  width: 4px;
  border-radius: 4px 4px 0 0;
  background: #f7f2e7;
}

.brand-mark span:nth-child(1) {
  height: 7px;
}

.brand-mark span:nth-child(2) {
  height: 14px;
}

.brand-mark span:nth-child(3) {
  height: 20px;
  background: #e7b957;
}

.brand-copy {
  display: grid;
  line-height: 1.18;
}

.brand-copy strong {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.board-switch {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 249 / 68%);
}

.board-switch-inline {
  width: fit-content;
  margin: 0;
  background: var(--surface-soft);
}

.chart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.switch-button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.switch-button:hover {
  color: var(--ink);
}

.switch-button.is-active {
  background: var(--navy);
  color: white;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 249 / 65%);
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 4px rgb(200 68 50 / 10%);
}

.status-chip.is-loading .status-dot {
  animation: pulse 1.2s ease infinite;
}

.status-chip.is-demo .status-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgb(156 120 45 / 11%);
}

.dashboard-shell {
  width: min(calc(100% - 48px), var(--content-width));
  margin: 0 auto;
  padding: 64px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: clamp(40px, 8vw, 130px);
  align-items: end;
  margin-bottom: 42px;
}

.eyebrow,
.section-index,
.method-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.eyebrow-rule {
  width: 28px;
  height: 1px;
  background: var(--gold);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 23px;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.mobile-title-break {
  display: inline;
}

.hero-summary {
  max-width: 840px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.8;
}

.hero-method {
  padding: 20px 0 3px 24px;
  border-left: 1px solid var(--line-strong);
}

.hero-method p {
  margin: 11px 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.method-formula {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: -0.03em;
}

.index-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.index-card {
  position: relative;
  min-height: 126px;
  padding: 19px 20px;
  overflow: hidden;
  background: var(--surface);
}

.index-card::after {
  position: absolute;
  right: -14px;
  bottom: -19px;
  width: 96px;
  height: 58px;
  opacity: 0.22;
  content: "";
  background: var(--spark, transparent);
}

.index-spark {
  position: absolute;
  top: 47px;
  right: 16px;
  width: 72px;
  height: 25px;
  opacity: 0.2;
}

.index-spark path {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

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

.index-name {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.index-code {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.index-value {
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.index-value small {
  margin-left: 2px;
  color: var(--muted);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9px;
  font-weight: 500;
}

.index-change {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 6px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(30px, 2.8vw, 41px);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.index-change > span {
  font-size: 0.43em;
  letter-spacing: 0;
}

.index-change strong {
  font: inherit;
}

.index-subline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.index-amount {
  color: var(--muted);
  font-size: 11px;
}

.direction-up {
  color: var(--up);
}

.direction-down {
  color: var(--down);
}

.direction-flat {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.primary-column {
  display: grid;
  grid-column: 1 / -1;
  gap: 20px;
  min-width: 0;
}

.panel {
  min-width: 0;
  padding: clamp(21px, 2.3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 253 249 / 92%);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 550;
  letter-spacing: -0.04em;
}

.section-note,
.quiet-label {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.chart-frame {
  display: grid;
  gap: 3px;
  overflow: visible;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strong-ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(110px, 0.7fr) minmax(140px, 1.5fr) 68px;
  align-items: center;
  gap: 12px;
  min-height: 39px;
  padding: 3px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}

.strong-ranking-row:last-child {
  border-bottom: 0;
}

.strong-ranking-row:hover,
.strong-ranking-row:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.strong-ranking-index {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.strong-ranking-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strong-ranking-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-deep);
}

.strong-ranking-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--up);
}

.strong-ranking-row > strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-align: right;
}

.metric-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-deep);
}

.metric-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--up);
}

.metric-track.metric-down span {
  background: var(--down);
}

.metric-track.metric-neutral span {
  background: var(--gold);
}

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

.board-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.board-card:hover,
.board-card:focus-visible {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 12px 24px rgb(20 36 58 / 8%);
  transform: translateY(-2px);
}

.board-card.is-board-loading {
  border-color: var(--gold);
  background:
    linear-gradient(
      110deg,
      #efe3c7 10%,
      #fffdfa 32%,
      #d9bd7e 50%,
      #fffdfa 68%,
      #efe3c7 90%
    );
  background-size: 240% 100%;
  animation:
    board-card-sheen 900ms linear infinite,
    board-loading-pulse 1.2s ease-in-out infinite;
}

.board-card.is-board-loading::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgb(20 36 58 / 12%);
  backdrop-filter: blur(1.2px);
  content: "";
  pointer-events: none;
}

.board-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
}

.board-name {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.board-label {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--up-soft);
  border-radius: 999px;
  background: rgb(248 221 215 / 45%);
  color: var(--up);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.board-loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid rgb(243 207 116 / 42%);
  border-radius: 999px;
  background: var(--navy);
  box-shadow: 0 12px 30px rgb(20 36 58 / 24%);
  color: white;
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -44%) scale(0.92);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  white-space: nowrap;
}

.board-card.is-board-loading .board-loading-indicator {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.board-card.is-board-loading .board-label {
  opacity: 0;
}

.board-loading-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgb(255 255 255 / 24%);
  border-top-color: #f3cf74;
  border-radius: 50%;
  animation: board-spin 700ms linear infinite;
}

.board-main-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 27px 0 5px;
}

.board-main-metric strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.08em;
}

.board-main-metric span {
  color: var(--muted);
  font-size: 11px;
}

.metric-track {
  margin: 4px 0 22px;
}

.board-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.board-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.board-facts strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.board-metric {
  display: grid;
  gap: 2px;
}

.board-metric span {
  color: var(--muted);
  font-size: 9px;
}

.board-metric strong {
  font-size: 11px;
  font-weight: 650;
}

.leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 10px;
}

.leader-row strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.leader-row em {
  color: var(--up);
  font-style: normal;
  font-weight: 700;
}

.method-panel {
  margin-top: 20px;
}

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

.method-step {
  min-height: 180px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
}

.method-step-number {
  color: var(--gold);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.method-step h3 {
  margin: 16px 0 9px;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.method-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.data-footnote {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 28px;
  margin-top: 22px;
  padding: 18px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.data-footnote strong {
  color: var(--ink-soft);
}

.data-footnote p {
  max-width: 920px;
  margin: 4px 0 0;
}

.compliance-note {
  max-width: 220px !important;
  text-align: right;
}

.fallback-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 13px 16px;
  border: 1px solid #dccba6;
  border-radius: 10px;
  background: #f6eddb;
  color: #6d531b;
  font-size: 11px;
}

.fallback-banner[hidden] {
  display: none;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(18 27 39 / 34%);
  backdrop-filter: blur(3px);
}

.drawer-backdrop[hidden] {
  display: none;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(540px, calc(100vw - 36px));
  height: 100dvh;
  padding: 42px 32px 32px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -22px 0 60px rgb(18 27 39 / 16%);
  transform: translateX(105%);
  visibility: hidden;
  transition:
    transform 230ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 230ms;
}

.detail-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.drawer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.drawer-content h2 {
  max-width: 420px;
  margin: 7px 0 8px;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.drawer-content > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.participation-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin: 16px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.participation-strip strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.detail-metric {
  padding: 15px;
  background: var(--surface-soft);
}

.detail-metric span {
  color: var(--muted);
  font-size: 9px;
}

.detail-metric strong {
  display: block;
  margin-top: 5px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 20px;
}

.detail-section {
  margin-top: 27px;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.stock-list {
  display: grid;
}

.stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 47px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.stock-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stock-name span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.stock-change {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
}

.stock-filter-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.stock-filter-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
}

.stock-filter-controls input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.stock-filter-controls input:focus {
  border-color: var(--gold);
  outline: 2px solid rgb(156 120 45 / 16%);
}

.apply-filter-button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: var(--navy);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.filter-summary {
  margin: 13px 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.filtered-stock-row {
  grid-template-columns: minmax(130px, 1fr) auto auto auto auto;
  gap: 9px;
}

.stock-rank,
.stock-amount {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  white-space: nowrap;
}

.filter-empty {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.drawer-distribution {
  display: grid;
  gap: 7px;
}

.drawer-distribution-row {
  display: grid;
  grid-template-columns: 68px 1fr 34px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}

.drawer-distribution-row span:nth-child(2) {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--bg-deep);
}

.drawer-distribution-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--up);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: 12px;
}

.toast[hidden] {
  display: none;
}

.skeleton-card,
.chart-skeleton,
.list-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
}

.skeleton-card::after,
.chart-skeleton::after,
.list-skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 72%), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

.chart-skeleton {
  height: 235px;
  margin: 28px 12px;
  border-radius: 10px;
}

.list-skeleton {
  height: 42px;
  margin-bottom: 3px;
  border-radius: 7px;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes board-card-sheen {
  to {
    background-position: -240% 0;
  }
}

@keyframes board-loading-pulse {
  0%,
  100% {
    box-shadow:
      0 12px 28px rgb(156 120 45 / 16%),
      0 0 0 0 rgb(156 120 45 / 0%);
  }

  50% {
    box-shadow:
      0 16px 36px rgb(156 120 45 / 28%),
      0 0 0 6px rgb(156 120 45 / 18%);
  }
}

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

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@media (max-width: 1120px) {
  .header-actions {
    grid-column: 2;
  }

  .hero {
    gap: 40px;
  }

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

  .primary-column {
    grid-column: 1 / -1;
  }

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

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

}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    width: min(calc(100% - 28px), var(--content-width));
    min-height: 68px;
    gap: 10px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .header-actions {
    gap: 6px;
  }

  .status-chip {
    max-width: 124px;
    min-height: 31px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .board-switch-inline {
    position: static;
    width: 100%;
    justify-content: stretch;
    margin: 0;
    border-radius: 12px;
    background: var(--surface-soft);
    backdrop-filter: none;
  }

  .switch-button {
    flex: 1;
    min-height: 44px;
  }

  .chart-controls {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
  }

  .dashboard-shell {
    width: min(calc(100% - 28px), var(--content-width));
    padding-top: 35px;
  }

  .hero {
    display: block;
    margin-bottom: 27px;
  }

  .eyebrow {
    margin-bottom: 15px;
  }

  h1 {
    margin-bottom: 17px;
    font-size: clamp(39px, 12vw, 54px);
  }

  .mobile-title-break {
    display: block;
  }

  .hero-summary {
    font-size: 14px;
    line-height: 1.75;
  }

  .hero-method {
    margin-top: 24px;
    padding: 15px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .index-card {
    min-height: 114px;
    padding: 14px;
  }

  .index-value {
    font-size: 16px;
  }

  .index-change {
    margin-top: 10px;
    font-size: 29px;
  }

  .index-amount {
    font-size: 10px;
  }

  .index-spark {
    top: 43px;
    right: 12px;
    width: 58px;
  }

  .dashboard-grid,
  .primary-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-column: auto;
    gap: 14px;
  }

  .panel {
    padding: 19px 17px;
    border-radius: 15px;
  }

  .section-heading {
    align-items: start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .section-note {
    max-width: 110px;
    line-height: 1.45;
  }

  .board-heading {
    display: block;
  }

  .strong-ranking-row {
    grid-template-columns: 28px minmax(88px, 0.8fr) minmax(80px, 1.2fr) 56px;
    gap: 8px;
    padding-inline: 3px;
  }

  .strong-ranking-name {
    font-size: 11px;
  }

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

  .method-panel {
    margin-top: 14px;
  }

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

  .method-step {
    min-height: auto;
    padding: 17px;
  }

  .board-card {
    min-height: 286px;
    padding: 19px;
  }

  .board-loading-indicator {
    max-width: calc(100% - 32px);
    min-height: 44px;
    padding-inline: 15px;
    font-size: 11px;
  }

  .board-main-metric strong {
    font-size: 39px;
  }

  .data-footnote {
    display: block;
    margin-top: 15px;
  }

  .compliance-note {
    margin-top: 10px !important;
    text-align: left;
  }

  .detail-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(84dvh, 780px);
    padding: 32px 18px calc(24px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
  }

  .detail-drawer.is-open {
    transform: translateY(0);
  }

  .drawer-close {
    top: 13px;
    right: 13px;
  }

  .drawer-content h2 {
    padding-right: 42px;
    font-size: 32px;
  }

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

  .apply-filter-button {
    grid-column: 1 / -1;
  }

  .filtered-stock-row {
    grid-template-columns: minmax(110px, 1fr) auto auto auto;
    gap: 8px;
  }

  .filtered-stock-row .stock-amount {
    display: none;
  }

  .toast {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .status-chip {
    max-width: 152px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .board-metrics {
    gap: 8px;
  }

  .board-metric span {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #4f5c6d;
    --line: #a9aaa5;
    --line-strong: #777d83;
  }
}
