/* SignDesk Requests 1.0 – styles of the pages people open from the green button (/s, /q). */
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 500; font-display: swap; src: url("fonts/fraunces-latin-500-normal.woff2") format("woff2"); }
:root {
  --bg: #FBF8F1; --paper: #F1ECDD; --panel: #fff; --ink: #17211C; --muted: #5E6B63; --line: #E6E0D2; --line-2: #CFC8B6;
  --green: #0B5D46; --green-dark: #08402F; --green-soft: #E6F0EB; --gold: #D4AF37; --gold-soft: #FBF3D9; --gold-ink: #6B5410; --red: #B42318; --red-soft: #FDECEA;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 Figtree, "Segoe UI", Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
h1, h2 { font-family: Fraunces, Georgia, serif; font-weight: 500; line-height: 1.2; margin: 0 0 10px; }
h1 { font-size: 26px; } h2 { font-size: 21px; }
p { margin: 0 0 12px; }
.bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar img { width: 30px; height: 30px; }
.bar b { font-size: 19px; color: var(--green-dark); }
.bar .test { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid #EAD9A0; padding: 3px 10px; border-radius: 99px; }
main { max-width: 760px; margin: 0 auto; padding: 16px 14px 150px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px; margin: 0 0 14px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.who { font-size: 15px; color: var(--muted); margin: -4px 0 12px; }
.spin { width: 34px; height: 34px; margin: 6px auto 12px; border: 4px solid var(--green-soft); border-top-color: var(--green); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* buttons: big, with words */
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 99px; border: 2px solid var(--green); background: var(--panel); color: var(--green-dark); font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none; }
.btn.main { background: var(--green); color: #fff; border-color: var(--green); }
.btn.wide { width: 100%; }
.btn.big { min-height: 62px; font-size: 19px; }
.btn.quiet { border-color: var(--line-2); color: var(--ink); font-weight: 600; }
.btn.danger { border-color: #E9B7B1; color: var(--red); background: #fff; font-weight: 600; }
.btn:disabled { opacity: 0.55; cursor: default; }
.link { background: none; border: 0; color: var(--green); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 8px 4px; font-size: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .btn { flex: 1 1 200px; }

/* the glowing next button and the pointing hand */
.go { position: relative; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0), 0 6px 16px rgba(11, 93, 70, 0.22); } 50% { box-shadow: 0 0 0 9px rgba(212, 175, 55, 0.5), 0 6px 16px rgba(11, 93, 70, 0.22); } }
.hand { position: absolute; right: -6px; top: 50%; width: 44px; height: 44px; margin-top: -22px; color: var(--gold-ink); pointer-events: none; animation: poke 1.2s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18)); }
.hand svg { width: 44px; height: 44px; transform: rotate(-90deg); }
@keyframes poke { 0%, 100% { transform: translateX(14px); } 50% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .go, .hand, .spin { animation: none; } }

/* steps */
.steps { display: flex; gap: 6px; margin: 0 0 14px; }
.step { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 4px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.step .n { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line-2); margin-right: 4px; font-size: 12px; }
.step.now { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); }
.step.now .n { border-color: var(--gold); }
.step.done { background: var(--green-soft); border-color: #B9D6C8; color: var(--green-dark); }
.step.done .n { background: var(--green); color: #fff; border-color: var(--green); }

/* the document */
.doc { display: flex; flex-direction: column; gap: 12px; align-items: center; margin: 0 0 14px; }
.pg { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 6px 20px rgba(0, 0, 0, 0.06); max-width: 100%; }
.pg canvas { display: block; width: 100%; height: auto; }
.mark { position: absolute; border: 2px dashed #C9A227; background: rgba(251, 243, 217, 0.55); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--gold-ink); font-weight: 700; font-size: 13px; text-transform: none; }
.mark.next { border-style: solid; animation: markglow 1.6s ease-in-out infinite; }
@keyframes markglow { 0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); } 50% { box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.45); } }
.mark.filled { border-color: transparent; background: transparent; }
.mark img { max-width: 100%; max-height: 100%; object-fit: contain; }
.datechip { position: absolute; font: 600 12px Arial, sans-serif; color: #111; white-space: nowrap; }

/* the action area at the bottom of the screen */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
.dock .in { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.dock .hint { font-size: 14px; color: var(--muted); text-align: center; }

/* sheets (signature, stamp, confirmations) */
.cover { position: fixed; inset: 0; z-index: 50; background: rgba(15, 25, 20, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--panel); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .cover { align-items: center; } .sheet { border-radius: 20px; } }
.tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.tab { flex: 1; min-height: 48px; border-radius: 12px; border: 2px solid var(--line-2); background: #fff; font-weight: 700; color: var(--ink); cursor: pointer; }
.tab.on { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.pad { width: 100%; height: 210px; border: 2px dashed var(--line-2); border-radius: 14px; background: #fff; touch-action: none; display: block; }
.preview { min-height: 120px; border: 1px solid var(--line); border-radius: 14px; background: repeating-conic-gradient(#f4f1e8 0% 25%, #fff 0% 50%) 50% / 18px 18px; display: flex; align-items: center; justify-content: center; padding: 10px; margin: 0 0 12px; }
.preview img { max-width: 100%; max-height: 180px; }
label.f { display: block; font-weight: 600; margin: 10px 0 6px; }
input.t, select.t, textarea.t { width: 100%; min-height: 52px; font: inherit; font-size: 18px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line-2); background: #fff; color: var(--ink); }
input.t:focus, select.t:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(11, 93, 70, 0.15); }
input.code { letter-spacing: 8px; font: 700 28px/1 Consolas, "Courier New", monospace; text-align: center; }
.err { color: var(--red); font-weight: 600; font-size: 15px; margin: 8px 0 0; }
.note { background: var(--gold-soft); border: 1px solid #EAD9A0; color: #4A3B0B; border-radius: 12px; padding: 12px 14px; font-size: 15px; margin: 0 0 12px; }
.ok { background: var(--green-soft); border: 1px solid #B9D6C8; color: var(--green-dark); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.bad { background: var(--red-soft); border: 1px solid #F1C3BD; color: #7A1A12; border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.bigtick { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; margin: 4px auto 12px; }
.bigtick svg { width: 36px; height: 36px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 700; font-size: 17px; color: var(--ink); min-height: 60px; }
.choice small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.choice:hover, .choice:focus-visible { border-color: var(--green); }
.shapes { display: flex; gap: 10px; }
.shapes button { flex: 1; min-height: 50px; border-radius: 12px; border: 2px solid var(--line-2); background: #fff; font-weight: 700; cursor: pointer; }
.shapes button.on { border-color: var(--green); background: var(--green-soft); }
.promo { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.promo a, .card a { color: var(--green); font-weight: 600; }

/* quotation: one item at a time */
.item-card { text-align: left; }
.item-no { font-size: 14px; font-weight: 700; color: var(--gold-ink); margin: 0 0 6px; }
.item-desc { font-size: 21px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.item-want { font-size: 17px; color: var(--ink); background: var(--paper); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 700; color: var(--muted); }
.money input { padding-left: 38px; font-size: 26px; font-weight: 700; min-height: 62px; }
.line-total { font-size: 17px; margin: 10px 0 0; color: var(--green-dark); font-weight: 700; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 12px 0 0; flex-wrap: wrap; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.dots i.on { background: var(--gold); } .dots i.done { background: var(--green); }
table.sum { width: 100%; border-collapse: collapse; font-size: 15px; }
table.sum td { padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.sum td.r { text-align: right; white-space: nowrap; }
.total-big { font-size: 24px; font-weight: 800; color: var(--green-dark); margin: 12px 0 2px; }
.words { font-size: 15px; color: var(--muted); }
.lh-thumb { max-width: 160px; border: 1px solid var(--line); border-radius: 8px; display: block; margin: 0 auto 10px; }
details.more { margin: 12px 0 0; } details.more summary { cursor: pointer; font-weight: 700; color: var(--green); padding: 8px 0; }
.qprev { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; }
/* 0.2.0: the vendor's name and position on the PO */
.mark.txt { font-size: 10px; border-width: 1.5px; justify-content: flex-start; padding: 0 3px; white-space: nowrap; overflow: hidden; }
.mark.txt.filled { justify-content: flex-start; }
.txtchip { font: 600 10px Arial, sans-serif; color: #111; white-space: nowrap; }
/* 0.2.0: the prices in one table (phones: one card per item) */
.ptbl-wrap { overflow-x: auto; margin: 6px 0 12px; }
table.ptbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.ptbl th { text-align: left; font-size: 13px; color: var(--muted); padding: 8px 6px; border-bottom: 2px solid var(--line-2); background: var(--paper); white-space: nowrap; }
table.ptbl th.r { text-align: right; }
table.ptbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.ptbl .r { text-align: right; white-space: nowrap; }
table.ptbl td.desc { font-weight: 600; }
table.ptbl td.pcell { min-width: 160px; }
table.ptbl td.ltot { font-weight: 700; color: var(--green-dark); }
.money.sm span { font-size: 17px; left: 10px; }
.money.sm input.pin { width: 100%; min-height: 46px; font: inherit; font-size: 18px; font-weight: 700; padding: 8px 10px 8px 30px; border-radius: 10px; border: 2px solid var(--line-2); background: #fff; color: var(--ink); }
.money.sm input.pin:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(11, 93, 70, 0.15); }
table.ptbl td.desc .sub { display: none; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 620px) { /* phones: still a table — item (with how many under it), your price, total */
  table.ptbl { font-size: 14px; }
  table.ptbl th.c-hide, table.ptbl td.c-hide { display: none; }
  table.ptbl td.desc .sub { display: block; }
  table.ptbl th, table.ptbl td { padding: 8px 4px; }
  table.ptbl td.pcell { min-width: 112px; width: 38%; }
  .money.sm input.pin { font-size: 17px; min-height: 44px; padding-left: 24px; }
  .money.sm span { left: 8px; font-size: 15px; }
}

/* v3: the vendor's / signer's short message */
textarea.t.msg { min-height: 132px; font-size: 16px; line-height: 1.45; resize: vertical; }

/* 3.6.2: signing order, confirmed sender, the genuine line */
.who .conf { color: #0B5D46; font-weight: 600; }
.order { margin: 12px 0 4px; padding: 10px 14px; border: 1px solid #cfe3da; border-radius: 12px; background: #f4f8f6; }
.order .f { margin: 0 0 6px; }
.order ol { margin: 0; padding-left: 22px; line-height: 1.7; }
.order li.o-signed { color: #0B5D46; }
.order li.o-waiting { color: #5E6B63; }
.order li.o-you b { text-decoration: underline; }
#genuineLine { margin-top: 10px; }
