:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --ink: #171717;
  --muted: #66645f;
  --line: #d9d2c4;
  --panel: #fffdf8;
  --accent: #0f8f6f;
  --accent-dark: #0a604d;
  --amber: #b7791f;
  --blue: #285f9f;
  --shadow: 0 20px 70px rgba(35, 31, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.08rem;
  font-weight: 820;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.08rem;
  font-weight: 840;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.78fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  min-height: auto;
  padding: clamp(52px, 7vw, 86px) clamp(20px, 5vw, 72px) 64px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 5.8vw, 5.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.9rem, 3.2vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.hero-text {
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
}

.signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.signal-strip span {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: #45423d;
  font-size: 0.9rem;
}

.signup-panel {
  width: 100%;
  padding: 24px;
  border: 1px solid #cfc6b6;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-heading h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
}

.tally-shell {
  position: relative;
  overflow: visible;
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

#tally-frame {
  display: none;
  width: 100%;
  min-height: 820px;
  border: 0;
}

.form-fallback {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.form-fallback label {
  display: grid;
  gap: 8px;
  color: #3d3934;
  font-size: 0.88rem;
  font-weight: 700;
}

.form-fallback input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--muted);
}

.primary-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 780;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.microcopy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.content-band,
.sample-section {
  padding: clamp(52px, 7vw, 88px) clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(23, 23, 23, 0.08);
}

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

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

.preset-grid article,
.principles article,
.alert-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.preset-grid article,
.principles article {
  padding: 24px;
}

.preset-grid p,
.principles p,
.sample-copy p,
.mail-note {
  color: var(--muted);
  line-height: 1.6;
}

.metric {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 780;
}

.sample-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 0.6fr);
  gap: clamp(24px, 6vw, 88px);
  align-items: center;
  background: #efede7;
}

.sample-copy {
  max-width: 650px;
}

.alert-preview {
  padding: 22px;
  box-shadow: var(--shadow);
}

.mail-topbar {
  display: flex;
  gap: 7px;
  margin-bottom: 28px;
}

.mail-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.mail-label {
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-weight: 780;
}

.alert-preview h3 {
  max-width: 420px;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.08;
}

.alert-preview dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 26px 0 20px;
}

.alert-preview dl div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f2;
}

.alert-preview dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.alert-preview dd {
  margin: 8px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.compact {
  padding-top: 56px;
  padding-bottom: 56px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(23, 23, 23, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .hero,
  .sample-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .signup-panel {
    max-width: 680px;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    min-height: 68px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 36px;
  }

  h1 {
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .preset-grid,
  .principles,
  .alert-preview dl {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .signup-panel,
  .preset-grid article,
  .principles article,
  .alert-preview {
    padding: 18px;
  }
}
