:root {
  --ink: #161616;
  --muted: #65605a;
  --line: #d8d2c8;
  --paper: #f7f5ef;
  --white: #fffdf8;
  --red: #b3312b;
  --green: #116149;
  --blue: #244e8f;
  --shadow: 0 16px 50px rgba(22, 22, 22, 0.08);
}

* {
  box-sizing: border-box;
}

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

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  font-family: Georgia, serif;
  font-size: 22px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(36px, 7vw, 86px) 0;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  font-size: 18px;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.video-panel {
  min-height: 320px;
  display: grid;
  place-items: center;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(179, 49, 43, 0.92), rgba(17, 97, 73, 0.82)),
    url("data:image/svg+xml,%3Csvg width='640' height='420' viewBox='0 0 640 420' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h640v420H0z' fill='%2322262a'/%3E%3Cpath d='M64 78h512M64 152h420M64 226h512M64 300h360' stroke='%23fff' stroke-opacity='.28' stroke-width='22' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: cover;
  border: 1px solid rgba(22, 22, 22, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--white);
  font-weight: 800;
}

.play-dot {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--white);
  position: relative;
}

.play-dot::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 22px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 20px solid var(--red);
}

.band {
  padding: clamp(28px, 5vw, 48px) 0;
  border-top: 1px solid var(--line);
}

.step-band {
  scroll-margin-top: 76px;
}

.muted {
  background: rgba(255, 253, 248, 0.58);
  box-shadow: 0 0 0 100vmax rgba(255, 253, 248, 0.58);
  clip-path: inset(0 -100vmax);
}

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

.subtitle {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.section-heading h2,
.table-block h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading.inline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.step-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
}

.step-action {
  min-width: 230px;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.three {
  grid-template-columns: 0.7fr 1fr 1.3fr;
}

.model-grid {
  margin: 4px 0 28px;
  align-items: end;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 78, 143, 0.12);
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #2a2927;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.icon-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.status {
  color: var(--muted);
  font-weight: 700;
  max-width: 360px;
  text-align: right;
}

.source-notes {
  margin-top: 16px;
  color: var(--muted);
}

.source-notes pre,
.result {
  overflow: auto;
  max-height: 300px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  white-space: pre-wrap;
}

.table-block {
  margin-top: 28px;
}

.email-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.email-row {
  display: grid;
  grid-template-columns: 44px minmax(180px, 0.42fr) minmax(280px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.row-number {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 800;
}

.email-row input,
.email-row textarea {
  min-height: 54px;
}

.compact {
  align-items: end;
}

.result:empty {
  display: none;
}

.result {
  margin-top: 16px;
}

@media (max-width: 820px) {
  .hero,
  .two,
  .three,
  .section-heading.inline,
  .step-heading,
  .email-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .video-panel {
    min-height: 240px;
  }

  .section-heading.inline {
    align-items: stretch;
  }

  .step-action {
    min-width: 0;
    justify-items: stretch;
  }

  .status {
    text-align: left;
    max-width: none;
  }

  .row-number {
    height: 38px;
  }
}
