*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --green: #0F6E56; --green-mid: #1D9E75; --green-dark: #085041;
  --green-light: #E8F5F0; --green-pale: #F2FAF7;
  --navy: #1a3a6b; --navy-light: #EBF2FB;
  --white: #FFFFFF; --off-white: #FAFAF8; --black: #111111;
  --gray-1: #F5F5F3; --gray-2: #E8E8E4; --gray-3: #9A9A94; --gray-4: #555550;
  --red: #DC2626; --red-light: #FEF2F2;
  --amber: #D97706; --amber-light: #FFFBEB;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--off-white); color: var(--black); -webkit-font-smoothing: antialiased; min-height: 100vh; }

/* NAV */
.q-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 56px; background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); border-bottom: 0.5px solid var(--gray-2); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.q-nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q-nav-logo span { font-size: 14px; font-weight: 600; color: var(--black); }
.q-nav-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--navy); background: var(--navy-light); padding: 4px 10px; border-radius: 20px; }
.q-nav-back { font-size: 13px; color: var(--gray-3); text-decoration: none; }
.q-nav-back:hover { color: var(--black); }

/* PROGRESS */
.progress-wrap { position: fixed; top: 56px; left: 0; right: 0; z-index: 99; background: white; border-bottom: 0.5px solid var(--gray-2); padding: 10px 32px; display: flex; align-items: center; gap: 16px; }
.progress-track { flex: 1; height: 4px; background: var(--gray-2); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--navy); border-radius: 4px; transition: width 0.4s ease; }
.progress-text { font-size: 12px; font-weight: 500; color: var(--gray-3); white-space: nowrap; min-width: 36px; text-align: right; }

/* MAIN */
.q-outer { padding-top: 112px; min-height: 100vh; display: flex; flex-direction: column; }
.q-inner { max-width: 600px; margin: 0 auto; padding: 40px 24px 120px; width: 100%; flex: 1; }

/* CARDS */
.q-card { background: white; border: 1px solid var(--gray-2); border-radius: 20px; padding: 36px 36px 28px; margin-bottom: 24px; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.q-title { font-family: var(--serif); font-size: 1.6rem; line-height: 1.25; color: var(--black); margin-bottom: 8px; }
.q-subtitle { font-size: 14px; color: var(--gray-3); line-height: 1.6; margin-bottom: 24px; }
.step-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.step-tag::before { content: ''; display: block; width: 16px; height: 1.5px; background: var(--navy); }

/* PATH SELECTOR */
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.path-card { border: 2px solid var(--gray-2); border-radius: 16px; padding: 24px 20px; cursor: pointer; transition: all 0.15s; text-align: center; background: white; }
.path-card:hover { border-color: var(--navy); background: var(--navy-light); }
.path-card.selected { border-color: var(--navy); background: var(--navy-light); }
.path-icon { font-size: 28px; margin-bottom: 12px; }
.path-card h4 { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 6px; color: var(--black); }
.path-card p { font-size: 13px; color: var(--gray-3); line-height: 1.5; }
.path-badge { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; margin-bottom: 10px; }
.path-badge.green { background: var(--green-light); color: var(--green-dark); }
.path-badge.gray { background: var(--gray-1); color: var(--gray-4); }

/* LOGIN FORM */
.login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-3); margin-bottom: 6px; }
.q-input { width: 100%; font-size: 15px; font-family: var(--sans); padding: 13px 16px; border: 1.5px solid var(--gray-2); border-radius: 12px; background: var(--gray-1); color: var(--black); transition: border-color 0.15s, background 0.15s; }
.q-input:focus { border-color: var(--navy); background: white; outline: none; }
.q-select { width: 100%; font-size: 15px; font-family: var(--sans); padding: 13px 16px; border: 1.5px solid var(--gray-2); border-radius: 12px; background: var(--gray-1); color: var(--black); cursor: pointer; }
.q-select:focus { border-color: var(--navy); background: white; outline: none; }

/* WEIGHT ROW */
.weight-row { display: flex; gap: 10px; }
.weight-row .q-input { flex: 1; }
.weight-unit { width: 80px; flex-shrink: 0; font-size: 15px; font-family: var(--sans); padding: 13px 12px; border: 1.5px solid var(--gray-2); border-radius: 12px; background: var(--gray-1); color: var(--black); cursor: pointer; }

/* OPTIONS */
.options-list { display: flex; flex-direction: column; gap: 8px; }
.option-label { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--gray-2); border-radius: 12px; cursor: pointer; transition: border-color 0.15s, background 0.15s; font-size: 14px; line-height: 1.5; color: var(--black); }
.option-label:hover { border-color: var(--navy); background: var(--navy-light); }
.option-label:has(input:checked) { border-color: var(--navy); background: var(--navy-light); }
.option-label.none-option { color: var(--black); }
.option-label.none-option:has(input:checked) { border-color: var(--navy); background: var(--navy-light); }
.option-label input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; min-width: 20px; border: 2px solid var(--gray-2); border-radius: 6px; background: white; margin: 0; margin-top: 1px; position: relative; cursor: pointer; }
.option-label input[type="checkbox"]:checked { background: var(--navy); border-color: var(--navy); }
.option-label input[type="checkbox"]:checked::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 12px; color: white; font-weight: 700; }

/* PREFILL BANNER */
.prefill-banner { background: var(--green-light); border: 1px solid var(--green); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--green-dark); line-height: 1.6; }
.prefill-banner svg { width: 18px; height: 18px; stroke: var(--green); fill: none; stroke-width: 1.5; flex-shrink: 0; margin-top: 2px; }

/* NOTICES */
.q-warning { background: var(--amber-light); border-left: 3px solid var(--amber); border-radius: 10px; padding: 16px 20px; margin: 16px 0; font-size: 14px; color: #78350F; line-height: 1.7; }
.q-notice { background: var(--red-light); border-left: 3px solid var(--red); border-radius: 10px; padding: 16px 20px; margin: 16px 0; font-size: 14px; color: #7f1d1d; line-height: 1.7; }

/* FOOTER BUTTONS */
.q-footer { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 0.5px solid var(--gray-2); padding: 16px 32px; display: flex; gap: 12px; align-items: center; z-index: 99; }
.btn-next { background: var(--navy); color: white; padding: 14px 32px; border-radius: 50px; border: none; font-size: 15px; font-weight: 500; font-family: var(--sans); cursor: pointer; transition: background 0.2s; }
.btn-next:hover { background: #243f7a; }
.btn-prev { background: transparent; color: var(--gray-4); padding: 14px 20px; border-radius: 50px; border: 1.5px solid var(--gray-2); font-size: 15px; font-weight: 400; font-family: var(--sans); cursor: pointer; transition: all 0.15s; }
.btn-prev:hover { border-color: var(--black); color: var(--black); }
.btn-prev:disabled { opacity: 0.3; cursor: not-allowed; }
.reset-link { font-size: 12px; color: var(--gray-3); cursor: pointer; margin-left: auto; text-decoration: underline; }

/* STOP SCREEN */
.stop-card { text-align: center; padding: 40px 36px; }
.stop-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--red-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 32px; }
.stop-actions { display: flex; flex-direction: column; gap: 10px; max-width: 340px; margin: 0 auto; }
.btn-green { display: block; background: var(--green); color: white; padding: 13px 24px; border-radius: 50px; font-size: 14px; font-weight: 500; text-decoration: none; text-align: center; }
.btn-navy { display: block; background: var(--navy); color: white; padding: 13px 24px; border-radius: 50px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; font-family: var(--sans); text-align: center; }
.btn-ghost { display: block; font-size: 13px; color: var(--gray-3); text-decoration: none; padding: 8px; text-align: center; }

/* DOSE GRID */
.dose-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.dose-btn { border: 1.5px solid var(--gray-2); border-radius: 12px; padding: 16px 12px; text-align: center; cursor: pointer; transition: all 0.15s; background: white; }
.dose-btn:hover { border-color: var(--navy); background: var(--navy-light); }
.dose-btn.selected { border-color: var(--navy); border-width: 2px; background: var(--navy-light); }
.dose-btn .dose-mg { font-family: var(--serif); font-size: 1.4rem; color: var(--black); }
.dose-btn .dose-price { font-size: 12px; color: var(--green); margin-top: 4px; font-weight: 500; }

@media (max-width: 640px) {
  .q-nav, .progress-wrap, .q-footer { padding-left: 16px; padding-right: 16px; }
  .q-inner { padding: 24px 16px 120px; }
  .q-card { padding: 24px 20px 20px; }
  .path-grid { grid-template-columns: 1fr; }
  .dose-grid { grid-template-columns: repeat(2, 1fr); }
}
