:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-deep: #040b14;
  --surface: #0d1928;
  --surface-raised: #112236;
  --surface-soft: #0a1624;
  --surface-hover: #14283d;
  --line: #203148;
  --line-soft: rgba(148, 170, 198, 0.13);
  --text: #ecf4ff;
  --text-soft: #c3d2e4;
  --muted: #96aac1;
  --faint: #6f849b;
  --accent: #48d7cd;
  --accent-strong: #22bbb3;
  --accent-soft: rgba(72, 215, 205, 0.13);
  --blue: #7c9cff;
  --blue-soft: rgba(124, 156, 255, 0.14);
  --positive: #4ac78e;
  --positive-soft: rgba(74, 199, 142, 0.14);
  --warning: #f5b942;
  --warning-soft: rgba(245, 185, 66, 0.14);
  --negative: #ff7c8a;
  --negative-soft: rgba(255, 124, 138, 0.14);
  --violet: #b28cff;
  --violet-soft: rgba(178, 140, 255, 0.14);
  --sidebar-width: 248px;
  --content-max: 1580px;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% -10%, rgba(75, 129, 205, 0.14), transparent 34rem),
    radial-gradient(circle at 15% 18%, rgba(72, 215, 205, 0.06), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(148, 170, 198, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 170, 198, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #78ece5;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(72, 215, 205, 0.46);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

h1,
h2,
h3,
strong,
.numeric,
.kpi-value {
  font-variant-numeric: tabular-nums;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #041315;
  font-weight: 750;
  transform: translate(-50%, -160%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  color: #041315;
  transform: translate(-50%, 0);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 24px 18px 18px;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
  background: rgba(6, 15, 27, 0.9);
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 30px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(72, 215, 205, 0.32);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(72, 215, 205, 0.24), rgba(124, 156, 255, 0.12)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 28px rgba(0, 0, 0, 0.22);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  gap: 7px;
}

.nav-link {
  position: relative;
  display: grid;
  min-height: 46px;
  padding: 10px 12px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.nav-link:hover {
  border-color: var(--line-soft);
  background: rgba(148, 170, 198, 0.06);
  color: var(--text);
}

.nav-link.is-active {
  border-color: rgba(72, 215, 205, 0.18);
  background: linear-gradient(90deg, rgba(72, 215, 205, 0.14), rgba(72, 215, 205, 0.04));
  color: var(--text);
}

.nav-link.is-active::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -19px;
  width: 3px;
  border-radius: 0 5px 5px 0;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(72, 215, 205, 0.45);
  content: "";
}

.nav-index {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.nav-link.is-active .nav-index {
  color: var(--accent);
}

.sidebar-spacer {
  flex: 1;
}

.read-only-card {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid rgba(74, 199, 142, 0.18);
  border-radius: var(--radius-md);
  background: rgba(74, 199, 142, 0.07);
}

.read-only-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bdebd5;
  font-size: 0.82rem;
}

.read-only-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--faint);
}

.status-dot--ok {
  background: var(--positive);
  box-shadow: 0 0 0 4px rgba(74, 199, 142, 0.12);
}

.sidebar-meta {
  display: flex;
  padding: 14px 3px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.sidebar-meta a {
  color: var(--muted);
}

.report-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  min-height: 82px;
  padding: 15px clamp(18px, 3vw, 42px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 17, 31, 0.82);
  backdrop-filter: blur(18px);
}

.topbar-start,
.topbar-end {
  display: flex;
  align-items: center;
}

.topbar-start {
  min-width: 0;
  gap: 12px;
}

.topbar-end {
  gap: 22px;
}

.eyebrow,
.section-kicker {
  margin-bottom: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.date-context {
  display: grid;
  gap: 2px;
}

.date-context span {
  color: var(--faint);
  font-size: 0.68rem;
}

.date-context strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.icon-button,
.refresh-button,
.secondary-button,
.text-button,
.filter-chip,
.row-action {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 1.15rem;
}

.icon-button:hover {
  border-color: rgba(72, 215, 205, 0.38);
  background: var(--surface-hover);
  color: var(--text);
}

.menu-button,
.sidebar-close {
  display: none;
}

.refresh-button,
.secondary-button {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(72, 215, 205, 0.28);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(72, 215, 205, 0.15), rgba(72, 215, 205, 0.06));
  color: #d8fffb;
  font-size: 0.8rem;
  font-weight: 750;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.refresh-button:hover,
.secondary-button:hover {
  border-color: rgba(72, 215, 205, 0.56);
  background: rgba(72, 215, 205, 0.18);
  color: #edfffd;
}

.refresh-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.refresh-button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.refresh-button.is-loading .refresh-icon {
  animation: spin 700ms linear infinite;
}

.connection-banner {
  width: min(calc(100% - clamp(36px, 6vw, 84px)), var(--content-max));
  margin: 18px auto 0;
  padding: 11px 14px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.connection-banner--loading {
  display: flex;
  border-color: rgba(124, 156, 255, 0.18);
  background: var(--blue-soft);
  color: #cbd7ff;
}

.connection-banner--error {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-color: rgba(255, 124, 138, 0.26);
  background: var(--negative-soft);
  color: #ffd7dc;
}

.connection-banner--error > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 124, 138, 0.18);
  font-weight: 850;
}

.connection-banner p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(124, 156, 255, 0.25);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

main,
.site-footer {
  width: min(calc(100% - clamp(36px, 6vw, 84px)), var(--content-max));
  margin-inline: auto;
}

.page-section {
  padding: clamp(54px, 7vw, 88px) 0 0;
}

.hero-section {
  padding-top: clamp(28px, 4vw, 48px);
}

.hero-panel {
  position: relative;
  display: grid;
  min-height: 290px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.6fr);
  align-items: center;
  gap: 36px;
  border: 1px solid rgba(124, 156, 255, 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 85% 18%, rgba(72, 215, 205, 0.13), transparent 24rem),
    radial-gradient(circle at 0 100%, rgba(124, 156, 255, 0.11), transparent 30rem),
    linear-gradient(135deg, rgba(17, 34, 54, 0.98), rgba(9, 22, 36, 0.98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-panel::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(72, 215, 205, 0.1);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.market-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(72, 215, 205, 0.11), 0 0 20px rgba(72, 215, 205, 0.4);
}

.freshness-chip {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 650;
}

.freshness-chip.is-fresh {
  border-color: rgba(74, 199, 142, 0.24);
  background: var(--positive-soft);
  color: #aee9cd;
}

.freshness-chip.is-stale {
  border-color: rgba(245, 185, 66, 0.3);
  background: var(--warning-soft);
  color: #ffe0a2;
}

.hero-panel h2 {
  max-width: 760px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: -0.055em;
}

.hero-panel h2 span {
  color: var(--accent);
}

.hero-copy > p {
  max-width: 700px;
  margin: 17px 0 22px;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.4vw, 1.02rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta > span {
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(5, 13, 23, 0.28);
  color: var(--faint);
  font-size: 0.69rem;
}

.hero-meta strong {
  margin-left: 4px;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

.regime-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 260px);
  aspect-ratio: 1;
  margin-inline: auto;
  place-items: center;
}

.regime-orbit__ring {
  display: grid;
  width: 76%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(72, 215, 205, 0.26);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(72, 215, 205, 0.12), transparent 62%),
    conic-gradient(from 210deg, rgba(72, 215, 205, 0.7), rgba(124, 156, 255, 0.08) 40%, rgba(72, 215, 205, 0.48) 78%, rgba(72, 215, 205, 0.7));
  box-shadow: 0 0 50px rgba(72, 215, 205, 0.08);
  mask: radial-gradient(circle, transparent 69%, #000 70%);
}

.regime-orbit__core {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 1px;
}

.regime-orbit__core span {
  color: var(--faint);
  font-size: 0.72rem;
}

.regime-orbit__core strong {
  font-family: var(--font-mono);
  font-size: 1.7rem;
}

.orbit-label {
  position: absolute;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 25, 40, 0.9);
  color: var(--muted);
  font-size: 0.63rem;
}

.orbit-label--top {
  top: 6%;
  left: 7%;
}

.orbit-label--right {
  top: 35%;
  right: 1%;
}

.orbit-label--bottom {
  right: 15%;
  bottom: 5%;
}

.kpi-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  min-width: 0;
  min-height: 132px;
  padding: 17px 17px 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(17, 34, 54, 0.78), rgba(9, 22, 36, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.kpi-label {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.hint {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--faint);
  font-family: Georgia, serif;
  font-size: 0.6rem;
}

.kpi-value {
  display: block;
  margin-top: 12px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card p {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: 0.64rem;
}

.mini-meter {
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 170, 198, 0.12);
}

.mini-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  transition: width 450ms ease;
}

.unit-track {
  display: flex;
  margin-top: 13px;
  gap: 5px;
}

.unit-block {
  height: 5px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 170, 198, 0.12);
}

.unit-block span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.overview-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.78fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: clamp(18px, 2.5vw, 24px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(15, 29, 46, 0.92), rgba(9, 21, 35, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 18px 45px rgba(0, 0, 0, 0.08);
}

.panel-heading,
.section-heading,
.valuation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading {
  margin-bottom: 20px;
}

.section-heading {
  margin-bottom: 22px;
  align-items: flex-end;
}

.section-heading > div:first-child > p:last-child,
.valuation-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.section-aside {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.section-date,
.subtle-label {
  color: var(--faint);
  font-size: 0.69rem;
}

.section-date strong {
  margin-left: 4px;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  padding: 4px 9px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 170, 198, 0.08);
  color: var(--text-soft);
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill--positive {
  border-color: rgba(74, 199, 142, 0.24);
  background: var(--positive-soft);
  color: #9ce3c3;
}

.status-pill--warning {
  border-color: rgba(245, 185, 66, 0.26);
  background: var(--warning-soft);
  color: #ffda8f;
}

.status-pill--negative {
  border-color: rgba(255, 124, 138, 0.26);
  background: var(--negative-soft);
  color: #ffbdc5;
}

.status-pill--info {
  border-color: rgba(124, 156, 255, 0.27);
  background: var(--blue-soft);
  color: #c2ceff;
}

.status-pill--violet {
  border-color: rgba(178, 140, 255, 0.26);
  background: var(--violet-soft);
  color: #d8c2ff;
}

.status-pill--neutral {
  color: var(--muted);
}

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

.action-item {
  display: grid;
  padding: 15px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(7, 17, 31, 0.42);
}

.action-side {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 850;
}

.action-side--buy {
  background: var(--positive-soft);
  color: #9ce3c3;
}

.action-side--sell {
  background: var(--negative-soft);
  color: #ffbdc5;
}

.action-side--hold {
  background: var(--blue-soft);
  color: #c2ceff;
}

.action-main {
  min-width: 0;
}

.action-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-main p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.action-metrics {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.action-metrics strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.notice-list {
  display: grid;
  padding: 0;
  margin: 0;
  gap: 8px;
  list-style: none;
}

.notice-item {
  position: relative;
  padding: 11px 12px 11px 31px;
  border: 1px solid rgba(245, 185, 66, 0.16);
  border-radius: 10px;
  background: rgba(245, 185, 66, 0.06);
  color: var(--text-soft);
  font-size: 0.72rem;
}

.notice-item::before {
  position: absolute;
  top: 15px;
  left: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  content: "";
}

.notice-item--error {
  border-color: rgba(255, 124, 138, 0.18);
  background: rgba(255, 124, 138, 0.06);
}

.notice-item--error::before {
  background: var(--negative);
}

.notice-item--muted {
  border-color: var(--line-soft);
  background: rgba(148, 170, 198, 0.04);
  color: var(--muted);
}

.notice-item--muted::before {
  background: var(--faint);
}

.rotation-grid,
.dca-grid,
.operations-grid {
  display: grid;
  gap: 16px;
}

.rotation-grid {
  grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1.45fr);
}

.allocation-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) minmax(160px, 1fr);
  align-items: center;
  gap: 24px;
}

.donut {
  position: relative;
  display: grid;
  width: min(100%, 210px);
  aspect-ratio: 1;
  margin-inline: auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--line) 0 100%);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25), 0 18px 42px rgba(0, 0, 0, 0.14);
}

.donut::after {
  position: absolute;
  width: 66%;
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface-soft);
  content: "";
}

.donut-hole {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 1px;
}

.donut-hole span {
  color: var(--faint);
  font-size: 0.68rem;
}

.donut-hole strong {
  font-family: var(--font-mono);
  font-size: 1.35rem;
}

.allocation-legend,
.dca-allocation-list {
  display: grid;
  padding: 0;
  margin: 0;
  gap: 10px;
  list-style: none;
}

.allocation-legend li,
.dca-allocation-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.72rem;
}

.allocation-legend strong,
.dca-allocation-list strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.73rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--legend-color, var(--accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--legend-color, var(--accent)) 14%, transparent);
}

.table-shell {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-color: var(--line) transparent;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.73rem;
}

.data-table th,
.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 130ms ease;
}

.data-table tbody tr:not(.loading-row):hover {
  background: rgba(148, 170, 198, 0.045);
}

.data-table td.numeric,
.data-table th.numeric {
  text-align: right;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.asset-identity {
  display: grid;
  min-width: 126px;
  gap: 1px;
}

.asset-identity strong {
  color: var(--text);
  font-size: 0.77rem;
}

.asset-identity span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.role-label {
  color: var(--muted);
  white-space: nowrap;
}

.value-positive {
  color: var(--positive) !important;
}

.value-negative {
  color: var(--negative) !important;
}

.value-muted {
  color: var(--faint) !important;
}

.row-action {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(148, 170, 198, 0.04);
  color: var(--muted);
}

.row-action:hover {
  border-color: rgba(72, 215, 205, 0.28);
  background: var(--accent-soft);
  color: var(--accent);
}

.loading-row td {
  padding-block: 34px;
  color: var(--faint);
  text-align: center;
}

.radar-summary {
  display: flex;
  gap: 10px;
}

.radar-summary span {
  min-width: 100px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(148, 170, 198, 0.04);
  color: var(--faint);
  font-size: 0.68rem;
  text-align: center;
}

.radar-summary strong {
  margin-right: 3px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.radar-toolbar {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(148, 170, 198, 0.04);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.filter-chip:hover {
  border-color: var(--line);
  background: var(--surface-hover);
  color: var(--text-soft);
}

.filter-chip.is-active {
  border-color: rgba(72, 215, 205, 0.26);
  background: var(--accent-soft);
  color: #b6f4ef;
}

.search-field {
  display: flex;
  width: min(260px, 100%);
  min-height: 40px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(5, 13, 23, 0.42);
  color: var(--faint);
}

.search-field:focus-within {
  border-color: rgba(72, 215, 205, 0.34);
  box-shadow: 0 0 0 3px rgba(72, 215, 205, 0.08);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.72rem;
}

.search-field input::placeholder {
  color: var(--faint);
}

.radar-table {
  min-width: 840px;
}

.state-cell {
  display: grid;
  min-width: 125px;
  justify-items: start;
  gap: 3px;
}

.state-cell small {
  max-width: 260px;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distance-cell {
  min-width: 145px;
}

.distance-copy {
  display: flex;
  margin-bottom: 5px;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.distance-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 170, 198, 0.12);
}

.distance-track span {
  display: block;
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.panel-footer {
  display: flex;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-footer p {
  margin: 0;
  color: var(--faint);
  font-size: 0.67rem;
}

.text-button {
  min-height: 32px;
  padding: 4px 7px;
  background: transparent;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 750;
}

.text-button:hover {
  color: #84f1ea;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dca-metrics {
  display: grid;
  margin-bottom: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-strip {
  display: flex;
  min-height: 74px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(13, 25, 40, 0.72);
}

.metric-strip span {
  color: var(--muted);
  font-size: 0.69rem;
}

.metric-strip strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.83rem;
  text-align: right;
}

.dca-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
}

.stacked-allocation {
  display: flex;
  height: 15px;
  margin: 6px 0 22px;
  overflow: hidden;
  border: 2px solid rgba(5, 13, 23, 0.52);
  border-radius: 999px;
  background: var(--line);
}

.stacked-allocation span {
  display: block;
  height: 100%;
  background: var(--allocation-color, var(--accent));
  transition: width 450ms ease;
}

.dca-allocation-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 22px;
}

.allocation-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.allocation-copy span {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.allocation-copy small {
  color: var(--faint);
  font-size: 0.6rem;
}

.account-holdings {
  display: grid;
  gap: 9px;
}

.account-holding {
  display: grid;
  padding: 11px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(5, 13, 23, 0.28);
}

.account-holding > div:first-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.account-holding span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-holding small {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.61rem;
}

.account-holding > div:last-child {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.account-holding strong {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.valuation-heading {
  margin: 28px 0 14px;
  align-items: flex-end;
}

.valuation-heading > span {
  color: var(--muted);
  font-size: 0.68rem;
}

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

.valuation-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(15, 29, 46, 0.88), rgba(9, 21, 35, 0.88));
}

.valuation-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.valuation-card__header strong {
  display: block;
  font-size: 0.82rem;
}

.valuation-card__header small {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.61rem;
}

.valuation-score {
  display: flex;
  margin: 22px 0 18px;
  align-items: baseline;
  gap: 5px;
}

.valuation-score strong {
  font-family: var(--font-mono);
  font-size: 2rem;
  letter-spacing: -0.06em;
}

.valuation-score span {
  color: var(--faint);
  font-size: 0.65rem;
}

.valuation-meter {
  position: relative;
  height: 6px;
  margin-bottom: 17px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--positive), var(--accent) 43%, var(--warning) 72%, var(--negative));
}

.valuation-meter span {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%);
}

.valuation-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.valuation-details div {
  display: grid;
  gap: 1px;
}

.valuation-details span {
  color: var(--faint);
  font-size: 0.6rem;
}

.valuation-details strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.quality-line {
  display: flex;
  margin-top: 15px;
  padding-top: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.64rem;
}

.operations-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.pipeline-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.pipeline-step {
  position: relative;
  display: grid;
  min-height: 56px;
  padding-bottom: 12px;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
}

.pipeline-step:not(:last-child)::after {
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 12px;
  width: 1px;
  background: var(--line);
  content: "";
}

.pipeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
}

.pipeline-step--ok .pipeline-marker {
  border-color: rgba(74, 199, 142, 0.3);
  background: var(--positive-soft);
  color: var(--positive);
}

.pipeline-step--warning .pipeline-marker {
  border-color: rgba(245, 185, 66, 0.3);
  background: var(--warning-soft);
  color: var(--warning);
}

.pipeline-step--error .pipeline-marker {
  border-color: rgba(255, 124, 138, 0.3);
  background: var(--negative-soft);
  color: var(--negative);
}

.pipeline-copy {
  min-width: 0;
}

.pipeline-copy strong {
  display: block;
  color: var(--text-soft);
  font-size: 0.73rem;
}

.pipeline-copy p {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 0.63rem;
}

.pipeline-time {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  white-space: nowrap;
}

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

.integration-card {
  display: grid;
  padding: 13px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(5, 13, 23, 0.3);
}

.integration-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: #c2ceff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
}

.integration-copy {
  min-width: 0;
}

.integration-copy strong {
  display: block;
  font-size: 0.73rem;
}

.integration-copy p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.freshness-panel {
  margin-top: 16px;
}

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

.freshness-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(5, 13, 23, 0.25);
}

.freshness-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 0.62rem;
}

.freshness-card strong {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.freshness-card small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.59rem;
}

.site-footer {
  display: flex;
  padding: 64px 0 28px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--faint);
  font-size: 0.65rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p:last-child {
  font-family: var(--font-mono);
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 170px;
  padding: 24px;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.empty-state p {
  max-width: 360px;
  margin: 0;
  color: var(--faint);
  font-size: 0.68rem;
}

.empty-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
}

.compact-empty {
  min-height: 88px;
  padding: 8px 4px;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  text-align: left;
}

.compact-empty .empty-symbol {
  margin: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(1, 7, 14, 0.7);
  backdrop-filter: blur(4px);
}

.detail-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  display: grid;
  width: min(460px, 100%);
  min-height: 100vh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 0, rgba(72, 215, 205, 0.08), transparent 22rem),
    var(--surface-soft);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.35);
  animation: drawer-in 180ms ease both;
}

.drawer-header,
.drawer-footer {
  padding: 22px 24px;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-header h2 {
  font-size: 1.5rem;
}

.drawer-header p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.drawer-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.drawer-section + .drawer-section {
  margin-top: 26px;
}

.drawer-section h3 {
  margin-bottom: 11px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.drawer-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.drawer-metric {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(148, 170, 198, 0.035);
}

.drawer-metric span {
  display: block;
  color: var(--faint);
  font-size: 0.6rem;
}

.drawer-metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.drawer-note {
  padding: 13px;
  border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0;
  background: var(--accent-soft);
  color: var(--text-soft);
  font-size: 0.7rem;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
}

.drawer-footer p {
  margin: 0;
  color: var(--faint);
  font-size: 0.62rem;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(148, 170, 198, 0.08);
}

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

.skeleton--action {
  height: 74px;
}

.skeleton--line {
  height: 22px;
}

.skeleton--block {
  min-height: 62px;
}

.skeleton--valuation {
  min-height: 250px;
}

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: calc(var(--sidebar-width) + 16px);
  z-index: 120;
  padding: 14px 16px;
  border: 1px solid rgba(245, 185, 66, 0.3);
  border-radius: var(--radius-md);
  background: #2d2414;
  color: #ffe3aa;
  box-shadow: var(--shadow);
  font-size: 0.78rem;
}

body.drawer-open,
body.nav-open {
  overflow: hidden;
}

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

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

@keyframes drawer-in {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-card {
    min-height: 118px;
  }

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

@media (max-width: 1040px) {
  :root {
    --sidebar-width: 76px;
  }

  .sidebar {
    padding-inline: 10px;
  }

  .brand-row {
    justify-content: center;
    padding-inline: 0;
  }

  .brand-copy,
  .nav-link > span:last-child,
  .read-only-card,
  .sidebar-meta {
    display: none;
  }

  .nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 6px;
  }

  .nav-link.is-active::before {
    left: -11px;
  }

  .nav-index {
    font-size: 0.72rem;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .rotation-grid,
  .dca-grid,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .allocation-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-width: 268px;
  }

  html {
    scroll-padding-top: 82px;
  }

  .sidebar {
    width: min(86vw, var(--sidebar-width));
    padding: 20px 18px 18px;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(1, 7, 14, 0.7);
    backdrop-filter: blur(3px);
  }

  .brand-row {
    justify-content: space-between;
  }

  .brand-copy,
  .nav-link > span:last-child,
  .read-only-card,
  .sidebar-meta,
  .menu-button,
  .sidebar-close {
    display: flex;
  }

  .brand-copy {
    display: grid;
  }

  .nav-link {
    grid-template-columns: 30px minmax(0, 1fr);
    justify-items: start;
    padding-inline: 12px;
  }

  .nav-link.is-active::before {
    left: -19px;
  }

  .sidebar-meta {
    display: flex;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    min-height: 72px;
    padding: 12px 18px;
  }

  .topbar-end {
    gap: 10px;
  }

  .date-context--secondary {
    display: none;
  }

  .hero-panel {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .regime-orbit {
    display: none;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .radar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

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

  .valuation-grid {
    grid-template-columns: 1fr;
  }

  .noscript-message {
    left: 16px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  main,
  .site-footer,
  .connection-banner {
    width: calc(100% - 28px);
  }

  .topbar h1,
  .eyebrow,
  .date-context {
    display: none;
  }

  .topbar {
    justify-content: space-between;
  }

  .refresh-button {
    width: 42px;
    padding-inline: 0;
  }

  .refresh-button > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .connection-banner--error {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .connection-banner--error .text-button {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }

  .page-section {
    padding-top: 54px;
  }

  .hero-section {
    padding-top: 20px;
  }

  .hero-panel {
    padding: 24px 20px;
  }

  .hero-panel h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-meta {
    display: grid;
  }

  .hero-meta > span {
    display: flex;
    justify-content: space-between;
  }

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

  .kpi-card {
    min-height: 112px;
    padding: 15px;
  }

  .panel {
    padding: 17px 15px;
  }

  .panel-heading,
  .section-heading,
  .valuation-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading--stackable {
    gap: 14px;
  }

  .section-aside {
    justify-content: flex-start;
  }

  .radar-summary {
    width: 100%;
  }

  .radar-summary span {
    flex: 1;
  }

  .allocation-layout {
    grid-template-columns: 1fr;
  }

  .donut {
    width: 190px;
  }

  .action-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .action-side {
    width: 38px;
    height: 38px;
  }

  .action-metrics {
    grid-column: 2;
    grid-auto-flow: column;
    justify-items: start;
    justify-content: start;
    gap: 12px;
  }

  .dca-metrics {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    min-height: 60px;
  }

  .dca-allocation-list {
    grid-template-columns: 1fr;
  }

  .freshness-grid {
    grid-template-columns: 1fr;
  }

  .integration-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .integration-card .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .pipeline-step {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .pipeline-time {
    grid-column: 2;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .drawer-header,
  .drawer-body,
  .drawer-footer {
    padding-inline: 18px;
  }
}

@media (max-width: 390px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 104px;
  }

  .filter-chip {
    flex: 1 0 calc(50% - 7px);
  }

  .drawer-metric-grid {
    grid-template-columns: 1fr;
  }
}

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

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #fff;
    color: #111827;
  }

  body::before,
  .sidebar,
  .topbar,
  .connection-banner,
  .radar-toolbar,
  .row-action,
  .site-footer,
  .drawer-backdrop,
  .detail-drawer {
    display: none !important;
  }

  .workspace {
    margin: 0;
  }

  main {
    width: 100%;
  }

  .page-section {
    padding-top: 24px;
    break-inside: avoid;
  }

  .hero-panel,
  .panel,
  .kpi-card,
  .metric-strip,
  .valuation-card {
    border-color: #d1d5db;
    background: #fff;
    box-shadow: none;
    color: #111827;
  }
}
