:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #5b6472;
  --line: #d8dee8;
  --primary: #0969da;
  --primary-strong: #0758b8;
  --accent: #1f883d;
  --code: #0f172a;
  --code-ink: #e5eefc;
  --shadow: 0 18px 50px rgb(15 23 42 / 0.12);
}

* {
  box-sizing: border-box;
}

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

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

.hero {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.88), rgb(247 248 251 / 0.96)),
    url("https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
  min-height: 620px;
  padding: 22px clamp(18px, 4vw, 72px) 64px;
}

.nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  max-width: 1180px;
}

.brand {
  font-size: 18px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
}

.hero-grid {
  align-items: end;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  margin: 110px auto 0;
  max-width: 1180px;
}

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

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

h1 {
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  margin-bottom: 22px;
  max-width: 880px;
}

.lead {
  color: #2f3948;
  font-size: clamp(18px, 2vw, 22px);
  max-width: 760px;
}

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

.primary-link,
.secondary-link,
button {
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  text-align: center;
}

.primary-link,
.generate-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.primary-link:hover,
.generate-button:hover {
  background: var(--primary-strong);
}

.secondary-link,
button {
  background: #ffffff;
  color: var(--ink);
}

.hero-panel {
  background: rgb(255 255 255 / 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.metric {
  display: block;
  font-size: 34px;
  font-weight: 900;
}

.metric-label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
}

main {
  padding: 42px clamp(18px, 4vw, 72px) 52px;
}

.workspace {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  margin: 0 auto;
  max-width: 1180px;
  min-width: 0;
}

.panel,
.feature-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 26px rgb(15 23 42 / 0.06);
}

.form-panel,
.preview-panel {
  min-width: 0;
  padding: 22px;
}

.section-heading h2 {
  font-size: 24px;
  margin-bottom: 18px;
}

label {
  color: #253044;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  margin-bottom: 14px;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

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

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

.switch {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px;
}

.switch input {
  min-height: auto;
  width: auto;
}

.generate-button {
  width: 100%;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab.active {
  border-color: var(--primary);
  color: var(--primary);
}

.output {
  background: var(--code);
  border-radius: 8px;
  color: var(--code-ink);
  display: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  min-height: 560px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.output.active {
  display: block;
}

.status {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin: 14px 0 0;
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 32px auto 0;
  max-width: 1180px;
}

.feature-grid article {
  padding: 20px;
}

.feature-grid h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-grid p {
  color: var(--muted);
  margin: 0;
}

.footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 72px);
}

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

  .hero {
    min-height: auto;
  }
}

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

  .field-grid,
  .switch-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .output-actions,
  .tabs {
    flex-direction: column;
  }

  .hero-actions a,
  .output-actions button,
  .tabs button {
    width: 100%;
  }

  h1 {
    font-size: 42px;
  }
}
