﻿:root {
  --bg: #f5f5f7;
  --bg-grad-start: #fbfbfd;
  --bg-overlay-left: rgba(0, 113, 227, 0.08);
  --bg-overlay-right: rgba(17, 24, 39, 0.05);
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(248, 250, 253, 0.86);
  --surface-muted: rgba(255, 255, 255, 0.86);
  --line: rgba(15, 23, 42, 0.06);
  --line-strong: rgba(15, 23, 42, 0.11);
  --text: #101214;
  --muted: #6e7381;
  --primary: #0071e3;
  --primary-strong: #0062c7;
  --primary-soft: rgba(0, 113, 227, 0.08);
  --success: #15803d;
  --success-soft: rgba(22, 163, 74, 0.12);
  --warning: #b45309;
  --warning-soft: rgba(217, 119, 6, 0.14);
  --info: #1d4ed8;
  --info-soft: rgba(29, 78, 216, 0.12);
  --error: #b91c1c;
  --error-soft: rgba(220, 38, 38, 0.12);
  --neutral: #475569;
  --neutral-soft: rgba(71, 85, 105, 0.12);
  --danger: var(--error);
  --input-bg: rgba(255, 255, 255, 0.88);
  --input-focus-bg: rgba(255, 255, 255, 0.98);
  --btn-bg: rgba(255, 255, 255, 0.86);
  --btn-hover-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  --surface: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.10);
  --text-muted: #6e7381;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111826;
  --bg-grad-start: #0f1520;
  --bg-overlay-left: rgba(30, 95, 194, 0.22);
  --bg-overlay-right: rgba(30, 41, 59, 0.3);
  --card: rgba(25, 34, 50, 0.88);
  --card-strong: rgba(31, 41, 58, 0.92);
  --surface-soft: rgba(29, 39, 58, 0.9);
  --surface-muted: rgba(26, 36, 54, 0.88);
  --line: rgba(148, 163, 184, 0.2);
  --line-strong: rgba(148, 163, 184, 0.34);
  --text: #e5edf7;
  --muted: #9fb0c6;
  --primary: #4d9fff;
  --primary-strong: #3f84da;
  --primary-soft: rgba(77, 159, 255, 0.2);
  --success: #4ade80;
  --success-soft: rgba(34, 197, 94, 0.2);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.22);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.22);
  --error: #f87171;
  --error-soft: rgba(248, 113, 113, 0.2);
  --neutral: #94a3b8;
  --neutral-soft: rgba(148, 163, 184, 0.22);
  --danger: var(--error);
  --input-bg: rgba(23, 32, 48, 0.94);
  --input-focus-bg: rgba(29, 40, 58, 0.98);
  --btn-bg: rgba(29, 40, 58, 0.92);
  --btn-hover-shadow: 0 10px 28px rgba(2, 8, 23, 0.45);
  --shadow: 0 24px 58px rgba(2, 8, 23, 0.45);
  --surface: #1a2236;
  --border: rgba(148, 163, 184, 0.2);
  --text-muted: #9fb0c6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111826;
    --bg-grad-start: #0f1520;
    --bg-overlay-left: rgba(30, 95, 194, 0.22);
    --bg-overlay-right: rgba(30, 41, 59, 0.3);
    --card: rgba(25, 34, 50, 0.88);
    --card-strong: rgba(31, 41, 58, 0.92);
    --surface-soft: rgba(29, 39, 58, 0.9);
    --surface-muted: rgba(26, 36, 54, 0.88);
    --line: rgba(148, 163, 184, 0.2);
    --line-strong: rgba(148, 163, 184, 0.34);
    --text: #e5edf7;
    --muted: #9fb0c6;
    --primary: #4d9fff;
    --primary-strong: #3f84da;
    --primary-soft: rgba(77, 159, 255, 0.2);
    --success: #4ade80;
    --success-soft: rgba(34, 197, 94, 0.2);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.22);
    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, 0.22);
    --error: #f87171;
    --error-soft: rgba(248, 113, 113, 0.2);
    --neutral: #94a3b8;
    --surface: #1a2236;
    --border: rgba(148, 163, 184, 0.2);
    --text-muted: #9fb0c6;
    --neutral-soft: rgba(148, 163, 184, 0.22);
    --danger: var(--error);
    --input-bg: rgba(23, 32, 48, 0.94);
    --input-focus-bg: rgba(29, 40, 58, 0.98);
    --btn-bg: rgba(29, 40, 58, 0.92);
    --btn-hover-shadow: 0 10px 28px rgba(2, 8, 23, 0.45);
    --shadow: 0 24px 58px rgba(2, 8, 23, 0.45);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, var(--bg-overlay-left), transparent 24%),
    radial-gradient(circle at top right, var(--bg-overlay-right), transparent 22%),
    linear-gradient(180deg, var(--bg-grad-start) 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.landing-page,
.auth-gate,
.app { display: none; }

body.landing-active .landing-page { display: block; }
body.auth-gate-active .auth-gate { display: grid; }
body.app-active .app { display: block; }
body.contact-modal-open { overflow: hidden; }

.landing-page {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 190, 255, 0.16), transparent 22%),
    radial-gradient(circle at 82% 24%, rgba(94, 92, 230, 0.22), transparent 24%),
    radial-gradient(circle at 52% 72%, rgba(0, 255, 194, 0.08), transparent 26%),
    linear-gradient(180deg, #08162b 0%, #07111f 56%, #08101a 100%);
  color: #f6fbff;
}

.landing-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
  pointer-events: none;
}

.landing-shell {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 24px 56px;
  display: grid;
  gap: 26px;
}

.landing-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 0 10px;
}

.landing-brand-block,
.landing-topbar-actions,
.landing-nav,
.landing-hero-actions,
.landing-hero-meta,
.landing-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 247, 255, 0.34), rgba(0, 120, 255, 0.22));
  border: 1px solid rgba(128, 230, 255, 0.28);
  box-shadow: 0 0 22px rgba(0, 174, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
}

.landing-brand-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.landing-brand-sub,
.landing-kicker,
.landing-text-link,
.landing-section-heading span,
.landing-module-index,
.landing-capability-card p,
.landing-module-card p,
.landing-bottom-copy p,
.landing-meta-pill {
  color: rgba(222, 235, 246, 0.72);
  font-size: 13px;
}

.landing-nav {
  justify-content: center;
  flex-wrap: wrap;
}

.landing-nav button {
  min-height: auto;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 250, 255, 0.92);
  box-shadow: none;
}

.landing-nav button:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.landing-text-link {
  text-decoration: none;
}

.landing-pill-button {
  min-width: 116px;
}

.landing-hero-showcase {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-radius: 32px;
  padding: 92px 72px 72px;
  background:
    radial-gradient(circle at 50% 35%, rgba(39, 88, 255, 0.28), transparent 22%),
    radial-gradient(circle at 20% 50%, rgba(0, 195, 255, 0.18), transparent 22%),
    radial-gradient(circle at 78% 44%, rgba(17, 193, 255, 0.14), transparent 18%),
    linear-gradient(180deg, rgba(7, 25, 54, 0.96), rgba(2, 12, 28, 0.98));
  border: 1px solid rgba(125, 170, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 40px 120px rgba(0, 0, 0, 0.38);
}

.landing-hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(56, 133, 255, 0.26), transparent 16%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%, rgba(0, 0, 0, 0.14));
  pointer-events: none;
}

.landing-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.landing-kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing-hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.landing-hero-copy h1 span {
  display: inline-block;
  margin-right: 18px;
  color: #ffffff;
}

.landing-hero-copy h1 {
  color: #39ebdb;
}

.landing-hero-copy p {
  max-width: 780px;
  margin: 0;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.45;
  color: rgba(238, 246, 255, 0.9);
}

.landing-hero-actions {
  margin-top: 34px;
}

.landing-cta-button {
  min-width: 192px;
  min-height: 64px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(180deg, #0c5dff 0%, #053cf4 100%);
  box-shadow: 0 14px 40px rgba(9, 88, 255, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.landing-secondary-button {
  min-width: 156px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(160, 210, 255, 0.16);
  color: #eaf6ff;
}

.landing-hero-meta {
  flex-wrap: wrap;
  margin-top: 30px;
}

.landing-meta-pill {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(160, 210, 255, 0.12);
}

.landing-visual {
  position: absolute;
  inset: 70px 40px 20px auto;
  width: min(48vw, 720px);
  pointer-events: none;
}

.landing-core-figure {
  position: absolute;
  right: 70px;
  top: 40px;
  width: 420px;
  height: 520px;
}

.landing-core-ring {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 188px;
  height: 30px;
  margin-left: -94px;
  border-radius: 50%;
  border: 2px solid rgba(191, 150, 255, 0.86);
  box-shadow: 0 0 18px rgba(158, 123, 255, 0.42);
}

.landing-core-body {
  position: absolute;
  inset: 54px 55px 0;
  border-radius: 180px 180px 90px 90px;
  background:
    radial-gradient(circle at 50% 20%, rgba(102, 128, 255, 0.48), transparent 24%),
    radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.12), transparent 8%),
    linear-gradient(180deg, rgba(40, 72, 184, 0.98), rgba(13, 33, 94, 0.98));
  box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.08), 0 40px 90px rgba(8, 17, 52, 0.44);
}

.landing-core-body::before,
.landing-core-body::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(28, 58, 150, 0.96), rgba(9, 24, 71, 0.96));
}

.landing-core-body::before {
  width: 76px;
  height: 200px;
  left: -48px;
  top: 146px;
}

.landing-core-body::after {
  width: 76px;
  height: 200px;
  right: -48px;
  top: 146px;
}

.landing-core-glow {
  position: absolute;
  left: 110px;
  right: 110px;
  bottom: 18px;
  height: 34px;
  border-radius: 50%;
  background: rgba(27, 105, 255, 0.5);
  filter: blur(18px);
}

.landing-orbit {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 193, 255, 0.18), transparent 70%);
}

.orbit-a {
  right: 210px;
  top: 70px;
  width: 180px;
  height: 180px;
}

.orbit-b {
  right: -10px;
  top: 190px;
  width: 160px;
  height: 160px;
}

.orbit-c {
  right: 60px;
  bottom: 70px;
  width: 130px;
  height: 130px;
}

.landing-coin {
  position: absolute;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dff8ff;
  font-size: 18px;
  font-weight: 700;
  background:
    radial-gradient(circle at 50% 50%, rgba(8, 35, 78, 0.94), rgba(10, 89, 191, 0.9) 62%, rgba(94, 212, 255, 0.9) 100%);
  box-shadow: 0 0 26px rgba(43, 194, 255, 0.32), inset 0 0 0 6px rgba(178, 244, 255, 0.16);
}

.coin-a { left: 36px; top: 270px; transform: rotate(-18deg); }
.coin-b { right: 18px; top: 88px; transform: rotate(16deg); }
.coin-c { right: 102px; bottom: 116px; transform: rotate(-14deg); }
.coin-d { left: 154px; bottom: 48px; transform: rotate(22deg); }

.landing-modules-block,
.landing-ai-block,
.landing-bottom-cta {
  position: relative;
  border: 1px solid rgba(150, 200, 255, 0.12);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(9, 24, 50, 0.78), rgba(7, 18, 34, 0.92));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.landing-modules-block,
.landing-ai-block {
  padding: 28px;
}

.landing-section-heading h2,
.landing-bottom-copy h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #f7fbff;
}

.landing-section-heading.compact h2 {
  max-width: 560px;
}

.landing-module-grid,
.landing-capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.landing-module-card,
.landing-capability-card {
  min-height: 220px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(162, 213, 255, 0.12);
}

.landing-module-card h3,
.landing-capability-card strong {
  display: block;
  margin: 18px 0 10px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #f8fbff;
}

.landing-module-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(44, 123, 255, 0.18);
  border: 1px solid rgba(164, 220, 255, 0.16);
}

.landing-module-card p,
.landing-capability-card p {
  margin: 0;
  line-height: 1.75;
}

.landing-bottom-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
}

.landing-bottom-copy {
  max-width: 760px;
}

.landing-bottom-copy p {
  margin: 14px 0 0;
  line-height: 1.7;
}

.landing-bottom-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(162, 213, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.landing-page {
  background:
    radial-gradient(circle at 18% 16%, rgba(0, 188, 212, 0.12), transparent 22%),
    radial-gradient(circle at 76% 8%, rgba(79, 110, 255, 0.12), transparent 18%),
    linear-gradient(180deg, #030814 0%, #071120 42%, #050b14 100%);
  color: #f3f7fb;
}

.landing-page::before {
  background:
    linear-gradient(90deg, rgba(116, 145, 188, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(116, 145, 188, 0.05) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.2;
}

.home-shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.home-topbar,
.home-nav,
.home-topbar-actions,
.home-hero-actions,
.home-footer-actions {
  display: flex;
  align-items: center;
}

.home-topbar {
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  margin-bottom: 28px;
  padding: 12px 18px;
  border: 1px solid rgba(111, 163, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(5, 15, 29, 0.82), rgba(7, 17, 32, 0.74));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(144, 189, 255, 0.08);
}

.home-brand-block {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.home-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(26, 191, 186, 0.96), rgba(58, 91, 255, 0.9));
  color: #f8fcff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 28px rgba(31, 115, 255, 0.26);
}

.home-brand-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-brand-sub,
.home-kicker,
.home-text-link,
.home-section-heading span,
.home-section-heading p,
.home-feature-card p,
.home-scene-card p,
.home-plan-card p,
.home-plan-card li,
.home-flow-step p,
.home-faq-item p,
.home-footer-copy p,
.home-metric-card span,
.home-status-item span,
.home-system-footer span,
.home-card-tag,
.home-panel-head span,
.home-mini-timeline span {
  color: rgba(205, 219, 235, 0.76);
}

.home-nav {
  justify-content: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.home-nav button,
.home-text-link,
.home-topbar-button,
.home-primary-button,
.home-secondary-button,
.home-plan-button {
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-nav button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(240, 246, 252, 0.88);
  font-size: 14px;
}

.home-nav button:hover,
.home-nav button:focus-visible {
  background: rgba(148, 163, 184, 0.09);
  border-color: rgba(148, 163, 184, 0.18);
  outline: none;
}

.home-topbar-actions {
  gap: 12px;
}

.home-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.home-topbar-button,
.home-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  background: linear-gradient(135deg, #18c9e8 0%, #3b82f6 100%);
  color: #f8fcff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(130, 198, 255, 0.14), 0 14px 34px rgba(49, 111, 255, 0.22);
}

.home-secondary-button,
.home-plan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(121, 164, 255, 0.18);
  background: linear-gradient(180deg, rgba(14, 26, 47, 0.82), rgba(8, 17, 31, 0.72));
  color: #edf4fb;
  font-size: 15px;
  font-weight: 600;
}

.home-text-link:hover,
.home-topbar-button:hover,
.home-primary-button:hover,
.home-secondary-button:hover,
.home-plan-button:hover {
  transform: translateY(-1px);
}

/* old .home-hero grid rule removed — see new centered rule below */

.home-hero,
.home-hero-copy,
.home-hero-visual,
.home-section,
.home-footer-cta {
  border: 1px solid rgba(117, 163, 255, 0.12);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(7, 18, 34, 0.88), rgba(4, 11, 22, 0.94));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(136, 183, 255, 0.05);
}

.home-hero-copy {
  position: relative;
  overflow: hidden;
  padding: 46px;
}

.home-hero-copy::before {
  content: "";
  position: absolute;
  inset: auto -120px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 64%);
  pointer-events: none;
}

.home-kicker,
.home-section-heading span,
.home-footer-copy span {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-hero-center h1,
.home-hero-copy h1,
.home-section-heading h2,
.home-footer-copy h2 {
  margin: 0;
  color: #f6fbff;
  letter-spacing: -0.04em;
}

.home-hero-center h1 {
  margin-top: 18px;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.08;
  font-weight: 800;
}

.home-hero-copy h1 {
  margin-top: 16px;
  max-width: 620px;
  font-size: clamp(42px, 4.8vw, 64px);
  line-height: 1.02;
}

.home-hero-accent {
  background: linear-gradient(84deg, #2c7cf5 5%, #bbe194 46%, #05fdf7 99%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-desc {
  margin: 22px auto 0;
  max-width: 600px;
  font-size: 17px;
  line-height: 1.72;
  color: rgba(229, 239, 247, 0.82);
}

.home-hero-copy p {
  margin: 18px 0 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.72;
  color: rgba(229, 239, 247, 0.88);
}

.home-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* glowing CTA button (reference: borderGlow) */
.home-cta-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 2px solid #004de5;
  background: linear-gradient(270deg, rgba(0, 199, 250, 0.10), rgba(0, 72, 228, 0.10));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  animation: ctaGlow 2.2s ease-in-out infinite;
  transition: transform 160ms ease;
}
.home-cta-glow:hover {
  transform: scale(1.04);
}
.home-cta-glow span {
  font-size: 20px;
}

/* hero chips */
.home-hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.home-chip-verified,
.home-chip-ready {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.home-chip-verified {
  border: 1px solid rgba(16, 200, 180, 0.28);
  background: rgba(16, 200, 180, 0.08);
  color: rgba(180, 255, 240, 0.92);
}

.home-chip-ready {
  border: 1px solid rgba(120, 164, 255, 0.22);
  background: rgba(59, 130, 246, 0.08);
  color: rgba(226, 236, 246, 0.88);
}

/* hero metrics */
.home-hero-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 40px;
  width: 100%;
}

.home-metric-icon {
  font-size: 26px;
  margin-bottom: 10px;
}

.home-metric-card,
.home-visual-panel,
.home-feature-card,
.home-scene-card,
.home-plan-card,
.home-flow-step,
.home-faq-item {
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(13, 25, 42, 0.92), rgba(9, 18, 31, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-metric-card {
  min-height: 110px;
  padding: 16px 16px 14px;
}

.home-metric-card strong,
.home-status-item strong,
.home-system-footer strong,
.home-plan-top strong {
  display: block;
  color: #f5fbff;
  font-size: 16px;
  font-weight: 600;
}

.home-metric-card span,
.home-status-item span,
.home-system-footer span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
}

.home-hero-visual {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  gap: 16px;
  padding: 20px;
}

.home-visual-panel {
  padding: 22px;
}

.home-hero-stage {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border-radius: 28px;
  border: 1px solid rgba(120, 164, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 22, 39, 0.94), rgba(6, 13, 24, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 44px rgba(0, 0, 0, 0.22);
  padding: 24px;
}

.home-stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.home-stage-head span {
  color: rgba(208, 221, 236, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-stage-head strong {
  color: #f7fbff;
  font-size: 16px;
}

.home-stage-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.home-stage-step {
  min-height: 108px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(120, 164, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.home-stage-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: rgba(224, 236, 248, 0.84);
  font-size: 12px;
  font-weight: 700;
}

.home-stage-step strong {
  display: block;
  margin-top: 12px;
  color: #f7fbff;
  font-size: 18px;
}

.home-stage-step em {
  display: block;
  margin-top: 8px;
  color: rgba(205, 219, 235, 0.74);
  font-style: normal;
  font-size: 13px;
  line-height: 1.7;
}

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

.home-stage-proof div {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(120, 164, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.home-stage-proof span {
  display: block;
  color: rgba(205, 219, 235, 0.72);
  font-size: 12px;
}

.home-stage-proof strong {
  display: block;
  margin-top: 8px;
  color: #f7fbff;
  font-size: 16px;
  line-height: 1.5;
}

.home-system-panel-compact {
  display: grid;
  align-content: space-between;
  min-height: 100%;
}

.home-system-panel {
  background: linear-gradient(180deg, rgba(10, 22, 39, 0.94), rgba(7, 15, 28, 0.94));
}

.home-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.home-panel-head strong {
  color: #f6fbff;
  font-size: 14px;
  font-weight: 600;
}

.home-overview-stack {
  display: grid;
  gap: 18px;
}

.home-overview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr) 26px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.home-system-link {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, rgba(64, 157, 255, 0.15), rgba(64, 157, 255, 0.8));
}

.home-system-link::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(64, 157, 255, 0.8);
  border-right: 1px solid rgba(64, 157, 255, 0.8);
  transform: rotate(45deg);
}

.home-system-node {
  min-height: 74px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #e9f3fb;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.home-system-node.accent {
  background: linear-gradient(135deg, rgba(17, 182, 176, 0.18), rgba(45, 108, 246, 0.16));
  border-color: rgba(79, 110, 255, 0.24);
}

.home-overview-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-overview-card {
  min-height: 100px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.home-overview-group {
  display: grid;
  gap: 10px;
}

.home-overview-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(205, 219, 235, 0.68);
}

.home-capability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-capability-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(123, 166, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(230, 238, 247, 0.88);
  font-size: 12px;
  font-weight: 600;
}

.home-overview-card span {
  display: block;
  font-size: 12px;
  color: rgba(205, 219, 235, 0.72);
}

.home-overview-card strong {
  display: block;
  margin-top: 10px;
  color: #f6fbff;
  font-size: 15px;
  line-height: 1.6;
}

.home-system-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.home-hero-outcomes {
  display: grid;
  gap: 10px;
}

.home-hero-outcome-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.home-hero-outcome-item span,
.home-hero-outcome-item strong {
  margin: 0;
}

.home-hero-outcome-item span {
  color: rgba(205, 219, 235, 0.72);
  font-size: 13px;
}

.home-hero-outcome-item strong {
  color: #f6fbff;
  font-size: 15px;
}

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

.home-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.home-status-item span,
.home-status-item strong {
  margin: 0;
}

.home-mini-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.home-mini-timeline span {
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.home-section,
.home-footer-cta {
  margin-top: 40px;
  padding: 34px;
}

/* ── Hero: centered layout with floating glows (inspired by zxlh.pro) ── */

@keyframes heroFloat1 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-24px) translateX(8px); }
}
@keyframes heroFloat2 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(16px) translateX(-12px); }
}
@keyframes heroFloat3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(0, 110, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.08); }
  50% { box-shadow: 0 0 36px rgba(0, 180, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.12); }
}

.home-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 36px 42px;
  margin-bottom: 34px;
}

/* floating glow orbs */
.home-hero-glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.55;
}
.home-hero-glow-1 {
  width: 340px; height: 340px;
  top: -60px; left: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
  animation: heroFloat1 6s ease-in-out infinite;
}
.home-hero-glow-2 {
  width: 280px; height: 280px;
  top: 40px; right: -60px;
  background: radial-gradient(circle, rgba(0, 199, 250, 0.35), transparent 70%);
  animation: heroFloat2 7s ease-in-out infinite 1s;
}
.home-hero-glow-3 {
  width: 200px; height: 200px;
  bottom: -40px; left: 40%;
  background: radial-gradient(circle, rgba(100, 80, 255, 0.3), transparent 70%);
  animation: heroFloat3 5s ease-in-out infinite 0.5s;
}

.home-hero-center {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.home-section-compact {
  padding: 28px 34px;
  margin-top: 24px;
}

.home-section-compact .home-section-heading {
  margin-bottom: 18px;
}

.home-audience-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-exchange-list-compact {
  gap: 8px;
}

.home-exchange-footnote {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: rgba(214, 227, 240, 0.55);
}

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

.home-flow-timeline-compact::before {
  display: none;
}

.home-flow-timeline-compact .home-flow-item {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.home-flow-timeline-compact .home-flow-step-index {
  margin-bottom: 8px;
}

.home-flow-timeline-compact .home-flow-item > div {
  padding: 14px 16px;
}

.home-footer-cta-compact {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 28px 34px;
  margin-top: 24px;
}

.home-footer-cta-compact h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
}

.home-site-footer-compact {
  padding: 14px 6px 0;
}

.home-site-footer-compact .home-site-footer-main {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.home-site-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.home-site-footer-links a {
  color: rgba(225, 236, 246, 0.82);
  text-decoration: none;
  font-size: 13px;
  transition: color 160ms ease;
}

.home-site-footer-links a:hover {
  color: #f6fbff;
}

.home-site-footer-contact {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.home-site-footer-contact span {
  color: rgba(214, 227, 240, 0.68);
  font-size: 12px;
}

.home-module-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.3fr);
  gap: 22px;
  align-items: stretch;
}

.home-module-spotlight {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(120, 164, 255, 0.16);
  background: linear-gradient(180deg, rgba(10, 24, 43, 0.92), rgba(6, 14, 26, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.18);
}

.home-module-kicker {
  color: rgba(216, 231, 244, 0.74);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-module-spotlight h3 {
  margin: 18px 0 0;
  color: #f7fbff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.home-module-spotlight p {
  margin: 16px 0 0;
  max-width: 460px;
  color: rgba(218, 230, 242, 0.82);
  font-size: 15px;
  line-height: 1.8;
}

.home-module-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.home-module-summary div {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(120, 164, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.home-module-summary span {
  display: block;
  color: rgba(205, 219, 235, 0.72);
  font-size: 12px;
}

.home-module-summary strong {
  display: block;
  margin-top: 8px;
  color: #f7fbff;
  font-size: 16px;
}

.home-module-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

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

.home-feature-card-module {
  min-height: 220px;
  border-color: rgba(120, 164, 255, 0.16);
  background: linear-gradient(180deg, rgba(11, 23, 41, 0.94), rgba(8, 16, 29, 0.94));
}

.home-feature-card-module h3 {
  font-size: 26px;
  line-height: 1.08;
}

.home-feature-card-module p {
  max-width: 280px;
}

.home-audience-shell,
.home-exchange-shell,
.home-flow-shell {
  display: grid;
  gap: 20px;
}

.home-audience-shell,
.home-exchange-shell {
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.12fr);
}

.home-flow-shell {
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.home-audience-intro,
.home-exchange-summary,
.home-flow-intro {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(120, 164, 255, 0.14);
  background: linear-gradient(180deg, rgba(10, 24, 43, 0.92), rgba(6, 14, 26, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.18);
}

.home-audience-intro h3,
.home-exchange-summary h3 {
  margin: 18px 0 0;
  color: #f7fbff;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.home-audience-intro p,
.home-exchange-summary p {
  margin: 14px 0 0;
  color: rgba(214, 227, 240, 0.82);
  font-size: 15px;
  line-height: 1.8;
}

.home-audience-points,
.home-exchange-summary-list,
.home-flow-highlights {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.home-audience-points div,
.home-exchange-summary-list div,
.home-flow-highlights div {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(120, 164, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.home-audience-points span,
.home-exchange-summary-list span,
.home-flow-highlights span {
  display: block;
  color: rgba(205, 219, 235, 0.72);
  font-size: 12px;
}

.home-audience-points strong,
.home-exchange-summary-list strong,
.home-flow-highlights strong {
  display: block;
  margin-top: 8px;
  color: #f7fbff;
  font-size: 16px;
  line-height: 1.5;
}

.home-audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.home-scene-card-compact {
  min-height: 0;
  padding: 22px 24px;
}

.home-scene-card-compact h3 {
  margin-top: 0;
  font-size: 24px;
}

.home-exchange-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-exchange-list {
  display: grid;
  gap: 12px;
}

.home-exchange-row {
  display: grid;
  grid-template-columns: 110px minmax(160px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(120, 164, 255, 0.14);
  background: linear-gradient(180deg, rgba(10, 22, 39, 0.92), rgba(7, 14, 26, 0.92));
}

.home-exchange-row-active {
  border-color: rgba(83, 164, 255, 0.24);
  background: linear-gradient(180deg, rgba(12, 28, 49, 0.96), rgba(8, 17, 31, 0.96));
}

.home-exchange-row-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(120, 164, 255, 0.16);
  color: rgba(226, 236, 246, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.home-exchange-row-name {
  color: #f7fbff;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.home-exchange-row-desc {
  color: rgba(214, 227, 240, 0.82);
  font-size: 14px;
  line-height: 1.75;
}

.home-exchange-note-inline {
  margin-top: 18px;
  padding: 0 2px;
}

.home-exchange-note-inline p {
  margin: 0;
  color: rgba(214, 227, 240, 0.78);
  font-size: 14px;
  line-height: 1.8;
}

.home-flow-timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.home-flow-timeline::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 16px;
  width: 1px;
  background: linear-gradient(180deg, rgba(120, 164, 255, 0.4), rgba(120, 164, 255, 0.06));
}

.home-flow-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 8px 0 8px 0;
}

.home-flow-item > div {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(120, 164, 255, 0.12);
  background: linear-gradient(180deg, rgba(10, 22, 39, 0.92), rgba(7, 14, 26, 0.92));
}

.home-flow-item strong {
  display: block;
  color: #f7fbff;
  font-size: 17px;
}

.home-flow-item p {
  margin: 8px 0 0;
  color: rgba(214, 227, 240, 0.82);
  font-size: 14px;
  line-height: 1.75;
}

.home-flow-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(120, 164, 255, 0.16);
  color: rgba(226, 236, 246, 0.88);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.home-section-heading {
  max-width: 700px;
  margin-bottom: 28px;
}

.home-section-heading h2,
.home-footer-copy h2 {
  margin-top: 14px;
  font-size: clamp(26px, 2.7vw, 36px);
  line-height: 1.18;
}

.home-section-heading p,
.home-footer-copy p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.75;
}

.home-card-grid {
  display: grid;
  gap: 18px;
}

.home-card-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.home-feature-card,
.home-scene-card,
.home-plan-card {
  min-height: 210px;
  padding: 24px;
}

.home-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(16, 182, 176, 0.1);
  border: 1px solid rgba(16, 182, 176, 0.18);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.home-feature-card h3,
.home-scene-card h3,
.home-plan-top span {
  margin: 16px 0 0;
  color: #f5fbff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.home-feature-card p,
.home-scene-card p,
.home-plan-card p,
.home-flow-step p,
.home-faq-item p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
}

.home-scene-card span {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(205, 219, 235, 0.72);
}

.home-flow-section {
  overflow: hidden;
}

.home-flow-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.home-flow-step {
  position: relative;
  min-height: 122px;
  padding: 18px 18px 16px;
}

.home-flow-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -13px;
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, rgba(120, 188, 255, 0.18), rgba(120, 188, 255, 0.78));
  transform: translateY(-50%);
}

.home-flow-step::before {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  right: -12px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(120, 188, 255, 0.78);
  border-right: 2px solid rgba(120, 188, 255, 0.78);
  transform: rotate(45deg);
}

.home-flow-step:nth-child(3)::before,
.home-flow-step:nth-child(3)::after,
.home-flow-step:last-child::before,
.home-flow-step:last-child::after {
  display: none;
}

.home-flow-step strong {
  display: block;
  color: #f5fbff;
  font-size: 15px;
  line-height: 1.45;
}

.home-plan-card {
  position: relative;
}

.home-plan-card.featured {
  border-color: rgba(71, 123, 255, 0.34);
  background: linear-gradient(180deg, rgba(14, 27, 48, 0.98), rgba(8, 18, 34, 0.96));
  box-shadow: 0 24px 60px rgba(23, 75, 201, 0.2);
}

.home-plan-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(71, 123, 255, 0.14);
  border: 1px solid rgba(71, 123, 255, 0.28);
  color: #d8e6ff;
  font-size: 12px;
  font-weight: 700;
}

.home-plan-top {
  padding-right: 78px;
}

.home-plan-top span {
  display: block;
  margin: 0;
  font-size: 22px;
}

.home-plan-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
}

.home-plan-card li + li {
  margin-top: 8px;
}

.home-plan-button {
  width: 100%;
  margin-top: 18px;
}

.home-faq-list {
  display: grid;
  gap: 14px;
}

.home-faq-item {
  padding: 0 22px;
}

.home-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  color: #f6fbff;
  font-size: 16px;
  font-weight: 600;
}

.home-faq-item summary::-webkit-details-marker {
  display: none;
}

.home-faq-item p {
  padding: 0 0 18px;
}

.home-footer-cta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.home-footer-copy {
  max-width: 620px;
}

.home-footer-actions {
  max-width: 520px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.home-cta-light {
  margin: 8px 0 0;
  width: 100%;
  color: rgba(214, 227, 240, 0.82);
  font-size: 14px;
  line-height: 1.75;
}

.home-footer-link {
  min-height: 48px;
}

.home-site-footer {
  margin-top: 24px;
  padding: 20px 6px 0;
}

.home-site-footer-main,
.home-site-footer-bottom,
.home-site-branding,
.home-site-contact-list,
.home-site-footer-links,
.home-site-footer-nav,
.home-site-footer-nav ul,
.home-site-footer-legal,
.home-contact-card-actions {
  display: flex;
  align-items: center;
}

.home-site-footer-main {
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.home-site-branding {
  gap: 14px;
}

.home-site-footer-nav {
  align-items: flex-start;
  gap: 48px;
}

.home-site-footer-nav div {
  min-width: 140px;
}

.home-site-footer-nav h4 {
  margin: 0 0 12px;
  color: #f6fbff;
  font-size: 16px;
}

.home-site-footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.home-site-footer-nav li,
.home-site-footer-bottom p {
  color: rgba(214, 227, 240, 0.78);
  font-size: 14px;
  line-height: 1.7;
}

.home-site-footer-nav a,
.home-site-footer-legal a {
  color: rgba(225, 236, 246, 0.82);
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.home-site-footer-nav a:hover,
.home-site-footer-legal a:hover,
.home-site-footer-nav a:focus-visible,
.home-site-footer-legal a:focus-visible {
  color: #f6fbff;
}

.home-site-footer-nav a:visited,
.home-site-footer-legal a:visited {
  color: rgba(225, 236, 246, 0.82);
}

.home-brand-mark-small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.home-site-brand-copy strong,
.home-contact-item strong,
.home-contact-card strong {
  display: block;
  color: #f5fbff;
}

.home-site-brand-copy p,
.home-site-contact-list span,
.home-site-footer-bottom span,
.home-contact-card p,
.home-contact-list li,
.home-contact-feedback,
.home-contact-item span,
.home-contact-label {
  color: rgba(205, 219, 235, 0.74);
}

.home-site-brand-copy p {
  margin: 6px 0 0;
  font-size: 14px;
}

.home-site-contact-list {
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-site-footer-links {
  gap: 16px;
  flex-wrap: wrap;
}

.home-site-footer-links a,
.home-site-footer-links button {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(225, 236, 246, 0.8);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.home-site-footer-links a:hover,
.home-site-footer-links button:hover {
  color: #f6fbff;
}

.home-site-contact-list span,
.home-site-footer-bottom span {
  font-size: 13px;
}

.home-site-footer-bottom {
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.home-site-footer-bottom p {
  margin: 0;
}

.home-site-footer-legal {
  gap: 16px;
  flex-wrap: wrap;
}

.home-contact-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.home-contact-modal.show {
  display: block;
}

.home-contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 17, 0.7);
  backdrop-filter: blur(10px);
}

.home-contact-dialog {
  position: relative;
  max-width: 980px;
  margin: 56px auto;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(8, 20, 36, 0.98), rgba(8, 16, 29, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.home-contact-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #f4f8fc;
  font-size: 24px;
  line-height: 1;
}

.home-contact-head {
  max-width: 620px;
}

.home-contact-head h2 {
  margin: 14px 0 0;
  color: #f6fbff;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.home-contact-head p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(205, 219, 235, 0.78);
}

.home-contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.92fr 0.92fr;
  gap: 16px;
  margin-top: 24px;
}

.home-contact-card {
  min-height: 240px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(13, 25, 42, 0.92), rgba(9, 18, 31, 0.92));
}

.home-contact-card-primary {
  background: linear-gradient(180deg, rgba(13, 34, 57, 0.96), rgba(8, 19, 34, 0.96));
}

.home-contact-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-contact-card strong {
  margin-top: 14px;
  font-size: 22px;
  line-height: 1.3;
}

.home-contact-card p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.75;
}

.home-contact-card-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.home-copy-button {
  min-height: 48px;
}

.home-contact-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.home-contact-item:last-of-type {
  border-bottom: 0;
}

.home-contact-item span {
  display: block;
  font-size: 12px;
}

.home-contact-item strong {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.5;
}

.home-contact-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.home-contact-list li + li {
  margin-top: 10px;
}

.home-contact-feedback {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.7;
}

/* ── 主题切换按钮 ── */
.home-theme-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(240, 246, 252, 0.88);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.2s ease;
}
.home-theme-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.28);
  transform: translateY(-1px);
}

/* 图标容器 — 两个图标叠放在同一位置 */
.home-theme-icon-sun,
.home-theme-icon-moon {
  position: absolute;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

/* 默认暗色模式：月亮可见，太阳隐藏在下方 */
.home-theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
.home-theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* 亮色模式：太阳可见，月亮旋转隐藏到上方 */
body[data-landing-theme="light"] .home-theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
body[data-landing-theme="light"] .home-theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* ── 页面整体过渡动画 ── */
body.theme-transitioning .landing-page,
body.theme-transitioning .landing-page *,
body.theme-transitioning .landing-page::before {
  transition:
    background 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 圆形扩散主题切换（View Transition API） */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 9999;
}

/* ── 亮色主题 (FMZ 风格) ── */
body[data-landing-theme="light"] .landing-page {
  background:
    radial-gradient(circle at 18% 16%, rgba(0, 113, 227, 0.06), transparent 22%),
    radial-gradient(circle at 76% 8%, rgba(99, 102, 241, 0.05), transparent 18%),
    linear-gradient(180deg, #f8fafd 0%, #f0f4f9 42%, #eef2f8 100%);
  color: #1a1f2e;
}

body[data-landing-theme="light"] .landing-page::before {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.4;
}

/* 亮色：主题按钮 */
body[data-landing-theme="light"] .home-theme-btn {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
}
body[data-landing-theme="light"] .home-theme-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
}

/* 亮色：顶栏 */
body[data-landing-theme="light"] .home-topbar {
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82));
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), inset 0 -1px 0 rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(18px);
}

body[data-landing-theme="light"] .home-brand-mark {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 18px rgba(31, 115, 255, 0.18);
}

body[data-landing-theme="light"] .home-brand-title {
  color: #1a1f2e;
}

body[data-landing-theme="light"] .home-brand-sub,
body[data-landing-theme="light"] .home-kicker,
body[data-landing-theme="light"] .home-section-heading span,
body[data-landing-theme="light"] .home-section-heading p,
body[data-landing-theme="light"] .home-card-tag,
body[data-landing-theme="light"] .home-metric-card span,
body[data-landing-theme="light"] .home-flow-item p,
body[data-landing-theme="light"] .home-exchange-footnote,
body[data-landing-theme="light"] .home-scene-card p {
  color: #64748b;
}

body[data-landing-theme="light"] .home-nav button {
  color: #334155;
}
body[data-landing-theme="light"] .home-nav button:hover {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
}

body[data-landing-theme="light"] .home-topbar-button,
body[data-landing-theme="light"] .home-primary-button {
  background: linear-gradient(135deg, #0071e3 0%, #0058b9 100%);
  box-shadow: 0 0 0 1px rgba(0, 113, 227, 0.2), 0 8px 24px rgba(0, 113, 227, 0.16);
}

/* 亮色：hero */
body[data-landing-theme="light"] .home-hero {
  border-color: rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.92));
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-landing-theme="light"] .home-hero-glow-1 {
  background: radial-gradient(circle, rgba(0, 113, 227, 0.12), transparent 70%);
}
body[data-landing-theme="light"] .home-hero-glow-2 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 70%);
}
body[data-landing-theme="light"] .home-hero-glow-3 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%);
}

body[data-landing-theme="light"] .home-hero-center h1 {
  color: #0f172a;
}

body[data-landing-theme="light"] .home-hero-accent {
  background: linear-gradient(84deg, #0058b9 5%, #059669 46%, #0071e3 99%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-landing-theme="light"] .home-hero-desc {
  color: #475569;
}

body[data-landing-theme="light"] .home-cta-glow {
  border-color: #0071e3;
  background: linear-gradient(270deg, rgba(0, 113, 227, 0.08), rgba(0, 83, 179, 0.08));
  color: #0071e3;
  animation: ctaGlowLight 2.2s ease-in-out infinite;
}
@keyframes ctaGlowLight {
  0%, 100% { box-shadow: 0 0 14px rgba(0, 113, 227, 0.2), inset 0 1px 0 rgba(255,255,255,0.3); }
  50% { box-shadow: 0 0 28px rgba(0, 113, 227, 0.35), inset 0 1px 0 rgba(255,255,255,0.4); }
}

body[data-landing-theme="light"] .home-secondary-button {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #1e293b;
}
body[data-landing-theme="light"] .home-secondary-button:hover {
  border-color: rgba(15, 23, 42, 0.2);
  background: rgba(255, 255, 255, 0.96);
}

body[data-landing-theme="light"] .home-chip-verified {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.06);
  color: #047857;
}

body[data-landing-theme="light"] .home-chip-ready {
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.05);
  color: #1d4ed8;
}

/* 亮色：卡片通用 */
body[data-landing-theme="light"] .home-metric-card,
body[data-landing-theme="light"] .home-scene-card,
body[data-landing-theme="light"] .home-feature-card,
body[data-landing-theme="light"] .home-flow-item > div {
  border-color: rgba(15, 23, 42, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.92));
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

body[data-landing-theme="light"] .home-metric-card strong,
body[data-landing-theme="light"] .home-scene-card h3,
body[data-landing-theme="light"] .home-feature-card h3,
body[data-landing-theme="light"] .home-flow-item strong {
  color: #0f172a;
}

body[data-landing-theme="light"] .home-card-tag {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.14);
  color: #0071e3;
}

/* 亮色：section 面板 */
body[data-landing-theme="light"] .home-section,
body[data-landing-theme="light"] .home-footer-cta {
  border-color: rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 253, 0.88));
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-landing-theme="light"] .home-section-heading h2,
body[data-landing-theme="light"] .home-footer-cta h2 {
  color: #0f172a;
}

/* 亮色：交易所列表 */
body[data-landing-theme="light"] .home-exchange-row {
  border-color: rgba(15, 23, 42, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 251, 253, 0.92));
}

body[data-landing-theme="light"] .home-exchange-row-active {
  border-color: rgba(0, 113, 227, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 254, 0.96));
}

body[data-landing-theme="light"] .home-exchange-row-status {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.14);
  color: #1d4ed8;
}

body[data-landing-theme="light"] .home-exchange-row-name {
  color: #0f172a;
}

body[data-landing-theme="light"] .home-exchange-row-desc {
  color: #475569;
}

/* 亮色：流程步骤 */
body[data-landing-theme="light"] .home-flow-step-index {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.14);
  color: #1d4ed8;
}

/* 亮色：CTA footer */
body[data-landing-theme="light"] .home-footer-cta h2 {
  color: #0f172a;
}

/* 亮色：站点 footer */
body[data-landing-theme="light"] .home-site-footer-main {
  border-top-color: rgba(15, 23, 42, 0.08);
}

body[data-landing-theme="light"] .home-site-branding strong {
  color: #0f172a;
}

body[data-landing-theme="light"] .home-site-footer-links a,
body[data-landing-theme="light"] .home-site-footer-legal a {
  color: #475569;
}
body[data-landing-theme="light"] .home-site-footer-links a:hover,
body[data-landing-theme="light"] .home-site-footer-legal a:hover {
  color: #0f172a;
}

body[data-landing-theme="light"] .home-site-footer-contact span,
body[data-landing-theme="light"] .home-site-footer-bottom p {
  color: #64748b;
}

/* 亮色：联系弹窗 */
body[data-landing-theme="light"] .home-contact-backdrop {
  background: rgba(255, 255, 255, 0.6);
}

body[data-landing-theme="light"] .home-contact-dialog {
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff, #f8fafd);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

body[data-landing-theme="light"] .home-contact-close {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
}

body[data-landing-theme="light"] .home-contact-head h2 {
  color: #0f172a;
}

body[data-landing-theme="light"] .home-contact-head p,
body[data-landing-theme="light"] .home-contact-label,
body[data-landing-theme="light"] .home-contact-card p,
body[data-landing-theme="light"] .home-contact-item span,
body[data-landing-theme="light"] .home-contact-feedback {
  color: #64748b;
}

body[data-landing-theme="light"] .home-contact-card {
  border-color: rgba(15, 23, 42, 0.07);
  background: linear-gradient(180deg, #ffffff, #fafbfd);
}

body[data-landing-theme="light"] .home-contact-card strong,
body[data-landing-theme="light"] .home-contact-item strong {
  color: #0f172a;
}

body[data-landing-theme="light"] .home-contact-card-primary {
  background: linear-gradient(180deg, #f0f7ff, #e8f1fc);
}

@media (max-width: 1180px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-module-shell {
    grid-template-columns: 1fr;
  }

  .home-audience-shell,
  .home-exchange-shell,
  .home-flow-shell {
    grid-template-columns: 1fr;
  }

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

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

  .home-overview-row,
  .home-overview-cards {
    grid-template-columns: 1fr;
  }

  .home-system-link {
    display: none;
  }

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

  .home-flow-step::before,
  .home-flow-step::after {
    display: none;
  }

  .home-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .home-topbar,
  .home-footer-cta,
  .home-site-footer-main,
  .home-site-footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .home-nav,
  .home-topbar-actions,
  .home-footer-actions,
  .home-site-contact-list,
  .home-contact-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .home-hero {
    padding: 48px 24px 32px;
  }

  .home-hero-center h1 {
    font-size: clamp(34px, 5vw, 52px);
  }

  .home-hero-copy {
    padding: 36px;
  }

  .home-hero-visual {
    grid-template-rows: minmax(280px, 1fr) auto;
  }

  .home-hero-metrics,
  .home-overview-row,
  .home-overview-cards,
  .home-hero-outcomes,
  .home-system-footer,
  .home-card-grid-3,
  .home-card-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-audience-cards {
    grid-template-columns: 1fr;
  }

  .home-flow-timeline-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-module-grid {
    grid-template-columns: 1fr;
  }

  .home-stage-flow,
  .home-stage-proof,
  .home-module-summary,
  .home-exchange-grid-compact {
    grid-template-columns: 1fr;
  }

  .home-exchange-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-footer-actions,
  .home-site-footer-nav {
    justify-content: flex-start;
  }

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

  .home-contact-dialog {
    margin: 28px 18px;
    padding: 22px;
  }

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

@media (max-width: 640px) {
  .landing-page::before {
    background-size: 44px 44px;
  }

  .home-shell {
    padding: 16px 16px 56px;
  }

  .home-topbar,
  .home-section,
  .home-footer-cta {
    padding: 22px 20px;
    border-radius: 22px;
  }

  .home-brand-block {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .home-brand-title {
    font-size: 15px;
  }

  .home-brand-sub {
    font-size: 12px;
  }

  .home-hero {
    padding: 36px 18px 24px;
  }

  .home-hero-center h1 {
    font-size: 30px;
  }

  .home-hero-desc {
    font-size: 15px;
  }

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

  .home-cta-glow {
    height: 46px;
    padding: 0 22px;
    font-size: 15px;
  }

  .home-hero-copy {
    padding: 24px;
    border-radius: 22px;
  }

  .home-hero-copy h1 {
    font-size: 34px;
  }

  .home-hero-copy p {
    font-size: 15px;
  }

  .home-hero-visual {
    padding: 14px;
  }

  .home-hero-stage {
    min-height: 260px;
    padding: 18px;
  }

  .home-module-spotlight,
  .home-feature-card-module,
  .home-audience-intro,
  .home-exchange-summary,
  .home-flow-intro {
    padding: 22px;
  }

  .home-module-spotlight h3,
  .home-feature-card-module h3 {
    font-size: 24px;
  }

  .home-hero-actions,
  .home-footer-actions,
  .home-contact-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-primary-button,
  .home-secondary-button,
  .home-topbar-button,
  .home-text-link,
  .home-plan-button,
  .home-copy-button {
    justify-content: center;
    width: 100%;
  }

  .home-hero-visual,
  .home-visual-panel,
  .home-feature-card,
  .home-scene-card,
  .home-plan-card,
  .home-flow-step,
  .home-faq-item {
    border-radius: 18px;
  }

  .home-scene-card-compact h3 {
    font-size: 22px;
  }

  .home-flow-timeline-compact {
    grid-template-columns: 1fr;
  }

  .home-section-compact {
    padding: 20px 20px;
  }

  .home-site-footer-nav {
    gap: 24px;
  }

  .home-card-grid-4 {
    grid-template-columns: 1fr;
  }

  .home-flow-board {
    grid-template-columns: 1fr;
  }

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

  .home-contact-dialog {
    margin: 16px;
    padding: 18px;
    border-radius: 22px;
  }

  .home-contact-card {
    min-height: auto;
    padding: 18px;
  }

  .home-site-footer {
    padding-top: 8px;
  }
}

.auth-gate {
  max-width: 1040px;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 440px);
  gap: 20px;
  margin: 48px auto;
  padding: 0 18px;
  align-items: stretch;
}

.auth-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 248, 252, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-brand {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.auth-sub {
  max-width: 360px;
  color: var(--muted);
  font-size: 15px;
}

.auth-left::after {
  content: "更少入口，更少按钮，更少打扰。";
  display: block;
  max-width: 280px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.auth-box {
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-topline {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.auth-panel h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.desc,
.page-desc,
.nav-note,
.small,
.monoSmall,
.hint,
.app-topbar-sub,
.nav-meta {
  color: var(--muted);
  font-size: 12px;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.auth-field,
.field-span-full {
  margin-top: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(0, 113, 227, 0.34);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
  background: var(--input-focus-bg);
}

button {
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  min-height: 42px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--btn-hover-shadow);
}

button.primary,
.auth-login-btn,
#btn_core_refresh,
#btn_manual_submit,
#btn_auth_set,
#btn_save_cfg {
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #fff;
  border-color: transparent;
}

button.secondary {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(29, 78, 216, 0.26);
}

button.subtle {
  background: var(--surface-soft);
  color: var(--muted);
  border-color: var(--line);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.danger {
  background: var(--error-soft);
  color: var(--error);
  border-color: rgba(220, 38, 38, 0.3);
}

.auth-actions,
.btnrow,
.command-action-row,
.page-actions,
.manual-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.auth-msg {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.app {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 18px 36px;
}

.app-topbar,
.panel,
.command-deck,
.display-card,
.subpanel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.app-topbar-mark,
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}


.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.section-tabs a {
  text-decoration: none;
  font-size: 13px;
  color: #214a8f;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 6px 11px;
}

.section-tabs a:hover {
  background: #e2edff;
}

.section-tabs .tab-btn {
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}

.section-tabs .tab-btn.active {
  background: rgba(0, 113, 227, 0.1);
  border-color: rgba(0, 113, 227, 0.18);
  color: var(--primary);
}

.section-tabs .tab-btn.deemphasis {
  opacity: 0.78;
  border-style: dashed;
}

.section-tabs .tab-btn.deemphasis.active {
  opacity: 0.9;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.app-topbar-brand,
.app-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-profile {
  opacity: 0.88;
}

.theme-toggle-btn {
  position: relative;
  min-height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.console-theme-icon-sun,
.console-theme-icon-moon {
  position: absolute;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* ── Toast 通知 ── */
.sj-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 10000;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sj-toast-show { transform: translateX(-50%) translateY(0); opacity: 1; }
.sj-toast-info    { background: #2563eb; }
.sj-toast-success { background: #16a34a; }
.sj-toast-warning { background: #d97706; }
.sj-toast-error   { background: #dc2626; }

.wrap { display: block; }

.view { display: none; }
.view.active { display: block; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.page-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.app-topbar-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-profile-name {
  font-size: 13px;
  font-weight: 600;
}

.app-profile-handle,
.page-desc {
  font-size: 12px;
}

.app-profile-handle {
  color: var(--muted);
  opacity: 0.92;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(0, 113, 227, 0.14);
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
}

.console-stage { margin-bottom: 12px; }

.command-deck {
  padding: 10px;
}

.command-deck-copy h3 {
  margin: 0;
  font-size: 18px;
}

.global-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px 14px;
}

.summary-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.summary-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mine-stack {
  display: grid;
  gap: 12px;
}

.panel {
  padding: 16px;
}

.panel.full {
  border-left: 0;
}

.section-intro {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

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

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.section-intro h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.overview-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

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

.overview-row-muted {
  background: rgba(248, 250, 253, 0.72);
}

.overview-label {
  color: var(--muted);
  font-size: 12px;
}

.overview-value {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: right;
}

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

.v {
  margin-top: 3px;
  font-size: 13px;
  word-break: break-word;
}

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

.settings-stack {
  display: grid;
  gap: 10px;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.settings-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.settings-card-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-card-note {
  color: var(--muted);
  font-size: 11px;
}

.settings-edit-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(248, 250, 253, 0.72);
}

.settings-edit-row,
.settings-toggle-row {
  display: grid;
  grid-template-columns: minmax(108px, 148px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.settings-edit-row:last-child,
.settings-toggle-row:last-child {
  border-bottom: 0;
}

.settings-edit-row span,
.settings-toggle-row span {
  color: var(--muted);
  font-size: 11px;
}

.settings-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  justify-self: start;
}

.settings-card-result {
  margin-top: 8px;
}

.settings-inline-hint {
  color: rgba(15, 23, 42, 0.48);
  font-size: 11px;
  line-height: 1.5;
}

.settings-edit-row input,
.settings-edit-row select {
  width: 100%;
  min-width: 0;
}

.v4-webhook-edit-list input[readonly] {
  background: rgba(241, 245, 249, 0.78);
  color: rgba(15, 23, 42, 0.88);
}

.v4-webhook-actions {
  justify-content: flex-start;
}

.legacy-log-panel {
  margin-top: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 18px;
  background: rgba(248, 250, 253, 0.64);
  padding: 10px;
}

.legacy-log-panel > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 6px;
}

.legacy-log-panel > summary::-webkit-details-marker {
  display: none;
}

.legacy-log-panel > summary::after {
  content: "展开";
  float: right;
  color: var(--primary);
  font-size: 12px;
}

.legacy-log-panel[open] > summary::after {
  content: "收起";
}

body[data-workbench-theme="dark"] .section-tabs .tab-btn {
  background: rgba(29, 40, 58, 0.88);
  border-color: rgba(148, 163, 184, 0.26);
  color: var(--muted);
}

body[data-workbench-theme="dark"] .section-tabs .tab-btn.active {
  background: rgba(77, 159, 255, 0.22);
  border-color: rgba(77, 159, 255, 0.44);
  color: #dbeafe;
}

body[data-workbench-theme="dark"] .summary-item,
body[data-workbench-theme="dark"] .settings-card,
body[data-workbench-theme="dark"] .workflow-step-card,
body[data-workbench-theme="dark"] .display-log-row,
body[data-workbench-theme="dark"] .display-log-empty,
body[data-workbench-theme="dark"] .display-overview-item,
body[data-workbench-theme="dark"] .display-summary-item,
body[data-workbench-theme="dark"] .display-summary-head,
body[data-workbench-theme="dark"] .console-quick-card,
body[data-workbench-theme="dark"] .overview-list,
body[data-workbench-theme="dark"] .settings-edit-list,
body[data-workbench-theme="dark"] .manual-feedback-item,
body[data-workbench-theme="dark"] pre {
  background: rgba(26, 36, 54, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
}

body[data-workbench-theme="dark"] table th,
body[data-workbench-theme="dark"] table td {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

body[data-workbench-theme="dark"] .console-quick-card:hover {
  background: linear-gradient(180deg, rgba(35, 49, 71, 0.96), rgba(30, 43, 64, 0.94));
}

body[data-workbench-theme="dark"] .display-filter-chips button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #f8fbff;
}

body[data-workbench-theme="dark"] .app-profile {
  opacity: 0.8;
}

body.theme-dark {
  background:
    radial-gradient(circle at top left, rgba(36, 99, 200, 0.2), transparent 24%),
    radial-gradient(circle at top right, rgba(30, 41, 59, 0.28), transparent 22%),
    linear-gradient(180deg, #0f1520 0%, #111826 100%);
}

body.theme-dark .app-topbar,
body.theme-dark .panel,
body.theme-dark .command-deck,
body.theme-dark .display-card,
body.theme-dark .subpanel {
  background: rgba(24, 34, 50, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 24px 56px rgba(2, 8, 23, 0.5);
}

body.theme-dark .summary-item,
body.theme-dark .console-quick-card,
body.theme-dark .console-recent-item,
body.theme-dark .console-banner-item,
body.theme-dark .console-guide-card,
body.theme-dark .console-guide-item,
body.theme-dark .settings-card,
body.theme-dark .overview-list,
body.theme-dark .settings-edit-list,
body.theme-dark .display-log-row,
body.theme-dark .display-log-empty,
body.theme-dark .display-overview-item,
body.theme-dark .display-summary-item,
body.theme-dark .display-summary-head,
body.theme-dark pre {
  background: rgba(27, 39, 58, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: rgba(22, 32, 48, 0.94);
  border-color: rgba(148, 163, 184, 0.3);
  color: #e5edf7;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #8fa4c0;
}

body.theme-dark .v4-webhook-edit-list input[readonly] {
  background: rgba(31, 44, 66, 0.96);
  color: #eef4fb;
}

body.theme-dark .section-tabs .tab-btn {
  background: rgba(29, 40, 58, 0.9);
  border-color: rgba(148, 163, 184, 0.26);
  color: #b9c8dc;
}

body.theme-dark .section-tabs .tab-btn.active {
  background: rgba(77, 159, 255, 0.24);
  border-color: rgba(77, 159, 255, 0.45);
  color: #e8f2ff;
}

body.theme-dark table th,
body.theme-dark table td {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark label,
body.theme-dark .page-desc,
body.theme-dark .small,
body.theme-dark .monoSmall,
body.theme-dark .hint,
body.theme-dark .workflow-step-note,
body.theme-dark .settings-card-note,
body.theme-dark .overview-label,
body.theme-dark .settings-edit-row span,
body.theme-dark .settings-toggle-row span,
body.theme-dark .summary-item span,
body.theme-dark .summary-item small,
body.theme-dark .console-banner-item span,
body.theme-dark .console-guide-item small,
body.theme-dark .console-recent-item span,
body.theme-dark .console-recent-item small,
body.theme-dark .console-quick-card span,
body.theme-dark .display-monitor-card span,
body.theme-dark .display-monitor-card small,
body.theme-dark .display-log-row-meta,
body.theme-dark .display-log-row-bottom,
body.theme-dark .display-log-empty,
body.theme-dark .display-summary-head small,
body.theme-dark .display-overview-item span,
body.theme-dark .display-summary-item span,
body.theme-dark th,
body.theme-dark td {
  color: #9fb2cb;
}

body.theme-dark .summary-item strong,
body.theme-dark .console-banner-item strong,
body.theme-dark .console-guide-item strong,
body.theme-dark .console-guide-card strong,
body.theme-dark .console-recent-item strong,
body.theme-dark .console-quick-card strong,
body.theme-dark .display-monitor-card strong,
body.theme-dark .display-overview-item strong,
body.theme-dark .display-summary-item strong,
body.theme-dark .display-summary-head strong,
body.theme-dark .overview-value,
body.theme-dark .v,
body.theme-dark pre,
body.theme-dark .display-log-note {
  color: #eef4fb;
}

body.theme-dark .console-quick-card.primary {
  background: linear-gradient(180deg, rgba(36, 86, 170, 0.28), rgba(27, 39, 58, 0.94));
  border-color: rgba(77, 159, 255, 0.28);
}

body.theme-dark .console-quick-card:hover,
body.theme-dark .console-guide-card:hover {
  background: linear-gradient(180deg, rgba(45, 101, 196, 0.32), rgba(31, 45, 68, 0.98));
}

body.theme-dark .console-guide-card p {
  color: #9fb2cb;
}

body.theme-dark .display-action-menu summary,
body.theme-dark .display-table-actions .subtle,
body.theme-dark button.subtle {
  background: rgba(31, 44, 66, 0.92);
  border-color: rgba(148, 163, 184, 0.24);
  color: #d8e4f2;
}

body.theme-dark .display-action-menu-body {
  background: rgba(24, 34, 50, 0.98);
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: 0 18px 36px rgba(2, 8, 23, 0.52);
}

body.theme-dark .display-status-pill,
body.theme-dark .manual-live-warning,
body.theme-dark .manual-live-warning-inline {
  color: #e6edf7;
}

body.theme-dark .manual-required,
body.theme-dark .manual-advanced,
body.theme-dark .workflow-inline-banner,
body.theme-dark .section-inline-note,
body.theme-dark .display-table-shell,
body.theme-dark .legacy-log-panel {
  background: rgba(24, 34, 50, 0.94);
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.32);
}

body.theme-dark .manual-live-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(86, 52, 15, 0.92), rgba(104, 72, 20, 0.84));
  color: #fde7bf;
}

body.theme-dark .display-status-pill {
  background: rgba(31, 44, 66, 0.96);
  border-color: rgba(148, 163, 184, 0.22);
  color: #dbe7f4;
}

body.theme-dark .manual-feedback-empty,
body.theme-dark .display-log-empty,
body.theme-dark #v4_logs_tbody .small,
body.theme-dark #accounts_tbody .small {
  background: rgba(29, 42, 63, 0.96);
  border-color: rgba(148, 163, 184, 0.22);
  color: #c7d4e5;
}

body.theme-dark .manual-raw-result summary,
body.theme-dark .legacy-log-panel > summary,
body.theme-dark .display-card-head .small {
  color: #9fb2cb;
}

body.theme-dark .legacy-log-panel > summary::after {
  color: #78b8ff;
}

body.theme-dark .display-table-shell table {
  background: transparent;
}

body.theme-dark .display-table-shell tbody tr:hover {
  background: rgba(36, 52, 77, 0.58);
}

body.theme-dark .manual-required .workflow-field-grid,
body.theme-dark .manual-advanced .workflow-field-grid,
body.theme-dark .manual-advanced-checks {
  background: transparent;
}

body.theme-dark .manual-mode-pill[data-tone="neutral"],
body.theme-dark .manual-feedback-state[data-tone="neutral"],
body.theme-dark .status-chip.neutral,
body.theme-dark .manual-target-status[data-tone="neutral"] {
  background: rgba(56, 70, 92, 0.92);
  color: #d8e3f1;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

body.theme-dark .manual-summary-item,
body.theme-dark .manual-feedback-metric,
body.theme-dark .manual-feedback-status,
body.theme-dark .manual-feedback-list,
body.theme-dark .manual-advanced-group,
body.theme-dark .manual-targets-box,
body.theme-dark .manual-target-item {
  background: rgba(27, 39, 58, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
}

body.theme-dark .manual-advanced-toggle {
  background: rgba(27, 39, 58, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e5edf7;
}

body.theme-dark .manual-result-section {
  background: rgba(24, 34, 50, 0.94);
  border-color: rgba(148, 163, 184, 0.24);
}

body.theme-dark .manual-targets-section {
  background: rgba(24, 34, 50, 0.94);
  border-color: rgba(148, 163, 184, 0.24);
}

body.theme-dark .manual-live-warning-inline {
  background: rgba(86, 52, 15, 0.92);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde7bf;
}

body.theme-dark .manual-feedback-metrics {
  color: #9fb2cb;
}

body.theme-dark .manual-feedback-metrics strong {
  color: #dbe7f4;
}

.compact-overview-list .overview-row {
  min-height: 44px;
}

.workflow-step-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.workflow-step-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.workflow-step-index {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(0, 113, 227, 0.14);
}

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

.workflow-field-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-span-full {
  grid-column: 1 / -1;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 10px;
}

.manual-console-headbar {
  align-items: flex-start;
}

/* ── strategy page compact layout ── */
.strategy-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.strategy-page-header h3 {
  margin: 0;
}

.strategy-page-header-left {
  display: grid;
  gap: 4px;
}

.strategy-page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.strategy-create-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  margin-bottom: 14px;
}

.strategy-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}

.strategy-create-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.strategy-list-section {
  margin-bottom: 14px;
}

.strategy-list-section a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.strategy-list-section a:hover {
  text-decoration: underline;
}

.strategy-detail-section {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.64);
  display: grid;
  gap: 16px;
}

.strategy-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.strategy-detail-params,
.strategy-detail-webhook {
  display: grid;
  gap: 10px;
  align-content: start;
}

.strategy-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.strategy-select-inline {
  font-size: 13px;
  font-weight: 400;
  min-width: 160px;
}

.strategy-param-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.strategy-webhook-field {
  display: grid;
  gap: 4px;
}

.strategy-webhook-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.strategy-webhook-input-row input {
  flex: 1;
  min-width: 0;
}

.strategy-webhook-actions {
  display: flex;
  gap: 8px;
}

.strategy-webhook-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

/* ── Webhook guide card ── */
.webhook-guide-card {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1.5px solid rgba(59, 130, 246, 0.25);
  display: grid;
  gap: 10px;
}
.webhook-guide-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.webhook-guide-steps {
  display: grid;
  gap: 8px;
}
.webhook-guide-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.webhook-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.webhook-guide-btn {
  font-size: 14px;
  padding: 10px 20px;
  animation: webhook-pulse 2s ease-in-out infinite;
}
@keyframes webhook-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}
.webhook-guide-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}
body.theme-dark .webhook-guide-card {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.6), rgba(45, 35, 85, 0.4));
  border-color: rgba(96, 165, 250, 0.3);
}

.strategy-bindings-section {
  display: grid;
  gap: 10px;
}

.strategy-bindings-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.strategy-binding-form-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.strategy-binding-form-section > summary {
  cursor: pointer;
  list-style: none;
}

.strategy-binding-form-section > summary::-webkit-details-marker {
  display: none;
}

.strategy-binding-form-section[open] > summary {
  margin-bottom: 10px;
}

.strategy-binding-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 820px) {
  .strategy-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* dark theme for strategy & api */
body.theme-dark .strategy-create-panel,
body.theme-dark .strategy-detail-section,
body.theme-dark .strategy-binding-form-section,
body.theme-dark .api-form-section {
  background: rgba(24, 34, 50, 0.94);
  border-color: rgba(148, 163, 184, 0.24);
}

body.theme-dark .strategy-webhook-note {
  border-color: rgba(148, 163, 184, 0.18);
}

/* ── TV alert modal ── */
.tv-alert-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tv-alert-modal-overlay[hidden] { display: none; }

.tv-alert-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  animation: tvModalIn 0.22s ease;
}

@keyframes tvModalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tv-alert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.tv-alert-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
}

.tv-alert-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  padding: 0 4px;
}
.tv-alert-modal-close:hover { color: var(--fg); }

.tv-alert-modal-code {
  font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  background: #f8f9fa;
  margin: 0;
  padding: 20px 24px;
  white-space: pre-wrap;
  word-break: break-all;
  color: #1a1a2e;
  user-select: all;
  max-height: 360px;
  overflow-y: auto;
}

.tv-alert-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.tv-alert-modal-actions .primary {
  min-width: 120px;
}

/* dark theme */
body.theme-dark .tv-alert-modal {
  background: #1a2235;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
body.theme-dark .tv-alert-modal-code {
  background: rgba(0, 0, 0, 0.32);
  color: #e2e8f0;
}
body.theme-dark .tv-alert-modal-header,
body.theme-dark .tv-alert-modal-actions {
  border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 560px) {
  .tv-alert-modal { max-width: 100%; }
  .tv-alert-modal-code { font-size: 11px; padding: 14px 16px; }
}

/* ── api form section ── */
.api-form-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.api-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── billing / 账单支付 ── */
.billing-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.billing-plan-card {
  background: var(--surface, #1a1c22);
  border: 1px solid var(--border, #2a2d36);
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.billing-plan-card:hover { border-color: #6366f1; }
.billing-plan-card.selected {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,.3);
}
.billing-plan-card .billing-plan-name {
  font-size: 1.05rem;
  font-weight: 600;
}
.billing-plan-card .billing-plan-duration {
  font-size: .82rem;
  color: var(--text-muted, #999);
}
.billing-plan-card .billing-plan-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6366f1;
  margin-top: 6px;
}
.billing-plan-card .billing-plan-price small {
  font-size: .75rem;
  font-weight: 400;
  color: var(--text-muted, #999);
}
.billing-plan-card .billing-plan-buy {
  margin-top: 10px;
  padding: 8px 0;
  text-align: center;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s;
}
.billing-plan-card .billing-plan-buy:hover { background: #4f46e5; }
.billing-plan-popular {
  position: absolute;
  top: -1px; right: 16px;
  background: #6366f1;
  color: #fff;
  font-size: .7rem;
  padding: 2px 10px;
  border-radius: 0 0 6px 6px;
}
.billing-coupon-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.billing-coupon-row label {
  font-size: .88rem;
  font-weight: 500;
  white-space: nowrap;
}
.billing-coupon-row input {
  flex: 1;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #2a2d36);
  background: var(--surface, #1a1c22);
  color: var(--text, #eee);
  font-size: .88rem;
}
/* modal */
.billing-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.billing-modal {
  background: var(--bg, #0e1015);
  border: 1px solid var(--border, #2a2d36);
  border-radius: 14px;
  width: 560px;
  max-width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.billing-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}
.billing-modal-head h3 { margin: 0; font-size: 1.1rem; }
.billing-modal-close {
  background: none;
  border: none;
  color: var(--text-muted, #999);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.billing-modal-body { padding: 18px 22px 22px; }
.billing-invoice {
  background: var(--surface, #1a1c22);
  border: 1px solid var(--border, #2a2d36);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.billing-invoice-title {
  margin: 0 0 12px;
  font-size: .95rem;
  color: #6366f1;
}
.billing-invoice-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: .9rem;
  border-bottom: 1px solid var(--border, #2a2d36);
}
.billing-invoice-row.discount strong { color: #22c55e; }
.billing-invoice-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 0;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(99,102,241,.06);
  margin: 8px -18px -16px;
  padding: 14px 18px;
  border-radius: 0 0 10px 10px;
}
.billing-pay-info { margin-bottom: 14px; }
.billing-pay-method {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  margin-bottom: 12px;
}
.billing-wallet-box { margin-bottom: 12px; }
.billing-wallet-box label {
  display: block;
  font-size: .82rem;
  color: var(--text-muted, #999);
  margin-bottom: 6px;
}
.billing-wallet-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.billing-wallet-row code {
  background: var(--surface, #1a1c22);
  border: 1px solid var(--border, #2a2d36);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .85rem;
  word-break: break-all;
  flex: 1;
  color: var(--text, #eee);
}
.billing-pay-note {
  font-size: .82rem;
  color: var(--text-muted, #aaa);
  line-height: 1.7;
}
.billing-pay-note p { margin: 4px 0; }
.billing-pay-warn { color: #ef4444; font-weight: 500; }
.billing-pay-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: .85rem;
}
.billing-exchange-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  transition: opacity .2s;
}
.billing-exchange-btn:hover { opacity: .85; }
.billing-exchange-btn.okx { background: #1e1e1e; border: 1px solid #444; }
.billing-exchange-btn.binance { background: #f0b90b; color: #1a1a1a; }
.billing-exchange-btn.bitget { background: #00b897; }
/* order status */
.order-status-unpaid { color: #ef4444; background: rgba(239,68,68,.1); padding: 2px 8px; border-radius: 4px; font-size: .8rem; }
.order-status-paid { color: #22c55e; background: rgba(34,197,94,.1); padding: 2px 8px; border-radius: 4px; font-size: .8rem; }
.order-pay-btn {
  padding: 4px 12px;
  font-size: .8rem;
  border-radius: 6px;
  background: #6366f1;
  color: #fff;
  border: none;
  cursor: pointer;
}
.order-del-btn {
  padding: 4px 12px;
  font-size: .8rem;
  border-radius: 6px;
  background: var(--error-soft, rgba(239,68,68,.12));
  color: var(--error, #ef4444);
  border: 1px solid var(--error, #ef4444);
  cursor: pointer;
  transition: background .2s;
}
.order-del-btn:hover {
  background: var(--error, #ef4444);
  color: #fff;
}

/* ── referral / 推广返现 ── */
.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.referral-stat-card {
  background: var(--surface, #1a1c22);
  border: 1px solid var(--border, #2a2d36);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.referral-stat-card.highlight {
  border-color: #6366f1;
  background: linear-gradient(135deg, rgba(99,102,241,.08), transparent);
}
.referral-stat-label {
  font-size: .82rem;
  color: var(--text-muted, #999);
}
.referral-stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #6366f1;
}
.referral-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.referral-code-value {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text,#eee);
  word-break: break-all;
}
.referral-link-value {
  font-size: .85rem;
  color: var(--text-muted, #aaa);
  word-break: break-all;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.referral-copy-btn {
  flex-shrink: 0;
  padding: 4px 14px;
  font-size: .82rem;
  border-radius: 6px;
  background: #6366f1;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.referral-copy-btn:hover { background: #4f46e5; }
.referral-copy-btn.copied {
  background: #22c55e;
  pointer-events: none;
}
.referral-rules-box {
  background: var(--surface, #1a1c22);
  border: 1px solid var(--border, #2a2d36);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 8px;
}
.referral-rules-box h4 {
  margin: 0 0 10px;
  font-size: .95rem;
  font-weight: 600;
}
.referral-rules-box ul {
  margin: 0;
  padding-left: 20px;
}
.referral-rules-box li {
  font-size: .88rem;
  line-height: 1.8;
  color: var(--text-muted, #bbb);
}
.referral-rules-box li strong {
  color: #6366f1;
}

/* ── manual trade compact layout ── */
.manual-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.manual-compact-header h3 {
  margin: 0;
  font-size: 18px;
}

.manual-compact-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.manual-compact-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manual-live-warning-inline {
  font-size: 12px;
  font-weight: 700;
  color: #9a3412;
  background: rgba(255, 247, 237, 0.94);
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  padding: 2px 12px;
  line-height: 26px;
}

.manual-live-warning-inline[hidden] {
  display: none;
}

.manual-compact-body {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.manual-compact-body .manual-advanced-toggle {
  justify-self: start;
}

.manual-result-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.64);
}

.manual-feedback-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.manual-feedback-bar .manual-feedback-tip {
  flex: 1;
  min-width: 120px;
}

.manual-feedback-metrics {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.manual-feedback-metrics strong {
  color: var(--text);
  margin-left: 2px;
}

.manual-console-intro .section-intro-copy {
  display: grid;
  gap: 6px;
}

.manual-console-intro .section-intro-copy p,
.workflow-step-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.manual-console-actions {
  align-items: stretch;
  gap: 10px;
}

.manual-submit-cluster {
  display: grid;
  gap: 8px;
  min-width: 260px;
  flex: 1;
}

.manual-submit-meta {
  display: grid;
  gap: 6px;
}

.manual-submit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.manual-advanced-toggle {
  align-self: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
}

.manual-advanced-toggle::after {
  content: "▾";
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  transition: transform .18s ease;
}

.manual-advanced-toggle::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background: rgba(100, 116, 139, 0.45);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.manual-advanced-toggle[data-open="1"]::before {
  background: rgba(14, 116, 144, 0.88);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.manual-advanced-toggle[data-open="1"]::after {
  transform: rotate(180deg);
}

.manual-mode-pill,
.manual-feedback-state,
.status-chip,
.manual-target-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.manual-mode-pill[data-tone="neutral"],
.manual-feedback-state[data-tone="neutral"],
.status-chip.neutral,
.manual-target-status[data-tone="neutral"] {
  background: var(--neutral-soft);
  color: var(--neutral);
}

.manual-mode-pill[data-tone="warning"],
.manual-feedback-state[data-tone="warning"],
.status-chip.warning,
.manual-target-status[data-tone="warning"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.manual-mode-pill[data-tone="danger"],
.manual-feedback-state[data-tone="danger"],
.status-chip.danger,
.manual-target-status[data-tone="danger"] {
  background: var(--error-soft);
  color: var(--error);
}

.manual-mode-pill[data-tone="success"],
.manual-feedback-state[data-tone="success"],
.status-chip.success,
.manual-target-status[data-tone="success"] {
  background: var(--success-soft);
  color: var(--success);
}

.manual-submit-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.manual-form-split,
.manual-form-stack {
  display: grid;
  gap: 10px;
}

.manual-form-split {
  grid-template-columns: 1fr;
}

.manual-required,
.manual-advanced {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.manual-col-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.manual-advanced {
  display: none;
}

.manual-advanced.show {
  display: block;
}

.manual-advanced-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.manual-advanced-groups {
  display: grid;
  gap: 12px;
}

.manual-advanced-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.manual-advanced-group-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.manual-advanced-checks {
  display: grid;
  gap: 10px;
  align-content: start;
}

.workflow-column-main,
.workflow-column-side,
.display-main-column,
.display-side-column {
  display: grid;
  gap: 10px;
}

.workflow-inline-banner,
.display-status-pill,
.section-inline-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  padding: 12px 14px;
  margin-top: 8px;
}

.manual-targets-box {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.05);
}

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

.manual-target-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.manual-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.manual-target-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: border-color .18s ease;
}

.manual-target-item:hover {
  border-color: rgba(14, 116, 144, 0.28);
}

.manual-target-item.is-checked {
  border-color: rgba(14, 116, 144, 0.34);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.08);
}

.manual-target-item.is-active {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.96), rgba(255, 255, 255, 0.92));
}

.manual-target-item.disabled {
  opacity: 0.7;
  background: rgba(248, 250, 252, 0.95);
}

.manual-target-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.manual-target-item input[type="checkbox"] {
  margin: 0;
}

.manual-target-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.manual-target-title strong {
  font-size: 14px;
}

.manual-targets-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.64);
}

.manual-targets-section > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.manual-targets-section > summary::-webkit-details-marker {
  display: none;
}

.manual-targets-section[open] > summary {
  margin-bottom: 10px;
}

.manual-summary-card,
.result-card {
  display: grid;
  gap: 12px;
}

.manual-summary-grid,
.manual-feedback-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-summary-grid-polished {
  align-items: stretch;
}

.manual-summary-item,
.manual-feedback-metric {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.manual-summary-item-accent {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.manual-summary-item span,
.manual-feedback-metric span,
.manual-feedback-label {
  font-size: 12px;
  color: var(--muted);
}

.manual-summary-item strong,
.manual-feedback-metric strong {
  font-size: 15px;
  color: var(--text);
}

.manual-summary-item-accent strong {
  font-size: 18px;
}

.manual-live-warning {
  border: 1px solid rgba(217, 119, 6, 0.22);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.94), rgba(254, 249, 195, 0.82));
  color: #9a3412;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
}

.manual-live-warning[hidden] {
  display: block;
  border-color: rgba(14, 116, 144, 0.18);
  background: rgba(240, 249, 255, 0.92);
  color: #0f766e;
}

.manual-feedback-status {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.manual-feedback-tip {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.manual-feedback-list-wrap {
  display: grid;
  gap: 8px;
}

.manual-feedback-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.manual-feedback-list {
  display: grid;
  gap: 8px;
}

.manual-feedback-item,
.manual-feedback-empty {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  padding: 12px 14px;
}

.manual-feedback-empty {
  color: var(--muted);
}

.manual-feedback-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manual-feedback-item[data-tone="success"] {
  border-color: rgba(22, 163, 74, 0.18);
  background: rgba(240, 253, 244, 0.92);
}

.manual-feedback-item[data-tone="warning"] {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 251, 235, 0.94);
}

.manual-feedback-item[data-tone="danger"] {
  border-color: rgba(220, 38, 38, 0.18);
  background: rgba(254, 242, 242, 0.94);
}

.manual-feedback-account {
  display: grid;
  gap: 4px;
}

.manual-feedback-account strong {
  font-size: 14px;
}

.manual-feedback-account span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.manual-raw-result {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.manual-raw-result summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.manual-raw-result pre {
  margin-top: 10px;
}

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

.display-status-row {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.display-page-head {
  align-items: flex-start;
}

.display-page-head p {
  margin: 6px 0 0;
}

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

.display-monitor-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-muted);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.display-monitor-card span,
.display-monitor-card small {
  color: var(--muted);
  font-size: 12px;
}

.display-monitor-card strong {
  font-size: 20px;
  color: var(--text);
}

.display-monitor-card[data-tone="danger"] {
  background: color-mix(in srgb, var(--error-soft) 55%, transparent);
  border-color: color-mix(in srgb, var(--error) 28%, transparent);
}

.display-monitor-card[data-tone="warning"] {
  background: color-mix(in srgb, var(--warning-soft) 58%, transparent);
  border-color: color-mix(in srgb, var(--warning) 28%, transparent);
}

.display-monitor-card[data-tone="success"] {
  background: color-mix(in srgb, var(--success-soft) 58%, transparent);
  border-color: color-mix(in srgb, var(--success) 28%, transparent);
}

.display-filter-card,
.display-execution-card {
  margin-bottom: 10px;
}

.display-filter-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 12px;
}

.display-filter-grid > div {
  display: grid;
  gap: 8px;
}

.display-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.display-filter-chips button {
  border-radius: 999px;
  padding: 8px 12px;
}

.display-filter-chips button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.display-log-list {
  display: grid;
  gap: 8px;
}

.display-log-row,
.display-log-empty {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  padding: 12px 14px;
}

.display-log-empty {
  color: var(--muted);
}

.display-log-row {
  display: grid;
  gap: 8px;
}

.display-log-row-top,
.display-log-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.display-log-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.display-log-row-title strong {
  font-size: 14px;
}

.display-log-row-meta,
.display-log-row-bottom {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.display-log-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.display-log-badge[data-tone="success"] {
  background: var(--success-soft);
  color: var(--success);
}

.display-monitor-card[data-tone="neutral"] {
  background: color-mix(in srgb, var(--neutral-soft) 48%, transparent);
  border-color: color-mix(in srgb, var(--neutral) 25%, transparent);
}

.display-log-badge[data-tone="warning"] {
  background: var(--warning-soft);
  color: var(--warning);
}

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

.display-overview-item,
.display-summary-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.display-overview-item span,
.display-summary-item span,
.display-summary-head small {
  color: var(--muted);
  font-size: 12px;
}

.display-overview-item strong,
.display-summary-item strong,
.display-summary-head strong {
  color: var(--text);
  font-size: 16px;
}

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

.display-summary-card {
  display: grid;
  gap: 10px;
}

.display-summary-head {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-muted);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.display-summary-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.display-log-badge[data-tone="danger"] {
  background: var(--error-soft);
  color: var(--error);
}

.display-log-badge[data-tone="neutral"] {
  background: var(--neutral-soft);
  color: var(--neutral);
}

.display-log-note {
  color: var(--text);
  font-size: 13px;
}

.display-table-status {
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.display-table-status[data-tone="success"] {
  background: var(--success-soft);
  color: var(--success);
}

.display-table-status[data-tone="warning"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.display-table-status[data-tone="danger"] {
  background: var(--error-soft);
  color: var(--error);
}

.display-table-status[data-tone="neutral"] {
  background: var(--neutral-soft);
  color: var(--neutral);
}

.display-inline-stack {
  display: grid;
  gap: 4px;
}

.display-table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.display-table-actions .subtle {
  background: rgba(255, 255, 255, 0.88);
}

.display-action-menu {
  position: relative;
}

.display-action-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}

.display-action-menu summary::-webkit-details-marker {
  display: none;
}

.display-action-menu-body {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.display-action-menu-body button {
  width: 100%;
}

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

.display-workbench {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 10px;
}

.display-card,
.subpanel {
  padding: 14px;
}

.console-stage-side {
  display: none;
}

.display-card-head {
  margin-bottom: 8px;
}

.display-table-shell {
  overflow-x: auto;
}

#view_api .display-table-shell table {
  min-width: 1180px;
}

#view_api th,
#view_api td {
  white-space: nowrap;
}

#view_api td:last-child,
#view_api th:last-child {
  position: sticky;
  right: 0;
  background: var(--panel);
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: 8px;
}

td.right,
th.right {
  text-align: right;
}

pre {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 70px;
}

.section-inline-notes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.console-home-shell {
  display: grid;
  gap: 14px;
}

.console-state-bar {
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.console-home-banner {
  display: none;
}

.inline-status-tag {
  font-size: 13px;
  font-weight: 500;
  vertical-align: middle;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--line);
  color: var(--muted);
}

.console-home-banner-copy h3 {
  margin: 10px 0 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.console-home-banner-copy p {
  margin: 10px 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.console-home-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.console-banner-item,
.console-guide-item,
.console-guide-card,
.console-recent-item,
.console-quick-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
}

.console-banner-item {
  padding: 14px;
}

.console-banner-item span,
.console-guide-item small,
.console-guide-card p,
.console-recent-item span,
.console-recent-item small,
.console-quick-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.console-banner-item strong,
.console-guide-item strong,
.console-guide-card strong,
.console-recent-item strong,
.console-quick-card strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.console-section-head {
  margin-bottom: 10px;
}

.console-status-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.console-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 12px;
  align-items: start;
}

.console-home-main,
.console-home-side {
  display: grid;
  gap: 12px;
}

.console-quick-panel,
.console-guide-panel,
.console-recent-panel,
.console-config-panel {
  background: rgba(255, 255, 255, 0.74);
}

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

.console-quick-card {
  min-height: 118px;
  padding: 16px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 6px;
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.console-quick-card.primary {
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.08), rgba(255, 255, 255, 0.82));
  border-color: rgba(0, 113, 227, 0.12);
}

.console-quick-card:hover,
.console-guide-item:hover,
.console-guide-card:hover,
.console-config-group > summary:hover {
  border-color: rgba(0, 113, 227, 0.22);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.console-quick-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(239, 246, 255, 0.92));
}

.console-quick-status,
.console-group-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.console-quick-status[data-tone="success"],
.console-group-status[data-tone="success"],
.console-execution-panel[data-tone="success"] .console-execution-kicker {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.14);
  color: #167a38;
}

.console-quick-status[data-tone="warning"],
.console-group-status[data-tone="warning"],
.console-execution-panel[data-tone="warning"] .console-execution-kicker {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.16);
  color: #a16207;
}

.console-quick-status[data-tone="danger"],
.console-group-status[data-tone="danger"],
.console-execution-panel[data-tone="danger"] .console-execution-kicker {
  background: rgba(217, 45, 32, 0.1);
  border-color: rgba(217, 45, 32, 0.16);
  color: var(--danger);
}

.console-quick-card strong {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 16px;
}

.console-quick-card .console-quick-status {
  justify-self: start;
}

.console-quick-card::after {
  content: "→";
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: rgba(0, 113, 227, 0.66);
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.18s ease, color 0.18s ease;
}

.console-quick-card:hover::after {
  transform: translateX(3px);
  color: var(--primary);
}

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

.console-guide-card,
.console-guide-item {
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.console-guide-card {
  align-content: start;
}

.console-guide-card button {
  justify-self: start;
}

.console-guide-index,
.console-guide-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  width: fit-content;
  height: 30px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(0, 113, 227, 0.14);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.console-guide-card strong,
.console-guide-item strong {
  margin-top: 0;
}

.console-guide-item strong {
  margin-top: 12px;
}

.console-execution-panel {
  position: relative;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.92));
  overflow: hidden;
}

.console-execution-panel::after {
  content: "";
  position: absolute;
  inset: auto -18px -42px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.14), rgba(0, 113, 227, 0));
  pointer-events: none;
}

.console-execution-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.console-execution-panel strong {
  display: block;
  margin-top: 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.console-execution-panel p {
  position: relative;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  z-index: 1;
}

.console-execution-actions {
  position: relative;
  z-index: 1;
}

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

.console-recent-item {
  padding: 14px;
}

.console-config-details {
  margin-top: 10px;
  padding: 4px;
}

.console-config-group > summary {
  list-style: none;
  cursor: pointer;
}

.console-config-group > summary::-webkit-details-marker {
  display: none;
}

.console-config-groups {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.console-config-group {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.console-config-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(248, 250, 253, 0.82);
}

.console-group-summary-copy {
  display: grid;
  gap: 4px;
}

.console-group-summary-copy strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.console-group-summary-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.console-config-group-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.console-group-actions,
.console-inline-actions {
  margin-bottom: 10px;
}

.console-config-status-row {
  margin-top: 0;
}

.console-inline-details {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: rgba(248, 250, 253, 0.72);
}

.console-inline-details summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
}

.console-inline-details summary::-webkit-details-marker {
  display: none;
}

.console-inline-details-body {
  padding: 0 14px 14px;
}

.console-auth-lite-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
}

.console-auth-lite-copy strong {
  display: block;
  font-size: 14px;
}

.console-auth-lite-copy span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.console-reauth-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

.console-reauth-panel[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .landing-topbar,
  .landing-bottom-cta,
  .workflow-layout,
  .display-workbench,
  .manual-form-split,
  .manual-form-stack {
    grid-template-columns: 1fr;
  }

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

  .console-home-banner,
  .console-home-grid {
    grid-template-columns: 1fr;
  }

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

  .landing-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .landing-nav {
    justify-content: flex-start;
  }

  .landing-hero-showcase {
    min-height: 820px;
    padding: 72px 36px 48px;
  }

  .landing-visual {
    position: relative;
    inset: auto;
    width: 100%;
    height: 420px;
    margin-top: 20px;
  }

  .landing-core-figure {
    right: 50%;
    top: 10px;
    margin-right: -210px;
  }

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

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

  .manual-target-grid,
  .console-quick-grid,
  .manual-summary-grid,
  .manual-feedback-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app {
    padding: 14px 12px 24px;
  }

  .panel,
  .command-deck,
  .display-card,
  .subpanel,
  .app-topbar {
    border-radius: 20px;
  }

  .page-head h2 {
    font-size: 22px;
  }

  .landing-topbar,
  .page-head,
  .app-topbar,
  .display-toolbar,
  .manual-targets-head,
  .settings-card-head,
  .manual-console-headbar,
  .manual-feedback-item,
  .manual-feedback-list-head,
  .manual-submit-actions,
  .manual-advanced-head,
  .display-log-row-top,
  .display-log-row-bottom,
  .display-page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .command-metrics,
  .global-summary,
  .workflow-field-grid.two-cols,
  .manual-target-grid,
  .display-monitor-grid,
  .display-filter-grid {
    grid-template-columns: 1fr;
  }

  .section-tabs {
    margin-top: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .section-tabs .tab-btn {
    flex: 0 0 auto;
  }

  .section-headbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .console-status-grid,
  .console-guide-grid {
    grid-template-columns: 1fr;
  }

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

  .landing-shell {
    padding: 14px 14px 34px;
    gap: 18px;
  }

  .landing-topbar-actions,
  .landing-nav,
  .landing-hero-actions,
  .landing-bottom-actions {
    width: 100%;
    flex-wrap: wrap;
  }

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

  .landing-hero-showcase,
  .landing-modules-block,
  .landing-ai-block,
  .landing-bottom-cta {
    border-radius: 24px;
  }

  .landing-hero-showcase {
    min-height: auto;
    padding: 48px 20px 26px;
  }

  .landing-hero-copy h1 {
    font-size: clamp(48px, 16vw, 78px);
  }

  .landing-hero-copy p {
    font-size: 16px;
  }

  .landing-cta-button,
  .landing-secondary-button {
    width: 100%;
  }

  .landing-visual {
    height: 300px;
    margin-top: 6px;
  }

  .landing-core-figure {
    width: 300px;
    height: 360px;
    margin-right: -150px;
  }

  .landing-core-ring {
    width: 140px;
    height: 24px;
    margin-left: -70px;
  }

  .landing-core-body {
    inset: 44px 42px 0;
  }

  .landing-coin {
    width: 78px;
    height: 78px;
    font-size: 14px;
  }

  .coin-a { left: 0; top: 150px; }
  .coin-b { right: 0; top: 28px; }
  .coin-c { right: 46px; bottom: 62px; }
  .coin-d { left: 54px; bottom: 10px; }

  .landing-module-grid,
  .landing-capability-grid {
    grid-template-columns: 1fr;
  }

  .display-log-grid {
    grid-template-columns: 1fr;
  }

  #accounts_table thead {
    display: none;
  }

  #accounts_table,
  #accounts_table tbody,
  #accounts_table tr,
  #accounts_table td {
    display: block;
    width: 100%;
  }

  #accounts_table tbody {
    display: grid;
    gap: 10px;
  }

  #accounts_table tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafbfd;
    padding: 8px 10px;
  }

  #accounts_table td {
    display: grid;
    grid-template-columns: minmax(86px, 110px) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    border: 0;
    padding: 6px 0;
  }

  #accounts_table td[colspan] {
    display: block;
    text-align: center;
    padding: 4px 0;
  }

  #accounts_table td:not([colspan])::before {
    content: attr(data-label);
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
  }

  #accounts_table td.right {
    text-align: left;
  }

  #accounts_table td.right button {
    width: 100%;
  }

  .landing-topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .landing-page {
    min-height: 100vh;
  }

  .auth-gate {
    grid-template-columns: 1fr;
    margin: 20px auto;
    padding: 0 10px;
  }

  .landing-shell {
    padding: 10px 10px 24px;
  }

  .landing-topbar {
    padding: 6px 2px 0;
    gap: 12px;
  }

  .landing-brand-block {
    gap: 10px;
  }

  .landing-nav button {
    padding: 8px 14px;
  }

  .landing-hero-showcase {
    padding: 40px 16px 18px;
  }

  .landing-section-heading h2,
  .landing-bottom-copy h2 {
    font-size: 26px;
  }

  .landing-modules-block,
  .landing-ai-block,
  .landing-bottom-cta {
    padding: 20px 16px;
  }

  .landing-bottom-actions > * {
    width: 100%;
  }

  .auth-left {
    display: none;
  }

  .auth-box,
  .panel,
  .command-deck,
  .display-card,
  .subpanel,
  .app-topbar {
    padding: 14px;
  }

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

  .overview-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-edit-row,
  .settings-toggle-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .overview-value {
    text-align: left;
  }

  .page-actions,
  .section-actions,
  .manual-target-actions,
  .auth-actions,
  .btnrow,
  .command-action-row {
    width: 100%;
  }

  .page-actions > *,
  .section-actions > *,
  .manual-target-actions > *,
  .auth-actions > *,
  .btnrow > *,
  .command-action-row > *,
  .manual-submit-cluster,
  .manual-submit-actions > * {
    width: 100%;
  }

  .manual-target-item {
    flex-direction: column;
  }

  .manual-target-top {
    flex-direction: column;
  }

  .manual-target-item input[type="checkbox"] {
    margin-top: 2px;
  }

  .display-table-actions,
  .display-log-row-title {
    width: 100%;
    justify-content: flex-start;
  }

  #accounts_table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #accounts_table td:not([colspan])::before {
    margin-bottom: 2px;
  }

  pre {
    font-size: 11px;
    padding: 8px;
  }
}

.home-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-proof-strip article,
.home-exchange-card {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(114, 163, 255, 0.14);
  background: linear-gradient(180deg, rgba(8, 19, 35, 0.72), rgba(6, 13, 24, 0.7));
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-proof-strip span,
.home-exchange-card span {
  display: block;
  color: rgba(214, 231, 247, 0.74);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.home-proof-strip strong,
.home-exchange-card strong {
  display: block;
  margin-top: 8px;
  color: #f6fbff;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.home-proof-strip article strong {
  font-size: 16px;
}

.home-proof-strip article {
  background:
    radial-gradient(circle at 50% 130%, rgba(16, 240, 210, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(11, 26, 48, 0.72), rgba(6, 14, 26, 0.66));
}

.home-exchange-grid,
.home-demo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-demo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-exchange-card p {
  margin: 10px 0 0;
  color: rgba(230, 239, 248, 0.78);
  font-size: 14px;
  line-height: 1.75;
}

.home-exchange-card-active {
  background:
    radial-gradient(circle at 50% 120%, rgba(16, 240, 210, 0.1), transparent 44%),
    linear-gradient(180deg, rgba(14, 34, 68, 0.84), rgba(7, 18, 34, 0.8));
  border-color: rgba(78, 168, 255, 0.28);
}

.home-scene-card,
.home-flow-step {
  border-color: rgba(114, 163, 255, 0.14);
  background:
    radial-gradient(circle at 50% 120%, rgba(75, 126, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(10, 23, 41, 0.94), rgba(8, 15, 28, 0.94));
}

.home-flow-board-strong .home-flow-step {
  min-height: 160px;
}

.home-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.info-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 190, 255, 0.16), transparent 22%),
    radial-gradient(circle at 82% 24%, rgba(94, 92, 230, 0.22), transparent 24%),
    linear-gradient(180deg, #08162b 0%, #07111f 56%, #08101a 100%);
  color: #f6fbff;
}

.info-page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 72px;
  display: grid;
  gap: 24px;
}

.info-page-topbar,
.info-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.info-page-link {
  color: rgba(225, 236, 246, 0.84);
  text-decoration: none;
  font-size: 14px;
}

.info-page-link:hover {
  color: #ffffff;
}

.info-page-card {
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 18, 34, 0.48);
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.18);
}

.info-page-card h1,
.info-page-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.info-page-card h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.info-page-card h2 {
  font-size: 24px;
}

.info-page-card p,
.info-page-card li {
  color: rgba(230, 239, 248, 0.82);
  font-size: 15px;
  line-height: 1.8;
}

.info-page-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.info-page-card ul li + li {
  margin-top: 8px;
}

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

.info-page-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(225, 236, 246, 0.84);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.info-page-summary {
  margin-top: 14px;
  max-width: 760px;
}

.app-profile .subtle {
  min-width: auto;
}

@media (max-width: 1200px) {
  .home-proof-strip,
  .home-exchange-grid,
  .home-card-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-demo-grid {
    grid-template-columns: 1fr;
  }

  .info-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .home-proof-strip,
  .home-exchange-grid,
  .home-card-grid-3 {
    grid-template-columns: 1fr;
  }

  .home-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .info-page-shell {
    padding: 18px 16px 48px;
  }

  .info-page-card {
    padding: 22px;
  }
}

/* ── Emergency Controls ───────────────────────────────────────── */
.emergency-bar { background: #dc2626; color: #fff; padding: 10px 16px; border-radius: 8px; margin-bottom: 12px; }
.emergency-bar-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.emergency-icon { font-size: 1.3em; }
.emergency-text { flex: 1; font-weight: 600; font-size: .95em; }
.emergency-resume-btn { background: #fff; color: #dc2626; border: none; padding: 6px 18px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: .9em; }
.emergency-resume-btn:hover { background: #fee; }
.emergency-actions-row { display: flex; gap: 10px; margin-bottom: 16px; }
.btn-emergency-stop { background: #f59e0b; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: .9em; }
.btn-emergency-stop:hover { background: #d97706; }
.btn-emergency-close { background: #dc2626; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: .9em; }
.btn-emergency-close:hover { background: #b91c1c; }

/* ── Confirm Dialog ───────────────────────────────────────────── */
.confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.confirm-dialog { background: var(--bg-card, #fff); border-radius: 12px; padding: 28px 24px; max-width: 420px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,.25); }
.confirm-dialog h3 { margin: 0 0 12px; font-size: 1.1em; color: #dc2626; }
.confirm-dialog p { margin: 0 0 20px; font-size: .95em; line-height: 1.5; color: var(--fg-secondary, #555); }
.confirm-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-dialog .btn-cancel { background: var(--bg-secondary, #e5e7eb); color: var(--fg-primary, #333); border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.confirm-dialog .btn-confirm { background: #dc2626; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.confirm-dialog .btn-confirm:hover { background: #b91c1c; }

[data-theme="dark"] .confirm-dialog { background: #1e1e2e; }
[data-theme="dark"] .confirm-dialog p { color: #ccc; }
[data-theme="dark"] .confirm-dialog .btn-cancel { background: #333; color: #eee; }

/* ── Overview Redesign ────────────────────────────────────────── */
.overview-ready-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(244,248,255,.9), rgba(255,255,255,.85));
  margin-bottom: 16px;
}
.overview-ready-bar[data-tone="success"] {
  border-color: rgba(22,163,74,.18);
  background: linear-gradient(135deg, rgba(240,253,244,.9), rgba(255,255,255,.85));
}
.overview-ready-bar[data-tone="warning"] {
  border-color: rgba(245,158,11,.18);
  background: linear-gradient(135deg, rgba(255,251,235,.9), rgba(255,255,255,.85));
}
.overview-ready-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  background: var(--primary-soft, rgba(0,113,227,.1));
  color: var(--primary, #0071e3);
  flex-shrink: 0;
}
.overview-ready-bar[data-tone="success"] .overview-ready-icon {
  background: rgba(22,163,74,.12); color: #16a34a;
}
.overview-ready-bar[data-tone="warning"] .overview-ready-icon {
  background: rgba(245,158,11,.12); color: #d97706;
}
.overview-ready-copy { flex: 1; min-width: 0; }
.overview-ready-copy strong { display: block; font-size: 14px; letter-spacing: -0.01em; }
.overview-ready-copy span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.overview-ready-actions { display: flex; gap: 8px; flex-shrink: 0; }

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.overview-metric {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  transition: box-shadow .2s, border-color .2s;
}
.overview-metric:hover {
  border-color: rgba(0,113,227,.15);
  box-shadow: 0 4px 16px rgba(15,23,42,.06);
}
.overview-metric.highlight {
  border-color: rgba(0,113,227,.18);
  background: linear-gradient(180deg, rgba(239,246,255,.8), rgba(255,255,255,.7));
}
.overview-metric span {
  display: block; font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
.overview-metric strong {
  display: block; margin-top: 6px; font-size: 20px; font-weight: 700; letter-spacing: -0.03em;
}
.overview-metric small {
  display: block; margin-top: 3px; font-size: 11px; color: var(--muted); line-height: 1.4;
}

.overview-activity {
  margin-bottom: 16px;
}
.overview-activity h3 {
  font-size: 15px; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em;
}
.overview-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.overview-activity-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  transition: box-shadow .2s;
}
.overview-activity-card:hover {
  box-shadow: 0 4px 16px rgba(15,23,42,.06);
}
.overview-activity-label {
  font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em;
}
.overview-activity-card strong {
  display: block; margin-top: 8px; font-size: 16px; letter-spacing: -0.02em;
}
.overview-activity-card small {
  display: block; margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.5;
}

.overview-guide-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.6);
  overflow: hidden;
}
.overview-guide-details > summary {
  padding: 12px 16px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; list-style: none;
  transition: background .15s;
}
.overview-guide-details > summary::-webkit-details-marker { display: none; }
.overview-guide-details > summary::before { content: "▸ "; }
.overview-guide-details[open] > summary::before { content: "▾ "; }
.overview-guide-details[open] > summary { background: rgba(248,250,253,.8); }
.overview-guide-details .console-guide-grid {
  padding: 12px 16px 16px;
  grid-template-columns: repeat(4, 1fr);
}

.btn-refresh {
  background: var(--primary, #0071e3); color: #fff; border: none;
  padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: .85em; cursor: pointer;
}
.btn-refresh:hover { filter: brightness(1.08); }
.btn-logout {
  background: none; color: var(--muted); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 8px; font-weight: 500; font-size: .85em; cursor: pointer;
}
.btn-logout:hover { border-color: var(--danger, #dc2626); color: var(--danger, #dc2626); }

/* Dark mode overrides for overview */
body.theme-dark .overview-ready-bar { background: linear-gradient(135deg, rgba(30,35,50,.9), rgba(24,24,36,.85)); }
body.theme-dark .overview-metric { background: rgba(255,255,255,.05); }
body.theme-dark .overview-metric.highlight { background: linear-gradient(180deg, rgba(0,113,227,.1), rgba(255,255,255,.04)); }
body.theme-dark .overview-activity-card { background: rgba(255,255,255,.05); }
body.theme-dark .overview-guide-details { background: rgba(255,255,255,.04); }
body.theme-dark .overview-guide-details[open] > summary { background: rgba(255,255,255,.06); }

@media (max-width: 900px) {
  .overview-metrics { grid-template-columns: repeat(3, 1fr); }
  .overview-activity-grid { grid-template-columns: 1fr; }
  .overview-guide-details .console-guide-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-ready-bar { flex-direction: column; align-items: flex-start; }
  .overview-ready-actions { width: 100%; }
}
@media (max-width: 600px) {
  .overview-metrics { grid-template-columns: repeat(2, 1fr); }
  .overview-guide-details .console-guide-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   Mobile / Tablet Responsive — v4 tables + console components
   ══════════════════════════════════════════════════════════════ */

/* — Tablet (≤900px) — */
@media (max-width: 900px) {
  .strategy-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .strategy-page-header-actions {
    width: 100%;
  }
  .strategy-page-header-actions button {
    flex: 1;
  }
  .manual-compact-header {
    flex-direction: column;
    align-items: stretch;
  }
  .manual-compact-header-left {
    flex-direction: column;
    align-items: flex-start;
  }
  .manual-compact-header-actions {
    width: 100%;
  }
  .manual-compact-header-actions button {
    flex: 1;
  }
  .app-profile {
    flex-wrap: wrap;
  }
  .manual-feedback-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .manual-feedback-metrics {
    width: 100%;
    justify-content: space-between;
  }
  .api-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .api-form-actions button,
  .api-form-actions span {
    text-align: center;
  }
  .strategy-binding-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .strategy-binding-form-actions button {
    width: 100%;
  }
  .strategy-bindings-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .strategy-webhook-input-row {
    flex-wrap: wrap;
  }
  .strategy-webhook-input-row input {
    width: 100%;
  }
}

/* — Mobile card-view mixin for v4 tables (≤760px) — */
@media (max-width: 760px) {
  /* app topbar profile */
  .app-profile {
    gap: 8px;
  }
  .app-profile .subtle {
    padding: 6px 10px;
    font-size: 12px;
  }
  .app-topbar-sub {
    display: none;
  }

  /* page actions full-width */
  .page-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .page-actions > * {
    flex: 1;
    min-height: 40px;
  }

  /* Strategy table → card */
  #v4_strategy_tbody {
    display: grid;
    gap: 10px;
  }
  #v4_strategy_tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--panel, #fafbfd);
  }
  .strategy-list-section thead {
    display: none;
  }
  .strategy-list-section table,
  .strategy-list-section tbody,
  .strategy-list-section tr,
  .strategy-list-section td {
    display: block;
    width: 100%;
  }
  .strategy-list-section tbody {
    display: grid;
    gap: 10px;
  }
  .strategy-list-section tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel, #fafbfd);
    padding: 12px 14px;
  }
  .strategy-list-section td {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    border: 0;
    padding: 7px 0;
    gap: 8px;
  }
  .strategy-list-section td > * {
    min-width: 0;
  }
  .strategy-list-section td[colspan] {
    display: block;
    text-align: center;
  }
  .strategy-list-section td:not([colspan])::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  .strategy-list-section td.right {
    text-align: left;
    flex-direction: column;
    align-items: stretch;
  }
  .strategy-list-section td.right::before {
    display: none;
  }
  .strategy-list-section td.right .display-table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .strategy-list-section td.right .display-table-actions button {
    width: 100%;
    min-height: 38px;
  }

  /* API table → card */
  #view_api .display-table-shell table {
    min-width: 0;
  }
  #view_api thead {
    display: none;
  }
  #view_api table,
  #view_api tbody,
  #view_api tr,
  #view_api td {
    display: block;
    width: 100%;
  }
  #view_api tbody {
    display: grid;
    gap: 10px;
  }
  #view_api tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel, #fafbfd);
    padding: 12px 14px;
  }
  #view_api td {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    border: 0;
    padding: 7px 0;
    gap: 8px;
    white-space: normal;
    position: static;
  }
  #view_api td[colspan] {
    display: block;
    text-align: center;
  }
  #view_api td:not([colspan])::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  #view_api td.right {
    text-align: left;
    flex-direction: column;
    align-items: stretch;
  }
  #view_api td.right::before {
    display: none;
  }
  #view_api td.right .display-table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  #view_api td.right .display-table-actions button {
    width: 100%;
    text-align: center;
    min-height: 38px;
  }
  #view_api td:last-child {
    position: static;
    background: transparent;
  }

  /* Bindings table → card */
  .strategy-bindings-section thead {
    display: none;
  }
  .strategy-bindings-section table,
  .strategy-bindings-section tbody,
  .strategy-bindings-section tr,
  .strategy-bindings-section td {
    display: block;
    width: 100%;
  }
  .strategy-bindings-section tbody {
    display: grid;
    gap: 10px;
  }
  .strategy-bindings-section tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel, #fafbfd);
    padding: 12px 14px;
  }
  .strategy-bindings-section td {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    border: 0;
    padding: 7px 0;
    gap: 8px;
  }
  .strategy-bindings-section td > * {
    min-width: 0;
  }
  .strategy-bindings-section td[colspan] {
    display: block;
    text-align: center;
  }
  .strategy-bindings-section td:not([colspan])::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  .strategy-bindings-section td.right {
    text-align: left;
    flex-direction: column;
    align-items: stretch;
  }
  .strategy-bindings-section td.right::before {
    display: none;
  }
  .strategy-bindings-section td.right .display-table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .strategy-bindings-section td.right .display-table-actions button {
    width: 100%;
    min-height: 38px;
  }

  /* Logs table → card */
  #view_logs .display-table-shell thead {
    display: none;
  }
  #view_logs .display-table-shell table,
  #view_logs .display-table-shell tbody,
  #view_logs .display-table-shell tr,
  #view_logs .display-table-shell td {
    display: block;
    width: 100%;
  }
  #view_logs .display-table-shell tbody {
    display: grid;
    gap: 10px;
  }
  #view_logs .display-table-shell tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel, #fafbfd);
    padding: 12px 14px;
  }
  #view_logs .display-table-shell td {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    border: 0;
    padding: 7px 0;
    gap: 8px;
  }
  #view_logs .display-inline-stack {
    gap: 6px;
  }
  #view_logs .display-inline-stack strong,
  #view_logs .display-inline-stack span {
    word-break: break-word;
  }
  #view_logs .display-table-shell td[colspan] {
    display: block;
    text-align: center;
  }
  #view_logs .display-table-shell td:not([colspan])::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  /* Logs filter grid */
  .display-filter-grid {
    grid-template-columns: 1fr !important;
  }
  .display-filter-chips {
    flex-wrap: wrap;
    gap: 8px;
  }

  .display-filter-chips button,
  .display-filter-grid button,
  .display-filter-grid select,
  .display-filter-grid input {
    min-height: 38px;
  }

  /* Emergency bar */
  .emergency-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .emergency-resume-btn {
    width: 100%;
    text-align: center;
  }

  /* TV alert modal */
  .tv-alert-modal {
    max-width: 100%;
    margin: 12px;
  }
  .tv-alert-modal-actions {
    flex-direction: column;
  }
  .tv-alert-modal-actions .primary {
    width: 100%;
  }

  /* Equity chart */
  .card[style*="margin-top:12px"] svg {
    max-width: 100%;
  }

  /* Manual targets */
  .manual-target-grid {
    grid-template-columns: 1fr !important;
  }

  /* Strategy create grid */
  .strategy-create-grid {
    grid-template-columns: 1fr;
  }

  .strategy-list-section tr,
  #view_api tr,
  .strategy-bindings-section tr,
  #view_logs .display-table-shell tr {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }
}

/* — Small phone (≤520px) — */
@media (max-width: 520px) {
  .app-topbar {
    padding: 10px 12px;
  }
  .app-topbar-brand {
    gap: 8px;
  }
  .app-topbar-title {
    font-size: 14px;
  }
  .app-topbar-mark {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .section-tabs .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Strategy table card tighter */
  .strategy-list-section tr,
  #view_api tr,
  .strategy-bindings-section tr,
  #view_logs .display-table-shell tr {
    padding: 10px 12px;
  }

  #view_api td.right .display-table-actions {
    grid-template-columns: 1fr;
  }

  .strategy-list-section td.right .display-table-actions,
  .strategy-bindings-section td.right .display-table-actions {
    grid-template-columns: 1fr;
  }

  .strategy-list-section td,
  #view_api td,
  .strategy-bindings-section td,
  #view_logs .display-table-shell td {
    padding: 8px 0;
    gap: 6px;
  }

  .overview-metric strong {
    font-size: 16px;
  }

  .strategy-detail-section {
    padding: 10px;
  }
  .strategy-create-panel {
    padding: 10px;
  }
  .api-form-section {
    padding: 10px;
  }

  .display-monitor-grid {
    gap: 8px;
  }
  .display-monitor-card {
    padding: 10px 12px;
  }

  .manual-mode-pill,
  .manual-live-warning-inline {
    font-size: 11px;
    padding: 2px 8px;
  }

  .manual-result-section {
    padding: 10px;
  }

  .strategy-webhook-actions {
    flex-direction: column;
  }
  .strategy-webhook-actions button {
    width: 100%;
  }
}

/* — Dark mode card override for mobile — */
@media (max-width: 760px) {
  body.theme-dark .strategy-list-section tr,
  body.theme-dark #view_api tr,
  body.theme-dark .strategy-bindings-section tr,
  body.theme-dark #view_logs .display-table-shell tr,
  body.theme-dark #accounts_table tr {
    background: rgba(24, 34, 50, 0.94);
    border-color: rgba(148, 163, 184, 0.24);
  }
}
