/* Personal area (product register): one column, one task per screen, built for a phone held in one hand.
   Same world as the landing page: Tel Aviv type, a deep spruce band on top, white cards on a light canvas,
   spruce for actions and progress, the spirit-level lime for the moving parts and the money moment. */

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

/* ---- top bar -------------------------------------------------------------------------------- */

.bar {
  background:
    radial-gradient(80% 140% at 100% 0%, oklch(0.33 0.07 160 / 0.8), transparent 65%),
    var(--brand-deep);
  color: var(--on-brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: calc(var(--s-2) + env(safe-area-inset-top)) var(--s-4) var(--s-2);
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-brand);
  text-decoration: none;
}

.brand:hover {
  color: var(--on-brand);
}

.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.brand__vial {
  fill: oklch(1 0 0 / 0.06);
  stroke: var(--copper);
  stroke-width: 2.4;
}

.brand__tick {
  stroke: var(--on-deep-soft);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.brand__bubble {
  fill: var(--copper);
}

/* The יציב+ logo (white on the dark header), round 2 direction 6, owner's pick 26.10.2026. */
.brand__logo {
  display: block;
  height: 30px;
  width: auto;
}

.brand__name {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.bar__end {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.bar__ref {
  color: var(--on-deep-soft);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.bar__out {
  appearance: none;
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 0;
  background: transparent;
  color: var(--on-brand);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: oklch(1 0 0 / 0.45);
  cursor: pointer;
}

.bar__out:hover {
  text-decoration-color: var(--on-brand);
}

/* ---- the view ------------------------------------------------------------------------------- */

.view {
  flex: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: var(--s-5) var(--s-4) var(--s-7);
}

.view:focus {
  outline: none;
}

.view h1 {
  font-size: clamp(1.7rem, 1.45rem + 1.1vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.view h1:focus {
  outline: none;
}

.view h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  /* scrolled-to headings (the spouse's signature) land with breathing room, not flush against the edge */
  scroll-margin-top: var(--s-5);
}

.view h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.lead {
  margin-top: var(--s-2);
  color: var(--ink-soft);
  max-width: 62ch;
}

.stack > * + * {
  margin-top: var(--s-5);
}

.section {
  margin-top: var(--s-6);
}

.section > h2 + * {
  margin-top: var(--s-3);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.93rem;
}

.noscript {
  padding: var(--s-4);
  background: var(--warn-tint);
  border-radius: var(--r);
}

/* back link + step counter above a step's title */
.crumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin: calc(var(--s-2) * -1) 0 var(--s-3);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding-inline-end: var(--s-2);
  color: var(--brand-ink);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
}

.back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.stepcount {
  color: var(--muted);
  font-size: 0.93rem;
}

/* ---- skeleton (first load) -------------------------------------------------------------------- */

.skel {
  display: grid;
  gap: var(--s-3);
  padding-top: var(--s-2);
}

.skel__line,
.skel__block {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: var(--surface-2);
  animation: pulse 1.4s ease-in-out infinite alternate;
}

.skel__line--title {
  height: 26px;
  width: 55%;
  border-radius: 9px;
}

.skel__line--short {
  width: 40%;
}

.skel__block {
  height: 140px;
  border-radius: var(--r-lg);
  margin: var(--s-2) 0;
}

@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.55; }
}

/* ---- home: greeting band, next step, progress meter, the step list --------------------------- */

/* Full-bleed deep band under the bar, built from the column itself (no extra wrapper in the markup). */
.hello {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: calc(var(--s-5) * -1);
  padding: var(--s-5) 0 64px;
  background: var(--brand-deep);
  box-shadow: 0 0 0 100vmax var(--brand-deep);
  clip-path: inset(0 -100vmax);
  color: var(--on-brand);
}

.hello__words {
  flex: 1;
  min-width: 0;
}

.view .hello h1 {
  color: var(--on-brand);
}

.hello .lead {
  color: var(--on-deep-soft);
}

.guidepic {
  display: block;
  flex: none;
}

.guidepic img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--brand-deep), 0 0 0 4px var(--copper);
}

.hello + .next {
  position: relative;
  margin-top: -44px;
  box-shadow: var(--shadow-3);
  border-color: transparent;
}

.meter {
  margin-top: var(--s-5);
}

.meter__label {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.meter__label strong {
  color: var(--ink);
}

.meter__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 5px;
  margin-top: var(--s-2);
}

.meter__seg {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.meter__seg.is-done {
  background: var(--brand);
}

.meter__seg.is-wait {
  background: var(--copper);
}

.next {
  position: relative;
  margin-top: var(--s-5);
  padding: var(--s-5) var(--s-5) var(--s-5);
  border-radius: var(--r-xl);
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.next::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(to left, var(--brand), var(--copper));
}

.next__label {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.85rem;
}

.next h2 {
  margin-top: var(--s-2);
  font-size: 1.45rem;
}

.next p {
  margin-top: var(--s-2);
  color: var(--ink-soft);
}

.next .btn {
  margin-top: var(--s-4);
}

/* Questions waiting for the client: the card and its label turn red (owner, 26 Oct 2026). */
.next--alert {
  border: 2px solid var(--danger);
}

.next--alert::before {
  background: var(--danger);
}

.next--alert .next__label {
  background: var(--danger);
  color: #fff;
}

.hello__face {
  position: relative;
  display: block;
  flex: none;
  border-radius: 50%;
}

.qbadge {
  position: absolute;
  top: -6px;
  inset-inline-start: -6px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 0 0 3px var(--brand-deep);
  animation: qbadge-pop 600ms var(--ease-out, ease-out) both;
}

@keyframes qbadge-pop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .qbadge { animation: none; }
}

.note--alert {
  background: var(--danger-tint);
  color: oklch(0.42 0.17 27);
  border: 1px solid var(--danger);
  font-weight: 700;
}

.next--done .next__label {
  background: var(--ok-tint);
  color: oklch(0.38 0.09 160);
}

.steps {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.steps li + li {
  border-top: 1px solid var(--line);
}

.steprow {
  display: grid;
  grid-template-columns: 32px 1fr 20px;
  align-items: center;
  gap: var(--s-3);
  min-height: 66px;
  padding: var(--s-3) var(--s-4);
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease-out);
}

.steprow:hover {
  color: var(--ink);
  background: var(--surface);
}

.steprow__title {
  display: block;
  font-weight: 600;
}

.steprow__status {
  display: block;
  font-size: 0.93rem;
  color: var(--muted);
}

.steprow__go {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--font-figure);
  font-size: 0.9rem;
}

.mark svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark--done {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.mark--waiting {
  background: var(--copper-tint);
  border-color: var(--copper);
  color: var(--copper-ink);
}

.mark--help {
  background: var(--warn-tint);
  border-color: var(--warn-ink);
  color: var(--warn-ink);
}

.steprow--done .steprow__status {
  color: var(--brand-ink);
}

.steprow--waiting .steprow__status,
.steprow--help .steprow__status {
  color: var(--copper-ink);
}

.linkrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 58px;
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: border-color var(--dur) var(--ease-out);
}

.linkrow:hover {
  color: var(--ink);
  border-color: var(--brand);
}

.linkrow span:last-child {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.93rem;
}

/* ---- notes, chips, toast -------------------------------------------------------------------- */

.note {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  font-size: 0.97rem;
}

.note svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.note--warn {
  background: var(--warn-tint);
  border-color: oklch(0.85 0.07 85);
  color: oklch(0.32 0.07 70);
}

.note--ok {
  background: var(--ok-tint);
  border-color: oklch(0.85 0.06 160);
  color: oklch(0.32 0.08 160);
}

.note--shield {
  background: var(--brand-tint);
  border-color: oklch(0.86 0.04 212);
  color: var(--brand-ink);
  font-weight: 600;
}

.note--error {
  background: var(--danger-tint);
  border-color: oklch(0.85 0.07 27);
  color: oklch(0.42 0.16 27);
  font-weight: 600;
}

.note p + p {
  margin-top: var(--s-1);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip--ok {
  background: var(--ok-tint);
  color: oklch(0.38 0.09 160);
}

.chip--wait {
  background: var(--brand-tint);
  color: var(--brand-ink);
}

.chip--danger {
  background: var(--danger-tint);
  color: oklch(0.45 0.17 27);
}

.chip--todo {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.toast {
  position: fixed;
  inset-inline: var(--s-4);
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom));
  max-width: 520px;
  margin: 0 auto;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  box-shadow: var(--shadow-2);
  z-index: var(--z-toast);
  animation: toast-in var(--dur) var(--ease-out);
}

.toast--error {
  background: oklch(0.42 0.16 27);
}

@keyframes toast-in {
  from { opacity: 0.6; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

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

.form {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-5);
}

.group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  gap: var(--s-4);
}

.group + .group {
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.group__title {
  float: inline-start;
  width: 100%;
  padding: 0;
  font-weight: 700;
  font-size: 1.15rem;
}

.group__title + * {
  clear: both;
}

.group__intro {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* Signing in three numbered steps: the step to do now is lit (owner, 26 Oct 2026). */
.signsteps {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
}

.signsteps li {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.signsteps b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  background: var(--surface);
  font-weight: 800;
}

.signsteps .is-current {
  color: var(--ink);
  font-weight: 700;
}

.signsteps .is-current b {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.signsteps .is-done b {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.group.group--step {
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.group--step .group__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stepno {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-weight: 800;
}

.group--step.is-current {
  border: 2px solid var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}

.group--step.is-current .stepno,
.group--step.is-done .stepno {
  background: var(--brand);
  color: var(--on-brand);
}

.group--step.is-current .group__intro--do {
  color: var(--ink);
  font-weight: 700;
  background: var(--brand-tint);
  border-radius: 12px;
  padding: var(--s-3) var(--s-4);
}

.field .hint,
.datef .hint {
  margin-top: -2px;
}

.field__err {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.93rem;
}

.field__err:empty {
  display: none;
}

.input.ltr {
  text-align: right;
}

.input.ltr:placeholder-shown {
  text-align: right;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

.row3 {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 1.6fr;
  gap: var(--s-3);
}

/* date in three boxes: day, month, year (reads right to left like the Hebrew date order) */
.datef {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.datef legend {
  padding: 0;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.97rem;
}

.datef__parts {
  display: flex;
  gap: var(--s-2);
  align-items: flex-end;
}

.datef__part {
  display: grid;
  gap: 2px;
  font-size: 0.85rem;
  color: var(--muted);
}

.datef__part .input {
  width: 64px;
  text-align: center;
  padding: 0 var(--s-2);
}

.datef__part--year .input {
  width: 92px;
}

.datef__x {
  margin-inline-start: auto;
}

.children {
  display: grid;
  gap: var(--s-4);
}

.formerr {
  scroll-margin-top: var(--s-5);
}

.formerr:empty {
  display: none;
}

.actions {
  display: grid;
  gap: var(--s-3);
}

.btn--sm {
  min-height: 44px;
  padding: 0 var(--s-4);
  font-size: 1rem;
  border-radius: var(--r-sm);
}

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--brand-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
}

.btn--quiet:hover {
  color: var(--brand-hover);
}

.btn--danger-quiet {
  background: transparent;
  border-color: transparent;
  color: oklch(0.45 0.17 27);
  font-weight: 600;
}

.btn--danger-quiet:hover {
  background: var(--danger-tint);
}

.btn[aria-busy="true"] {
  cursor: progress;
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- saved summary (a step already done) ---------------------------------------------------- */

.saved {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid var(--line);
}

.saved dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px var(--s-4);
  margin: var(--s-2) 0 0;
}

.saved dt {
  color: var(--muted);
}

.saved dd {
  margin: 0;
  font-weight: 600;
}

/* ---- engagement ----------------------------------------------------------------------------- */

.price {
  margin-top: var(--s-5);
  padding: var(--s-4);
  border-radius: var(--r);
  background: var(--copper-tint);
}

.price strong {
  display: block;
  font-weight: 700;
}

.price ul {
  margin: var(--s-2) 0 0;
  padding-inline-start: 1.2em;
}

.price p {
  margin-top: var(--s-2);
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.legal {
  margin-top: var(--s-5);
  display: grid;
  gap: var(--s-4);
}

.legal h2 {
  font-size: 1.0625rem;
}

.legal p {
  margin-top: 2px;
  color: var(--ink-soft);
  max-width: 65ch;
}

/* ---- signature pad -------------------------------------------------------------------------- */

.statement {
  margin-top: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.pad {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r);
  background: var(--bg);
  overflow: hidden;
}

.pad:has(canvas:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.pad canvas {
  display: block;
  width: 100%;
  height: 190px;
  touch-action: none;
  cursor: crosshair;
}

.pad canvas:focus {
  outline: none;
}

.pad__line {
  position: absolute;
  inset-inline: var(--s-5);
  bottom: 52px;
  border-bottom: 1.5px solid var(--line-strong);
  pointer-events: none;
}

.pad__hint {
  position: absolute;
  inset-inline-start: var(--s-5);
  bottom: 22px;
  color: var(--muted);
  font-size: 0.93rem;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease-out);
}

.pad.is-inked .pad__hint {
  opacity: 0;
}

.pad__tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

.signed {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r);
  background: var(--ok-tint);
  color: oklch(0.32 0.08 160);
  font-weight: 600;
}

.signed svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- step-by-step guide ------------------------------------------------------------------------------ */

.guide {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-4);
  counter-reset: guide;
}

.guide li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--s-3);
  align-items: start;
  counter-increment: guide;
}

.guide li::before {
  content: counter(guide);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.guide li span {
  padding-top: 3px;
}

.sms {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---- documents ------------------------------------------------------------------------------ */

.docsum {
  margin-top: var(--s-4);
}

.docgroup {
  margin-top: var(--s-6);
}

.docgroup > h2 {
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}

.req {
  margin-top: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  display: grid;
  /* minmax(0, 1fr): a long file name used to widen the card past a phone screen (owner's note, 26 Oct 2026) */
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: var(--s-2);
}

.req__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
}

.req__who {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.req__hint {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.req__reason {
  color: oklch(0.45 0.17 27);
  font-weight: 600;
  font-size: 0.95rem;
}

.req__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-1);
}

.req__err:empty {
  display: none;
}

.req__err {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.93rem;
}

.files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
}

.files li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 2px var(--s-2) 2px var(--s-3);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 0.95rem;
}

.files svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.files__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files .btn--danger-quiet {
  min-height: 40px;
  padding: 0 var(--s-2);
  font-size: 0.93rem;
}

/* file inputs are visually hidden inside a label styled as a button */
.filebtn {
  position: relative;
}

.filebtn input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.filebtn:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.progress {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.progress__fill {
  display: block;
  height: 100%;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 120ms linear;
}

/* ---- status page ---------------------------------------------------------------------------- */

.path {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
}

.path li {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-3);
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}

.path li::before {
  content: "";
  position: absolute;
  inset-inline-start: 11px;
  top: 50%;
  height: 100%;
  border-inline-start: 2px solid var(--line);
}

.path li:last-child::before {
  display: none;
}

.path__dot {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--bg);
  display: grid;
  place-items: center;
}

.path__dot svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.path li.is-done {
  color: var(--ink-soft);
}

.path li.is-done::before {
  border-color: var(--brand);
}

.path li.is-done .path__dot {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.path li.is-current {
  color: var(--ink);
  font-weight: 700;
}

.path li.is-current .path__dot {
  border: 7px solid var(--brand);
}

.path__now {
  margin-inline-start: var(--s-2);
}

.tl {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
}

.tl li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}

.tl time {
  flex: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.money {
  margin-top: var(--s-6);
  padding: var(--s-5) var(--s-4);
  border-radius: var(--r-lg);
  background: var(--copper-tint);
  display: grid;
  gap: var(--s-3);
}

.money p {
  color: var(--ink-soft);
}

.money .btn--primary {
  background: var(--copper-ink);
}

.money .btn--primary:hover {
  background: oklch(0.41 0.1 55);
}

.confirm {
  display: grid;
  gap: var(--s-2);
}

.confirm p {
  color: var(--ink);
  font-weight: 600;
}

/* ---- sign-in and the code cards (fieldkit.css draws them; this places them in the view) -------- */

.view > .fk-card {
  margin: var(--s-2) auto 0;
}

.view > .crumbs + .fk-card {
  margin-top: var(--s-4);
}

.verifycard__send {
  margin-top: var(--s-5);
}

/* sign-in when no code went out: the number isn't registered, or its area isn't open yet */
.signin-state .fk-sub + .fk-sub {
  margin-top: var(--s-3);
}

.signin-state__actions {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.signin-state__slot {
  display: grid;
}

.signin-state__slot:empty {
  display: none;
}

.agree-code:empty {
  display: none;
}

@media (min-width: 640px) {
  .view > .fk-card:first-child {
    margin-top: var(--s-5);
  }
}

/* ---- help ----------------------------------------------------------------------------------- */

.help {
  margin-top: var(--s-6);
  padding: var(--s-5) var(--s-4);
  border-radius: var(--r-xl);
  background: var(--copper-tint);
  display: grid;
  gap: var(--s-3);
}

.help__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.help .guidepic img {
  box-shadow: 0 0 0 2px var(--copper-tint), 0 0 0 4px var(--copper);
  background: var(--bg);
}

.help__tag {
  color: var(--copper-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.help p {
  color: var(--ink-soft);
}

.help .btn {
  justify-self: start;
}

/* ---- footer --------------------------------------------------------------------------------- */

.pfoot {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: var(--s-5) var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom));
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.pfoot > * {
  max-width: 600px;
  margin-inline: auto;
}

.pfoot__never {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  color: var(--brand-ink);
  font-weight: 600;
}

.pfoot__never svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pfoot__notice {
  margin-top: var(--s-3);
}

.pfoot__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
  margin-top: var(--s-3);
}

.pfoot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
}

/* ---- path and call -------------------------------------------------------------------------- */

.choices {
  margin-top: var(--s-5);
  display: grid;
  gap: var(--s-3);
}

.choice {
  appearance: none;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--s-3);
  align-items: start;
  width: 100%;
  padding: var(--s-5) var(--s-4);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), transform 160ms var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.choice:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.choice.is-picked {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.choice[aria-busy="true"] {
  opacity: 0.6;
}

.choice__icon {
  width: 48px;
  height: 48px;
  padding: 11px;
  border-radius: 50%;
  background: var(--copper-tint);
  fill: none;
  stroke: var(--brand-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice__text {
  display: grid;
  gap: 2px;
}

.choice__title {
  font-weight: 700;
  font-size: 1.2rem;
}

.choice__about {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.slots {
  margin-top: var(--s-5);
}

.days {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  padding-bottom: var(--s-2);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.day {
  appearance: none;
  flex: none;
  display: grid;
  min-width: 88px;
  min-height: 56px;
  padding: var(--s-2) var(--s-3);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
}

.day[aria-selected="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

.day__name {
  font-weight: 700;
  font-size: 0.97rem;
}

.day__date {
  font-size: 0.85rem;
}

.times {
  margin-top: var(--s-3);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: var(--s-2);
}

.time {
  min-height: 48px;
  padding: 0;
  font-weight: 600;
}

.time[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-weight: 700;
}

.slotpick {
  margin-top: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--brand-tint);
  display: grid;
  gap: var(--s-3);
}

.slotpick__label {
  font-weight: 700;
  font-size: 1.0625rem;
}

.linkrow--call {
  margin-top: var(--s-4);
}

.linkrow--call span:last-child {
  color: var(--brand-ink);
  font-weight: 600;
}

/* ---- home extras ---------------------------------------------------------------------------- */

.next--money {
  background: var(--copper-tint);
}

.next--money .next__label {
  color: var(--copper-ink);
}

.promise {
  margin-top: var(--s-6);
  padding: var(--s-5) var(--s-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg);
}

.promise__list {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.promise__list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--s-2);
  align-items: start;
}

.promise__list svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  fill: none;
  stroke: var(--ok);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linklist {
  margin-top: var(--s-3);
  display: grid;
}

.linklist .linkrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.steprow--locked {
  color: var(--muted);
  cursor: default;
}

.steprow--locked:hover {
  background: transparent;
}

.mark--locked,
.mark--todo {
  background: var(--surface-2);
  color: var(--ink-soft);
}

.mark--skipped {
  background: var(--ok-tint);
  color: var(--ok);
}

.mark--locked svg {
  width: 14px;
  height: 14px;
}

.input--area {
  min-height: 96px;
  padding: var(--s-3) var(--s-4);
  line-height: 1.5;
  resize: vertical;
}

.select {
  appearance: auto;
  padding-inline-end: var(--s-3);
}

/* ---- numbers in the client's words ---------------------------------------------------------- */

.numfield {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--bg);
  overflow: hidden;
}

.numfield:focus-within {
  border-color: var(--brand);
  outline: 3px solid oklch(0.62 0.14 212 / 0.25);
}

.numfield .input {
  border: 0;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}

.numfield .input:focus {
  outline: none;
}

.numfield:has(.input[aria-invalid="true"]) {
  border-color: var(--danger);
}

.numfield__unit {
  display: grid;
  place-items: center;
  padding: 0 var(--s-3);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 600;
}

.numfield__sign {
  min-height: 52px;
  min-width: 52px;
  padding: 0;
  border: 0;
  border-inline-end: 1px solid var(--line);
  border-radius: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.numfield__sign[aria-pressed="true"] {
  background: var(--danger-tint);
  color: var(--danger);
}

.numfield .numfield__sign {
  text-decoration: none;
}

.numfield:has(.numfield__sign[aria-pressed="true"]) .input {
  color: var(--danger);
}

.listf__rows {
  display: grid;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.listf__row {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r);
  background: var(--surface);
}

.listf__row--owner {
  grid-template-columns: 1fr 92px;
  align-items: end;
}

.listf__row--owner .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.listf__row .btn--danger-quiet {
  justify-self: start;
}

.snap + .snap {
  margin-top: var(--s-5);
}

.savebar {
  position: sticky;
  bottom: 0;
  z-index: var(--z-sticky);
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-5);
  margin-inline: calc(-1 * var(--s-4));
  padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: oklch(1 0 0 / 0.96);
  border-top: 1px solid var(--line);
}

.savebar__left {
  color: var(--ink-soft);
}

/* ---- agreement ------------------------------------------------------------------------------ */

.draftnote {
  display: inline-block;
  margin-top: var(--s-2);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--warn-tint);
  color: var(--warn-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.notice {
  margin-top: var(--s-5);
  padding: var(--s-4);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
}

.notice h2 {
  font-size: 1.0625rem;
}

.notice ul {
  margin: var(--s-2) 0 0;
  padding-inline-start: 1.2em;
  display: grid;
  gap: var(--s-1);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.legal {
  gap: 0;
  border-top: 1px solid var(--line);
}

.section > .legal {
  margin-top: var(--s-3);
}

.legal__item {
  border-bottom: 1px solid var(--line);
}

.legal__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 52px;
  padding: var(--s-2) 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.legal__item summary::-webkit-details-marker {
  display: none;
}

.legal__item summary::after {
  content: "+";
  flex: none;
  color: var(--brand);
  font-weight: 700;
  font-size: 1.25rem;
}

.legal__item[open] summary::after {
  content: "−";
}

.legal__item p {
  padding-bottom: var(--s-3);
}

.consent {
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.consent + .consent {
  margin-top: var(--s-2);
}

.consent:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.consent__body {
  display: grid;
  gap: 4px;
}

.consent__title {
  font-weight: 700;
}

.consent__text {
  color: var(--ink-soft);
}

.consent__details {
  margin: var(--s-1) 0 0;
  padding-inline-start: 1.1em;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ---- payment and money ---------------------------------------------------------------------- */

.paybox {
  margin-top: var(--s-5);
  margin-bottom: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-xl);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.paybox--money {
  background: var(--copper-tint);
}

.paybox__label {
  color: var(--brand-ink);
  font-weight: 600;
}

.paybox__amount {
  margin-top: 4px;
  font-family: var(--font-figure);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.paybox__vat {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.paybox__list {
  margin: var(--s-3) 0 0;
  padding-inline-start: 1.2em;
  display: grid;
  gap: var(--s-1);
  font-size: 0.95rem;
}

.feebreak {
  margin: var(--s-3) 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-1) var(--s-3);
  font-size: 0.95rem;
}

.feebreak dt {
  color: var(--ink-soft);
}

.feebreak dd {
  margin: 0;
  font-weight: 600;
}

/* ---- processing, questions ------------------------------------------------------------------ */

.missing {
  margin: var(--s-3) 0 0;
  padding-inline-start: 1.2em;
  display: grid;
  gap: var(--s-2);
}

.missing a {
  font-weight: 600;
}

.section + .formerr + .btn--primary {
  margin-top: var(--s-4);
}

.qcard {
  margin-top: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: grid;
  gap: var(--s-3);
}

.qcard__q {
  font-weight: 600;
  font-size: 1.0625rem;
}

.qcard .btn--primary {
  justify-self: start;
}

.yesno {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}

.yesno .btn[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand-ink);
}

.answered {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}

.answered li {
  display: grid;
  gap: 2px;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}

.answered__q {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.answered__a {
  font-weight: 600;
}

/* ---- the kit -------------------------------------------------------------------------------- */

.kitlist {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.kitlist__item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-2) var(--s-3);
  align-items: center;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}

.kitlist__item > svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--brand-ink);
  stroke-width: 2;
  stroke-linejoin: round;
}

.kitlist__title {
  font-weight: 600;
}

.kitlist__acts {
  grid-column: 2;
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.portal-link {
  margin-top: var(--s-4);
}

.portal-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.subhead {
  margin-top: var(--s-5);
}

.ticks {
  list-style: none;
  margin: var(--s-2) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.ticks li {
  position: relative;
  padding-inline-start: 26px;
}

.ticks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 5px;
  width: 7px;
  height: 12px;
  border-right: 2.5px solid var(--ok);
  border-bottom: 2.5px solid var(--ok);
  transform: rotate(45deg);
}

.guide li > span {
  display: grid;
  gap: 2px;
}

.guide__body {
  color: var(--ink-soft);
}

.chip.verify {
  margin-inline-start: var(--s-2);
  vertical-align: middle;
}

.lenderacts {
  margin-top: var(--s-5);
  display: grid;
  gap: var(--s-2);
}

.lenderpanel:not(:empty) {
  margin-top: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.req__how {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
}


@media (min-width: 640px) {
  .view {
    padding-top: var(--s-6);
  }

  .view h1 {
    font-size: 1.875rem;
  }

  .actions--row {
    grid-template-columns: auto auto;
    justify-content: start;
  }
}

/* ---- documents in stages: overall bar, the stepper, one stage at a time ------------------------ */

.docmeter {
  margin-top: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-xl);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.docmeter__text {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.docmeter__text strong {
  color: var(--ink);
  font-size: 1.15rem;
}

.docmeter__bar {
  position: relative;
  height: 10px;
  margin-top: var(--s-2);
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.docmeter__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to left, var(--brand), oklch(0.56 0.12 150));
  transform-origin: right center;
  transition: transform 500ms var(--ease-out);
}

.docsteps {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.docstep {
  position: relative;
}

/* the line between two stages, behind the dots */
.docstep + .docstep::before {
  content: "";
  position: absolute;
  top: 21px;
  inset-inline-end: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.docstep.is-done + .docstep::before {
  background: var(--brand);
}

.docstep__btn {
  position: relative;
  z-index: 1;
  appearance: none;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  padding: 0 2px 4px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  cursor: pointer;
}

.docstep__dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--bg);
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform 160ms var(--ease-out);
}

.docstep__dot svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docstep__btn:hover .docstep__dot {
  border-color: var(--brand);
}

.docstep__name {
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
}

.docstep__count {
  font-size: 0.75rem;
  color: var(--muted);
}

.docstep.is-done .docstep__dot {
  background: var(--copper);
  border-color: var(--brand);
  color: var(--brand-deep);
}

.docstep.is-current .docstep__dot {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 0 0 4px var(--copper-tint), 0 0 0 6px var(--copper);
  transform: scale(1.06);
}

.docstep.is-current .docstep__name {
  color: var(--ink);
}

.docgroup--stage {
  margin-top: var(--s-6);
}

.docgroup--stage > .docgroup__top {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-bottom: var(--s-2);
}

.docgroup__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--copper-tint);
  color: var(--brand-ink);
}

.docgroup__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view .docgroup--stage h2 {
  font-size: 1.4rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.view .docgroup--stage h2:focus {
  outline: none;
}

.docgroup__intro {
  margin-top: 2px;
  color: var(--ink-soft);
}

/* the ready-made message, shown as the chat bubble it becomes */
.askcard {
  margin-top: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 20% 20%, oklch(0.9 0.02 120 / 0.5) 0 2px, transparent 3px) 0 0 / 22px 22px,
    oklch(0.95 0.015 110);
  border: 1px solid var(--line);
}

.askcard__title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.9rem;
}

.askcard__title svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bubble {
  position: relative;
  margin-top: var(--s-2);
  margin-inline-end: 18px;
  padding: 10px 14px 12px;
  border-radius: 4px 14px 14px 14px;
  background: oklch(0.93 0.07 140);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 1px 1px oklch(0.25 0.03 168 / 0.12);
}

.sharerow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.req--in {
  border-color: oklch(0.85 0.06 160);
}

.howbtn {
  justify-self: start;
  min-height: 40px;
  padding-inline: 4px 10px;
  gap: 6px;
}

.docnav {
  margin-top: var(--s-5);
  display: grid;
  gap: var(--s-2);
}

.docnav__hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.docmore {
  margin-top: var(--s-5);
  border-top: 1px solid var(--line);
  padding-top: var(--s-3);
}

.docmore summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--brand-ink);
  font-weight: 700;
  cursor: pointer;
}

.docfine {
  margin-top: var(--s-4);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- the "how do I get it?" popup: a bottom sheet on phones, a centred card on wide screens ---- */

.howto {
  width: min(100%, 520px);
  max-width: 100%;
  max-height: 92vh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 26px 26px 0 0;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-3);
  overflow: auto;
  animation: sheet-up 320ms var(--ease-out);
}

.howto::backdrop {
  background: oklch(0.2 0.04 168 / 0.55);
  backdrop-filter: blur(2px);
}

@keyframes sheet-up {
  from {
    transform: translateY(24px);
    opacity: 0.4;
  }
}

.howto__body {
  position: relative;
  padding: var(--s-5) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom));
  display: grid;
  gap: var(--s-3);
}

.howto__close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.howto__close svg,
.howto__who svg,
.howto__icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.howto__close svg {
  width: 20px;
  height: 20px;
}

.howto h2 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  padding-inline-end: 48px;
}

.howto__who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: var(--copper-tint);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.9rem;
}

.howto__who svg {
  width: 18px;
  height: 18px;
}

.howto__looks {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.howto__steps {
  list-style: none;
  margin: var(--s-1) 0 0;
  padding: 0;
  display: grid;
}

.howto__steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 52px;
  padding-bottom: 10px;
  font-weight: 600;
}

/* dotted line from one step to the next */
.howto__steps li + li::before {
  content: "";
  position: absolute;
  top: -12px;
  inset-inline-start: 21px;
  height: 14px;
  border-inline-start: 2px dotted var(--line-strong);
}

.howto__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-ink);
}

.howto__icon svg {
  width: 22px;
  height: 22px;
}

.howto__ok {
  margin-top: var(--s-2);
}

/* a drawn thumbnail of the document: a page with lines and the mark that tells it apart */
.docthumb {
  position: relative;
  justify-self: center;
  width: 118px;
  height: 148px;
  margin: var(--s-2) 0 var(--s-1);
  padding: 16px 14px;
  border-radius: 6px;
  background: oklch(0.995 0.003 100);
  border: 1px solid var(--line);
  box-shadow: 8px 10px 0 -2px var(--surface-2), 0 14px 24px -12px oklch(0.2 0.04 168 / 0.35);
  transform: rotate(-3deg);
  display: grid;
  align-content: start;
  gap: 9px;
}

.docthumb__head,
.docthumb__line {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
}

.docthumb__head {
  width: 70%;
  height: 10px;
  background: var(--brand-deep);
}

.docthumb__line--short {
  width: 55%;
}

.docthumb__mark {
  position: absolute;
  display: block;
}

/* accountant: a round stamp */
.docthumb--accountant .docthumb__mark {
  inset-inline-start: 12px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid oklch(0.5 0.12 260 / 0.75);
  transform: rotate(-14deg);
}

.docthumb--accountant .docthumb__mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1.5px solid oklch(0.5 0.12 260 / 0.6);
}

/* bank: statement rows with the balance column marked */
.docthumb--bank .docthumb__line {
  height: 9px;
  background: repeating-linear-gradient(to left, var(--surface-2) 0 26px, transparent 26px 30px);
}

.docthumb--bank .docthumb__mark {
  inset-inline-end: 10px;
  top: 34px;
  width: 26px;
  height: 64px;
  border-radius: 4px;
  background: oklch(0.89 0.175 122 / 0.55);
}

/* company: a seal */
.docthumb--company .docthumb__mark {
  inset-inline-end: 16px;
  bottom: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--copper) 0 40%, var(--brand) 42% 100%);
  box-shadow: 0 0 0 3px oklch(0.89 0.175 122 / 0.4);
}

/* purpose: a price tag */
.docthumb--purpose .docthumb__mark {
  inset-inline-start: 14px;
  bottom: 18px;
  width: 44px;
  height: 26px;
  border-radius: 4px 12px 12px 4px;
  background: var(--copper);
  border: 2px solid var(--brand);
}

.docthumb--extra .docthumb__mark {
  inset-inline-start: 14px;
  bottom: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--brand);
}

@media (min-width: 640px) {
  .howto {
    margin: auto;
    border-radius: 26px;
  }

  .docstep__name {
    font-size: 0.88rem;
  }
}
