/* Site chrome and PDF tool styles (tokens come from tool.css) */
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.nav a { color: var(--accent); font-weight: 600; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.nav a:hover { text-decoration: underline; }
.lang a { padding: 6px 14px; min-height: 40px; display: inline-flex; align-items: center; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.crumb { margin-top: 14px; font-size: 14px; color: var(--muted); }
.crumb a { color: var(--muted); }
.content { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.content .card h2 { font-size: 20px; }
.content h3 { margin: 0; font-size: 17px; }
.prose { display: flex; flex-direction: column; gap: 10px; }
.prose p { max-width: 68ch; }
.prose ol, .prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; max-width: 68ch; }
.prose a, .foot a, .crumb a { color: var(--accent); }
.tablewrap { overflow-x: auto; }
table.rt { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 16px; }
table.rt th, table.rt td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.rt th { font-size: 14px; color: var(--muted); font-weight: 600; border-top: 0; }
table.rt td.mono { font-size: 15px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; padding: 4px 0; }
.faq details p { padding: 0 0 12px; max-width: 68ch; color: var(--fg); }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.links a { display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--fg); text-decoration: none; font-weight: 600; }
.links a small { font-weight: 400; color: var(--muted); font-size: 14px; }
.links a:hover { border-color: var(--accent); }
.foot { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; }
.foot nav a { min-height: 40px; display: inline-flex; align-items: center; }

/* PDF tools */
.pcol { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
select { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--surface); color: var(--fg); }
.flist { display: flex; flex-direction: column; gap: 8px; }
.frow { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.frow .fname { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.frow .fname b { font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.frow .fname .mono { font-size: 13px; color: var(--muted); }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex: none; background: var(--line); }
.rowbtns { display: flex; gap: 6px; flex: none; }
.mini { width: 44px; height: 44px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 4px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; font-family: var(--font-mono); font-size: 14px; color: var(--fg); }
.chip:hover { border-color: var(--accent); }
#presult { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) { .nav { margin-top: 0; } }

/* form kit stepper */
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps li { flex: 1 0 auto; }
.stp { width: 100%; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); cursor: pointer; font: inherit; }
.stp .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--line); color: var(--fg); }
.stp .l { font-size: 13px; font-weight: 600; white-space: nowrap; }
.stp.cur { border-color: var(--accent); color: var(--fg); background: var(--surface); }
.stp.cur .n { background: var(--accent); color: var(--accent-ink); }
.stp.ok .n { background: var(--ok); color: var(--surface); }
.kitnav { display: flex; gap: 10px; margin-top: 14px; }
.kitnav .btn { flex: 1; }
.kitnav .btn[hidden] { display: none; }
.linkbtn { border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0 4px; }
.mark.wait { background: var(--muted); }
#ptabs { display: flex; flex-wrap: wrap; gap: 1.5px; background: var(--line); }
#ptabs button { flex: 1 1 140px; background: var(--surface-2); border-left: 0 !important; }
#ptabs button[aria-selected="true"] { background: var(--accent); }
#cardDone .dl { display: grid; gap: 10px; }
[hidden]{display:none!important}

/* Clean Light theme */
body { font-size: 16px; line-height: 1.55; padding-top: 0; }
.top { position: sticky; top: 0; z-index: 10; background: var(--surface); margin: 0 -16px; padding: 10px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 1012px) { .top { margin: 0 -16px; border-radius: 0 0 16px 16px; } }
.nav { margin-top: 12px; gap: 8px; }
.nav a { padding: 0 16px; min-height: 40px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); font-weight: 500; font-size: 15px; text-decoration: none !important; }
.nav a[aria-current="page"] { background: var(--accent-tint); border-color: var(--accent-tint); color: var(--accent); font-weight: 600; }
.nav a:hover { background: var(--surface-2); }
.lang { border-radius: 999px; border-width: 1px; }
.lang a[aria-current="true"] { background: var(--accent-tint); color: var(--accent); }
h1 { font-weight: 700; letter-spacing: -0.015em; }
.lead { font-size: 17px; }
.card { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 20px; }
@media (max-width: 480px) { .card { padding: 16px; border-radius: 16px; } }
h2 { font-size: 19px; font-weight: 600; }
.btn { border-radius: 999px; border-width: 1px; min-height: 48px; padding: 8px 24px; font-weight: 600; }
.btn.primary { box-shadow: 0 1px 2px rgba(26,115,232,.35); }
.btn.primary:hover { filter: brightness(1.07); }
.btn:not(.primary):hover { background: var(--accent-tint); }
.opt { border-radius: 14px; border-width: 1px; background: var(--surface); }
.opt:hover { border-color: var(--accent); }
.opt[aria-pressed="true"] { border-width: 2px; padding-top: 9px; padding-bottom: 9px; }
.tabs { border-radius: 999px; border-width: 1px; padding: 4px; gap: 4px; background: var(--surface-2); }
.tabs button { border-radius: 999px; min-height: 42px; }
.tabs button + button { border-left: 0; }
#ptabs { border-radius: 20px; background: var(--surface-2); gap: 4px; }
#ptabs button { border-radius: 999px; background: transparent; }
#ptabs button[aria-selected="true"] { background: var(--accent); }
.stage { border-radius: 16px; border-style: dashed; }
input[type="number"], input[type="text"], input[type="password"], select { border-radius: 12px; border-width: 1px; background: var(--surface); }
input[type="password"] { width: 100%; min-height: 46px; padding: 6px 10px; color: var(--fg); font-size: 16px; }
input:focus, select:focus { border-color: var(--accent); outline: 2px solid var(--accent-tint); }
.verdict { border-radius: 14px; }
.specs div, .frow { border-radius: 12px; }
.links a { border-radius: 14px; border-width: 1px; background: var(--surface); box-shadow: var(--shadow); }
.links a:hover { border-color: var(--accent); background: var(--accent-tint); }
.chip { border-width: 1px; background: var(--surface); }
.stp { border-width: 1px; border-radius: 14px; background: var(--surface); }
.stp.cur { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }
.mini { border-radius: 999px; border-width: 1px; }
.faq summary { font-weight: 500; }
.foot { padding-top: 12px; }
/* numbered cards on the tool pages */
.grid { counter-reset: sec; }
.grid > .card > h2:first-child::before { counter-increment: sec; content: counter(sec); display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-size: 15px; font-weight: 700; vertical-align: 2px; }
#cardDocs, #cardDone { }
.steps li { flex: 1 1 0; min-width: 0; }
.stp { padding: 4px 4px; }
.stp .l { font-size: 12px; }

/* App shell with left sidebar */
body { padding: 0; background: var(--bg); }
.shell { display: flex; min-height: 100vh; }
.side { width: 264px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px; }
.sidetop { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); }
.brand span { font-size: 19px; font-weight: 700; color: var(--fg); letter-spacing: -0.01em; }
.sidenav { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.sg { display: flex; flex-direction: column; gap: 2px; }
.sh { margin: 4px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.si { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--fg); text-decoration: none; font-weight: 500; font-size: 15px; }
.si svg { flex: none; color: var(--muted); }
.si:hover { background: var(--surface-2); }
.si.on { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.si.on svg { color: var(--accent); }
.sidefoot { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 14px 12px 4px; border-top: 1px solid var(--line); margin-top: 14px; }
.sidefoot a { color: var(--muted); font-size: 13px; text-decoration: none; }
.sidefoot a:hover { text-decoration: underline; }
.main { flex: 1; min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); box-shadow: none; border-radius: 0; }
.grow { flex: 1; }
.app { max-width: 1040px; margin: 0 auto; padding: 8px 24px 48px; }
.pagetitle { margin-top: 18px; font-size: 28px; text-wrap: balance; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--fg); display: inline-grid; place-items: center; cursor: pointer; }
.iconbtn:hover { background: var(--surface-2); }
.only-m { display: none; }
.scrim { display: none; }
@media (max-width: 899px) {
  .only-m { display: inline-grid; }
  .brand.only-m { display: flex; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 8px 32px rgba(0,0,0,.25); width: min(300px, 86vw); }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(15,20,30,.45); }
  .top { padding: 8px 12px; }
  .app { padding: 4px 16px 40px; }
  .pagetitle { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* rotate bar + signature pad */
.rotbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini.rot { width: auto; height: auto; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 2px; font-size: 20px; line-height: 1.1; }
.mini.rot span { font-size: 11px; font-weight: 500; color: var(--muted); text-align: center; }
.presets .chips { margin-top: 6px; }
.padwrap { position: fixed; inset: 0; z-index: 50; background: rgba(15,20,30,.55); display: grid; place-items: center; padding: 12px; overflow-y: auto; }
.padbox { background: var(--surface); border-radius: 20px; padding: 18px; width: min(640px, 100%); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
#padCv { width: 100%; height: auto; aspect-ratio: 5 / 2; background: #fff; border: 1.5px dashed var(--line); border-radius: 14px; touch-action: none; cursor: crosshair; }
.padbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.padbtns .btn { flex: 1 1 120px; }

/* sidebar search, hub, checklist */
.sidesearch { position: relative; margin: 0 4px 12px; }
.sidesearch .sicon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; }
#sideSearch, #hubSearch { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); padding: 0 14px 0 38px; font: inherit; color: var(--fg); }
#hubSearch { padding-left: 16px; min-height: 50px; background: var(--surface); font-size: 16px; }
#sideSearch:focus, #hubSearch:focus { border-color: var(--accent); background: var(--surface); outline: 2px solid var(--accent-tint); }
.sideres { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sideres .si { height: auto; min-height: 48px; padding-top: 4px; padding-bottom: 4px; }
.sideres small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.sq { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.hubsearch { margin-bottom: 12px; }
.hubgroup { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.hubgroup h3 { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.chip[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); font-weight: 600; font-family: inherit; }
.chip { font-family: inherit; }
.rowlinks { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 13px; font-weight: 600; vertical-align: 2px; }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.clist li { border-top: 1px solid var(--line); }
.clist li:first-child { border-top: 0; }
.clist .check { padding: 4px 0; }
.chk .btn { align-self: flex-start; }

.kitcheck { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.kitcheck h3 { font-size: 16px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.pcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pcard.gone { opacity: .45; }
.pimg { width: 100%; height: 150px; display: grid; place-items: center; overflow: hidden; background: #fff; border-radius: 8px; }
.pimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pimg .ph { color: var(--muted); font-size: 22px; }
.pbtns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pbtns .mini { width: 34px; height: 34px; font-size: 15px; }
.pbtns .mini[disabled] { opacity: .35; cursor: default; }
.pcard .pno { font-size: 12px; color: var(--muted); }
.pcol:has(.pgrid) { max-width: none; }

/* face, camera, tabs in the signature pad */
.facebtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.facebtns .btn { min-height: 44px; padding: 6px 12px; font-size: 14px; }
#faceMsg:empty { display: none; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; align-self: flex-start; }
.segb { border: 0; background: transparent; min-height: 40px; padding: 0 20px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segb.on { background: var(--accent); color: var(--accent-ink); }
.cambox { max-width: 520px; }
.camstage { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 62vh; margin: 0 auto; width: 100%; }
.camstage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camguide { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 2px rgba(0,0,0,.7)); pointer-events: none; }
.camhint { min-height: 2.6em; font-weight: 600; color: var(--fg); text-align: center; }

.psview{width:100%;max-width:420px;height:auto;margin:0 auto;display:block;border:1px solid var(--line);box-shadow:var(--shadow);background:#fff}
.reportline{font-size:14px;color:var(--muted)}
.reportline a{color:var(--accent)}
.remind .f{max-width:320px}
.remind input[type="date"]{min-height:46px;border:1px solid var(--line);border-radius:12px;padding:6px 10px;background:var(--surface);color:var(--fg);font:inherit}
