.hes-wizard {
  --hes-bg: #FAFAFA;
  --hes-surface: #FFFFFF;
  --hes-border: #E5E5E5;
  --hes-border-strong: #D4D4D4;
  --hes-text: #0A0A0A;
  --hes-text-muted: #737373;
  --hes-text-subtle: #A3A3A3;
  --hes-accent: #0070F3;
  --hes-accent-hover: #0058CC;
  --hes-success: #16A34A;
  --hes-error: #E11D48;

  --hes-radius: 8px;
  --hes-radius-sm: 6px;
  --hes-radius-lg: 12px;

  --hes-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hes-font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  max-width: 640px;
  margin: 32px auto;
  padding: 24px;
  background: var(--hes-surface);
  border: 1px solid var(--hes-border);
  border-radius: var(--hes-radius-lg);
  color: var(--hes-text);
  font-family: var(--hes-font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

[x-cloak] { display: none !important; }

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

.hes-wizard__header { margin-bottom: 32px; }

.hes-progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: 13px; color: var(--hes-text-muted); }
.hes-progress__bar { height: 2px; background: var(--hes-border); overflow: hidden; }
.hes-progress__fill { height: 100%; background: var(--hes-text); transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.hes-progress__save { font-variant-numeric: tabular-nums; min-width: 80px; text-align: right; }

.hes-step__title { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 24px; line-height: 1.2; }
.hes-step__subtitle { color: var(--hes-text-muted); margin: 0 0 24px; }

.hes-grid { display: grid; gap: 16px; }
.hes-grid--2 { grid-template-columns: repeat(2, 1fr); }
.hes-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 480px) { .hes-grid--3 { grid-template-columns: repeat(2, 1fr); } }

.hes-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 16px;
  background: var(--hes-surface);
  border: 1px solid var(--hes-border);
  border-radius: var(--hes-radius);
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  transition: border-color 120ms ease-out, transform 120ms ease-out, background 120ms ease-out;
}
.hes-card:hover { border-color: var(--hes-border-strong); transform: translateY(-1px); }
.hes-card.is-selected { border: 2px solid var(--hes-accent); background: rgba(0,112,243,.04); padding: 23px 15px; }
.hes-card__icon { width: 32px; height: 32px; color: var(--hes-text); display: inline-flex; align-items: center; justify-content: center; }
.hes-card__icon svg { width: 100%; height: 100%; }
.hes-card__label { font-size: 14px; font-weight: 500; }

.hes-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.hes-field__label { font-size: 14px; font-weight: 500; color: var(--hes-text); display: inline-flex; align-items: center; gap: 8px; }
.hes-field__label-icon { width: 18px; height: 18px; display: inline-flex; }
.hes-field__label-icon svg { width: 100%; height: 100%; }
.hes-field__hint { font-size: 13px; color: var(--hes-text-muted); margin: 0; }
.hes-field__error { font-size: 13px; color: var(--hes-error); }

.hes-input, .hes-textarea, .hes-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--hes-surface);
  color: var(--hes-text);
  border: 1px solid var(--hes-border);
  border-radius: var(--hes-radius);
  font: inherit;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}
.hes-textarea { font-family: var(--hes-font); resize: vertical; min-height: 120px; }
.hes-input:focus, .hes-textarea:focus, .hes-select:focus {
  outline: none;
  border-color: var(--hes-accent);
  box-shadow: 0 0 0 3px rgba(0,112,243,.15);
}
.hes-input--mono { font-family: var(--hes-font-mono); font-size: 20px; font-weight: 500; }

.hes-stepper { display: grid; grid-template-columns: 36px auto 36px; align-items: center; gap: 12px; justify-content: center; padding: 8px; border: 1px solid var(--hes-border); border-radius: var(--hes-radius); }
.hes-stepper__btn { width: 36px; height: 36px; border: 1px solid var(--hes-border); border-radius: var(--hes-radius); background: var(--hes-surface); cursor: pointer; font: inherit; font-size: 18px; transition: border-color 120ms ease-out; }
.hes-stepper__btn:hover { border-color: var(--hes-border-strong); }
.hes-stepper__value { font-family: var(--hes-font-mono); font-size: 20px; font-weight: 500; min-width: 32px; text-align: center; }

.hes-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--hes-border); border-radius: var(--hes-radius-sm); background: var(--hes-surface); color: inherit; cursor: pointer; font: inherit; font-size: 14px; transition: all 120ms ease-out; }
.hes-chip__icon { width: 18px; height: 18px; display: inline-flex; }
.hes-chip__icon svg { width: 100%; height: 100%; }
.hes-chip.is-active { background: var(--hes-text); color: var(--hes-surface); border-color: var(--hes-text); }

.hes-step__hint { font-size: 13px; color: var(--hes-text-muted); margin: -8px 0 16px; }
.hes-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hes-pill { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--hes-border); border-radius: 999px; background: var(--hes-surface); color: inherit; cursor: pointer; font: inherit; font-size: 13px; letter-spacing: -0.005em; transition: border-color 120ms ease-out, background 120ms ease-out, color 120ms ease-out; }
.hes-pill:hover { border-color: var(--hes-border-strong); }
.hes-pill.is-active { background: var(--hes-text); color: var(--hes-surface); border-color: var(--hes-text); }

.hes-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 2px dashed var(--hes-border); border-radius: var(--hes-radius-lg);
  padding: 48px 24px; text-align: center; color: var(--hes-text-muted);
  background: var(--hes-bg);
  transition: border-color 120ms ease-out, background 120ms ease-out;
  cursor: pointer;
}
.hes-dropzone.is-dragover, .hes-dropzone:hover { border-color: var(--hes-accent); background: rgba(0,112,243,.03); }
.hes-dropzone__title { font-size: 16px; color: var(--hes-text); margin: 8px 0 4px; font-weight: 500; }
.hes-dropzone__icon { width: 32px; height: 32px; display: inline-flex; color: var(--hes-text-muted); }
.hes-dropzone__icon svg { width: 100%; height: 100%; }

.hes-thumbnails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
@media (max-width: 480px) { .hes-thumbnails { grid-template-columns: repeat(2, 1fr); } }
.hes-thumbnail { position: relative; aspect-ratio: 4/3; border-radius: var(--hes-radius-sm); overflow: hidden; border: 1px solid var(--hes-border); }
.hes-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hes-thumbnail__remove { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; background: rgba(10,10,10,.7); color: white; border: none; border-radius: 50%; cursor: pointer; line-height: 1; padding: 0; font-size: 14px; }
.hes-thumbnail__cover { position: absolute; top: 6px; left: 6px; background: var(--hes-text); color: white; font-size: 11px; padding: 2px 6px; border-radius: 4px; }

.hes-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--hes-radius);
  font: inherit; font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease-out, border-color 120ms ease-out, opacity 120ms ease-out;
}
.hes-btn--primary { background: var(--hes-accent); color: white; border: 1px solid var(--hes-accent); }
.hes-btn--primary:hover { background: var(--hes-accent-hover); border-color: var(--hes-accent-hover); }
.hes-btn--primary:disabled { opacity: 0.4; cursor: not-allowed; }
.hes-btn--secondary { background: transparent; color: var(--hes-text); border: 1px solid var(--hes-border); }
.hes-btn--secondary:hover { border-color: var(--hes-border-strong); }
.hes-btn:focus-visible { outline: 2px solid var(--hes-accent); outline-offset: 2px; }

.hes-wizard__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hes-border); }
.hes-wizard__footer .hes-btn--secondary { margin-right: auto; }

.hes-wizard__success { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hes-wizard__success p { margin: 0; font-size: 18px; font-weight: 500; }

.hes-notice { padding: 16px; background: var(--hes-bg); border: 1px solid var(--hes-border); border-radius: var(--hes-radius); color: var(--hes-text-muted); }
.hes-error-banner { padding: 12px 16px; background: rgba(225,29,72,.06); border: 1px solid var(--hes-error); border-radius: var(--hes-radius); color: var(--hes-error); font-size: 13px; margin-bottom: 16px; }

.hes-advanced { margin-top: 24px; border: 1px solid var(--hes-border); border-radius: var(--hes-radius); overflow: hidden; }
.hes-advanced__toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; background: var(--hes-bg); border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; color: var(--hes-text); text-align: left; transition: background 120ms ease-out; }
.hes-advanced__toggle:hover { background: rgba(0,0,0,.02); }
.hes-advanced__caret { font-family: var(--hes-font-mono); font-size: 12px; color: var(--hes-text-muted); transition: transform 120ms ease-out; }
.hes-advanced.is-open .hes-advanced__caret { transform: rotate(90deg); }
.hes-advanced__body { padding: 20px 16px; border-top: 1px solid var(--hes-border); background: var(--hes-surface); }
.hes-advanced__hint { font-size: 13px; color: var(--hes-text-muted); margin: 0 0 16px; }

.hes-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.hes-toggle__switch { position: relative; width: 36px; height: 20px; background: var(--hes-border); border-radius: 999px; transition: background 120ms ease-out; }
.hes-toggle__switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--hes-surface); border-radius: 50%; transition: transform 120ms ease-out; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.hes-toggle input:checked + .hes-toggle__switch { background: var(--hes-accent); }
.hes-toggle input:checked + .hes-toggle__switch::after { transform: translateX(16px); }
.hes-toggle input { position: absolute; opacity: 0; pointer-events: none; }

.hes-step__subhead { font-size: 16px; font-weight: 600; margin: 32px 0 12px; color: var(--hes-text); }
.hes-dropzone--compact { padding: 24px 16px; }

.hes-doc-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hes-doc-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--hes-border); border-radius: var(--hes-radius-sm); background: var(--hes-surface); }
.hes-doc-item__icon { width: 18px; height: 18px; color: var(--hes-text-muted); display: inline-flex; }
.hes-doc-item__icon svg { width: 100%; height: 100%; }
.hes-doc-item__name { flex: 1; font-size: 14px; color: var(--hes-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hes-doc-item__name:hover { color: var(--hes-accent); }
.hes-doc-item__remove { border: 0; background: transparent; color: var(--hes-text-muted); cursor: pointer; padding: 4px; line-height: 1; font-size: 16px; }
.hes-doc-item__remove:hover { color: var(--hes-error); }

.hes-gdpr { margin-top: 32px; padding: 16px; background: var(--hes-bg); border: 1px solid var(--hes-border); border-radius: var(--hes-radius); }
.hes-gdpr .hes-toggle span:last-child { font-size: 14px; line-height: 1.4; }
