/* BSL RAMS — owner screens. Brand: red #dc2227, ink #111111, Roboto (self-hosted). */
@font-face { font-family: 'Roboto'; src: url('/fonts/Roboto-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('/fonts/Roboto-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --red: #dc2227;          /* 4.9:1 on white */
  --red-dark: #b3161c;     /* 6.6:1 on white, 6.0:1 on --red-tint */
  --red-tint: #fdecec;
  --ink: #111111;
  --text: #222222;
  --muted: #595959;        /* 7.0:1 on white, 6.3:1 on --bg */
  --green: #12703a;        /* 6.2:1 on white */
  --green-tint: #e6f3ea;
  --wa: #0b6b3a;           /* WhatsApp button: 6.6:1 with white text */
  --bg: #f3f2ef;
  --card: #ffffff;
  --line: #dcdad5;         /* decorative dividers only */
  --field: #767676;        /* form control borders: 4.5:1 */
  --track: #d4d2cc;
  --radius: 10px;
  --gutter: 16px;
  --shadow: 0 1px 0 rgba(17,17,17,.06), 0 6px 18px -10px rgba(17,17,17,.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: 'Roboto', system-ui, sans-serif; font-size: 16px; line-height: 1.45;
  color: var(--text); background: var(--bg);
  /* faint scaffold grid: tubes every 48px */
  background-image:
    linear-gradient(rgba(17,17,17,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,17,.035) 1px, transparent 1px);
  background-size: 48px 48px;
}
img { max-width: 100%; display: block; }
a { color: var(--red-dark); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ---------- header */
.top {
  position: sticky; top: 0; z-index: 20; background: #fff;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 6px) var(--gutter) 6px;
}
.top::after { /* hazard-tape band */
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, #fff 10px 20px);
  box-shadow: 0 4px 10px -6px rgba(17,17,17,.35);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; flex: 0 0 auto; }
.brand img { height: 30px; width: auto; }
.brand .tag {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; color: #fff; background: var(--ink);
  padding: 3px 6px 2px; border-radius: 3px;
}
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 9px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
  border-bottom: 3px solid transparent;
}
.nav a[aria-current="page"] { border-bottom-color: var(--red); }
@media (max-width: 359px) { .brand .tag { display: none; } .nav a { padding: 0 7px; font-size: 14px; } .brand img { height: 26px; } }

/* ---------- layout */
main { max-width: 640px; margin: 0 auto; padding: 26px var(--gutter) 120px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red-dark); margin: 0 0 6px; }
.page-title { font-size: 28px; letter-spacing: -.01em; }
.page-title .dash { color: var(--red); }
.lede { color: var(--muted); margin: 6px 0 0; }
.section { margin-top: 28px; }
.section > h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 8px; border: 2px solid var(--ink);
  background: #fff; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .08s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-danger { color: var(--red-dark); border-color: var(--red-dark); }
.btn-danger.armed { background: var(--red-dark); color: #fff; }
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn-block { width: 100%; min-height: 52px; font-size: 17px; }
.btn-link { background: none; border: 0; color: var(--red-dark); font-weight: 700; text-decoration: underline; min-height: 44px; padding: 0 4px; cursor: pointer; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(243,242,239,0));
}
.sticky-cta .btn { max-width: 608px; margin: 0 auto; display: flex; box-shadow: 0 8px 20px -8px rgba(220,34,39,.6); }
@media (min-width: 720px) { .sticky-cta { position: static; background: none; padding: 0; margin-top: 18px; } .sticky-cta .btn { margin: 0; display: inline-flex; width: auto; } }

/* ---------- forms */
.field { margin-top: 18px; }
.field > label, .field > .label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 4px; }
.req { color: var(--red-dark); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--field); border-radius: 8px;
  background: #fff; font-size: 17px; color: var(--ink);
}
textarea.input { min-height: 72px; resize: vertical; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(220,34,39,.35); }
.input[readonly] { background: #f7f7f5; }
.row { display: flex; gap: 8px; }
.row > .input { flex: 1; min-width: 0; }
.date-read { font-size: 15px; color: var(--muted); margin-top: 6px; }

.checks { display: grid; gap: 8px; }
.check {
  display: flex; align-items: flex-start; gap: 12px; min-height: 52px; padding: 12px;
  border: 2px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
}
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--red); flex: 0 0 auto; }
.check:has(input:checked) { border-color: var(--ink); background: #fffdfa; }
.check .name { font-weight: 700; color: var(--ink); }
.check .sub { display: block; font-size: 14px; color: var(--muted); }
.pill {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px;
  background: var(--green-tint); color: var(--green); vertical-align: 1px; margin-left: 4px;
}
fieldset.group { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
fieldset.group > legend { font-weight: 700; color: var(--ink); margin-bottom: 6px; padding: 0; }
.hint-inline { font-weight: 400; color: var(--muted); }
.form-h { font-size: 18px; }
details.more { margin-top: 18px; border-top: 1px solid var(--line); }
details.more summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; color: var(--ink); }

.msg { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.msg.err { background: var(--red-tint); color: var(--red-dark); }
.msg.ok { background: var(--green-tint); color: var(--green); }
.inline-err { color: var(--red-dark); font-weight: 700; font-size: 15px; margin-top: 8px; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px var(--gutter); }

/* ---------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.login-card .tape { height: 10px; background: repeating-linear-gradient(-45deg, var(--red) 0 12px, var(--ink) 12px 24px); }
.login-card .inner { padding: 28px 22px 26px; }
.login-card img { width: 210px; margin: 0 auto 18px; }
.login-card h1 { font-size: 22px; text-align: center; }
.login-card p.lede { text-align: center; }
.pin {
  width: 100%; height: 68px; margin-top: 22px; text-align: center; font-size: 34px; letter-spacing: .5em; text-indent: .5em;
  border: 2px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink);
}
.pin:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(220,34,39,.35); }

/* ---------- today */
.day-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.day-bar label { font-weight: 700; color: var(--ink); }
.day-bar .input { width: auto; flex: 1 1 170px; min-height: 44px; font-size: 16px; }
.tally { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.tally span { background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 14px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow); }
.tally b { color: var(--red-dark); }

.jobs { display: grid; gap: 16px; margin-top: 18px; }
.job {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  border-left: 6px solid var(--red);
}
.job.done { border-left-color: var(--green); }
.job.closed { border-left-color: var(--ink); }
.job-head { padding: 14px var(--gutter) 0; }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.wo { font-size: 13px; font-weight: 700; letter-spacing: .08em; background: var(--ink); color: #fff; padding: 4px 8px; border-radius: 4px; }
.chip { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--red-tint); color: var(--red-dark); }
.chip.ok { background: var(--green-tint); color: var(--green); }
.chip.closed { background: #ececec; color: var(--ink); }
.job h3 { font-size: 20px; margin-top: 10px; }
.addr { color: var(--text); margin-top: 2px; }
.addr .pc { font-weight: 700; white-space: nowrap; }
.desc { color: var(--muted); font-size: 15px; margin-top: 4px; }
.carry { font-size: 13px; font-weight: 700; color: var(--red-dark); margin-top: 6px; }

.meter { display: flex; gap: 4px; margin: 14px 0 0; height: 8px; }
.meter i { flex: 1; border-radius: 99px; background: var(--track); transition: background-color .4s ease; }
.meter i.on { background: var(--green); }

.crew { list-style: none; margin: 10px 0 0; padding: 0 var(--gutter); }
.crew li { display: flex; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--line); }
.crew li:first-child { border-top: 0; }
.mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: 0 0 auto; }
.mark.yes { background: var(--green); color: #fff; }
.mark.no { background: var(--red-tint); color: var(--red-dark); }
.crew .who { flex: 1; min-width: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.crew .who small { font-weight: 400; color: var(--muted); }
.crew .when { font-size: 15px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.crew .when.no { color: var(--red-dark); font-weight: 400; }
.crew li.fresh .mark { animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.crew li.fresh { animation: flash 1.6s ease both; }

.facts { padding: 10px var(--gutter) 0; font-size: 14px; color: var(--muted); display: grid; gap: 2px; }
.facts b { color: var(--ink); }
.ae-note { color: var(--red-dark); font-weight: 700; } /* hospital caveat, e.g. A&E not 24 hours */
.status { margin: 12px var(--gutter) 0; padding: 10px 12px; border-radius: 8px; font-weight: 700; font-size: 15px; background: #f4f4f2; color: var(--ink); }
.status.ok { background: var(--green-tint); color: var(--green); }
.status.err { background: var(--red-tint); color: var(--red-dark); }

.actions { padding: 14px var(--gutter) 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .btn { padding: 0 10px; font-size: 14px; }
.actions .wide { grid-column: 1 / -1; }
.action-note { grid-column: 1 / -1; font-size: 14px; font-weight: 700; }
.action-note.ok { color: var(--green); }
.action-note.err { color: var(--red-dark); }
.editor { border-top: 1px dashed var(--field); margin: 0 var(--gutter); padding: 14px 0 4px; }
.editor .field { margin-top: 10px; }
.editor h4 { margin: 0 0 8px; color: var(--ink); font-size: 15px; }
.editor .row { margin-top: 10px; flex-wrap: wrap; }
.editor .input { font-size: 16px; }

.empty { text-align: center; padding: 40px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 18px; }
.empty .glyph { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: repeating-linear-gradient(-45deg, var(--red) 0 7px, #fff 7px 14px); border: 3px solid var(--ink); }
.empty p { margin: 0; color: var(--ink); font-weight: 700; font-size: 18px; }
.loading { color: var(--muted); padding: 24px 0; }

/* ---------- new job result */
.result { margin-top: 20px; animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
.result .badge { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.result h2 { font-size: 26px; }
.result .btns { display: grid; gap: 10px; margin-top: 14px; }
.ae { margin-top: 16px; padding: 12px; border-radius: 8px; background: #f4f4f2; color: var(--ink); font-size: 15px; }
.ae.miss { background: var(--red-tint); color: var(--red-dark); font-weight: 700; }

/* ---------- crew page */
.list { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.list li { padding: 12px var(--gutter); border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .nm { font-weight: 700; color: var(--ink); }
.list .q { font-size: 14px; color: var(--muted); }
.list li.inactive .nm { color: var(--muted); text-decoration: line-through; }
.toggles { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 15px; color: var(--ink); }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: #8a8a8a; position: relative; margin: 0; cursor: pointer; transition: background-color .2s ease; flex: 0 0 auto; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.add-form { margin-top: 14px; }

/* =====================================================================
   Crew signing screen (/j/<code>) — outdoors, one-handed, poor signal.
   Bigger type, heavy contrast, everything thumb-sized.
   ===================================================================== */
:root { --amber: #8a4b00; --amber-tint: #fff3d6; --amber-line: #e0a526; } /* amber text 6.9:1 on tint */
body.site { font-size: 17px; line-height: 1.5; color: #1c1c1c; }
.site .top { min-height: 54px; }
.top-wo { margin-left: auto; font-size: 14px; font-weight: 700; letter-spacing: .06em; background: var(--ink); color: #fff; padding: 5px 9px; border-radius: 4px; white-space: nowrap; }
.top-wo:empty { display: none; }
.sign-main { padding-top: 22px; padding-bottom: 64px; }

.banners { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }
.banner { margin: 12px 0 0; padding: 12px 14px; border-radius: 8px; font-weight: 700; font-size: 16px; box-shadow: var(--shadow); }
.banner.offline { background: var(--ink); color: #fff; }
.banner.closed { background: #fff; color: var(--ink); border: 3px solid var(--ink); }
.banner.sent { background: var(--green); color: #fff; }
.banner.warn { background: var(--amber-tint); color: var(--amber); border: 2px solid var(--amber-line); }

.fatal { margin-top: 30px; padding: 26px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 8px solid var(--red); }
.fatal p { margin: 0 0 14px; font-size: 20px; font-weight: 700; color: var(--ink); }

/* job card */
.jcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px var(--gutter) 16px; border-left: 6px solid var(--red); }
.j-customer { font-size: 26px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.j-addr { margin: 6px 0 0; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.j-addr .pc { font-weight: 700; white-space: nowrap; }
.j-date { margin: 4px 0 0; font-weight: 700; color: var(--red-dark); }
.j-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; }
.j-facts div { min-width: 0; }
.j-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.j-facts dd { margin: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.j-desc { margin: 10px 0 0; color: #333; font-size: 16px; }

/* site safety: the emergency card */
.safety { margin-top: 16px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px var(--gutter) 18px; position: relative; overflow: hidden; }
.safety::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(-45deg, var(--red) 0 10px, var(--ink) 10px 20px); }
.call999 { display: flex; align-items: center; gap: 14px; min-height: 64px; margin-top: 6px; padding: 8px 16px; border-radius: 10px; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; line-height: 1.15; }
.call999 .n { font-size: 40px; letter-spacing: .02em; }
.call999 small { font-weight: 400; font-size: 14px; }
.call999:focus-visible { outline-color: #fff; }
.safety-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
@media (min-width: 520px) { .safety-grid { grid-template-columns: 1.4fr 1fr; } }
.sf-k { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffb3b5; }
.sf-v { margin: 2px 0 0; font-size: 19px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.sf-sub { margin: 2px 0 0; font-size: 15px; color: #e6e6e6; }
.sf-link { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 700; }
.sf-hz { margin-top: 14px; }
.hz { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.hz li { position: relative; padding: 8px 10px 8px 34px; background: rgba(255,255,255,.09); border-radius: 6px; font-size: 16px; color: #fff; }
.hz li::before { content: '!'; position: absolute; left: 9px; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: #ffd23f; color: var(--ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; line-height: 1; }
.hz li.none { padding-left: 10px; color: #e6e6e6; }
.hz li.none::before { display: none; }

/* my status */
.mystatus { margin: 0 0 16px; padding: 16px; border-radius: var(--radius); display: grid; gap: 4px; scroll-margin-top: 80px; animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }
.mystatus .big { font-size: 22px; font-weight: 700; line-height: 1.2; }
.mystatus .small { font-size: 15px; }
.mystatus.ok { background: var(--green); color: #fff; }
.mystatus.amber { background: var(--amber-tint); color: var(--amber); border: 3px solid var(--amber-line); }
.mystatus.amber .big { font-size: 19px; }
.mystatus.err { background: var(--red-tint); color: var(--red-dark); }

/* steps */
.step { margin-top: 26px; scroll-margin-top: 70px; }
.step-h { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.step-h .num { width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; font-size: 17px; display: grid; place-items: center; flex: 0 0 auto; }
.step-sub { margin: 4px 0 12px; color: #333; }

.who-list { display: grid; gap: 8px; }
.who-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 60px; padding: 10px 14px; text-align: left;
  background: #fff; border: 2px solid var(--ink); border-radius: 10px; cursor: pointer; box-shadow: var(--shadow); -webkit-tap-highlight-color: transparent; }
.who-btn:active { transform: translateY(1px); }
.who-btn.signed { border-color: var(--line); background: #f7f7f5; box-shadow: none; cursor: default; }
.who-l { display: grid; min-width: 0; }
.who-n { font-size: 19px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.who-q { font-size: 14px; color: var(--muted); }
.who-r { font-weight: 700; font-size: 15px; white-space: nowrap; }
.who-r.ok { color: var(--green); }
.who-r.amber { color: var(--amber); }
.role-chip { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--red-tint); color: var(--red-dark); vertical-align: 2px; }
.client-link { margin-top: 6px; font-size: 15px; }

.chosen { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding: 8px 8px 8px 14px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.chosen-k { color: var(--muted); font-size: 15px; }
.chosen b { color: var(--ink); font-size: 18px; }

/* reading */
.readbar { position: sticky; top: 60px; z-index: 12; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); }
.readbar-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; color: var(--ink); }
.readbar-track { height: 8px; margin-top: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.readbar-track i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s ease; }
.acc { margin-top: 10px; display: grid; gap: 8px; }
.ra { background: #fff; border-radius: 10px; box-shadow: var(--shadow); scroll-margin-top: 124px; border-left: 5px solid var(--track); min-width: 0; }
.ra.read { border-left-color: var(--green); }
.ra.open { border-left-color: var(--red); }
.ra-h { margin: 0; font-size: inherit; }
.ra-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px 10px 10px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink); }
.ra-n { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.ra.read .ra-n { background: var(--green); border-color: var(--green); color: #fff; }
.ra-t { flex: 1; font-weight: 700; font-size: 17px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.ra-tick::after { content: '▾'; font-size: 20px; color: var(--ink); display: inline-block; transition: transform .2s ease; }
.ra.open .ra-tick::after { transform: rotate(180deg); }
.ra-b { padding: 0 12px 16px; border-top: 1px solid var(--line); min-width: 0; }
.ra-end { margin: 18px 0 12px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* RAMS body text */
.rams-content { font-size: 17px; color: #1c1c1c; overflow-wrap: anywhere; min-width: 0; }
.rams-content h3 { font-size: 19px; margin: 18px 0 6px; }
.rams-content h4 { font-size: 17px; color: var(--ink); margin: 18px 0 6px; }
.rams-content p { margin: 8px 0; }
.rams-content ul, .rams-content ol { padding-left: 22px; margin: 8px 0; }
.rams-content li { margin: 5px 0; }
.rams-content img { max-width: 100%; height: auto; margin: 8px 0; border-radius: 6px; }
.swipe-hint { margin: 12px 0 4px; font-size: 14px; font-weight: 700; color: var(--red-dark); text-align: right; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; border: 1px solid var(--field); border-radius: 6px; max-width: 100%; }
.tbl-scroll:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.rams-content table { border-collapse: collapse; width: 100%; font-size: 15px; }
.rams-content th, .rams-content td { border: 1px solid #b9b7b1; padding: 6px 8px; vertical-align: top; text-align: left; overflow-wrap: normal; }
.rams-content th { background: #f1f0ec; color: var(--ink); }
.rams-content td p, .rams-content th p { margin: 3px 0; }
.rams-content table.wide { width: 854px; min-width: 854px; table-layout: fixed; font-size: 14px; }
.rams-content table.wide ul { padding-left: 16px; }
@media (max-width: 480px) {
  .rams-content table.stack, .rams-content table.stack tbody, .rams-content table.stack tr, .rams-content table.stack td { display: block; width: 100%; }
  .rams-content table.stack td { border-width: 0 0 1px; padding: 10px 12px; }
  .rams-content table.stack tr td:last-child { border-bottom: 0; }
}

.confirm { display: grid; gap: 8px; margin-top: 16px; }
.confirm .check { min-height: 60px; }
.confirm .check input { width: 26px; height: 26px; }
.confirm .check:has(input:disabled) { cursor: not-allowed; background: #f7f7f5; }
.confirm .check:has(input:disabled) .name { color: #595959; }

/* signing */
.pad-wrap { position: relative; margin-top: 12px; height: 210px; max-width: 560px; background: #fff; border: 3px solid var(--ink); border-radius: 10px; touch-action: none; }
.pad-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 8px; touch-action: none; cursor: crosshair; }
.pad-line { position: absolute; left: 18px; right: 18px; bottom: 46px; border-bottom: 2px dashed #9a9893; pointer-events: none; }
.pad-hint { position: absolute; left: 18px; bottom: 14px; font-size: 15px; color: var(--muted); pointer-events: none; }
.pad-clear { position: absolute; top: 6px; right: 6px; z-index: 1; min-height: 44px; min-width: 64px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font-weight: 700; color: var(--ink); cursor: pointer; }
.pad-note { margin: 8px 0 0; color: var(--amber); font-weight: 700; font-size: 15px; }
.privacy { margin: 12px 0 0; font-size: 14px; color: #595959; }
.todo { margin: 14px 0 8px; font-size: 15px; font-weight: 700; color: var(--red-dark); }
.todo.ready { color: var(--green); }
.sign-btn { min-height: 60px; font-size: 20px; }
.sign-btn:disabled { background: #6f6f6f; border-color: #6f6f6f; opacity: 1; color: #fff; }

/* signed copy */
.view-copy { margin-top: 26px; }
.copy { margin-top: 26px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 0; scroll-margin-top: 70px; }
.copy-h { font-size: 21px; padding: 0 var(--gutter); }
.copy-sub { margin: 8px 0 0; padding: 0 var(--gutter); }
.copy-list { margin-top: 8px; }
.copy-list .when { font-size: 15px; white-space: nowrap; }
.copy-list .when.wait { color: var(--amber); }
.mark.wait { background: var(--amber-tint); color: var(--amber); }
.copy-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px var(--gutter) 0; }
.notyet { padding: 0 var(--gutter); }
.nt-k { margin: 14px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nt-v { margin: 2px 0 0; color: var(--red-dark); font-weight: 700; }
@media (max-width: 359px) { .copy-btns { grid-template-columns: 1fr; } .j-customer { font-size: 23px; } .copy-list .when { white-space: normal; } .who-btn { flex-wrap: wrap; } }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
@keyframes flash { 0% { background: var(--green-tint); } 100% { background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Crew signing screen — fix round 1 (additive) */
.banner.rejected { background: var(--red-tint); color: var(--red-dark); border: 2px solid var(--red-dark); }
.mystatus.info { background: #fff; color: var(--ink); border: 3px solid var(--ink); }
.mystatus.info .big { font-size: 19px; }
.readbar.done #read-count { color: var(--green); }

/* Public verify page (/v/<token>) - additive */
.verify .sign-main { padding-top: 20px; }
.verify .vcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px var(--gutter); margin-top: 14px; }
.verify .vcard:first-child { margin-top: 0; border-top: 6px solid var(--ink); }
.v-seal { display: inline-flex; align-items: center; gap: 8px; }
.v-seal .tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 14px; font-weight: 700; }
.verify h1 { font-size: 28px; letter-spacing: -.01em; margin-top: 4px; }
.v-h2 { font-size: 18px; margin-bottom: 10px; }
.v-facts { margin: 14px 0 0; }
.v-facts > div { padding: 10px 0; border-top: 1px solid var(--line); }
.v-facts dt { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.v-facts dd { margin: 2px 0 0; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.v-facts .ok { color: var(--green); font-weight: 700; font-size: 16px; }
.v-facts .wait { color: var(--amber); font-weight: 700; font-size: 16px; }
.v-crew { margin: 14px 0 0; padding: 14px var(--gutter); border-radius: var(--radius); font-size: 20px; font-weight: 700; }
.v-crew.done { background: var(--green); color: #fff; }
.v-crew.part { background: var(--amber-tint); color: var(--amber); border: 2px solid var(--amber-line); }
.v-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.v-table th { text-align: left; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 8px 0; border-bottom: 2px solid var(--ink); }
.v-table td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text); }
.v-table td:last-child { white-space: nowrap; padding-right: 0; }
@media (max-width: 539px) {
  .v-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .v-table, .v-table tbody, .v-table tr, .v-table td { display: block; }
  .v-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .v-table td { border: 0; padding: 2px 0; display: flex; gap: 10px; white-space: normal; }
  .v-table td::before { content: attr(data-l); flex: 0 0 104px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
}
.v-sub { display: block; margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.fatal .v-sub { font-weight: 400; }
.v-fp { margin: 0; font: 700 24px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .08em; color: var(--ink); overflow-wrap: anywhere; }
.v-foot { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter) 40px; font-size: 14px; color: var(--muted); text-align: center; }
