:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #fffdf8;
  --ink: #171717;
  --muted: #6f6a60;
  --line: #ded8ca;
  --accent: #176b5b;
  --accent-dark: #0e473c;
  --warm: #c7752d;
  --shadow: 0 24px 70px rgba(23, 23, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(247, 245, 239, 0.96)),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
}

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

.site-header,
.hero,
.right-hero,
.feature-grid,
.strip,
.section,
.auth-shell,
.dashboard,
.footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.page {
  display: none;
}

.page.active {
  display: grid;
}

body:not([data-view="home"]) .home-only {
  display: none;
}

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.header-actions,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 42px;
  height: 34px;
  border-radius: 0;
  background: url("./ce-logo.png?v=20260604-ce-logo-1") center / contain no-repeat;
  box-shadow: none;
}

.nav-links {
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.header-actions {
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
}

.ghost-link,
.text-link {
  color: var(--accent-dark);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--accent-dark);
  color: white;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14, 71, 60, 0.18);
}

.button.small {
  min-height: 38px;
  padding-inline: 14px;
}

.button.outline {
  background: transparent;
  color: var(--accent-dark);
}

.hero {
  min-height: calc(100vh - 132px);
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 72px;
  padding: 44px 0 76px;
}

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

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

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.text-link {
  font-weight: 800;
}

.right-hero {
  min-height: calc(100vh - 156px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 0 88px;
  text-align: center;
}

.right-hero .eyebrow {
  margin-bottom: 22px;
}

.right-hero h1 {
  max-width: 1080px;
  margin-bottom: 24px;
  font-size: clamp(48px, 6.2vw, 78px);
  line-height: 1.04;
}

.right-hero .lead {
  max-width: 720px;
  margin: 0 auto 34px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 0 96px;
}

.feature-card {
  min-height: 232px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.feature-card span {
  display: inline-flex;
  margin-bottom: 42px;
  color: var(--warm);
  font-size: 13px;
  font-weight: 800;
}

.feature-card h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.status-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.8);
  box-shadow: var(--shadow);
}

.panel-row,
.metric,
.metric-grid {
  border-bottom: 1px solid var(--line);
}

.panel-row,
.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.panel-row {
  padding-top: 0;
}

.panel-row span,
.metric span,
.metric-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-row strong,
.metric strong,
.metric-grid strong {
  font-size: 18px;
}

.panel-row strong {
  color: var(--accent);
}

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

.metric-grid div {
  display: grid;
  gap: 8px;
  padding: 16px 0;
}

.status-panel code {
  display: block;
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #171717;
  color: #f8efe0;
  font-size: 13px;
  overflow-x: auto;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.strip span {
  padding: 22px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.strip span + span {
  border-left: 1px solid var(--line);
}

.section {
  padding: 92px 0;
}

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

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

.plan {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.plan.featured {
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.plan-name {
  color: var(--warm);
  font-size: 13px;
  font-weight: 800;
}

.plan strong {
  margin-top: 16px;
  font-size: 32px;
}

.plan p,
.docs p,
.faq-item p {
  color: var(--muted);
  line-height: 1.7;
}

.docs {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 42px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

pre {
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: #171717;
  color: #f8efe0;
  overflow-x: auto;
  line-height: 1.8;
}

.faq {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.faq-item {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.auth-shell {
  min-height: calc(100vh - 162px);
  place-items: center;
  padding: 54px 0 90px;
}

.auth-card {
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
}

.auth-card.wide {
  width: min(100%, 520px);
}

.auth-copy,
.switch-line {
  color: var(--muted);
  line-height: 1.7;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.form label {
  display: grid;
  gap: 8px;
}

.form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 0 14px;
  outline: none;
}

.form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  align-items: end;
  gap: 12px;
}

.form-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message[data-type="success"] {
  color: var(--accent);
}

.form-message[data-type="error"] {
  color: #a33a2b;
}

.switch-line {
  margin: 12px 0 0;
}

.switch-line a {
  color: var(--accent-dark);
  font-weight: 800;
}

.dashboard {
  padding: 70px 0 96px;
}

.dashboard-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 54px;
}

.console-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.76);
}

.console-card span {
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.console-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 22px;
}

.console-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.copy-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.console-docs {
  width: 100%;
  padding: 48px 0;
}

@media (max-width: 820px) {
  .site-header,
  .hero,
  .right-hero,
  .feature-grid,
  .strip,
  .section,
  .auth-shell,
  .dashboard,
  .footer {
    width: min(100% - 28px, 560px);
  }

  .site-header {
    height: auto;
    gap: 18px;
    padding: 18px 0;
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 54px 0 64px;
  }

  h1 {
    font-size: clamp(44px, 14vw, 66px);
  }

  .lead {
    font-size: 17px;
  }

  .right-hero {
    min-height: auto;
    padding: 70px 0 62px;
  }

  .right-hero h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .strip,
  .feature-grid,
  .pricing-grid,
  .docs,
  .faq,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .strip span {
    text-align: left;
  }

  .strip span + span {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .section {
    padding: 66px 0;
  }
}

@media (max-width: 460px) {
  .header-actions {
    width: auto;
    justify-content: flex-end;
  }

  .right-hero .button {
    width: 100%;
  }

  .inline-fields {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .text-link {
    text-align: center;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }
}
