:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e1ec;
  --soft: #eef3fa;
  --blue: #2457d6;
  --blue-hover: #1e49b2;
  --green: #067647;
  --red: #c43232;
  --amber: #a15c08;
  --shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

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

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

button {
  border: 0;
}

svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #e7eeff;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 1.12rem;
}

.brand p,
.project-hero p,
.step-head p {
  color: var(--muted);
  font-size: 0.92rem;
}

.settings-menu {
  position: relative;
}

.settings-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.settings-menu summary::-webkit-details-marker,
.alternate summary::-webkit-details-marker,
.technical summary::-webkit-details-marker {
  display: none;
}

.settings-form {
  position: absolute;
  right: 0;
  top: 48px;
  width: 320px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.page {
  width: min(1060px, calc(100% - 36px));
  margin: 26px auto 44px;
  display: grid;
  gap: 18px;
}

.project-hero,
.step-card,
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-hero h2 {
  margin-bottom: 4px;
  font-size: 1.45rem;
}

.project-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.84rem;
}

.status-pill.done {
  color: var(--green);
  background: #e7f6ee;
}

.wizard {
  display: grid;
  gap: 14px;
}

.step-card {
  overflow: hidden;
}

.step-card.locked {
  opacity: 0.58;
}

.step-card.locked .step-body {
  pointer-events: none;
}

.step-card.active {
  border-color: rgba(36, 87, 214, 0.45);
}

.step-card.complete {
  border-color: rgba(6, 118, 71, 0.32);
}

.step-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.step-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7eeff;
  color: var(--blue);
  font-weight: 900;
}

.step-card.complete .step-number {
  color: var(--green);
  background: #e7f6ee;
}

.step-state {
  color: var(--muted);
  font-size: 0.84rem;
}

.step-body {
  display: grid;
  gap: 15px;
  padding: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

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

input.field-error {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(161, 92, 8, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.folder-row,
.existing-site-row,
.inline-form {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 10px;
  align-items: end;
}

.preview-line,
.selected-project {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
}

.preview-line strong,
.selected-project strong {
  color: var(--ink);
}

.form-feedback {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-feedback.warn {
  color: var(--amber);
}

.form-feedback.ok {
  color: var(--green);
}

.primary,
.danger,
.light-button,
.text-button,
.settings-form button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.primary,
.settings-form button {
  color: #fff;
  background: var(--blue);
}

.primary:hover,
.settings-form button:hover {
  background: var(--blue-hover);
}

.danger {
  color: #fff;
  background: var(--red);
}

.light-button {
  color: var(--ink);
  background: var(--soft);
}

.text-button {
  min-height: 36px;
  color: var(--blue);
  background: transparent;
}

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

.alternate {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.alternate summary,
.technical summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--blue);
}

.alternate[open] summary {
  margin-bottom: 12px;
}

.domain-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.domain-list {
  display: grid;
  gap: 8px;
}

.domain-option {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  cursor: pointer;
}

.domain-option:hover,
.domain-option.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.1);
}

.domain-option strong {
  color: var(--ink);
}

.domain-option span {
  color: var(--muted);
  font-size: 0.84rem;
}

.load-error {
  padding: 12px;
  border: 1px solid #f3d7a3;
  border-radius: 8px;
  background: #fff8eb;
  color: var(--amber);
  font-weight: 700;
}

.buy-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.check {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.result-card {
  padding: 18px;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.result-summary {
  min-height: 96px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcff;
}

.result-ok {
  border-left: 4px solid var(--green);
}

.result-warn {
  border-left: 4px solid var(--amber);
}

.result-error {
  border-left: 4px solid var(--red);
}

.step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.step + .step {
  margin-top: 8px;
}

.step span {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
}

.step em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  font-size: 0.84rem;
}

.technical {
  margin-top: 12px;
}

pre {
  max-height: 340px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #111827;
  color: #e6edf8;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 820px) {
  .topbar,
  .project-hero,
  .folder-row,
  .existing-site-row,
  .inline-form,
  .form-grid.three {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-form {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .step-head {
    grid-template-columns: 38px 1fr;
  }

  .step-state {
    grid-column: 2;
  }
}
