:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --text: #1a2332;
  --text-muted: #5c6b7f;
  --border: #d8e0e8;
  --accent: #0d6b6b;
  --accent-hover: #095555;
  --accent-soft: #e6f3f3;
  --accent-ring: rgba(13, 107, 107, 0.25);
  --danger: #b42318;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(26, 35, 50, 0.06), 0 8px 24px rgba(26, 35, 50, 0.06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --max: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  background: linear-gradient(135deg, #0a4f4f 0%, #0d6b6b 45%, #0f7d7d 100%);
  color: #fff;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-weight: 500;
  opacity: 0.9;
}

.header-sub {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.88;
}

.main {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.intro.card {
  margin-bottom: 1.5rem;
}

.sheet-config-banner {
  max-width: 720px;
  margin: 0 auto 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid #f5a623;
  background: #fffbeb;
  color: #5c4a1a;
  font-size: 0.95rem;
  line-height: 1.5;
}

.sheet-config-banner strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #3d3208;
}

.sheet-config-banner code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
}

.intro h1 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lead {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  max-width: 62ch;
}

.hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.5rem 1.5rem;
}

.wizard-layout {
  max-width: 960px;
  margin: 0 auto;
}

.wizard-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafcfd 0%, #fff 100%);
}

.wizard-header-text {
  margin-bottom: 0.75rem;
}

.wizard-step-count {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.wizard-current-title {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.wizard-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 1rem;
}

.wizard-bar-fill {
  height: 100%;
  width: 11.11%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0a5a5a, #0d8a8a);
  transition: width 0.35s ease;
}

.wizard-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
}

.wizard-dots li {
  margin: 0;
}

.wizard-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  cursor: default;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wizard-dot.is-future {
  opacity: 0.45;
}

.wizard-dot.is-current {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.wizard-dot.is-past {
  cursor: pointer;
  color: var(--text);
}

.wizard-dot.is-past:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wizard-dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.wizard-panels {
  min-height: 12rem;
}

.wizard-panels .form-section {
  border-bottom: none;
  padding: 1.5rem 1.5rem 1.75rem;
  animation: stepIn 0.25s ease;
}

.wizard-panels .form-section h2:focus {
  outline: none;
}

.wizard-panels .form-section h2:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.form {
  padding: 0;
  overflow: hidden;
}

.form-section {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
}

.file-input.invalid {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
  border-radius: 4px;
}

.section-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.35rem;
}

.section-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
}

.section-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.section-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.field-grid {
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .field-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.field.full {
  grid-column: 1 / -1;
}

.field,
.fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.req {
  color: var(--danger);
  font-weight: 700;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
  font: inherit;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--danger);
}

textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.file-input {
  padding: 0.5rem 0;
  border: none;
  font-size: 0.9rem;
}

.fieldset {
  border: none;
  margin: 0 0 1rem;
  padding: 0;
}

.fieldset .label {
  margin-bottom: 0.25rem;
}

.radio-row,
.radio-col {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.radio-col {
  flex-direction: column;
  gap: 0.5rem;
}

.radio,
.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.check.block {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.check.block input {
  margin-top: 0.25rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
}

.checkbox-grid.days {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.consent-box {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.form-actions {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.wizard-nav-gap {
  flex: 1;
  min-width: 0.5rem;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: #c5d0dc;
}

.btn {
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.form-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.error-summary {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.9rem;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 35, 50, 0.45);
}

.modal-panel {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 1.75rem;
  z-index: 1;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.modal-panel p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

body.modal-open {
  overflow: hidden;
}
