/* Make Me A Proposal: wizard (start.html) + account. Builds on app.css tokens.
   v2 DARK: the proposal cover comes alive as a form. Ink ground, document-style
   filled inputs, sage accents. No white page ground, no beige. */

.wiz-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--on-dark-body);
  background: var(--ink);
  background:
    radial-gradient(1200px 620px at 50% -8%, #17321F 0%, rgba(23, 50, 31, 0) 58%),
    var(--ink);
  background-attachment: fixed;
}

/* ---- Nav ---- */
.wiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 5vw, 40px);
}
.wiz-brand {
  font: 500 1.4rem/1 var(--font-display);
  color: var(--on-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wiz-brand img {
  width: 36px; height: 36px;
  background: var(--on-dark);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,.28);
}
@media (max-width: 640px) {
  .wiz-brand { font-size: .95rem; gap: 8px; }
  .wiz-brand img { width: 32px; height: 32px; border-radius: 9px; }
  .wiz-save { font-size: .8125rem; }
}
.wiz-brand { white-space: nowrap; }
.wiz-brand-i { color: var(--sage); }
.wiz-save {
  font: 500 0.875rem/1 var(--font-ui);
  color: rgba(244, 241, 231, 0.62);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 4px;
  border-radius: 8px;
  min-height: 44px;
}
.wiz-save:hover { color: var(--sage); }
.wiz-save { white-space: nowrap; }

/* ---- Progress (slim, sticky) ---- */
.wiz-progress {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px 0 12px;
  background: var(--ink);
  border-bottom: 1px solid rgba(169, 199, 155, 0.14);
}
.wiz-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.wiz-count {
  font: 600 0.75rem/1 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage);
}
.wiz-count-label {
  font: 500 0.8125rem/1 var(--font-ui);
  color: rgba(244, 241, 231, 0.55);
}
.wiz-track {
  height: 5px;
  background: rgba(169, 199, 155, 0.16);
  border-radius: 999px;
  overflow: hidden;
}
.wiz-fill {
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, #C7DBB9, var(--sage) 55%, #6E9A5B);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Main / steps ---- */
.wiz-main {
  flex: 1 0 auto;
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(26px, 6vw, 52px) 0 128px; /* bottom clears the fixed footer */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.step[hidden] { display: none; }
.step {
  animation: stepIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .step { animation: none; }
  .wiz-fill { transition: none; }
}

.q-title {
  font-size: clamp(2.05rem, 6.2vw, 2.9rem);
  color: var(--on-dark);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.q-help {
  font-size: 1.0625rem;
  color: rgba(244, 241, 231, 0.65);
  margin-bottom: 30px;
  max-width: 32em;
}
.q-body { display: flex; flex-direction: column; gap: 24px; }

/* ---- Fields ---- */
.field { display: flex; flex-direction: column; gap: 10px; }
.field label {
  font: 600 0.75rem/1.3 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sage);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}
.opt-tag {
  font: 500 0.6875rem/1 var(--font-ui);
  color: rgba(244, 241, 231, 0.5);
  text-transform: none;
  letter-spacing: 0.02em;
}
.helper-friend {
  font: 400 0.875rem/1.45 var(--font-ui);
  color: rgba(244, 241, 231, 0.5);
}

/* ---- Document-style inputs (the heart of the brand) ---- */
.wiz-body input,
.wiz-body textarea,
.wiz-body select {
  font: 400 1.0625rem/1.5 var(--font-ui);
  color: var(--on-dark);
  background: var(--ink-2);
  border: 1px solid rgba(169, 199, 155, 0.25);
  border-radius: 14px;
  padding: 15px 18px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.wiz-body textarea {
  border-radius: 16px;
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}
.wiz-body input::placeholder,
.wiz-body textarea::placeholder { color: rgba(244, 241, 231, 0.4); }
.wiz-body input:focus,
.wiz-body textarea:focus,
.wiz-body select:focus {
  border-color: var(--sage);
  background: #16301F;
  box-shadow: 0 0 0 4px rgba(169, 199, 155, 0.2);
}
/* keep autofilled fields inside the dark document */
.wiz-body input:-webkit-autofill,
.wiz-body input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--on-dark);
  caret-color: var(--on-dark);
  -webkit-box-shadow: 0 0 0 1000px var(--ink-2) inset;
  transition: background-color 9999s ease-out 0s;
}
.ta-tall { min-height: 176px; }
/* the "describe the work" step feels like a note app on mobile */
@media (max-width: 520px) {
  .ta-tall { min-height: 40vh; }
}

/* ---- Option cards / tiles ---- */
.opt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.opt-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) {
  .opt-grid-2 { grid-template-columns: 1fr; }
}
.opt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  width: 100%;
  min-height: 56px;
  background: var(--ink-2);
  border: 1px solid rgba(169, 199, 155, 0.22);
  border-radius: 16px;
  padding: 17px 46px 17px 20px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.14s ease;
}
.opt-card.has-ico {
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 15px;
  row-gap: 3px;
  align-items: center;
}
.opt-card.has-ico .opt-title, .opt-card.has-ico .opt-sub { grid-column: 2; }
.opt-ico {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(169, 199, 155, 0.12);
  border: 1px solid rgba(169, 199, 155, 0.2);
  color: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.opt-ico svg { width: 22px; height: 22px; }
.opt-card.selected .opt-ico { background: var(--sage); border-color: var(--sage); color: var(--ink); }
.opt-card:hover { border-color: rgba(169, 199, 155, 0.55); }
.opt-card:active { transform: scale(0.99); }
.opt-card.selected {
  border-color: var(--sage);
  background: #1A3324;
  box-shadow: 0 0 0 3px rgba(169, 199, 155, 0.22);
  transform: translateY(-1px);
}
.opt-card.selected::after {
  content: "\2713";
  position: absolute;
  top: 15px;
  right: 16px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--ink);
  display: grid;
  place-items: center;
  font: 700 12px/1 var(--font-ui);
}
.opt-slim {
  min-height: 52px;
  padding: 15px 46px 15px 20px;
  justify-content: center;
}
.opt-title {
  font: 600 1.0625rem/1.25 var(--font-ui);
  color: var(--on-dark);
}
.opt-sub {
  font: 400 0.9375rem/1.4 var(--font-ui);
  color: rgba(244, 241, 231, 0.55);
}

/* ---- Chips ---- */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  font: 500 1rem/1 var(--font-ui);
  color: var(--on-dark);
  background: var(--ink-2);
  border: 1px solid rgba(169, 199, 155, 0.22);
  border-radius: 999px;
  padding: 13px 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.14s ease;
}
.chip:hover { border-color: rgba(169, 199, 155, 0.55); }
.chip:active { transform: scale(0.97); }
.chip.selected {
  border-color: var(--sage);
  background: rgba(169, 199, 155, 0.16);
  color: var(--on-dark);
  box-shadow: 0 0 0 3px rgba(169, 199, 155, 0.18);
}
.chip.selected::before {
  content: "\2713";
  color: var(--sage);
  font-weight: 700;
  font-size: 0.9375rem;
}

/* ---- Account box (step 8) ---- */
.account-box {
  background: rgba(169, 199, 155, 0.06);
  border: 1px solid rgba(169, 199, 155, 0.2);
  border-radius: 18px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.account-head {
  font: 600 1.0625rem/1.3 var(--font-ui);
  color: var(--on-dark);
  text-transform: none;
  letter-spacing: 0;
}
.account-note {
  font: 400 0.9375rem/1.4 var(--font-ui);
  color: rgba(244, 241, 231, 0.62);
}
.account-note a { color: var(--sage); font-weight: 600; text-decoration: none; }
.account-note a:hover { text-decoration: underline; }

.submit-err {
  font: 500 0.9375rem/1.4 var(--font-ui);
  color: #F3B4A8;
  background: rgba(158, 54, 40, 0.2);
  border: 1px solid rgba(194, 91, 75, 0.42);
  border-radius: 12px;
  padding: 12px 16px;
}
.field-invalid input,
.field-invalid textarea { border-color: #C25B4B; }

/* ---- Footer nav (sticky bottom bar) ---- */
/* FIXED, not sticky: body carries overflow-x:hidden (site invariant), which
   makes body a scroll container and silently un-sticks sticky descendants. */
.wiz-foot {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: linear-gradient(to top, var(--ink) 72%, rgba(14, 27, 20, 0));
  padding: 22px 0 max(16px, env(safe-area-inset-bottom));
  z-index: 20;
}
.wiz-foot-inner {
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wiz-back {
  font: 500 1rem/1 var(--font-ui);
  color: rgba(244, 241, 231, 0.62);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 8px;
  border-radius: 8px;
  min-height: 44px;
}
.wiz-back:hover { color: var(--sage); }
.wiz-back[hidden] { visibility: hidden; }
.wiz-continue {
  min-width: 172px;
  font-size: 1.125rem;
  padding: 18px 32px;
  min-height: 56px;
}
.wiz-foot[hidden] { display: none; }

/* Mobile: Continue is a full-width sticky bar, Back a small link above it */
@media (max-width: 520px) {
  .wiz-foot-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .wiz-back { align-self: flex-start; padding-left: 2px; }
  .wiz-continue { width: 100%; }
}

/* ---- Confirmation ---- */
.confirm { text-align: center; align-items: center; padding-top: 12px; }
.confirm-mark {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--ink);
  display: grid;
  place-items: center;
  margin: 0 auto 26px;
  box-shadow: 0 0 0 6px rgba(169, 199, 155, 0.14);
}
.confirm-title { text-align: center; color: var(--on-dark); }
.confirm-sub { text-align: center; margin-left: auto; margin-right: auto; }
.status-timeline {
  list-style: none;
  counter-reset: st;
  text-align: left;
  max-width: 400px;
  margin: 12px auto 34px;
  padding: 0;
}
.st-node {
  counter-increment: st;
  position: relative;
  display: flex;
  gap: 16px;
  padding: 0 0 28px 0;
}
.st-node:last-child { padding-bottom: 0; }
.st-node::before {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 34px;
  bottom: -2px;
  width: 1px;
  background: rgba(169, 199, 155, 0.22);
}
.st-node:last-child::before { display: none; }
.st-dot {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1.5px solid rgba(169, 199, 155, 0.3);
  display: grid;
  place-items: center;
  font: 600 0.8125rem/1 var(--font-ui);
  color: rgba(244, 241, 231, 0.55);
  z-index: 1;
}
.st-dot::before { content: counter(st); }
.st-active .st-dot {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(169, 199, 155, 0.16);
}
.st-body { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.st-title { font: 600 1.0625rem/1.3 var(--font-ui); color: var(--on-dark); }
.st-desc { font: 400 0.9375rem/1.45 var(--font-ui); color: rgba(244, 241, 231, 0.6); }
.st-active .st-title { color: var(--sage); }
.confirm-cta { margin-top: 4px; }

/* ---- Login modal (same dark world) ---- */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 9, 0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
  animation: fadeIn 0.2s ease;
}
.modal-scrim[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  background: var(--ink-2);
  border: 1px solid rgba(169, 199, 155, 0.2);
  border-radius: 22px;
  padding: 34px 28px 28px;
  width: min(420px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(244, 241, 231, 0.6);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  min-height: 40px;
  min-width: 40px;
}
.modal-close:hover { color: var(--on-dark); }
.modal-title {
  font-size: clamp(1.9rem, 6vw, 2.3rem);
  color: var(--on-dark);
}
.modal-sub { font-size: 1rem; color: rgba(244, 241, 231, 0.65); margin-top: -6px; margin-bottom: 4px; }
.modal-submit { width: 100%; margin-top: 4px; }

/* ---- Toast ---- */
.wiz-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: var(--on-dark);
  color: var(--ink);
  font: 600 0.9375rem/1.3 var(--font-ui);
  padding: 12px 20px;
  border-radius: 999px;
  z-index: 70;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.wiz-toast[hidden] { display: none; }
.wiz-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Busy state ---- */
.wiz-continue.busy { opacity: 0.7; pointer-events: none; }

/* ======================================================
   ACCOUNT PAGE (account.html): same dark world
   ====================================================== */
.acct-main {
  flex: 1 0 auto;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 56px) 0 48px;
}
.acct-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.acct-title { font-size: clamp(2.2rem, 6vw, 3rem); color: var(--on-dark); }
.acct-sub { font-size: 1rem; color: rgba(244, 241, 231, 0.62); margin-top: 4px; }
.acct-actions { display: flex; align-items: center; gap: 14px; }
.acct-signout {
  font: 500 0.9375rem/1 var(--font-ui);
  color: rgba(244, 241, 231, 0.62);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 4px;
  min-height: 44px;
}
.acct-signout:hover { color: var(--sage); }

.prop-list { display: flex; flex-direction: column; gap: 14px; }
.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ink-2);
  border: 1px solid rgba(169, 199, 155, 0.2);
  border-radius: 16px;
  padding: 18px 22px;
}
.prop-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prop-type { font: 600 1.0625rem/1.3 var(--font-ui); color: var(--on-dark); }
.prop-meta { font: 400 0.9375rem/1.4 var(--font-ui); color: rgba(244, 241, 231, 0.55); }
.status-pill {
  flex-shrink: 0;
  font: 600 0.8125rem/1 var(--font-ui);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-in_review { background: rgba(169, 199, 155, 0.16); color: var(--sage); border: 1px solid rgba(169, 199, 155, 0.32); }
.status-designing { background: rgba(120, 160, 200, 0.16); color: #A9C6E0; border: 1px solid rgba(120, 160, 200, 0.32); }
.status-landed { background: var(--sage); color: var(--ink); }
@media (max-width: 480px) {
  .prop-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

.acct-empty {
  text-align: center;
  padding: 48px 24px;
  border: 1.5px dashed rgba(169, 199, 155, 0.26);
  border-radius: 20px;
  background: rgba(169, 199, 155, 0.05);
}
.acct-empty-title { font: 500 1.75rem/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--on-dark); margin-bottom: 8px; }
.acct-empty-sub { color: rgba(244, 241, 231, 0.62); margin-bottom: 22px; }

/* Login card (signed-out account view) */
.acct-login {
  max-width: 420px;
  margin: clamp(24px, 8vw, 64px) auto;
  background: var(--ink-2);
  border: 1px solid rgba(169, 199, 155, 0.2);
  border-radius: 22px;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acct-login h1 { font-size: clamp(2rem, 6vw, 2.5rem); color: var(--on-dark); }
.acct-login-sub { color: rgba(244, 241, 231, 0.65); margin-top: -6px; margin-bottom: 4px; }

.loading-note { text-align: center; color: rgba(244, 241, 231, 0.55); padding: 40px 0; }

/* ---- Footer (shared, both pages) ---- */
.wiz-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 26px 20px calc(30px + env(safe-area-inset-bottom));
  font: 400 0.8125rem/1.5 var(--font-ui);
  color: rgba(244, 241, 231, 0.5);
}
.wiz-footer a { color: var(--sage); text-decoration: none; }
.wiz-footer a:hover { text-decoration: underline; }
