@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;

  --ink: #0a0f1c;
  --ink-soft: #1f2937;
  --ink-muted: #4b5563;
  --ink-subtle: #6b7280;

  --bg: #fafcff;
  --bg-card: #ffffff;
  --bg-elev: #f6f8fc;
  --bg-doc: #fcfcfd;

  --line: rgba(10, 15, 28, 0.08);
  --line-strong: rgba(10, 15, 28, 0.16);
  --line-faint: rgba(10, 15, 28, 0.04);

  /* Inverse surfaces for dark marks on light pages (and vice versa in dark mode) */
  --surface-inverse: #0a0f1c;
  --surface-inverse-text: #ffffff;
  --surface-inverse-soft: #1f2937;

  --focus-ring: rgba(10, 15, 28, 0.10);

  --shadow-xs: 0 1px 2px rgba(10, 15, 28, 0.04);
  --shadow-sm: 0 2px 8px rgba(10, 15, 28, 0.05);
  --shadow-md: 0 12px 32px rgba(10, 15, 28, 0.08);
  --shadow-lg: 0 24px 48px rgba(10, 15, 28, 0.10);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --max-w: 880px;
  --header-h: 64px;
  --nav-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::selection { background: var(--surface-inverse); color: var(--surface-inverse-text); }

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; border: 0; background: none; }

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

img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-subtle); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ============ HEADER ============ */

.hw-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 252, 255, 0.85);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.hw-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link { display: inline-flex; align-items: center; }

.logo-img { height: 24px; width: auto; }

.hw-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.hw-header-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--surface-inverse);
}

/* ============ STEP NAV ============ */

.step-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.step-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

.step-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  height: var(--nav-h);
}

.step-list li { display: flex; }

.step-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0 1rem;
  color: var(--ink-subtle);
  font-family: var(--font-heading);
  transition: color 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  position: relative;
}

.step-item:hover { color: var(--ink); }

.step-num {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.step-label {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-item.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.step-item.is-active .step-num {
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
  border-color: var(--surface-inverse);
}

.step-item.is-complete { color: var(--ink); }

.step-item.is-complete .step-num {
  background: var(--surface-inverse-soft);
  color: var(--surface-inverse-text);
  border-color: var(--surface-inverse-soft);
}

.step-item.is-locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.step-item.is-locked:hover { color: inherit; }

.step-item.is-shake {
  animation: step-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes step-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

.step-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--line-faint);
  pointer-events: none;
}

.step-progress-bar {
  height: 100%;
  width: 20%;
  background: var(--ink);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 960px) {
  .step-list { gap: 0; }
  .step-item { padding: 0 0.5rem; gap: 0.5rem; }
  .step-label { display: none; }
  .step-item { justify-content: center; }
}

@media (max-width: 720px) {
  :root { --nav-h: 64px; }
}

/* ============ STAGE / PANELS ============ */

.stage {
  position: relative;
  min-height: calc(100vh - var(--header-h) - var(--nav-h));
}

.step-panel {
  display: none;
  padding: 4rem 1.5rem 6rem;
  animation: panelIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-panel.is-active { display: block; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.panel-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 1rem;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.panel-lede {
  font-size: 1.18rem;
  color: var(--ink-muted);
  max-width: 60ch;
  margin-bottom: 2.5rem;
  line-height: 1.55;
}

/* ============ WELCOME CARD ============ */

.welcome-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.welcome-card:hover { box-shadow: var(--shadow-md); }

.welcome-card-visual {
  height: 160px;
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.welcome-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.motion-mark {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mark-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

.mark-ring-2 {
  inset: 12px;
  animation-delay: 0.5s;
  border-color: rgba(255, 255, 255, 0.12);
}

.mark-ring-3 {
  inset: 24px;
  animation-delay: 1s;
  border-color: rgba(255, 255, 255, 0.08);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.5; }
}

.mark-core {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--surface-inverse-text);
  letter-spacing: 0.02em;
}

.welcome-card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.welcome-card-text {
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.welcome-card-success .welcome-card-visual {
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
}

.check-mark {
  width: 64px;
  height: 64px;
  color: var(--surface-inverse-text);
  animation: checkIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes checkIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
  .welcome-card { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.5rem; }
  .welcome-card-visual { height: 140px; }
}

/* ============ PATH GRID (3 cards on step 1) ============ */

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.path-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.path-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}

.path-num {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-elev);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.path-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.path-text {
  color: var(--ink-muted);
  font-size: 0.94rem;
  line-height: 1.55;
  margin: 0;
}

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

/* ============ FORM CARD (Step 2) ============ */

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-section {
  border: 0;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-section:last-of-type { margin-bottom: 1.5rem; }

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
  width: 100%;
}

.form-section-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.q-count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  font-family: var(--font-heading);
}

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--bg-elev);
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-right: 0.55rem;
  vertical-align: -0.18rem;
}

.form-section-note {
  font-size: 0.94rem;
  color: var(--ink-muted);
  margin: -0.5rem 0 0.25rem;
  line-height: 1.55;
}

.form-section-research { background: linear-gradient(180deg, var(--bg-elev) 0%, transparent 100%); padding: 1.5rem; margin-left: -1.5rem; margin-right: -1.5rem; border-radius: var(--radius-md); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-card { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-section-research { margin-left: 0; margin-right: 0; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.98rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-subtle); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.field textarea { resize: vertical; min-height: 96px; line-height: 1.55; }

.field-help {
  font-size: 0.84rem;
  color: var(--ink-subtle);
}

.field-file-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2rem 1rem;
  background: var(--bg);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field-file-box:hover {
  border-color: var(--ink);
  background: var(--bg-card);
}

.field-file-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.field-file-hint {
  font-size: 0.84rem;
  color: var(--ink-subtle);
}

/* ============ AGREEMENT (Step 3) ============ */

.agreement-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  overflow: hidden;
}

.agreement-meta-row {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.agreement-meta-row:nth-child(2n) { border-right: 0; }
.agreement-meta-row:nth-last-child(-n+2) { border-bottom: 0; }

.agreement-meta-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.agreement-meta-value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

@media (max-width: 640px) {
  .agreement-meta { grid-template-columns: 1fr; }
  .agreement-meta-row { border-right: 0; }
  .agreement-meta-row:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

.agreement-doc {
  background: var(--bg-doc);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 2rem;
  max-height: 520px;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xs);
}

.agreement-doc::after {
  content: '';
  position: sticky;
  bottom: 0;
  display: block;
  height: 60px;
  margin: -60px -3rem 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-doc) 100%);
  pointer-events: none;
}

.agreement-doc-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.agreement-doc-head h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.agreement-doc-head p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0;
}

.agreement-doc-client {
  color: var(--ink-subtle);
  font-weight: 500;
  font-style: italic;
}

.agreement-doc section {
  margin-bottom: 1.5rem;
}

.agreement-doc h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.agreement-doc p {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.agreement-doc ul {
  list-style: none;
  margin: 0.5rem 0;
}

.agreement-doc li {
  font-size: 0.94rem;
  color: var(--ink-muted);
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.4rem;
}

.agreement-doc li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-subtle);
}

.agreement-doc-fineprint {
  font-size: 0.85rem !important;
  color: var(--ink-subtle) !important;
  font-style: italic;
}

.agreement-doc-governing {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem !important;
  color: var(--ink-subtle) !important;
}

@media (max-width: 640px) {
  .agreement-doc { padding: 1.75rem; max-height: 420px; }
  .agreement-doc::after { margin: -60px -1.75rem 0; }
}

.signature-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.signature-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .signature-row { grid-template-columns: 1fr; }
}

.signature-input {
  font-family: 'Caveat', 'Brush Script MT', cursive !important;
  font-size: 1.6rem !important;
  letter-spacing: 0.02em;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
}

.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.18rem;
  accent-color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

/* ============ TIMELINE (Step 4) ============ */

.timeline {
  list-style: none;
  margin-bottom: 3rem;
  position: relative;
  padding-left: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  padding-bottom: 2rem;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--line-strong) 0%, var(--line) 100%);
}

.timeline-marker {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 2px solid var(--ink);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.timeline-marker-final {
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
  border-color: var(--surface-inverse);
  font-size: 1rem;
}

.timeline-body h3 {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.timeline-meta {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.5rem !important;
}

.timeline-body p:last-child {
  font-size: 0.96rem;
  color: var(--ink-muted);
  margin: 0;
}

.closing-note {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
}

.closing-note h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}

.closing-note p {
  font-size: 0.94rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ============ BUTTONS / FOOTERS ============ */

.panel-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.panel-footer-split {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.panel-footnote {
  font-size: 0.88rem;
  color: var(--ink-subtle);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.btn-primary {
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--surface-inverse-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover svg { transform: translateX(2px); }

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--bg-card);
  border-color: var(--line-strong);
}

.btn-ghost:hover svg { transform: translateX(-2px); }

/* ============ FOOTER ============ */

.hw-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.hw-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-subtle);
}

.hw-footer-divider { opacity: 0.6; }

/* ============ CHECKOUT (Step 1: Payment) ============ */

.checkout-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.checkout-summary {
  padding: 2rem 2rem 2rem 2.25rem;
  border-right: 1px solid var(--line);
  background: var(--bg-card);
}

.checkout-summary-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 1.5rem;
}

.line-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.line-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.line-item-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.line-item-meta {
  font-size: 0.85rem;
  color: var(--ink-subtle);
}

.line-item-price {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.line-item-period {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-subtle);
  margin-left: 0.1rem;
}

.line-divider {
  height: 1px;
  background: var(--line);
  margin: 0.75rem 0;
}

.line-total .line-item-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.line-total .line-item-price {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.checkout-includes {
  padding: 2rem 2.25rem 2rem 2rem;
  background: var(--bg-elev);
}

.checkout-includes h4 {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 1.25rem;
}

.checkout-includes ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.checkout-includes li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.94rem;
  color: var(--ink);
  line-height: 1.5;
}

.checkout-includes li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.28rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@media (max-width: 720px) {
  .checkout-card { grid-template-columns: 1fr; }
  .checkout-summary { border-right: 0; border-bottom: 1px solid var(--line); padding: 1.5rem; }
  .checkout-includes { padding: 1.5rem; }
}

.btn-large {
  padding: 1.15rem 2rem;
  font-size: 1.05rem;
  width: 100%;
  max-width: 380px;
}

.btn-large svg { width: 20px; height: 20px; }

/* ============ AGREEMENT CONFIRM (Step 4) ============ */

.agreement-confirm {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.agreement-confirm:has(input[type="checkbox"]:checked) {
  border-color: var(--ink);
  background: var(--bg-elev);
}

.check-large {
  font-size: 1rem;
  color: var(--ink);
  align-items: center;
  gap: 0.85rem;
}

.check-large input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 0;
}

.check-large strong {
  font-weight: 700;
  color: var(--ink);
}

/* ============ CLOSING NOTE LINK (Step 5) ============ */

.closing-link {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s ease;
}

.closing-link:hover {
  border-bottom-color: var(--ink);
}

/* ============ RADIO GROUP (Step 3, Q10) ============ */

.field-radio {
  border: 0;
  padding: 0;
  margin: 0;
}

.field-radio > .field-label {
  margin-bottom: 0.75rem;
  display: block;
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (max-width: 640px) {
  .radio-group { grid-template-columns: 1fr; }
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
  user-select: none;
}

.radio:hover {
  border-color: var(--ink);
  background: var(--bg-card);
}

.radio input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.radio:has(input[type="radio"]:checked) {
  border-color: var(--ink);
  background: var(--bg-elev);
}

/* ============ DISABLED BUTTON STATE ============ */

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* ============ DARK MODE (auto via prefers-color-scheme) ============ */

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f0f3f8;
    --ink-soft: #d8dde6;
    --ink-muted: #a4abb8;
    --ink-subtle: #6b7280;

    --bg: #0a0d14;
    --bg-card: #11151f;
    --bg-elev: #161b27;
    --bg-doc: #0d1118;

    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --line-faint: rgba(255, 255, 255, 0.04);

    --surface-inverse: #f0f3f8;
    --surface-inverse-text: #0a0d14;
    --surface-inverse-soft: #d8dde6;

    --focus-ring: rgba(240, 243, 248, 0.18);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
  }

  /* Logo: invert in dark mode (works for monochrome dark logos on transparent) */
  .logo-img {
    filter: invert(1) brightness(1.05) hue-rotate(180deg);
  }

  /* Header stays glassy in dark */
  .hw-header {
    background: rgba(10, 13, 20, 0.78);
  }

  /* Welcome / mark rings: lighter ring colors on light surface */
  .mark-ring { border-color: rgba(10, 13, 20, 0.18); }
  .mark-ring-2 { border-color: rgba(10, 13, 20, 0.12); }
  .mark-ring-3 { border-color: rgba(10, 13, 20, 0.08); }

  .welcome-card-visual::after {
    background: radial-gradient(circle at 30% 30%, rgba(10, 13, 20, 0.06) 0%, transparent 60%);
  }

  /* Scrollbar in dark */
  ::-webkit-scrollbar-thumb { background: #2a3142; }
  ::-webkit-scrollbar-thumb:hover { background: #3a4358; }

  /* Form: keep input bg slightly elevated from page bg in dark */
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="tel"],
  .field textarea {
    background: var(--bg-elev);
  }

  .field input:focus,
  .field textarea:focus {
    background: var(--bg-card);
  }

  .radio { background: var(--bg-elev); }
  .radio:hover { background: var(--bg-card); }
  .radio:has(input[type="radio"]:checked) { background: var(--bg-card); }

  .field-file-box { background: var(--bg-elev); }
  .field-file-box:hover { background: var(--bg-card); }
}

