:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #607089;
  --border: #d9e0eb;
  --accent: #0f766e;
  --accent-dark: #0a5d58;
  --gold: #f59e0b;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 224, 235, 0.75);
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

nav {
  display: flex;
  gap: clamp(12px, 2.5vw, 28px);
}

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 82px) clamp(18px, 4vw, 56px) 48px;
}

.heroCopy {
  padding-top: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 560px;
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.tool {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tabs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef2f7;
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4d5b70;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.tab.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.1);
}

.generatorForm,
.preview {
  display: grid;
  gap: 14px;
}

.panel {
  display: none;
  gap: 12px;
}

.panel.is-active {
  display: grid;
}

label {
  display: grid;
  gap: 7px;
  color: #30394d;
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 188px;
  padding: 11px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

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

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

.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-top: 20px;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(180px, 0.55fr);
  gap: 12px;
  align-items: end;
}

button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

button:hover:not(:disabled) {
  border-color: #b6bfce;
  background: #f9fafc;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.primary:hover:not(:disabled) {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.preview {
  align-content: start;
}

.canvasFrame {
  display: grid;
  place-items: center;
  min-height: 342px;
  padding: 14px;
  border: 1px dashed #c6d0df;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

canvas {
  display: block;
  max-width: 100%;
  border-radius: 4px;
  background: #ffffff;
}

.status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.status.error {
  color: #b42318;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 54px clamp(18px, 4vw, 56px);
}

.sectionHead {
  max-width: 680px;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: 0;
}

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

.features article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

h3 {
  margin-bottom: 9px;
  font-size: 20px;
}

.features p,
.split p,
.faq p {
  color: var(--muted);
  line-height: 1.65;
}

.features a,
.linkGrid a,
.offerLinks a,
footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.features a:hover,
.linkGrid a:hover,
.offerLinks a:hover,
footer a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

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

.linkGrid a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.offers {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #cfe7e3;
  border-radius: 8px;
  background: #f0fdfa;
}

.offerTitle {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.offerLinks {
  display: grid;
  gap: 8px;
}

.offerLinks a {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  background: #ffffff;
  text-align: center;
}

.offers[hidden] {
  display: none;
}

.pageCta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 850;
  text-decoration: none;
}

.pageCta:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
}

.split p {
  margin: 0;
  font-size: 18px;
}

.faq {
  display: grid;
  gap: 12px;
}

details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 850;
}

details p {
  margin: 0;
  padding: 0 20px 18px;
}

.policy {
  max-width: 820px;
}

.policy h1 {
  max-width: none;
}

.policy h2 {
  margin-top: 32px;
  font-size: 28px;
}

.policy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

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

  .heroCopy {
    padding-top: 0;
  }

  .tool {
    max-width: 760px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .linkGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1500px) {
  .tool {
    grid-template-columns: 1fr;
  }

  .preview {
    max-width: 480px;
    width: 100%;
    justify-self: center;
  }
}

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

  nav {
    width: 100%;
    justify-content: space-between;
  }

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

  .controls,
  .grid.two,
  .actions {
    grid-template-columns: 1fr;
  }

  .canvasFrame {
    min-height: 292px;
  }
}
