:root {
  color-scheme: light;
  --ink: #1d1715;
  --muted: #776d68;
  --line: #eadfd8;
  --panel: #fffaf6;
  --soft: #fff1e8;
  --field: #fff8f3;
  --accent: #f13a16;
  --accent-dark: #9f0905;
  --ember: #ff8a20;
  --charcoal: #202a2d;
  --shadow: 0 24px 70px rgba(87, 24, 11, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
  color: var(--ink);
  background: #fff8f3;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 64px);
  background: rgba(31, 20, 17, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 42px;
  place-items: center;
  color: #fff;
  font-weight: 360;
  background: var(--accent);
  border-radius: 8px;
}

.zanyi-wordmark,
.corner-logo {
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}

.zanyi-wordmark {
  font-size: 18px;
}

.brand strong,
.brand small,
.metric-grid strong,
.metric-grid span,
.signal-card strong,
.signal-card small {
  display: block;
}

.topbar .brand strong {
  color: #fff;
}

.topbar .brand small {
  color: rgba(255, 255, 255, 0.62);
}

.brand small,
.eyebrow,
.preview-head span,
.signal-card span,
.agent-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 240px;
}

.corner-logo {
  color: #fff;
  font-size: 24px;
  font-weight: 330;
  line-height: 1;
}

.primary-button,
.secondary-button,
.ghost-button,
.advisor-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 760;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-button,
.advisor-button {
  padding: 0 20px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(241, 58, 22, 0.26);
}

.primary-button:hover,
.advisor-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.secondary-button,
.ghost-button {
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.text-link {
  color: #fff;
}

.hero .eyebrow,
.hero .signal-card span {
  color: rgba(255, 255, 255, 0.68);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: clamp(28px, 6vw, 88px);
  min-height: calc(100vh - 79px);
  padding: clamp(44px, 7vw, 88px) clamp(20px, 5vw, 72px);
  overflow: hidden;
  background: linear-gradient(118deg, #202a2d 0%, #321310 28%, #b30b04 62%, #ff3b10 100%);
}

#signalCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.42;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
  align-self: center;
}

.hero-copy {
  max-width: 790px;
}

.hero h1 {
  margin: 12px 0 22px;
  max-width: 760px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
  color: #fff;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
}

.hero-panel {
  padding: 24px;
  background: rgba(33, 26, 24, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 750;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.12);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.metric-grid div,
.signal-card,
.agent-grid article {
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.metric-grid strong {
  font-size: 32px;
  color: #fff;
}

.metric-grid span,
.signal-card small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.signal-card strong {
  margin-top: 8px;
  font-size: 20px;
  color: #fff;
}

.agents,
.application,
.advisor {
  padding: 72px clamp(20px, 5vw, 72px);
}

.agents {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(32, 42, 45, 0.97), rgba(32, 42, 45, 0.9)),
    var(--charcoal);
}

.agents .eyebrow {
  color: rgba(255, 255, 255, 0.58);
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2,
.advisor h2 {
  margin: 6px 0 0;
  max-width: 860px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.14;
  letter-spacing: 0;
}

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

.agent-grid article {
  min-height: 220px;
  background: rgba(255, 255, 255, 0.08);
}

.agent-grid span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  color: #fff;
  background: rgba(241, 58, 22, 0.72);
  border-radius: 8px;
}

.agent-grid h3 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.agent-grid p,
.advisor p {
  color: var(--muted);
  line-height: 1.72;
}

.agents .agent-grid p {
  color: rgba(255, 255, 255, 0.68);
}

.application-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.application-form,
.review-panel {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 46px rgba(87, 24, 11, 0.08);
}

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

label {
  display: grid;
  gap: 8px;
  color: #6f625d;
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 160px;
  padding: 14px;
  line-height: 1.7;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(241, 58, 22, 0.75);
  box-shadow: 0 0 0 4px rgba(241, 58, 22, 0.1);
}

fieldset {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 8px;
  color: #6f625d;
  font-size: 13px;
  font-weight: 760;
}

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

.checkbox-grid label,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  line-height: 1.55;
}

.checkbox-grid input,
.consent input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.wide-field,
.consent {
  margin-top: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.review-panel {
  position: sticky;
  top: 96px;
}

.preview-head {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.preview-head strong {
  font-size: 22px;
}

.proposal-content {
  padding: 18px 0;
  color: #465550;
  line-height: 1.72;
}

.proposal-content h4 {
  margin: 18px 0 8px;
  color: var(--ink);
}

.proposal-content ul {
  padding-left: 20px;
  margin: 0;
}

.advisor-button {
  width: 100%;
}

.advisor-button.is-disabled {
  pointer-events: none;
  color: #8a7e78;
  background: #eee3dc;
  box-shadow: none;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 10px;
  padding: 0 10px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.advisor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fffaf6;
}

.advisor p {
  max-width: 780px;
  font-size: 17px;
}

@media (max-width: 1100px) {
  .hero,
  .application-shell {
    grid-template-columns: 1fr;
  }

  .review-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
  }

  .nav-links,
  .topbar .ghost-button {
    display: none;
  }

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

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

  .form-grid,
  .checkbox-grid,
  .agent-grid {
    grid-template-columns: 1fr;
  }

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

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
