:root {
  --ink: #172033;
  --muted: #687386;
  --line: #d9dee5;
  --paper: #ffffff;
  --surface: #f4f6f8;
  --forest: #146b5c;
  --coral: #b7493f;
  --gold: #d29a2e;
  --danger: #b42318;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

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.45;
}

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

.topbar {
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  background: var(--forest);
  color: white;
  font-size: 17px;
}

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #2c9c6b;
  border-radius: 50%;
}

.workspace {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: minmax(430px, 44%) minmax(0, 56%);
}

.brief-panel {
  padding: 48px clamp(28px, 5vw, 76px) 52px;
  border-right: 1px solid var(--line);
}

.intro { max-width: 620px; margin-bottom: 34px; }

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

h1 {
  margin: 0;
  max-width: 660px;
  font-size: clamp(38px, 4vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro-copy {
  margin: 20px 0 0;
  max-width: 570px;
  color: var(--muted);
  font-size: 17px;
}

form { max-width: 680px; }

.field { margin-bottom: 21px; min-width: 0; }

.field label, .field legend {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.field label span { color: #8993a3; font-weight: 500; }

input, textarea, select {
  width: 100%;
  border: 1px solid #cbd2db;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

input, select { height: 46px; padding: 0 13px; }
textarea { min-height: 112px; padding: 13px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(20, 107, 92, .11);
}

.field-meta, .availability {
  min-height: 20px;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  color: #8993a3;
  font-size: 12px;
}

.availability.available { color: var(--forest); }
.availability.unavailable { color: var(--danger); }

.domain-input {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  align-items: center;
  border: 1px solid #cbd2db;
  border-radius: 6px;
  overflow: hidden;
}

.domain-input:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(20, 107, 92, .11);
}

.domain-input input { border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
.domain-input input:focus { box-shadow: none; }
.domain-input > span { padding: 0 12px; color: #697386; font-size: 13px; white-space: nowrap; border-left: 1px solid var(--line); }

fieldset { padding: 0; border: 0; min-width: 0; }

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

.segments label { margin: 0; min-width: 0; }
.segments input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.segments span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: #596273;
  cursor: pointer;
  font-size: 13px;
  border-right: 1px solid var(--line);
}
.segments label:last-child span { border-right: 0; }
.segments input:checked + span { color: white; background: var(--ink); }
.segments input:focus-visible + span { outline: 3px solid rgba(20, 107, 92, .2); outline-offset: -3px; }

.swatches { display: flex; gap: 11px; }
.swatches label { margin: 0; }
.swatches input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.swatch {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 1px #bcc4cf;
}
.swatches input:checked + .swatch { box-shadow: 0 0 0 3px var(--ink); }
.forest { background: #146b5c; }
.coral { background: #b7493f; }
.ink { background: #26354a; }
.sun { background: #c38b1e; }

.form-row {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 14px;
}

.consent {
  margin: 4px 0 18px;
  display: grid;
  grid-template-columns: 19px 1fr;
  gap: 10px;
  align-items: start;
  color: #596273;
  font-size: 13px;
}
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--forest); }
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-error { min-height: 20px; color: var(--danger); font-size: 13px; margin-bottom: 6px; }

.generate-button {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--forest);
  color: white;
  font-weight: 850;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.generate-button:hover { background: #0f5b4e; }
.generate-button:disabled { cursor: wait; opacity: .65; }

.preview-panel {
  padding: 48px clamp(24px, 4vw, 64px) 34px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.browser-frame {
  width: min(100%, 860px);
  min-height: 590px;
  margin: 0 auto;
  border: 1px solid #cbd2db;
  background: white;
  box-shadow: 0 28px 70px rgba(29, 42, 59, .12);
  position: sticky;
  top: 92px;
}

.browser-bar {
  height: 50px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.traffic { display: flex; gap: 6px; }
.traffic span { width: 9px; height: 9px; border-radius: 50%; background: #d6dbe2; }
.traffic span:nth-child(1) { background: #d66a5d; }
.traffic span:nth-child(2) { background: #d9a942; }
.traffic span:nth-child(3) { background: #4f9f78; }

.address {
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #e1e5ea;
  background: #f7f8fa;
  color: #697386;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lock { color: var(--forest); font-size: 10px; font-weight: 850; }

.canvas { min-height: 540px; position: relative; overflow: hidden; }
.sample-site { padding: 26px 32px 34px; }
.sample-nav { height: 44px; display: flex; justify-content: space-between; align-items: flex-start; font-size: 12px; border-bottom: 1px solid var(--line); }
.sample-nav strong { font-size: 15px; }
.sample-hero { min-height: 320px; padding: 48px 0 34px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; }
.sample-hero small { color: var(--forest); font-weight: 850; }
.sample-hero h2 { margin: 13px 0 12px; font-size: clamp(34px, 4vw, 58px); line-height: .98; }
.sample-hero p { max-width: 430px; color: var(--muted); }
.sample-button { display: inline-flex; min-height: 40px; align-items: center; padding: 0 15px; margin-top: 10px; color: white; background: var(--forest); font-size: 12px; font-weight: 800; }
.sample-signal { padding: 22px; background: #edf5f2; border-left: 5px solid var(--gold); display: grid; gap: 0; }
.sample-signal span { padding: 14px 0; border-bottom: 1px solid rgba(23, 32, 51, .14); font-size: 12px; font-weight: 750; }
.sample-signal span:last-child { border-bottom: 0; }
.sample-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.sample-grid span { height: 58px; border: 1px solid var(--line); background: #fafbfc; }

.progress-view, .result-view {
  min-height: 540px;
  padding: 70px clamp(28px, 8vw, 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.progress-view h2, .result-view h2 { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; }
.progress-view > p:last-child, .result-view > p { color: var(--muted); }
.progress-icon { height: 46px; display: flex; align-items: flex-end; gap: 7px; margin-bottom: 28px; }
.progress-icon span { width: 8px; background: var(--forest); animation: bars 1.1s ease-in-out infinite; }
.progress-icon span:nth-child(1) { height: 20px; }
.progress-icon span:nth-child(2) { height: 38px; animation-delay: .14s; }
.progress-icon span:nth-child(3) { height: 28px; animation-delay: .28s; }
@keyframes bars { 0%, 100% { transform: scaleY(.65); } 50% { transform: scaleY(1); } }
.progress-track { width: 100%; height: 8px; margin: 28px 0 12px; background: #e7eaee; overflow: hidden; }
.progress-track span { width: 5%; height: 100%; display: block; background: var(--forest); transition: width .4s ease; }

.result-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 26px; color: white; background: var(--forest); font-size: 26px; }
.open-result { min-height: 48px; display: inline-flex; align-items: center; gap: 14px; padding: 0 18px; margin-top: 18px; background: var(--ink); color: white; text-decoration: none; font-weight: 800; }
.new-result { margin-top: 16px; padding: 0; border: 0; color: var(--forest); background: transparent; cursor: pointer; font-weight: 750; }

.trust-row {
  width: min(100%, 860px);
  margin: 18px auto 0;
  display: flex;
  justify-content: center;
  gap: 24px;
  color: #697386;
  font-size: 12px;
}
.trust-row span::before { content: "✓"; color: var(--forest); margin-right: 6px; font-weight: 900; }

.page-footer {
  min-height: 48px;
  padding: 0 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #7b8493;
  font-size: 12px;
}
.page-footer a { color: var(--ink); }

[hidden] { display: none !important; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .brief-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .browser-frame { min-height: 520px; position: static; }
  .canvas, .progress-view, .result-view { min-height: 470px; }
}

@media (max-width: 620px) {
  .topbar, .page-footer { padding-left: 18px; padding-right: 18px; }
  .top-status { display: none; }
  .brief-panel, .preview-panel { padding: 32px 18px; }
  .segments { grid-template-columns: repeat(2, 1fr); }
  .segments label:nth-child(2) span { border-right: 0; }
  .segments label:nth-child(-n+2) span { border-bottom: 1px solid var(--line); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .domain-input { grid-template-columns: 1fr; }
  .domain-input > span { min-height: 38px; display: flex; align-items: center; border-left: 0; border-top: 1px solid var(--line); }
  .browser-frame { min-height: 500px; }
  .browser-bar { grid-template-columns: 48px minmax(0, 1fr); }
  .lock { display: none; }
  .sample-site { padding: 20px; }
  .sample-hero { grid-template-columns: 1fr; padding-top: 34px; }
  .sample-signal { display: none; }
  .sample-grid { grid-template-columns: 1fr; }
  .sample-grid span:nth-child(n+2) { display: none; }
  .trust-row { justify-content: flex-start; flex-wrap: wrap; gap: 8px 18px; }
  .page-footer { padding-top: 14px; padding-bottom: 14px; flex-direction: column; align-items: flex-start; }
}
