/* ============================================================
   RecordClearances.com — wizard + auth styles
   Design tokens inherited from balilawoffices.com (navy + gold,
   Playfair Display + Inter). Mobile-first throughout.
   ============================================================ */
:root {
  --navy:       #17263c;
  --navy-deep:  #0f1a2b;
  --ink:        #232936;
  --soft:       #5b6472;
  --gold:       #a8834b;
  --gold-dark:  #8a6a39;
  --gold-line:  #c9a962;
  --ivory:      #f7f4ee;
  --white:      #ffffff;
  --rule:       #e5ded1;
  --green:      #2e6e4e;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Header band ---------- */
.topbar {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 14px 20px 12px;
  position: sticky; top: 0; z-index: 40;
}
.topbar-inner {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.wordmark {
  font-family: var(--serif); font-size: 19px; letter-spacing: 0.09em;
  text-transform: uppercase; color: #fff; text-decoration: none; white-space: nowrap;
}
.wordmark .amp { color: var(--gold-line); }
.powered {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-line); text-align: right; line-height: 1.5;
}
.powered-att {
  font-size: 9px; letter-spacing: 0.16em; color: rgba(255,255,255,0.7);
}
@media (max-width: 600px) {
  .topbar-inner { display: block; }
  .powered {
    display: block; text-align: left; margin-top: 5px;
    font-size: 8px; letter-spacing: 0.14em; white-space: nowrap;
  }
  .powered br { display: none; }
  .powered-att { font-size: 8px; }
  .powered-att::before { content: "· "; color: var(--gold-line); }
}
.progress-track {
  max-width: 640px; margin: 10px auto 0; height: 4px;
  background: rgba(255,255,255,0.16); border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-line) 100%);
  border-radius: 4px; transition: width 0.35s ease;
}
.progress-meta {
  max-width: 640px; margin: 7px auto 0;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  display: flex; justify-content: space-between; gap: 10px;
}

/* ---------- Saved pill ---------- */
.saved-pill {
  position: fixed; bottom: calc(96px + env(safe-area-inset-bottom)); right: 12px; z-index: 60;
  background: var(--navy-deep); color: #fff;
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(201,169,98,0.5);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.saved-pill.show { opacity: 1; transform: translateY(0); }
.saved-pill .ok { color: var(--gold-line); }
.saved-pill.warn { background: #6b5322; }

/* ---------- Screen ---------- */
.stage {
  max-width: 640px; margin: 0 auto;
  padding: 26px 20px 120px;
}
.screen { animation: slidein 0.24s ease both; }
@keyframes slidein {
  from { opacity: 0; transform: translateX(26px); }
  to   { opacity: 1; transform: none; }
}
.screen.back-anim { animation-name: slideback; }
@keyframes slideback {
  from { opacity: 0; transform: translateX(-26px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .screen.back-anim { animation: none; }
  .progress-fill { transition: none; }
}

.q-text {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: clamp(23px, 5.4vw, 28px); line-height: 1.25;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.q-help { color: var(--soft); font-size: 15.5px; margin-bottom: 22px; white-space: pre-line; }
.q-optional {
  display: inline-block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 10px; font-weight: 600;
}

/* ---------- Inputs ---------- */
input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="number"], textarea, select {
  width: 100%; padding: 15px 14px;
  border: 1px solid #d5cec0; border-radius: 10px;
  font-family: var(--sans); font-size: 16.5px; color: var(--ink); background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168,131,75,0.18);
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
label.f-label {
  display: block; font-size: 13px; margin: 14px 0 6px; color: var(--navy);
  font-weight: 600; letter-spacing: 0.02em;
}
.f-row { display: flex; gap: 10px; }
.f-row > * { flex: 1; min-width: 0; }

/* date parts */
.date-parts { display: flex; gap: 10px; }
.date-parts select { flex: 1; }
.date-parts .dp-day { max-width: 110px; }

/* toggle (e.g., OK to text) */
.toggle-row {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
  padding: 14px; background: #fff; border: 1px solid var(--rule); border-radius: 10px;
  cursor: pointer; font-size: 15px;
}
.toggle-row input { width: 22px; height: 22px; accent-color: var(--gold); flex-shrink: 0; }

/* ---------- Choice buttons ---------- */
.choices { display: flex; flex-direction: column; gap: 11px; }
.choice-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid #d9d2c4; border-radius: 12px;
  padding: 16px 16px; font-family: var(--sans); font-size: 16.5px; color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  min-height: 56px;
}
.choice-btn:active { transform: scale(0.99); }
.choice-btn .mark {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #cfc7b6; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: transparent; transition: all 0.15s ease;
}
.choice-btn.selected { border-color: var(--gold); background: #fdfaf3; }
.choice-btn.selected .mark { background: var(--gold); border-color: var(--gold); color: #fff; }
.choice-btn.multi .mark { border-radius: 6px; }

/* ---------- Bottom bar ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(247,244,238,0.96);
  border-top: 1px solid var(--rule);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}
.bottombar-inner {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
}
.btn {
  font-family: var(--sans); font-size: 16.5px; font-weight: 600;
  border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
  transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.99); }
.btn-continue {
  flex: 1; background: var(--gold); color: #fff; padding: 16px 22px; min-height: 56px;
}
.btn-continue:hover { background: var(--gold-dark); box-shadow: 0 6px 18px rgba(138,106,57,0.3); }
.btn-continue:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.btn-back {
  background: none; color: var(--soft); font-weight: 500; font-size: 15px;
  padding: 14px 6px; flex-shrink: 0;
}
.btn-back:hover { color: var(--navy); }
.btn-back[hidden] { display: none; }
.err-msg { color: #a13333; font-size: 14.5px; margin-top: 12px; display: none; }
.err-msg.show { display: block; }

/* ---------- Wobbler analysis screen ---------- */
.wb-list { margin-bottom: 18px; }
.wb-row {
  background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
.wb-label { font-size: 15px; color: var(--ink); font-weight: 500; }
.wb-chip {
  display: inline-block; margin-top: 8px; border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
}
.wb-good { background: #e7f0ea; color: var(--green); }
.wb-no   { background: #f7e9e4; color: #8c3b2e; }
.wb-mid  { background: #f7efdd; color: var(--gold-dark); }
.wb-note { font-size: 13px; color: var(--soft); margin-top: 7px; }
.wb-variant { border-left: 3px solid var(--gold); padding-left: 14px; }
.wb-explainer {
  background: #fcfaf5; border: 1px solid var(--rule); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 20px;
}
.wb-ex-title {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: 17px; margin-bottom: 6px;
}
.wb-explainer p { font-size: 14.5px; color: var(--soft); }

/* ---------- Fee summary screen ---------- */
.fee-box {
  background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  padding: 6px 18px; margin-bottom: 18px;
}
.fee-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid #f0ece2; font-size: 15px;
}
.fee-row:last-child { border-bottom: 0; }
.fee-label { color: var(--ink); }
.fee-amt { color: var(--navy); font-weight: 600; white-space: nowrap; }
.fee-total { border-top: 2px solid var(--gold-line); margin-top: 4px; }
.fee-total .fee-label, .fee-total .fee-amt {
  font-family: var(--serif); font-size: 18px; color: var(--navy);
}
.fee-pending {
  background: #f7efdd; border: 1px solid var(--gold-line); border-radius: 10px;
  padding: 13px 15px; font-size: 14.5px; color: var(--gold-dark); margin-bottom: 16px;
}

/* ---------- Review screen ---------- */
.review-head { margin-bottom: 8px; }
.review-sec {
  background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  margin-top: 18px; overflow: hidden;
}
.review-sec h3 {
  font-family: var(--serif); font-weight: 500; color: var(--navy); font-size: 18px;
  padding: 14px 18px; border-bottom: 1px solid var(--rule); background: #fcfaf5;
}
.review-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid #f0ece2; padding: 13px 18px; cursor: pointer;
  font-family: var(--sans);
}
.review-item:last-child { border-bottom: 0; }
.review-item:hover { background: #fdfaf3; }
.review-item .ri-q { font-size: 13px; color: var(--soft); display: block; }
.review-item .ri-a {
  font-size: 15.5px; color: var(--ink); display: block; margin-top: 2px;
  white-space: pre-line; overflow-wrap: anywhere;
}
.review-item .ri-a.empty { color: #b3a98f; font-style: italic; }
.review-item .ri-edit { font-size: 12.5px; color: var(--gold-dark); font-weight: 600; }

/* ---------- Done screen ---------- */
.done-card {
  background: #fff; border: 1px solid var(--rule); border-radius: 14px;
  padding: 34px 26px; text-align: center;
}
.done-card .big-check {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--green); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Auth pages (sign in / access code) ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 34px 20px 80px; }
.auth-card {
  background: #fff; border: 1px solid var(--rule); border-radius: 14px;
  padding: 30px 24px; margin-top: 18px;
}
.auth-card h1 {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: 25px; margin-bottom: 6px;
}
.auth-card .sub { color: var(--soft); font-size: 15px; margin-bottom: 20px; }
.auth-card .btn-continue { width: 100%; margin-top: 18px; }
.auth-alert {
  background: #faf1ee; border: 1px solid #e3c2b8; color: #8c3b2e;
  border-radius: 10px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 16px;
}
.auth-note { font-size: 13.5px; color: var(--soft); margin-top: 18px; }
.auth-note a { color: var(--gold-dark); }
.auth-switch { text-align: center; margin-top: 22px; font-size: 14.5px; }
.auth-switch a { color: var(--gold-dark); font-weight: 600; }
.service-chip {
  display: inline-block; background: #fdfaf3; border: 1px solid var(--gold-line);
  color: var(--gold-dark); border-radius: 999px; padding: 5px 14px;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Footer ---------- */
.foot {
  max-width: 640px; margin: 0 auto; padding: 26px 20px 40px;
  font-size: 12px; color: var(--soft); text-align: center; line-height: 1.7;
}
.foot a { color: var(--gold-dark); }

/* Desktop: keep the phone-like column, add air */
@media (min-width: 700px) {
  .stage { padding-top: 44px; }
  .q-text { font-size: 30px; }
}
