:root {
  --background: #f6f8fb;
  --foreground: #172226;
  --muted: #5f6b70;
  --teal: #177f7b;
  --teal-dark: #0d5553;
  --coral: #d95d43;
  --gold: #d49a1f;
  --cream: #ffffff;
  --line: rgba(23, 34, 38, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

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

.topbar,
.section,
.hero-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
}

.brand {
  font-weight: 800;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(246, 248, 251, 0.98) 0%, rgba(246, 248, 251, 0.9) 42%, rgba(246, 248, 251, 0.16) 100%),
    url("replyflow-preview.jpg") center right / cover no-repeat;
}

.hero-inner {
  padding: 70px 0 88px;
}

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

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1;
}

.lede {
  max-width: 700px;
  color: #26373c;
  font-size: 1.18rem;
  line-height: 1.58;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 800;
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.9);
}

.section {
  padding: 78px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.card,
.panel,
.script,
.generator-panel,
.generator-output {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--cream);
  padding: 22px;
}

.card span {
  display: block;
  margin-bottom: 12px;
  color: var(--coral);
  font-weight: 900;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card p,
.panel p,
.script p,
.generator-note {
  color: var(--muted);
  line-height: 1.56;
}

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

ul {
  margin: 0;
  padding-left: 20px;
  color: #25363b;
  line-height: 1.58;
}

li + li {
  margin-top: 10px;
}

.sample-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--cream);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

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

th {
  color: var(--teal-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  line-height: 1.5;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.script h2 {
  font-size: 1.22rem;
  line-height: 1.25;
}

.generator {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
  margin-top: 28px;
}

.generator-panel {
  display: grid;
  gap: 18px;
}

.control-block,
.field,
.full-field {
  display: grid;
  gap: 8px;
}

label,
.control-title {
  color: #25363b;
  font-size: 0.88rem;
  font-weight: 800;
}

.segments {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

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

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

.segment {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  background: rgba(246, 248, 251, 0.86);
  color: #25363b;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: var(--teal);
  color: #fff;
}

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

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(246, 248, 251, 0.86);
  color: var(--foreground);
  font: inherit;
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 250px;
  padding: 14px;
  line-height: 1.55;
  resize: vertical;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
}

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

  .split,
  .generator,
  .fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .button {
    width: 100%;
  }

  .segments,
  .segments.three,
  .segments.two {
    grid-template-columns: 1fr;
  }

  .segment {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .segment:last-child {
    border-bottom: 0;
  }
}
