/* Signet Workflows: what the hosted page (/w) adds to hosted.css: its layouts, the form and the test bar. Colours come from brand.css. */
body { background: var(--paper); }
.frame { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); }
.side { display: none; }
.main { width: 100%; max-width: 480px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; min-height: 100%; min-width: 0; }
.head { display: flex; align-items: center; justify-content: center; min-height: 40px; margin-bottom: 20px; }
.who { font: 650 18px/1.25 var(--serif); text-align: center; overflow-wrap: anywhere; }
.who img { display: block; max-height: 44px; max-width: min(220px, 70vw); width: auto; height: auto; margin: 0 auto; }
/* A band in the primary colour, as on the camera pages. */
.header-band .head { margin: 0 0 20px; padding: 16px 20px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); }

.bar { display: flex; height: 5px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; margin-bottom: 16px; }
.bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--accent); transition: width .35s ease; }
.bar.parts { gap: 6px; background: none; border-radius: 0; }
.bar.parts i { flex: 1; width: auto; background: color-mix(in srgb, var(--ink) 12%, transparent); } .bar.parts i.done { background: var(--accent); }
.bar.parts i.now { background: color-mix(in srgb, var(--accent) 45%, transparent); }   /* the part under way: half the accent (no gradient since plan 22, IV53 stage 6) */

main.card { padding: calc(var(--pad) + 6px) calc(var(--pad) + 2px); animation: none; }
main.card.center { display: block; }
main.card:focus { outline: none; }
main.card h1 { margin: 0; }
.lead { margin: 8px 0 0; color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.ico { width: 52px; height: 52px; border-radius: calc(var(--radius-sm) + 4px); display: grid; place-items: center; background: var(--accent-soft); color: var(--foil); margin-bottom: 16px; }
.ico svg { width: 26px; height: 26px; }
.ico.ok { color: var(--ok); background: var(--ok-bg); }
.ico.review { color: var(--warn); background: var(--warn-bg); }
.ico.fail { color: var(--bad); background: var(--bad-bg); }
.center .ico, .center .spinner { margin-left: auto; margin-right: auto; }
.center > .spinner { margin-top: 26px; margin-bottom: 22px; }

form { margin: 20px 0 0; }
.f { margin: 0 0 calc(var(--gap) + 2px); }
.f label, .f legend { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; padding: 0; }
.f fieldset { border: 0; margin: 0; padding: 0; }
.f input:not([type=radio]) { width: 100%; min-height: var(--control); padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--ink) 38%, var(--surface)); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 16px; }
.f input::placeholder { color: var(--muted); opacity: .75; }
.f input[aria-invalid=true] { border-color: var(--bad); border-width: 2px; padding: 9px 13px; }
.f input:focus-visible { border-radius: var(--radius-sm); }
.f .err { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; color: var(--bad); font-size: 14px; font-weight: 550; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg label { display: flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; font-size: 15px; text-align: center; padding: 6px 8px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { border-color: var(--foil); box-shadow: inset 0 0 0 1px var(--foil); background: var(--accent-soft); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--foil); outline-offset: 2px; }

.btn .dot { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: turn .8s linear infinite; }
.acts { display: grid; gap: 10px; margin-top: 20px; }
form .acts { margin-top: 18px; }
.links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.lk { background: none; border: 0; padding: 8px 4px; min-height: 40px; color: var(--muted); font-weight: 550; font-size: 15px; cursor: pointer; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.lk:hover { color: var(--ink); } .lk svg { width: 16px; height: 16px; } .lk.end { margin-left: auto; }
.aside { margin: 14px 0 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.oops { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); color: var(--bad); background: var(--bad-bg); font-size: 14.5px; font-weight: 550; }
.card > * { animation: rise .22s ease both; } .card > .spinner { animation: turn .8s linear infinite; } .preview .card > *:not(.spinner) { animation: none; }

.frame .foot { margin-top: auto; padding: 22px 0 0; gap: 4px 16px; }
.foot .by { display: inline-flex; align-items: center; gap: 5px; width: 100%; justify-content: center; padding-top: 4px; }
.foot .by svg { width: 14px; height: 14px; }

/* test mode */
.test { margin: 22px calc(-2px - var(--pad)) calc(-6px - var(--pad)); padding: 12px calc(var(--pad) + 2px) 14px; border-top: 1px dashed var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.test b { margin-right: auto; font-weight: 650; }
.live-test { margin: 0 auto 14px; width: fit-content; padding: 4px 12px; border: 1px dashed var(--line); border-radius: var(--radius-pill, 999px); background: var(--surface-2); color: var(--muted); font-size: 13px; }
.test button { min-height: 34px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.test button:hover { border-color: currentColor; }
.test .p { color: var(--ok); } .test .r { color: var(--warn); } .test .x { color: var(--bad); }

/* the camera flow, over the page */
.cam { position: fixed; inset: 0; z-index: 10; background: var(--paper); display: flex; flex-direction: column; }
.cam-top { display: flex; align-items: center; padding: calc(4px + env(safe-area-inset-top)) 10px 4px; border-bottom: 1px solid var(--line); background: var(--paper); }
.cam iframe { flex: 1; width: 100%; border: 0; display: block; background: var(--paper); }

/* full page: no card */
.layout-full main.card { background: none; border: 0; box-shadow: none; padding: 8px 4px; }
body.layout-full { background: var(--surface); } .layout-full .test { margin: 22px 0 0; border-radius: var(--radius-sm); border: 1px dashed var(--line); padding: 12px 14px; }
.layout-full .main { padding-top: calc(40px + env(safe-area-inset-top)); }

/* split: a picture (or the brand colour) beside the card */
.layout-split .side { display: block; height: 132px; background: var(--accent); overflow: hidden; }
.layout-split .side img { display: block; width: 100%; height: 100%; object-fit: cover; }
.layout-split .main { min-height: 0; padding-top: 22px; }
@media (min-width: 900px) {
  .layout-split .frame { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .layout-split .side { height: auto; min-height: 100vh; position: sticky; top: 0; }
  .layout-split .main { min-height: 100vh; justify-content: center; }
  .layout-split .foot { margin-top: 0; }
}
@media (min-width: 600px) { .layout-card .main { padding-top: 56px; } main.card { padding: calc(var(--pad) + 12px) calc(var(--pad) + 10px); } .test { margin: 26px calc(-10px - var(--pad)) calc(-12px - var(--pad)); padding: 12px calc(var(--pad) + 10px) 14px; } main.card h1 { font-size: 28px; } }
@media (max-width: 359px) { .main { padding-left: 14px; padding-right: 14px; } main.card { padding: 22px 16px; } .test { margin: 18px -16px -22px; padding: 10px 16px 12px; } main.card h1 { font-size: 22px; } }

/* inside a frame on the member's own page */
.embedded.layout-card .main, .embedded.layout-full .main { padding-top: 48px; }
.embedded .main { max-width: 520px; }
.embedded.layout-split .side { display: none; }
body.embedded { background: var(--paper); }
@media (prefers-reduced-motion: reduce) { .card > .spinner, .btn .dot { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; } }

/* steps of the business's own */
.f .hint { margin: -2px 0 6px; color: var(--muted); font-size: 14px; }
.f textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--ink) 38%, var(--surface)); border-radius: var(--radius-sm); background: var(--surface-2); color: inherit; font: inherit; font-size: 16px; resize: vertical; }
.f textarea[aria-invalid=true] { border-color: var(--bad); border-width: 2px; padding: 11px 13px; }
.f .opts { display: grid; gap: 8px; }
.f .opts label { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.f .opts label:has(input:checked) { border-color: var(--foil); box-shadow: inset 0 0 0 1px var(--foil); background: var(--accent-soft); }
.f .opts input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.f label.tick { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 0; font-size: 15px; cursor: pointer; overflow-wrap: anywhere; }
.f .tick input[type=checkbox] { flex: none; width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.said { margin: 14px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.more { margin: 10px 0 0; }

/* a bank payment */
.pay { margin: 18px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 4px 14px; }
.pay dt { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; }
.pay dd { margin: 0; padding: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; border-bottom: 1px solid var(--line); }
.pay dd:last-child { border-bottom: 0; }
.pay .val { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.copy { flex: none; min-height: 44px; min-width: 72px; margin: -12px 0 -4px; padding: 4px 14px; border: 1px solid color-mix(in srgb, var(--ink) 38%, var(--surface)); border-radius: 999px; background: var(--surface); color: inherit; cursor: pointer; font-size: 14px; font-weight: 600; }
.copy:hover { border-color: currentColor; }
.hint.pay-note, .hint.pay-time { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.warnbox { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--ink); font-size: 14.5px; overflow-wrap: anywhere; }
.pay-steps { margin: 16px 0 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }
.pay-status { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; }
.pay-status .dot { flex: none; width: 18px; height: 18px; margin-top: 3px; border: 2px solid var(--foil); border-right-color: transparent; border-radius: 50%; animation: turn .8s linear infinite; }
.ask { margin: 14px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.ask p { margin: 0; } .ask .acts { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .pay-status .dot { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; } }
