/* Axios CPA — Online Tax Organizer
   Design system taken from the approved "Axios Tax Organizer v1" comp.
   Desktop (>820px): sidebar + single scrolling page of section cards.
   Mobile  (<=820):  one section per card, Back/Continue wizard. */

:root {
  --ink: #2a2820;
  --muted: #6f6a5c;
  --faint: #8a8474;
  --line: #e4dac2;
  --line-soft: #ece2cb;
  --field: #ffffff;
  --tomato: #ff5b3e;
  --butter: #ffc23d;
  --mint: #5fd3a3;
  --paper: #fcf8ef;
  --sand: #e8dfcb;
  --shell: #17150f;
  --cream: #f5ecd9;
  --dim: #a89f8a;
  --rust: #b0663f;
  --danger: #c24230;
  --radius: 11px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--sand);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  min-height: 100vh;
}

a { color: var(--tomato); }

/* ---------- sticky top bar (desktop) ---------- */

.page { min-height: 100vh; }

.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--shell); color: var(--cream);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.top-in {
  max-width: 1200px; margin: 0 auto; padding: 14px 40px;
  display: flex; align-items: center; gap: 24px;
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand-globe { width: auto; display: block; flex-shrink: 0; }
.brand-logo { width: auto; display: block; }
.brand-tag {
  font-family: "Space Mono", monospace; font-size: 9px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--dim); margin-top: 7px;
}

.top-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.top-meter { text-align: right; }
.top-count {
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
}
.top-bar {
  width: 190px; height: 6px; background: rgba(245, 236, 217, 0.14);
  border-radius: 99px; margin-top: 6px; overflow: hidden;
}
.top-fill {
  height: 100%; border-radius: 99px; transition: width 0.35s ease;
  background: linear-gradient(90deg, var(--butter), var(--mint));
}

.btn-ghost {
  padding: 10px 17px; border-radius: 10px;
  border: 1.5px solid rgba(245, 236, 217, 0.28);
  background: transparent; color: var(--cream);
  font-family: "Space Grotesk", sans-serif; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-ghost:hover { border-color: rgba(245, 236, 217, 0.6); }

/* ---------- page layout ---------- */

.layout {
  max-width: 1200px; margin: 0 auto; padding: 34px 40px 90px;
  display: grid; grid-template-columns: 262px 1fr; gap: 40px; align-items: start;
}
.layout.single { grid-template-columns: 1fr; max-width: 780px; }
.aside { position: sticky; top: 104px; }
.main { display: flex; flex-direction: column; gap: 22px; }

/* ---------- sidebar ---------- */

.side { display: flex; flex-direction: column; gap: 14px; }

.nav-card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 16px 14px;
}
.nav-h {
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint); padding: 0 6px 10px;
}
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 10px; border: none; cursor: pointer;
  background: transparent; font-family: "Space Grotesk", sans-serif;
  font-size: 13.5px; font-weight: 500; color: var(--muted); line-height: 1.3;
}
.nav-item:hover { background: rgba(255, 91, 62, 0.06); }
.nav-item.on { background: rgba(255, 91, 62, 0.12); font-weight: 700; color: var(--ink); }
.nav-badge {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  font-size: 11px; font-weight: 700; font-family: "Space Mono", monospace;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--faint); border: 1.5px solid #d8cdb2;
}
.nav-badge.done { background: var(--mint); color: var(--shell); border: none; }
.nav-badge.active { background: var(--tomato); color: var(--shell); border: none; }

.prog-card { background: var(--shell); border-radius: 16px; padding: 16px 16px 18px; color: var(--cream); }
.prog-head { display: flex; justify-content: space-between; align-items: baseline; }
.prog-label {
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim);
}
.prog-pct { font-family: "Anton", "Space Grotesk", sans-serif; font-size: 24px; color: var(--butter); }
.prog-bar {
  height: 6px; background: rgba(245, 236, 217, 0.14); border-radius: 99px;
  margin: 10px 0 14px; overflow: hidden;
}
.prog-fill {
  height: 100%; border-radius: 99px; transition: width 0.3s;
  background: linear-gradient(90deg, var(--butter), var(--mint));
}

.btn-submit {
  width: 100%; padding: 13px; border-radius: var(--radius); border: none;
  background: var(--tomato); color: #fff;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 14.5px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(255, 91, 62, 0.3);
}
.btn-submit:hover { background: #ef4a2d; }
.btn-submit.big { width: auto; padding: 15px 30px; border-radius: 12px; font-size: 15.5px; }

/* ---------- cards ---------- */

.card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 20px; padding: 30px 32px;
}
.sec { scroll-margin-top: 100px; }

.banner { display: flex; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.banner-l { flex: 1 1 340px; }
.banner-h {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-size: 40px; color: var(--ink); line-height: 1.02; margin-top: 16px; font-weight: 400;
}
.banner-p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin-top: 12px; max-width: 520px; }
.banner-p b { color: var(--ink); }

.year-pill {
  display: inline-block; background: rgba(95, 211, 163, 0.18);
  border: 1.5px solid var(--mint); border-radius: 99px; padding: 6px 16px;
  font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: #2f7e5c; font-weight: 700;
}

.handy {
  flex: 0 1 300px; background: #fff; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 18px 20px;
}
.handy-h {
  font-family: "Space Mono", monospace; font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--rust); margin-bottom: 12px;
}
.handy-list { display: flex; flex-direction: column; gap: 8px; }
.handy-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); line-height: 1.4; }
.handy-dot { color: var(--mint); font-weight: 800; margin-top: 1px; }

.sec-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.sec-num {
  font-family: "Anton", "Space Grotesk", sans-serif; font-size: 46px;
  color: var(--tomato); line-height: 0.8; flex-shrink: 0;
}
.sec-num.done { color: var(--mint); }
.sec-mid { flex: 1; padding-top: 2px; }
.sec-lead {
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--rust);
}
.sec-title {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-size: 32px; color: var(--ink); line-height: 1.02; margin-top: 4px;
}
.sec-blurb { color: var(--muted); font-size: 14.5px; margin-top: 8px; line-height: 1.5; max-width: 560px; }

.hidden { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--shell); color: var(--cream);
  padding: 13px 20px; border-radius: 12px; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60; max-width: 90vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.done-pill {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: rgba(95, 211, 163, 0.16); border: 1.5px solid var(--mint);
  border-radius: 99px; padding: 5px 12px;
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #2f7e5c;
}

.send {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--shell); border-radius: 20px; padding: 26px 32px; color: var(--cream);
}
.send-l { flex: 1; min-width: 240px; }
.send-h { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 26px; color: var(--butter); }
.send-p { color: #c9c0ab; font-size: 14px; margin-top: 6px; line-height: 1.5; }

.pfoot {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  padding: 6px 4px 0; color: var(--faint);
}
.pfoot-l { flex: 1 1 260px; }
.pfoot-h {
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 5px;
}
.pfoot-name { color: var(--ink); font-size: 14px; font-weight: 600; }
.pfoot-line { font-size: 13.5px; line-height: 1.6; margin-top: 2px; }
.pfoot-lock { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }

/* ---------- fields ---------- */

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.f-full { grid-column: 1 / -1; }

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

.f-label {
  font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--faint);
  margin-bottom: 8px; display: block; line-height: 1.3;
}
.req { color: var(--tomato); margin-left: 5px; }
.f-help { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.45; }
.f-err { color: var(--danger); font-size: 12px; margin-top: 6px; }

input[type="text"], input[type="tel"], input[type="email"],
input[type="date"], input[type="number"], select, textarea {
  height: 48px; width: 100%; background: var(--field);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 0 15px; color: var(--ink); font-size: 15.5px;
  font-family: "Space Grotesk", sans-serif; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { height: 96px; padding: 12px 15px; resize: vertical; line-height: 1.5; }
select { cursor: pointer; }

input:focus, select:focus, textarea:focus {
  border-color: var(--tomato); box-shadow: 0 0 0 3px rgba(255, 91, 62, 0.13);
}
.invalid { border-color: var(--danger) !important; }

.locked {
  height: 48px; display: flex; align-items: center;
  background: rgba(255, 194, 61, 0.15); border: 1.5px dashed var(--butter);
  border-radius: var(--radius); padding: 0 15px; color: #8a6413;
  font-family: "Space Mono", monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
}

.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 15px; pointer-events: none; }
.money input { padding-left: 30px; }

.pills { display: flex; flex-wrap: wrap; gap: 9px; }
.pill {
  font-family: "Space Grotesk", sans-serif; font-size: 14.5px; font-weight: 500;
  padding: 11px 18px; border-radius: var(--radius); cursor: pointer;
  transition: all 0.15s ease; border: 1.5px solid var(--line);
  background: var(--field); color: var(--ink);
}
.pill:hover { border-color: var(--faint); }
.pill.on { border-color: var(--tomato); background: var(--tomato); color: #fff; font-weight: 700; }

.chips { display: flex; flex-direction: column; gap: 9px; }
.chip {
  display: flex; align-items: center; gap: 9px;
  font-family: "Space Grotesk", sans-serif; font-size: 14.5px; font-weight: 500;
  padding: 10px 15px 10px 12px; border-radius: var(--radius); cursor: pointer;
  text-align: left; transition: all 0.15s ease; border: 1.5px solid var(--line);
  background: var(--field); color: var(--ink); line-height: 1.35;
}
.chip:hover { border-color: var(--faint); }
.chip.on { border-color: var(--mint); background: rgba(95, 211, 163, 0.14); font-weight: 600; }
.box {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--line); background: transparent;
  color: var(--shell); font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.chip.on .box, .consent.on .box { border: none; background: var(--mint); }

.drop {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: var(--field); padding: 24px 18px; text-align: center;
  cursor: pointer; transition: all 0.15s ease;
}
.drop:hover, .drop.over { border-color: var(--tomato); background: rgba(255, 91, 62, 0.04); }
.drop-t { font-size: 14.5px; font-weight: 600; }
.drop-s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.files { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file {
  display: flex; align-items: center; gap: 10px; background: var(--field);
  border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 13.5px;
}
.file-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-s { color: var(--faint); font-size: 12px; font-family: "Space Mono", monospace; }
.x { border: 0; background: transparent; cursor: pointer; color: var(--faint); font-size: 17px; line-height: 1; padding: 0 3px; }
.x:hover { color: var(--danger); }

.rep { display: flex; flex-direction: column; gap: 9px; }
.rep-row { display: flex; gap: 8px; align-items: center; }
.rep-row input { height: 44px; font-size: 14.5px; }
.add {
  align-self: flex-start; border: 1.5px dashed var(--line); background: var(--field);
  border-radius: var(--radius); padding: 9px 15px; cursor: pointer;
  font-family: "Space Grotesk", sans-serif; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.add:hover { border-color: var(--tomato); color: var(--tomato); }

.tbl-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--field); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; }
th {
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint);
  background: rgba(228, 218, 194, 0.22); white-space: nowrap;
}
td:first-child { color: var(--ink); min-width: 190px; }
td input { height: 38px; border-radius: 7px; font-size: 14px; min-width: 120px; }
tr:last-child td { border-bottom: 0; }

.note {
  background: rgba(255, 194, 61, 0.13); border-left: 3px solid var(--butter);
  border-radius: 8px; padding: 12px 15px; font-size: 13.5px; color: #7a5a1e; line-height: 1.5;
}
.note.head {
  background: transparent; border-left: 0; border-bottom: 1.5px solid var(--line);
  border-radius: 0; padding: 4px 0 9px; color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 24px;
}

.letter {
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--field);
  max-height: 340px; overflow-y: auto; padding: 20px 22px;
  font-size: 13.5px; line-height: 1.62; color: #3a382e; white-space: pre-wrap;
}
.letter-h { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 24px; margin-bottom: 10px; color: var(--ink); }
.letter-f { font-size: 12px; color: var(--faint); margin-top: 8px; font-style: italic; }

.consent {
  display: flex; gap: 11px; align-items: flex-start; background: var(--field);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  cursor: pointer; font-size: 14px; line-height: 1.5; transition: all 0.15s ease; text-align: left;
}
.consent:hover { border-color: var(--faint); }
.consent.on { border-color: var(--mint); background: rgba(95, 211, 163, 0.1); }
.consent .box { margin-top: 1px; }

.idx { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--field); overflow: hidden; }
.idx-h {
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); padding: 11px 15px;
  background: rgba(228, 218, 194, 0.25); border-bottom: 1.5px solid var(--line);
}
.idx-r { display: flex; align-items: center; gap: 10px; padding: 10px 15px; font-size: 13.5px; border-bottom: 1px solid var(--line-soft); }
.idx-r:last-child { border-bottom: 0; }
.idx-r .tick { width: 18px; flex-shrink: 0; font-weight: 800; }
.ok { color: var(--mint); }
.wait { color: var(--tomato); }
.idx-s { color: var(--faint); font-size: 11.5px; font-family: "Space Mono", monospace; margin-left: auto; }
.idx-empty { padding: 16px 15px; font-size: 13.5px; color: var(--muted); }

.sig input {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-size: 25px; height: 62px;
}

/* ---------- mobile wizard ---------- */

.shell {
  max-width: 700px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; background: var(--paper);
}
.hdr { background: var(--shell); color: var(--cream); padding: 16px 20px 14px; flex-shrink: 0; }
.hdr-top { display: flex; align-items: flex-start; gap: 12px; }
.hdr-step {
  margin-left: auto; text-align: right; font-family: "Space Mono", monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); white-space: nowrap;
}
.bar { height: 5px; background: rgba(245, 236, 217, 0.14); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; transition: width 0.35s ease; background: linear-gradient(90deg, var(--butter), var(--mint)); }

.body { flex: 1; padding: 26px 20px 30px; }
.sec-in { animation: fade-in 0.28s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sec-in .grid { margin-top: 24px; }

.nav {
  position: sticky; bottom: 0; flex-shrink: 0; background: #fff;
  border-top: 1.5px solid var(--line-soft);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
}
.save { display: flex; align-items: center; gap: 7px; font-family: "Space Mono", monospace; font-size: 10.5px; letter-spacing: 0.08em; color: var(--faint); }
.save i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); display: inline-block; }
.nav-r { margin-left: auto; display: flex; gap: 10px; }

.btn {
  font-family: "Space Grotesk", sans-serif; font-size: 14.5px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: all 0.15s ease;
}
.btn:hover { border-color: var(--faint); }
.btn-p { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.btn-p:hover { background: #ef4a2d; border-color: #ef4a2d; }

/* ---------- status screens ---------- */

.pad { padding: 40px 26px; max-width: 620px; margin: 0 auto; }
.pad.center { text-align: center; }
.pad h1 { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 38px; line-height: 1.06; color: var(--ink); font-weight: 400; }
.pad p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 14px; }
.need { list-style: none; margin: 20px 0 0; display: flex; flex-direction: column; gap: 9px; }
.need li { display: flex; gap: 10px; font-size: 14.5px; align-items: flex-start; }
.need li::before { content: "•"; color: var(--tomato); font-weight: 800; }
.pad .btn { margin-top: 26px; }
.meta { font-family: "Space Mono", monospace; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 22px; }

.tick {
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(95, 211, 163, 0.16); border: 2px solid var(--mint);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 26px; font-size: 42px; color: #3aa77b;
}

.err-box {
  background: rgba(194, 66, 48, 0.09); border: 1.5px solid rgba(194, 66, 48, 0.4);
  color: var(--danger); border-radius: var(--radius); padding: 13px 16px;
  font-size: 13.5px; margin-top: 18px; line-height: 1.5;
}

.spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--tomato);
  animation: spin 0.8s linear infinite; margin: 0 auto 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- narrow desktop fallback ---------- */

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; padding: 24px 22px 70px; }
  .aside { position: static; }
  .top-in { padding: 14px 22px; }
  .card { padding: 24px 22px; }
}
