/* =============================================================================
   Registration, documents, dashboard. Extends site.css — never replaces it.
   ========================================================================== */

/* ---------- the stepper --------------------------------------------------- */

.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.steps li {
  list-style: none; display: flex; align-items: center; gap: 8px;
  font-size: .84rem; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.steps li[data-state="now"]  { color: var(--text); border-color: var(--accent); }
.steps li[data-state="done"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.steps b { font-family: var(--mono); font-size: .74rem; }

/* ---------- forms --------------------------------------------------------- */

.panel {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  padding: clamp(20px, 4vw, 34px);
}
.panel + .panel { margin-top: 18px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: .86rem; color: var(--muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; font: inherit; font-size: .95rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}
.field .hint { font-size: .8rem; color: var(--dim); margin-top: 6px; }

.row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row--2 { grid-template-columns: 1fr 1fr; } }

/* Consent. Deliberately not styled as fine print — these decide whether the
   form can proceed at all, so they get the same weight as any other field. */
.consent { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 18px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check span { font-size: .92rem; }
.check em { display: block; color: var(--dim); font-style: normal; font-size: .82rem; margin-top: 3px; }
.check[data-required="yes"] span b { color: var(--accent); }

.note {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 12px 16px; background: var(--bg-lift);
  font-size: .9rem; color: var(--muted); margin: 16px 0;
}
.note--bad { border-left-color: #ff6b6b; color: #ffb3b3; }
.note--ok  { border-left-color: var(--ok); color: #b6ecc9; }

/* ---------- purpose picker ------------------------------------------------ */

.picks { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .picks { grid-template-columns: 1fr 1fr; } }
.pick {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-lift);
  padding: 16px 18px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start;
  transition: border-color .15s ease;
}
.pick:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pick input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.pick b { display: block; font-size: .96rem; }
.pick em { font-style: normal; font-size: .8rem; color: var(--dim); display: block; margin-top: 3px; }
.pick:has(input:checked) { border-color: var(--accent); background: var(--surface); }

/* ---------- the paper ----------------------------------------------------- */

/* An actual page, not a scrolling div of text. Someone signing an agreement
   should see a document, because that is what it is. */
.paper {
  background: #f7f3ee; color: #1a1714;
  border-radius: var(--r); padding: clamp(24px, 5vw, 56px);
  font-family: var(--mono); font-size: .84rem; line-height: 1.75;
  max-height: 60vh; max-height: 60dvh; overflow-y: auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.paper h4 { font-family: var(--sans); font-size: 1.06rem; margin: 0 0 18px; color: #1a1714; }
.paper pre { white-space: pre-wrap; word-wrap: break-word; margin: 0; font: inherit; }

.sigrow { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 26px;
          border-top: 1px solid rgba(0,0,0,.14); padding-top: 22px; }
@media (min-width: 700px) { .sigrow { grid-template-columns: 1fr 1fr; } }
.sigblock b { display: block; font-family: var(--sans); font-size: .72rem;
              letter-spacing: .1em; text-transform: uppercase; color: #6a625a; margin-bottom: 8px; }
.sigline {
  border-bottom: 1.5px solid #1a1714; min-height: 46px;
  display: flex; align-items: flex-end; padding-bottom: 4px;
}
.sigline .ink { font-family: "Snell Roundhand", "Apple Chancery", "Segoe Script", cursive;
                font-size: 1.7rem; line-height: 1; color: #16233f; }
.sigmeta { font-family: var(--sans); font-size: .76rem; color: #6a625a; margin-top: 6px; }

/* The empty client block invites a click. Without this it reads as decoration
   and people look for a button that is not there. */
.sigline--empty { cursor: pointer; background: rgba(255,122,69,.10); border-bottom-style: dashed; }
.sigline--empty:hover { background: rgba(255,122,69,.18); }
.sigline--empty::after {
  content: "click to place your signature";
  font-family: var(--sans); font-size: .76rem; color: #9a5a38; padding-bottom: 3px;
}
.sigline--empty.is-ready::after { content: "click here to sign"; color: #b8501f; font-weight: 600; }

/* ---------- dashboard ----------------------------------------------------- */

.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; min-height: 100dvh; }
@media (min-width: 900px) { .shell { grid-template-columns: 250px 1fr; } }

.side {
  border-right: 1px solid var(--line-soft); background: var(--bg-lift);
  padding: 20px 16px; display: none; flex-direction: column; gap: 4px;
}
@media (min-width: 900px) { .side { display: flex; } }
.side a {
  color: var(--muted); padding: 10px 14px; border-radius: var(--r-sm); font-size: .93rem;
  display: flex; align-items: center; gap: 10px;
}
.side a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.side a[aria-current="page"] { background: var(--surface); color: var(--text); }
.side .spacer { flex: 1; }
.side .group { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
               text-transform: uppercase; color: var(--dim); padding: 16px 14px 6px; }

.dash-head {
  display: flex; align-items: center; gap: 14px; padding: 14px var(--pad);
  border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
}
.dash-body { padding: clamp(22px, 4vw, 40px) var(--pad) 60px; }

/* Avatar menu. On desktop it sits in the header too, so there is one place to
   find the profile rather than two that drift apart. */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: linear-gradient(140deg, var(--accent), var(--accent-dim));
  color: var(--on-accent); font-weight: 700; font-size: .84rem;
  display: grid; place-items: center; cursor: pointer; margin-left: auto; flex: none;
}
.menu {
  position: absolute; right: var(--pad); top: 62px; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 6px; min-width: 210px; display: none;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.menu[open] { display: block; }
.menu a, .menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--muted); font: inherit; font-size: .92rem;
  padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer;
}
.menu a:hover, .menu button:hover { background: var(--bg-lift); color: var(--text); text-decoration: none; }
.menu .sep { height: 1px; background: var(--line-soft); margin: 6px 0; }
.menu .who { padding: 10px 12px; color: var(--text); font-size: .9rem; }
.menu .who span { display: block; color: var(--dim); font-size: .8rem; }

.roles { display: flex; gap: 6px; flex-wrap: wrap; }
.role {
  font-family: var(--mono); font-size: .68rem; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.role[data-r="client"] { border-color: var(--accent); color: var(--accent); }
.role[data-r="community"] { border-color: var(--ok); color: var(--ok); }

.soon {
  border: 1px dashed var(--line); border-radius: var(--r); padding: 22px;
  color: var(--dim); font-size: .9rem; text-align: center;
}
