@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --paper: #eef2f8; --surface: #fff; --surface-2: #f5f8fc; --ink: #0d1b2e; --ink-2: #34465f; --ink-3: #55667e;
  --line: #dbe3ee; --line-strong: #8796ab; --brand: #1565d8; --brand-strong: #0b47a8; --brand-wash: #e3eefc;
  --glow: #2f8bff; --navy: #07101f; --navy-2: #0c1d3a; --silver: #e6ebf2;
  --side: #0a1730; --warn: #8a5300; --warn-wash: #fbefd6; --danger: #a3372c; --danger-wash: #f9e6e2; --ok: #1f6b3a; --ok-wash: #e1f1e6;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --t-xs: 12px; --t-sm: 13.5px; --t-md: 15px; --t-lg: 17px; --t-xl: 21px; --t-2xl: 28px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --tap: 44px; --head: 60px;
  --shadow-pop: 0 8px 24px rgba(10, 23, 48, .18);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: var(--t-md); line-height: 1.75; color: var(--ink); background: var(--paper); min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.4; font-weight: 700; }
.ltr { direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); } .small { font-size: var(--t-sm); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* buttons, tags */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r-md); border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight: 600; font-size: var(--t-sm); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-strong); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.red { background: var(--surface); color: var(--danger); border-color: #e2b9b3; }
.btn.red:hover { background: var(--danger-wash); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--brand-wash); }
.btn.sm { min-height: var(--tap); padding: 0 var(--s3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.tag { display: inline-flex; align-items: center; padding: 0 var(--s2); border-radius: var(--r-sm); font-size: var(--t-xs); font-weight: 600; line-height: 22px; background: #e8edf4; color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--ok-wash); color: var(--ok); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--head) 1fr; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s4); height: var(--head); background: linear-gradient(90deg, var(--navy-2), var(--navy)); border-bottom: 1px solid rgba(47, 139, 255, .45); box-shadow: 0 1px 12px rgba(47, 139, 255, .25); color: var(--silver); min-width: 0; }
.topbar .btn.ghost { background: transparent; color: var(--silver); border-color: rgba(230, 235, 242, .35); }
.topbar .btn.ghost:hover, .topbar .menu summary:hover { background: rgba(47, 139, 255, .18); }
.topbar .btn.quiet { color: var(--silver); }
.topbar .pos span { color: #b7c3d4; }
.topbar .pos select { background: var(--navy-2); color: var(--silver); border-color: rgba(230, 235, 242, .35); }
.topbar .avatar { background: var(--glow); color: #fff; }
.topbar .pop { color: var(--ink); }
.topbar :focus-visible { outline-color: var(--glow); }
.brand { display: flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: var(--t-lg); white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand-nm { font-style: italic; letter-spacing: .01em; direction: ltr; unicode-bidi: isolate; }
.brand-g { color: var(--glow); }
.grow { flex: 1; }
.burger { display: none; }
.pos select, .pos span { max-width: 240px; min-height: 36px; font-size: var(--t-sm); }
.pos select { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); padding: 0 var(--s2); min-height: var(--tap); }
.pos span { color: var(--ink-3); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s2); cursor: pointer; border-radius: var(--r-md); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--brand-wash); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-strong); font-weight: 700; font-size: var(--t-sm); flex: none; }
.pop { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: var(--s2); display: grid; z-index: 30; }
.pop a, .pop button { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--s3); border: 0; background: none; border-radius: var(--r-sm); text-align: start; cursor: pointer; font-size: var(--t-sm); }
.pop a:hover, .pop button:hover { background: var(--brand-wash); }
.body { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; background: linear-gradient(to left, var(--side) 250px, transparent 250px); }
.side { position: sticky; top: var(--head); height: calc(100vh - var(--head)); overflow-y: auto; background: var(--side); padding: var(--s4) var(--s3); display: grid; align-content: start; gap: 2px; }
.side a { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--s3); border-radius: var(--r-md); color: #c5d2e4; font-size: var(--t-sm); border-inline-start: 3px solid transparent; }
.side a:hover { background: rgba(255, 255, 255, .08); }
.side a.on { background: rgba(47, 139, 255, .2); border-inline-start-color: var(--glow); color: #fff; font-weight: 700; }
.side :focus-visible { outline-color: #fff; }
.scrim { display: none; }
.main { padding: var(--s5) var(--s5) var(--s7); min-width: 0; }
.page-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.page-h h1 { font-size: var(--t-xl); }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--s4); -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s4); color: var(--ink-3); font-size: var(--t-sm); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; flex: none; }
.tabs a.on { color: var(--ink); font-weight: 700; border-color: var(--brand); }

/* content blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pad { padding: var(--s5); }
.narrow { max-width: 680px; }
.empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s7) var(--s4); text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty svg.i { width: 40px; height: 40px; stroke-width: 1.4; }
.empty.bad { color: var(--danger); border-color: #e2b9b3; background: var(--danger-wash); }
.loading { display: flex; gap: var(--s3); padding: var(--s5); }
.sk { width: 100px; height: 12px; border-radius: 6px; background: #e1e7f0; animation: sk 1.2s ease-in-out infinite alternate; }
@keyframes sk { to { opacity: .35; } }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.toolbar .grow { flex: 0 0 auto; margin-inline-start: auto; }
.search { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); flex: 1 1 220px; max-width: 380px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; min-height: 40px; }
.search:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.flt { min-height: var(--tap); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); padding: 0 var(--s3); }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tbl th { text-align: start; padding: var(--s3) var(--s4); background: var(--surface-2); color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: var(--s2) var(--s4); border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.rowlink { display: inline-flex; align-items: center; min-height: var(--tap); border: 0; background: none; padding: 0; color: var(--brand-strong); font-weight: 600; cursor: pointer; text-align: start; }
.rowlink:hover { text-decoration: underline; }
.acts { width: 1%; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) 0; min-height: 56px; }
.pg { display: flex; gap: var(--s2); }
.tree, .tree ul { list-style: none; padding: 0; }
.tree .tree { padding-inline-start: var(--s5); border-inline-start: 1px solid var(--line); margin-inline-start: var(--s3); }
.node { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s2); border: 0; background: none; border-radius: var(--r-sm); cursor: default; font-weight: 600; }
a.node, button.node { cursor: pointer; color: var(--brand-strong); }
a.node:hover, button.node:hover { background: var(--brand-wash); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); }
.kv dt { color: var(--ink-3); }
.dash { display: grid; gap: var(--s5); }
.hello h2 { font-size: var(--t-2xl); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); }
.stat { padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.stat b { display: block; font-size: var(--t-2xl); line-height: 1.2; }
.stat span { font-size: var(--t-xs); color: var(--ink-3); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s2); }
.quick .btn { justify-content: flex-start; min-height: 56px; }

/* forms */
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); min-width: 0; }
.field input, .field select, .field textarea { min-height: var(--tap); padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-weight: 400; color: var(--ink); width: 100%; min-width: 0; }
.field input[readonly] { background: var(--surface-2); color: var(--ink-3); }
.field input.err, .field select.err { border: 2px solid var(--danger); }
.field.check label { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); cursor: pointer; font-weight: 500; }
.field.check input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--brand); }
.req { color: var(--danger); }
.errmsg { color: var(--danger); font-weight: 500; font-size: var(--t-xs); line-height: 1.6; }
.errmsg:empty { display: none; }
.form-err { padding: var(--s3); border-radius: var(--r-md); background: var(--danger-wash); color: var(--danger); font-size: var(--t-sm); }
.ok-box { padding: var(--s4); border-radius: var(--r-md); background: var(--ok-wash); color: var(--ok); font-weight: 600; }
input.code { font-size: var(--t-xl); letter-spacing: .3em; text-align: center; }
.enroll { display: flex; flex-direction: column; gap: var(--s4); width: 100%; min-width: 0; }
.enroll-start { display: grid; gap: var(--s4); text-align: center; }
.enroll-start .btn-row, .enroll-start .btn-row .btn { width: 100%; flex: 1; }
.qr { display: flex; justify-content: center; align-items: center; align-self: center; width: 100%; max-width: 220px; padding: var(--s3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); line-height: 0; box-sizing: border-box; margin-inline: auto; }
.qr svg { display: block; width: 100%; max-width: 220px; height: auto; }
.enroll-help { font-size: var(--t-sm); color: var(--ink-2); text-align: center; line-height: 1.6; margin: 0; }
.secret-row { display: flex; align-items: center; justify-content: center; gap: var(--s2); width: 100%; min-width: 0; }
.secret { padding: var(--s2) var(--s3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); font-family: Consolas, monospace; letter-spacing: .08em; overflow-wrap: anywhere; user-select: all; }
.secret-row .secret { font-size: var(--t-xs); letter-spacing: .05em; text-align: center; word-break: normal; overflow-wrap: normal; line-height: 1.6; max-width: 100%; min-width: 0; flex: 0 1 auto; }
.secret-row .btn { flex-shrink: 0; }
.enroll .form { width: 100%; }
.enroll .btn-row, .enroll .btn-row .btn { width: 100%; flex: 1; }
.enroll-side { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; width: 100%; }
.auth-box .enroll-card { width: 100%; min-width: 0; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(6, 14, 30, .55); display: grid; place-items: center; padding: var(--s4); }
.modal-box { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: var(--s5); display: grid; gap: var(--s4); }
.modal-h { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.modal-h h2 { font-size: var(--t-lg); }
#app-update progress { width: 100%; }
.upd-notes { white-space: pre-line; }
#toast { position: fixed; inset-inline: var(--s4); bottom: var(--s4); margin-inline: auto; max-width: 440px; z-index: 60; background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: var(--t-sm); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s; text-align: center; }
#toast.show { opacity: 1; transform: none; }
#toast.err { background: var(--danger); }

/* auth screens */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s5) var(--s4); background: radial-gradient(ellipse at 50% 0%, #123c7a 0%, var(--navy-2) 40%, var(--navy) 80%); align-content: center; gap: var(--s4); }
.auth-banner { width: 100%; max-width: 440px; border-radius: var(--r-lg); box-shadow: 0 0 32px rgba(47, 139, 255, .3); }
.auth-box { border-top: 3px solid var(--glow) !important; }
.auth-box { width: 100%; max-width: 440px; display: grid; gap: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6) var(--s5); box-shadow: var(--shadow-pop); }
.auth-box .brand { justify-content: center; }
.auth-box h1 { font-size: var(--t-xl); text-align: center; }
.auth-box .btn-row .btn { flex: 1; }
.auth-foot { text-align: center; }

/* print preview */
.print-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); align-items: center; margin-bottom: var(--s4); }
.seg { display: flex; flex-wrap: wrap; gap: 2px; background: #e4eaf2; border-radius: var(--r-md); padding: 3px; }
.seg button { min-height: 40px; padding: 0 var(--s3); border: 0; border-radius: 8px; background: transparent; font-size: var(--t-sm); color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); font-weight: 700; color: var(--ink); }
.sheet-wrap { position: relative; background: #cfd7e3; border-radius: var(--r-lg); padding: var(--s4); display: grid; justify-items: center; overflow: hidden; }
.pages { display: flex; flex-direction: column; gap: 8mm; transform-origin: top center; }
.pg-sheet.probe { position: absolute; top: 0; visibility: hidden; pointer-events: none; }
.pg-sheet { gap: 0; background: #fff; color: #000; box-shadow: 0 2px 12px rgba(0, 0, 0, .25); padding: 16mm 18mm; display: flex; flex-direction: column; overflow: hidden; font-size: 12.5pt; line-height: 1.9; --gap: 5mm; }
.pg-sheet.a4 { width: 210mm; height: 297mm; }
.pg-sheet.a5 { width: 148mm; height: 210mm; padding: 12mm 14mm; font-size: 10pt; --gap: 3mm; }
.pg-head { display: flex; flex-direction: column; gap: var(--gap); margin-bottom: var(--gap); }
.pl { text-align: justify; } .ln { height: var(--lh); white-space: nowrap; text-align: justify; text-align-last: justify; } .ln.end { text-align-last: start; } /* a line is one box: a paragraph split over two pages must still justify its first part */
.pg-sheet h3 { font-size: 1.1em; }
.lh { display: flex; align-items: center; gap: 5mm; border-bottom: 2px solid var(--brand); padding-bottom: 4mm; }
.lh-logo { width: 18mm; height: 18mm; border: 1.5px dashed #888; display: grid; place-items: center; font-size: 9pt; color: #888; flex: none; }
.lh-logo.has { width: auto; height: 20mm; border: 0; } .lh-logo img { max-height: 100%; max-width: 45mm; object-fit: contain; }
.sign img { display: block; margin: 0 auto 2mm; max-height: 20mm; max-width: 50mm; object-fit: contain; }
.lh b, .lh span { display: block; line-height: 1.5; } .lh b { font-size: 1.2em; } .lh span { color: #555; font-size: .85em; }
.sheet-meta { align-self: flex-end; display: grid; grid-template-columns: auto auto; gap: 0 4mm; font-size: .9em; } /* flex-end = the LEFT of the page in RTL: labels in one column, values in the next */
.sheet-meta span { white-space: nowrap; }
.signs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6mm; width: fit-content; min-width: 50%; max-width: 100%; margin-inline-start: auto; margin-top: 1.9em; } /* directly after the text, in the left half (auto start margin = push to the left in RTL), text centered */
.sign { text-align: center; min-width: 40mm; } .sign b, .sign span { display: block; }
.lf { margin-top: auto; border-top: 1px solid #999; padding-top: 3mm; font-size: .8em; color: #444; text-align: center; }

/* tables as cards, drawer, tighter header on small screens */
@media (max-width: 900px) {
  .body { display: block; background: none; }
  .burger { display: inline-flex; }
  .side { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; height: auto; width: min(300px, 86vw); z-index: 40; transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s; padding-top: var(--s5); }
  body.drawer-open .side { transform: none; visibility: visible; }
  body.drawer-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(6, 14, 30, .55); }
  .main { padding: var(--s4) var(--s3) var(--s7); }
  .brand span { display: none; }
  .who-nm { display: none; }
  .topbar { gap: var(--s1); padding: 0 var(--s2); }
  .topbar .btn.ghost.sm { padding: 0 var(--s2); }
  .menu summary { padding: 0 var(--s1); }
  .pos { min-width: 0; }
  .pos select, .pos span { max-width: 26vw; }
  .main { overflow-x: clip; } /* a wide block scrolls inside its own box, never the whole page */
  .pad { padding: var(--s4); }
  .sheet-wrap { padding: var(--s2); }
}
@media (max-width: 700px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .table-wrap { background: transparent; border: 0; overflow: visible; }
  .tbl tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s2); padding: var(--s2) var(--s4); }
  .tbl td { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); border: 0; padding: 2px 0; min-height: 32px; text-align: end; }
  .tbl td::before { content: attr(data-label); color: var(--ink-3); font-size: var(--t-xs); flex: none; }
  .tbl td > * { min-width: 0; overflow-wrap: anywhere; }
  .tbl td.acts { width: auto; justify-content: flex-end; }
  .tbl td.acts::before { content: none; }
  .tbl tbody tr:hover { background: var(--surface); }
  .toolbar .grow { margin-inline-start: 0; flex: 1 1 100%; }
  .search { max-width: none; }
}
@media print {
  body.is-print { background: #fff; }
  body.is-print .topbar, body.is-print .side, body.is-print .page-h, body.is-print .tabs, body.is-print .print-bar, body.is-print .no-print, body.is-print #toast, body.is-print .scrim { display: none !important; }
  body.is-print .main { padding: 0; } body.is-print .body { display: block; } body.is-print .shell { display: block; }
  body.is-print .sheet-wrap { padding: 0; background: #fff; display: block; }
  .pages { zoom: 1 !important; display: block; }
  .pg-sheet { box-shadow: none; margin: 0; break-after: page; } .pg-sheet:last-child { break-after: auto; } /* every page is one fixed paper box (@page margin is 0, the box padding is the margin) */
  .signs, .sign, .lh, .sheet-meta, .lf { break-inside: avoid; }
}
.sig-prev { padding: var(--s2) 0; min-height: 48px; } .sig-prev img { max-height: 24mm; max-width: 70mm; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: var(--r-sm); }
.sess { display: grid; gap: var(--s4); } .sess .acts { display: inline-flex; gap: var(--s2); flex-wrap: wrap; }
.sigpad { display: grid; gap: var(--s3); }
.sigpad-canvas-wrap { background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .06); }
.sigpad-canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sigpad-bar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.sig-draw-modal { display: grid; gap: var(--s3); }
.sig-qr-box { display: grid; justify-items: center; gap: var(--s3); text-align: center; }
.sig-qr-frame { background: #fff; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); line-height: 0; }
.sig-qr-frame svg { display: block; max-width: 100%; height: auto; }
.sig-countdown { font-weight: 700; color: var(--ink-2); font-size: var(--t-md); }
.sig-url-sel { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); }

/* org / role designer */
.dz { display: grid; gap: var(--s3); }
.dz-bar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.dz-zoom { margin-inline-start: auto; display: inline-flex; gap: 2px; }
.btn.on { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-strong); }
.dz-msg { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--danger-wash); color: var(--danger); font-weight: 600; font-size: var(--t-sm); }
.dz-msg[hidden], .dz-sel[hidden], .dz-prev[hidden] { display: none; }
.dz-sel, .dz-prev { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.dz-prev { border-color: var(--brand); background: #f1f6fd; }
.dz-sel-h, .dz-prev-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.dz-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 0 0 var(--s2); padding-inline-start: var(--s3); border-radius: 99px; background: #efe9fb; color: #4c2a8a; font-size: var(--t-sm); font-weight: 600; }
.chip.add { background: var(--ok-wash); color: var(--ok); }
.chip.del { background: var(--danger-wash); color: var(--danger); text-decoration: line-through; }
.chip .btn { min-height: var(--tap); min-width: var(--tap); padding: 0; }
.dz-staged { padding-inline-start: var(--s5); display: grid; gap: 2px; }
.dz-staged li { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.dz-sum { font-weight: 700; color: var(--brand-strong); }
.dz-legend { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 22px; height: 14px; border: 2px solid var(--brand-strong); border-radius: 4px; background: var(--brand); }
.lg.k-group::before { border: 2px dashed #7c3aed; background: #f5f3ff; border-radius: 9px; }
.lg.k-pos::before { border-color: #0e7490; background: #fff; }
.lg.ed::before { width: 24px; height: 0; border: 0; border-top: 2px solid #7c3aed; border-radius: 0; background: none; }
.dz-vp { position: relative; height: min(66vh, 640px); min-height: 360px; overflow: hidden; background: var(--surface) radial-gradient(circle, #cfd8e4 1px, transparent 1.4px) 0 0 / 22px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); touch-action: none; cursor: grab; user-select: none; }
.dz-vp.panning { cursor: grabbing; }
.dz-vp[hidden] { display: none; }
.dz-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; direction: ltr; }
.dz-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.dz-c { fill: none; stroke: #a7b3c4; stroke-width: 1.6; }
.dz-i { fill: none; stroke: #7c3aed; stroke-width: 2.2; }
.dz-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
.dz-ie:hover .dz-i { stroke: var(--danger); stroke-width: 3; }
.dz-ie.add .dz-i { stroke: var(--ok); stroke-dasharray: 7 5; }
.dz-ie.del .dz-i { stroke: var(--danger); stroke-dasharray: 3 6; opacity: .75; }
.dz-ar { fill: #7c3aed; } .dz-ar-add { fill: var(--ok); } .dz-ar-del { fill: var(--danger); }
.dn { position: absolute; box-sizing: border-box; direction: rtl; display: grid; align-content: center; gap: 0; padding: 4px 12px; border: 2px solid #0e7490; border-radius: 8px; background: #fff; color: var(--ink); cursor: grab; touch-action: none; user-select: none; overflow: hidden; line-height: 1.5; }
.dn-t { font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-k { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn.k-unit { background: var(--brand); border-color: var(--brand-strong); color: #fff; }
.dn.k-unit .dn-k { color: #d6e5fb; }
.dn.k-group { border: 2px dashed #7c3aed; background: #f5f3ff; border-radius: 22px; }
.dn.sel { box-shadow: 0 0 0 4px rgba(21, 101, 216, .35); }
.dn.dragging { opacity: .35; }
.dn.drop { outline: 4px dashed #d97706; outline-offset: 3px; }
.dn.hit { background: var(--warn-wash); border-color: #d97706; }
.dn.k-group.hit { background: var(--warn-wash); }
.dn-fx { position: absolute; bottom: 2px; inset-inline-end: 8px; font-size: 11px; font-weight: 700; color: var(--warn); }
.dn:focus-visible { outline: 3px solid #d97706; outline-offset: 2px; }
.dn-ghost { position: fixed; z-index: 70; pointer-events: none; transform: translate(-50%, -135%); padding: 6px 16px; background: #fff; border: 2px solid #0e7490; border-radius: 8px; box-shadow: var(--shadow-pop); font-weight: 700; font-size: var(--t-sm); }
.dn-ghost.k-group { border: 2px dashed #7c3aed; background: #f5f3ff; border-radius: 22px; }
.dn-ghost.k-unit { background: var(--brand); color: #fff; }
.dz-hint { margin: 0; }
.tag.bad { background: var(--danger-wash); color: var(--danger); }
.tag.inh { background: #efe9fb; color: #4c2a8a; }
.fx { display: grid; gap: var(--s4); }
.fx-g h3 { font-size: var(--t-md); margin-bottom: var(--s2); }
.fx select { min-height: var(--tap); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); padding: 0 var(--s2); }
.fx .acts { display: flex; flex-wrap: wrap; gap: var(--s1); }
.why { display: grid; gap: var(--s3); }
.why-s { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-md); background: var(--ok-wash); }
.why-s.deny { background: var(--danger-wash); }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.cn { padding: 2px var(--s3); border-radius: 99px; background: #fff; border: 1px solid var(--line-strong); font-size: var(--t-sm); font-weight: 600; }
.cn.end { border-color: var(--brand); background: var(--brand-wash); }
.why-s.deny .cn.end { border-color: var(--danger); background: #fff; color: var(--danger); }
.arr { color: var(--ink-3); font-weight: 700; }
@media (max-width: 700px) {
  .dz-vp { height: min(60vh, 520px); min-height: 320px; }
  .fx .tbl td.acts { justify-content: flex-start; flex-wrap: wrap; }
  .dz-zoom { margin-inline-start: 0; flex: 1 1 100%; justify-content: flex-end; }
}
.fx td.acts { width: auto; min-width: 330px; }
.fx td.acts .btn.sm { padding: 0 var(--s2); }
@media (max-width: 700px) { .fx td.acts { min-width: 0; } }
.dz-zoom .btn { border-color: var(--line-strong); background: var(--surface); font-size: var(--t-lg); }

/* pkg5: long text + letter-type form builder */
.field textarea { min-height: 7rem; padding: var(--s2) var(--s3); line-height: 1.8; resize: vertical; }
.fb-row { border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: var(--s3); margin: 0 0 var(--s3); display: grid; gap: var(--s2); }
.fb-row legend { padding: 0 var(--s2); font-weight: 700; }
.btn-row.end { justify-content: flex-end; margin-top: var(--s3); }
.att-list { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: var(--s2); }
.att-list li { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.att-list li a { flex: 1 1 12rem; overflow-wrap: anywhere; }
.atts { margin-top: var(--s4); border-top: 1px solid var(--line-strong); padding-top: var(--s3); }
.rc-list { max-height: 16rem; overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: var(--s2); display: grid; gap: var(--s1); margin-top: var(--s2); }
.rc { display: flex; align-items: center; justify-content: flex-start; gap: var(--s3); min-height: var(--tap); padding: 0 var(--s2); border-radius: var(--r-md); cursor: pointer; font-weight: 500; text-align: start; }
.rc:hover { background: var(--surface-2); }
.field .rc input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; flex: none; accent-color: var(--brand); cursor: pointer; }
.rc-item { display: flex; align-items: center; flex-wrap: wrap; column-gap: var(--s3); border-radius: var(--r-md); } .rc-item .rc { flex: 1 1 12rem; }
.rc-opts { display: inline-flex; gap: var(--s3); flex-wrap: wrap; padding-inline: var(--s2); } .rc-opts[hidden] { display: none; }
.rc-opt { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--t-xs); min-height: var(--tap); cursor: pointer; color: var(--ink-2); }
.field .rc-opt input[type=checkbox] { width: 16px; height: 16px; min-height: 0; padding: 0; border: 0; flex: none; accent-color: var(--brand); cursor: pointer; }
.vt-list { display: grid; gap: var(--s2); } .vt-list li { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.vt-act { display: grid; gap: var(--s2); margin-top: var(--s3); }
.lt-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.lt-tags { display: flex; gap: var(--s2); flex-wrap: wrap; }
.lt-tamper { padding: var(--s3) var(--s4); margin-bottom: var(--s3); border-radius: var(--r-md); background: var(--danger-wash); color: var(--danger); border: 1px solid var(--danger); line-height: 1.8; }
.lt-tamper ul { margin: var(--s2) 0 0; padding-inline-start: var(--s5); }
.lt-hash { margin: var(--s3) 0; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); }
.hs-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin-bottom: var(--s2); }
.hs-val { font-family: ui-monospace, Consolas, monospace; font-size: var(--t-xs); overflow-wrap: anywhere; word-break: break-all; direction: ltr; unicode-bidi: isolate; flex: 1 1 18rem; }
.hs-out { margin-top: var(--s2); }
.warn-box { padding: var(--s3); border-radius: var(--r-md); background: var(--warn-wash, var(--danger-wash)); color: var(--warn, var(--danger)); font-weight: 600; margin-bottom: var(--s3); }
.pg-sheet.sheet { position: relative; }
.hf { position: absolute; inset-inline: 0; bottom: 5mm; text-align: center; direction: ltr; font: 6.5pt/1 ui-monospace, Consolas, monospace; color: #777; letter-spacing: .04em; }
.pg-sheet.a5 .hf { bottom: 3.5mm; }
.hf.bad { color: #b00020; }
.lt-body { white-space: pre-wrap; line-height: 2; margin: var(--s3) 0; padding: var(--s3); border-radius: var(--r-md); background: var(--surface-2, transparent); border: 1px solid var(--line-strong); }
.lt-mine { margin-top: var(--s4); }
a.stat { text-decoration: none; color: inherit; }
.scan-pages { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.scan-bar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s2); }
.scan-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: var(--r-md); }

/* pkg7.8: level chips (audit page) and colored level tags */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { min-height: var(--tap); padding: 0 var(--s3); border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"].critical { background: var(--danger-wash); color: var(--danger); border-color: var(--danger); }
.chip[aria-pressed="true"].warning { background: var(--warn-wash); color: var(--warn); border-color: var(--warn); }
.chip[aria-pressed="true"].normal { background: #e8edf4; color: var(--ink-2); border-color: var(--ink-2); }
.tag.critical { background: var(--danger-wash); color: var(--danger); }
.tag.warning { background: var(--warn-wash); color: var(--warn); }

/* pkg7.8: notification bell, drop-down, rows */
.bell-wrap { position: relative; }
.bell { position: relative; min-width: var(--tap); min-height: var(--tap); border: 0; background: none; border-radius: var(--r-md); cursor: pointer; font-size: 1.15rem; color: inherit; }
.bell:hover { background: rgba(47, 139, 255, .18); }
.badge { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.badge[hidden] { display: none; }
.npop { width: min(380px, 92vw); color: var(--ink); }
.npop[hidden] { display: none; }
.nhead { display: flex; align-items: center; justify-content: space-between; padding: var(--s2) var(--s3); }
.nlist { display: grid; max-height: 60vh; overflow: auto; }
.nrow { display: grid; gap: 2px; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.nrow.unread { background: var(--brand-wash); }
.nrow .nt { font-size: var(--t-sm); }
.nrow .nb, .nrow .nd { font-size: var(--t-xs); color: var(--ink-2); }
.nall { justify-content: center; }
.nperm { padding: var(--s2) var(--s3); }
.nperm:empty { display: none; }
/* features matrix (designer) */
.modal-box:has(.mx-host) { max-width: min(1100px, 96vw); }
.mx-host { display: grid; gap: var(--s3); min-width: 0; }
.mx-w { max-height: 62vh; overflow: auto; }
.mx { border-collapse: separate; border-spacing: 0; font-size: var(--t-sm); }
.mx th, .mx td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); background: var(--surface); text-align: center; }
.mx thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); min-width: 92px; vertical-align: bottom; }
.mx thead th small { display: block; color: var(--ink-3); font-weight: 400; font-size: var(--t-xs); }
.mx thead th.grp { background: var(--brand-wash); }
.mx .mx-f { position: sticky; inset-inline-start: 0; z-index: 1; text-align: start; min-width: 190px; max-width: 260px; background: var(--surface-2); font-weight: 600; }
.mx thead th:first-child { inset-inline-start: 0; z-index: 3; }
.mx .mx-g th { text-align: start; background: var(--surface-2); color: var(--ink-3); position: static; }
.mx td.inh { background: var(--ok-wash); }
.mx .mx-c { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: var(--tap); min-height: var(--tap); justify-content: center; cursor: pointer; }
.mx input[type=checkbox] { width: 20px; height: 20px; }
.mx-i { color: var(--ink-3); font-size: var(--t-xs); }
.mx-d { color: var(--danger); font-size: var(--t-xs); font-weight: 700; }

/* app switcher (ADR-0017) */
.appsw summary::after { content: '▾'; font-size: var(--t-sm); opacity: .8; }
.appsw .pop a[aria-current="page"] { font-weight: 700; background: var(--brand-wash); }

/* GN1: referral path graph (inline SVG) */
.rg-wrap { display: grid; gap: var(--s3); }
.rg-root { display: grid; gap: var(--s3); }
.rg-bar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; justify-content: space-between; }
.rg-tools { display: inline-flex; gap: var(--s1); align-items: center; }
.rg-legend { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.rg-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 500; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.rg-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rg-vp { position: relative; height: min(65vh, 600px); min-height: 380px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); touch-action: none; cursor: grab; user-select: none; }
.rg-vp.panning { cursor: grabbing; }
.rg-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.rg-svg { display: block; overflow: visible; font-family: var(--font); }
.rg-node { cursor: pointer; outline: none; }
.rg-node:focus-visible .rg-n-card { stroke: var(--brand); stroke-width: 3; }
.rg-n-card { fill: var(--surface); stroke-width: 2; transition: stroke-width .15s ease; }
.rg-node:hover .rg-n-card { stroke-width: 3; }
.rg-n-t { font-size: 12px; font-weight: 700; }
.rg-n-m { font-size: 13.5px; font-weight: 600; fill: var(--ink); }
.rg-n-d { font-size: 11px; font-weight: 600; fill: var(--ink-3); }
.rg-edge { fill: none; stroke-width: 2.2; transition: stroke-width .15s ease; }
.rg-edge.recalled { stroke-dasharray: 6 4; }
.rg-edge-wrap { cursor: pointer; outline: none; }
.rg-edge-wrap:hover .rg-edge, .rg-edge-wrap:focus-visible .rg-edge { stroke-width: 3.5; }
.rg-el-bg { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.rg-el-txt { font-size: 11px; fill: var(--ink-2); font-weight: 500; }
.rg-sel { padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: var(--s2); }
.rg-sel-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.rg-sel-b { display: grid; gap: var(--s1); line-height: 1.6; }
.lt-route { margin-top: var(--s4); border-top: 1px solid var(--line); padding-top: var(--s4); }

/* GN2: Word letterhead (ADR-0023): the header / footer picture of the .docx is the band of the preview */
.lh.lh-img { display: block; padding: 0; border: 0; } .lh-img img { display: block; width: 100%; max-height: 38mm; object-fit: contain; object-position: top; }
.lf.lf-img { padding: 0; border: 0; } .lf-img img { display: block; width: 100%; max-height: 28mm; object-fit: contain; object-position: bottom; }
.wlh-up { display: grid; gap: var(--s3); max-width: 640px; margin-block: var(--s3) var(--s4); }
.wlh-img { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; }

/* GN3: workflow visual designer canvas */
.wf-host { display: grid; gap: var(--s3); }
.wf-bar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; background: var(--surface); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); }
.wf-bar label { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); font-weight: 500; }
.wf-bar input, .wf-bar select { min-height: 38px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: var(--t-sm); }
.wf-bar .btn-row { margin-inline-start: auto; }
.wf-tools { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.wf-banner { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); border-radius: var(--r-md); background: var(--brand-wash); color: var(--brand-strong); font-weight: 600; font-size: var(--t-sm); }
.wf-banner[hidden], .wf-msg[hidden], .wf-inspector[hidden] { display: none !important; }
.wf-msg { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--danger-wash); color: var(--danger); font-size: var(--t-sm); font-weight: 500; }
.wf-err-list { margin: 0; padding-inline-start: var(--s5); display: grid; gap: 4px; }
.wf-vp { position: relative; height: min(65vh, 580px); min-height: 380px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); touch-action: none; cursor: default; user-select: none; }
.wf-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wf-node { cursor: grab; }
.wf-node:active { cursor: grabbing; }
.wf-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; transition: stroke .15s ease, stroke-width .15s ease; }
.wf-node.sel .wf-box { stroke: var(--brand); stroke-width: 2.5; }
.wf-node.src .wf-box { stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 6 3; }
.wf-node.start .wf-box { fill: var(--ok-wash); stroke: var(--ok); stroke-width: 2; }
.wf-node.end .wf-box { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 2; }
.wf-t-name { font-family: var(--font); font-size: 13px; font-weight: 700; fill: var(--ink); pointer-events: none; }
.wf-t-sub { font-family: var(--font); font-size: 11px; fill: var(--ink-3); pointer-events: none; }
.wf-badge-ok { fill: var(--ok-wash); stroke: var(--ok); stroke-width: 1; }
.wf-badge-sign { fill: var(--warn-wash); stroke: var(--warn); stroke-width: 1; }
.wf-t-badge { font-family: var(--font); font-size: 10px; font-weight: 600; pointer-events: none; }
.wf-t-badge.ok { fill: var(--ok); }
.wf-t-badge.sign { fill: var(--warn); }
.wf-edge { fill: none; stroke: var(--brand); stroke-width: 2.2; }
.wf-edge.sel { stroke: var(--danger); stroke-width: 3.2; }
.wf-edge-hit { fill: none; stroke: transparent; stroke-width: 20; pointer-events: stroke; cursor: pointer; }
.wf-edge-hit:hover + .wf-edge { stroke-width: 3.2; }
.wf-inspector { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.wf-ins-title { font-size: var(--t-sm); }
.wf-ins-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.wf-ins-row label { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); }
.wf-ins-row input[type=text], .wf-ins-row select { min-height: 36px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: var(--t-sm); }
.wf-chk { cursor: pointer; font-weight: 500; }
.wf-chk input { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .wf-bar { flex-direction: column; align-items: stretch; }
  .wf-bar .btn-row { margin-inline-start: 0; }
  .wf-vp { min-height: 320px; height: 50vh; }
  .wf-ins-row { flex-direction: column; align-items: stretch; }
}
.wf-page { display: grid; gap: var(--s3); }
.lic-banner { grid-column: 1 / -1; padding: var(--s3) var(--s5); font-weight: 600; font-size: var(--t-sm); line-height: 1.7; }
.lic-banner.warn { background: var(--warn-wash); color: var(--warn); border-bottom: 1px solid #e6cf9e; }
.lic-banner.bad { background: var(--danger-wash); color: var(--danger); border-bottom: 1px solid #e2b9b3; }
.lic-card .lic-ok, .lic-ok { color: var(--ok); font-weight: 600; }
.lic-id { overflow-wrap: anywhere; font-size: var(--t-xs); }
@media (max-width: 700px) { .lic-banner { padding: var(--s3); } .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin: 0 0 var(--s2); } }
.dn .tag { position: absolute; top: 2px; inset-inline-end: 6px; font-size: 10px; padding: 0 5px; }

/* fingerprint login (ADR-0030) */
.bio-box { margin-top: var(--s3); display: grid; gap: var(--s2); }
.bio-btn { width: 100%; }
.bio-lock { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--bg, #fff); padding: var(--s4); }
.bio-lock .auth-box { max-width: 360px; width: 100%; text-align: center; display: grid; gap: var(--s3); }
