:root {
  color-scheme: dark;
  --bg: #06100d;
  --bg-deep: #030907;
  --surface: #0b1814;
  --surface-strong: #10231c;
  --surface-soft: #122a22;
  --text: #f4f7f5;
  --text-soft: #c6d1cc;
  --muted: #8fa49b;
  --line: #244238;
  --line-soft: rgba(138, 180, 163, 0.16);
  --emerald: #6ee7b7;
  --emerald-strong: #34d399;
  --gold: #d9b86c;
  --danger: #fb7185;
  --warning: #fbbf24;
  --info: #7dd3fc;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --content: 1180px;
  --header-height: 76px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% -5%, rgba(52, 211, 153, 0.11), transparent 34rem),
    radial-gradient(circle at 94% 8%, rgba(217, 184, 108, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "IBM Plex Sans", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--emerald);
  color: #062017;
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid rgba(110, 231, 183, 0.85);
  outline-offset: 3px;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  width: min(calc(100% - 32px), var(--content));
  margin: 12px auto 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(139, 180, 163, 0.2);
  border-radius: 20px;
  background: rgba(6, 16, 13, 0.86);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand img {
  width: 36px;
  height: 36px;
}

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

.brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.primary-nav a,
.nav-account-button {
  min-height: 44px;
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"],
.nav-account-button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.primary-nav .nav-cta {
  margin-left: 5px;
  background: var(--emerald);
  color: #062017;
}

.primary-nav .nav-cta:hover {
  background: #8af0c9;
  color: #03110c;
}

.nav-divider {
  width: 1px;
  height: 24px;
  margin: 0 5px;
  background: var(--line);
}

.nav-toggle {
  display: none;
}

.icon-button {
  width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

main {
  flex: 1;
}

.page,
.page-narrow {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: 84px 0 96px;
}

.page-narrow {
  max-width: 760px;
}

.page-loading {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
}

.loading-line {
  width: 96px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-soft);
}

.loading-line::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: var(--emerald);
  animation: load 1.2s var(--ease) infinite alternate;
}

@keyframes load {
  from { transform: translateX(-20%); }
  to { transform: translateX(145%); }
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--emerald);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 7vw, 78px);
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
  letter-spacing: -0.015em;
}

.lead {
  max-width: 700px;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 20px);
}

.muted,
.section-copy,
.fine-print {
  color: var(--muted);
}

.fine-print {
  font-size: 13px;
}

.hero {
  min-height: 620px;
  padding: 80px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: center;
  gap: 64px;
}

.hero h1 span {
  display: block;
  background: linear-gradient(95deg, var(--text) 12%, #a7f3d0 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(42px, 5.6vw, 68px);
}

.hero h1 span {
  white-space: nowrap;
}

.hero-actions,
.button-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--emerald);
  color: #04130d;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}

.button:hover {
  background: #8af0c9;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: #4d7767;
  background: var(--surface-strong);
}

.button.danger {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

.button.small {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 13px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.hero-panel {
  position: relative;
  min-height: 440px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(16, 35, 28, 0.94), rgba(6, 16, 13, 0.8));
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 22% -35% -42% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.13), transparent 64%);
}

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

.signal-header span,
.status-badge,
.pill {
  min-height: 28px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(110, 231, 183, 0.25);
  border-radius: 999px;
  background: rgba(110, 231, 183, 0.08);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.signal-date {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.mini-allocation {
  position: relative;
  z-index: 1;
  margin-top: 38px;
  flex: 1;
  display: grid;
  gap: 14px;
}

.mini-asset {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
}

.mini-asset strong {
  font-size: 14px;
}

.mini-asset span {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald-strong), var(--gold));
}

.progress-track .access-meter-0 {
  width: 70%;
}

.progress-track .access-meter-1 {
  width: 79%;
}

.progress-track .access-meter-2 {
  width: 88%;
}

.hero-panel-note {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.trust-strip {
  padding: 22px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.trust-item {
  padding: 4px 24px;
  border-right: 1px solid var(--line-soft);
}

.trust-item:first-child {
  padding-left: 0;
}

.trust-item:last-child {
  border-right: 0;
}

.trust-item strong {
  display: block;
  font-size: 18px;
}

.trust-item span {
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding: 104px 0 16px;
}

.section-heading {
  margin-bottom: 34px;
}

.section-copy {
  max-width: 550px;
}

.metrics-grid,
.feature-grid,
.allocation-grid,
.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.feature-card,
.panel,
.allocation-card,
.auth-card,
.notice-card {
  border: 1px solid var(--line-soft);
  background: rgba(11, 24, 20, 0.82);
}

.metric-card,
.feature-card,
.allocation-card {
  padding: 22px;
  border-radius: var(--radius);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  margin-top: 12px;
  display: block;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.metric-foot {
  margin-top: 9px;
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-value.positive,
.positive {
  color: var(--emerald);
}

.negative {
  color: var(--danger);
}

.feature-card {
  min-height: 190px;
}

.feature-index {
  margin-bottom: 34px;
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 34px 0 54px;
  border-bottom: 1px solid var(--line-soft);
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(40px, 6vw, 64px);
}

.panel {
  padding: 26px;
  border-radius: var(--radius);
}

.chart-panel {
  margin-top: 28px;
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.range-button {
  min-width: 52px;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.range-button:hover,
.range-button.active {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 340px;
  margin-top: 26px;
}

.chart-wrap svg {
  width: 100%;
  height: 340px;
  overflow: visible;
}

.chart-grid {
  stroke: rgba(143, 164, 155, 0.15);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.chart-line.secondary-line {
  stroke: #64748b;
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
}

.chart-area {
  fill: url(#chart-fill);
}

.chart-label {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart-legend {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.legend-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-key::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--emerald);
}

.legend-key.secondary::before {
  background: #64748b;
}

.gate-card {
  margin-top: 28px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(110deg, rgba(16, 35, 28, 0.95), rgba(11, 24, 20, 0.68)),
    var(--surface);
}

.gate-card p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.allocation-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}

.allocation-card .asset-code {
  color: var(--muted);
  font-size: 12px;
}

.allocation-weight {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--emerald);
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.status-line {
  margin: 24px 0;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 13px;
  background: rgba(125, 211, 252, 0.07);
  color: #d8f3ff;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 0 5px rgba(125, 211, 252, 0.1);
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: rgba(16, 35, 28, 0.7);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: rgba(110, 231, 183, 0.035);
}

.auth-layout {
  min-height: calc(100vh - 190px);
  padding: 72px 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.55fr);
  align-items: center;
  gap: 80px;
}

.auth-intro h1 {
  font-size: clamp(38px, 5vw, 58px);
}

.auth-proof {
  margin-top: 34px;
  display: grid;
  gap: 14px;
}

.auth-proof div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  color: var(--text-soft);
  font-size: 14px;
}

.proof-mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(110, 231, 183, 0.28);
  border-radius: 8px;
  color: var(--emerald);
  font-size: 12px;
  font-weight: 800;
}

.auth-card {
  padding: 34px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #07120f;
  color: var(--text);
  outline: 0;
}

.field input:focus,
.field select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.11);
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
}

.form-error {
  display: none;
  padding: 11px 13px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.08);
  color: #fecdd3;
  font-size: 13px;
}

.form-error.visible {
  display: block;
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.text-link {
  color: var(--emerald);
  font-weight: 700;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 34px;
}

.admin-sidebar {
  position: sticky;
  top: 104px;
  height: fit-content;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(11, 24, 20, 0.78);
}

.admin-sidebar button {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.admin-sidebar button:hover,
.admin-sidebar button.active {
  background: var(--surface-soft);
  color: var(--text);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

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

.preview-card {
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(11, 24, 20, 0.82);
}

.preview-card.intraday {
  border-color: rgba(217, 184, 108, 0.3);
}

.preview-card .pill {
  border-color: rgba(217, 184, 108, 0.25);
  background: rgba(217, 184, 108, 0.08);
  color: var(--gold);
}

.target-list {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.target-row {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.target-row small {
  display: block;
  color: var(--muted);
}

.target-row strong:last-child {
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}

.setting-row {
  padding: 18px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
}

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

.setting-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.switch {
  position: relative;
  width: 52px;
  height: 30px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #07120f;
  cursor: pointer;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.switch input:checked + span {
  border-color: var(--emerald-strong);
  background: rgba(52, 211, 153, 0.15);
}

.switch input:checked + span::after {
  transform: translateX(22px);
  background: var(--emerald);
}

.switch input:focus-visible + span {
  outline: 3px solid rgba(110, 231, 183, 0.85);
  outline-offset: 3px;
}

.notice-card {
  padding: 22px;
  border-radius: var(--radius);
}

.notice-card.warning {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.06);
}

.notice-card.danger {
  border-color: rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.06);
}

.empty-state,
.error-state {
  padding: 64px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.error-state h2 {
  color: var(--text);
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(360px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10231c;
  box-shadow: var(--shadow);
  color: var(--text-soft);
  font-size: 13px;
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.4);
}

.site-footer {
  width: min(calc(100% - 40px), var(--content));
  margin: auto auto 0;
  padding: 36px 0 44px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  border-top: 1px solid var(--line-soft);
}

.footer-brand {
  font-weight: 800;
  letter-spacing: 0.06em;
}

.site-footer p {
  max-width: 540px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.footer-meta a:hover {
  color: var(--text);
}

@media (max-width: 980px) {
  .hero,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 34px;
  }

  .hero-panel {
    min-height: 390px;
  }

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

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

  .admin-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .admin-sidebar button {
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    width: calc(100% - 24px);
    min-height: 64px;
    margin-top: 8px;
    padding: 0 12px;
    border-radius: 16px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 10px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #07120f;
    box-shadow: var(--shadow);
  }

  .primary-nav.open {
    display: flex;
  }

  .primary-nav a,
  .nav-account-button {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 5px 0;
  }

  .page,
  .page-narrow {
    width: min(calc(100% - 28px), var(--content));
    padding: 52px 0 72px;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .hero-panel {
    min-height: 380px;
    padding: 22px;
  }

  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
  }

  .trust-item:nth-child(2) {
    border-right: 0;
  }

  .trust-item:nth-child(3),
  .trust-item:nth-child(4) {
    border-bottom: 0;
  }

  .trust-item:nth-child(3) {
    padding-left: 0;
  }

  .section {
    padding-top: 76px;
  }

  .section-heading,
  .panel-heading {
    flex-direction: column;
  }

  .gate-card,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .chart-wrap,
  .chart-wrap svg {
    min-height: 280px;
    height: 280px;
  }

  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .brand-copy small {
    display: none;
  }

  .metrics-grid,
  .feature-grid,
  .allocation-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero h1 span {
    white-space: normal;
  }

  .auth-card,
  .panel,
  .gate-card {
    padding: 22px;
  }
}

@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;
  }
}
