:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --ink: #152033;
  --muted: #627083;
  --border: #d8e0ea;
  --border-strong: #b8c4d3;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #dff4ef;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --shadow: 0 20px 50px rgba(21, 32, 51, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 220px),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  margin: 10px 0 0;
  color: var(--muted);
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
  min-width: 360px;
}

.hero-summary div {
  min-height: 78px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  padding: 12px;
}

.hero-summary strong {
  display: block;
  color: var(--accent-strong);
  font-size: 18px;
}

.hero-summary span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workflow-section {
  padding: 26px;
}

.workflow-section + .workflow-section,
.submit-section {
  border-top: 1px solid var(--border);
}

.section-heading {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.step-badge {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0;
}

.section-heading p,
.submit-section p,
.hint {
  margin: 5px 0 0;
  color: var(--muted);
}

.preset-grid,
.module-grid,
.field-grid {
  display: grid;
  gap: 12px;
}

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

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

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

.preset-card,
.module-item {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 14px 14px 14px 44px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.preset-card:hover,
.module-item:hover {
  border-color: var(--border-strong);
  box-shadow: 0 10px 24px rgba(21, 32, 51, 0.08);
  transform: translateY(-1px);
}

.preset-card:has(input:checked),
.module-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22);
}

.preset-card input,
.module-item input {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.module-item:has(input:disabled) {
  cursor: default;
}

.card-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.preset-title,
.module-title {
  font-weight: 800;
}

.preset-title {
  font-size: 17px;
}

.preset-desc,
.module-desc {
  color: var(--muted);
  font-size: 14px;
}

.hint {
  margin-top: 12px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 12px;
}

label {
  color: #243247;
  font-weight: 750;
}

input[type="text"],
input:not([type]) {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="text"]:focus,
input:not([type]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
  outline: none;
}

.submit-section {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: #f9fbfd;
  padding: 22px 26px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: flex-end;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer span {
  white-space: nowrap;
}

.submit-section h2 {
  font-size: 18px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 12px 20px;
  white-space: nowrap;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover {
  background: var(--accent-strong);
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22);
  transform: translateY(-1px);
}

button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

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

  .hero-summary {
    min-width: 0;
  }

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

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1180px);
    margin-top: 18px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-summary {
    grid-template-columns: 1fr;
  }

  .workflow-section {
    padding: 20px 16px;
  }

  .submit-section {
    display: grid;
    padding: 20px 16px;
  }

  .site-footer {
    justify-content: flex-start;
  }

  button {
    width: 100%;
  }
}
