On the new person and new passport forms, next to Read:
- "Take a photo" opens a camera view (getUserMedia, the back camera): a
frame of the photo page's shape (125 by 88 mm), a band for the two lines,
and a hint from four checks of the band four times a second: too dark,
glare on the lines, no lines in the band, not sharp yet (variance of the
Laplacian). Once the band has looked readable for a second it takes the
photo itself; "Take the photo" and Cancel (or Escape) are there too.
The band where the frame showed it is read first; when that holds no
zone, the whole frame is searched.
- "Choose a picture" reads any image: EXIF orientation, the four quarter
turns, a tilt of 7 degrees either way; a failed read says when there is
glare in the picture.
Reading happens in the browser (static/mrz-photo.js): even light from a
local mean, the lines found with Tesseract's page layout, then the band cut
along their baselines, scaled and read as one block. Tesseract.js 7.0.0
and its core (SIMD and plain LSTM builds) with Doubango's MRZ model, all
served by the app from static/vendor/tesseract/ (README.txt: sources, npm
integrity, SHA-256, licenses Apache-2.0 and BSD-3), loaded at the first
photo. The photo never leaves the device: only the lines go into the zone's
field, and Read is pressed.
The server reads them like typed ones, through mrz::from_ocr when they are
no clean zone: the first line wherever it is, the second whose check digits
match best, a miscounted filler run cut or filled, K for < in the filler,
letters and digits where the zone has them, and look-alikes (O for 0, B for
8) swapped in the number fields only where a check digit asks for it,
preferring a digit. A photo's note asks to compare the names, which have no
check digit.
Only those two pages and the reader's files allow WebAssembly
('wasm-unsafe-eval', worker-src 'self', img-src blob:) and the camera
(Permissions-Policy camera=(self)); every other page keeps camera=().
Content types for .wasm and .gz.
Checks: fmt, clippy -D warnings, 99 unit and 50 integration tests (new:
from_ocr cases from real reads, tests/mrz_photo.rs for the markup, the two
policies, the files and a read from photo lines). In Edge (Playwright): 12
made-up phone photos and 16 specimen pages from Wikimedia Commons, every
zone that is readable read with all check digits matching (not: a hard
shadow across the lines; the specimens whose zone is blanked out), 1 to 5 s
each; the camera view with a fake camera: the glare and dark hints, and a
good picture taken by itself and the form filled in. Layout check 0
problems on both forms and a person, light and dark, desk and phone.
PLAN: task 7.3 done ahead of the client link, the decision recorded.
1392 lines
24 KiB
CSS
1392 lines
24 KiB
CSS
/* visa.buildfor.life: the buildfor.life colors, navy #071323 and gold
|
|
#f5c000, with tints of both. Status colors (--ok, --warn, --bad) appear
|
|
only on chips and notes that carry a text label. No inline styles: the
|
|
Content Security Policy allows none. */
|
|
|
|
:root {
|
|
--bg: #071323;
|
|
--panel: #0d1d33;
|
|
--panel2: #12284a;
|
|
--line: rgba(229, 236, 245, 0.12);
|
|
--stroke: rgba(229, 236, 245, 0.24);
|
|
--field: #0a182c;
|
|
--fg: #e6ebf2;
|
|
--hd: #ffffff;
|
|
--mute: #9ba8ba;
|
|
--accent: #f5c000;
|
|
--accent-s: rgba(245, 192, 0, 0.14);
|
|
--on-accent: #071323;
|
|
--link: #f5c000;
|
|
--ok: #4cc38a;
|
|
--ok-s: rgba(76, 195, 138, 0.15);
|
|
--warn: #ffb547;
|
|
--warn-s: rgba(255, 181, 71, 0.15);
|
|
--bad: #ff7a7a;
|
|
--bad-s: rgba(255, 107, 107, 0.15);
|
|
--shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
|
|
--mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
|
|
--side: 220px;
|
|
--toph: 56px;
|
|
color-scheme: dark;
|
|
}
|
|
html[data-theme="light"] {
|
|
--bg: #f4f6f9;
|
|
--panel: #ffffff;
|
|
--panel2: #eef2f7;
|
|
--line: #e1e6ee;
|
|
--stroke: #c4ccd8;
|
|
--field: #ffffff;
|
|
--fg: #13202f;
|
|
--hd: #071323;
|
|
--mute: #566375;
|
|
--accent-s: rgba(245, 192, 0, 0.2);
|
|
--link: #0b3a78;
|
|
--ok: #17784a;
|
|
--ok-s: #e2f2e9;
|
|
--warn: #8f5300;
|
|
--warn-s: #fdf0d5;
|
|
--bad: #b42318;
|
|
--bad-s: #fce8e6;
|
|
--shadow: 0 1px 2px rgba(7, 19, 35, 0.06);
|
|
color-scheme: light;
|
|
}
|
|
|
|
[hidden] {
|
|
display: none !important;
|
|
}
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
/* a jump to #doc-7 lands below the bars that stay in place */
|
|
html {
|
|
scroll-padding-top: calc(var(--toph) + 16px);
|
|
}
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
font:
|
|
15px/1.5 system-ui,
|
|
-apple-system,
|
|
"Segoe UI",
|
|
Roboto,
|
|
"Helvetica Neue",
|
|
"Noto Sans Thai",
|
|
Tahoma,
|
|
sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
a {
|
|
color: var(--link);
|
|
text-decoration: none;
|
|
}
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
html[data-theme="light"] main p a,
|
|
html[data-theme="light"] main dd a {
|
|
text-decoration: underline;
|
|
text-underline-offset: 2px;
|
|
}
|
|
:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
h1,
|
|
h2,
|
|
h3 {
|
|
color: var(--hd);
|
|
line-height: 1.25;
|
|
}
|
|
h1 {
|
|
font-size: 24px;
|
|
margin: 0;
|
|
}
|
|
h1 a {
|
|
color: inherit;
|
|
}
|
|
h2 {
|
|
font-size: 16px;
|
|
margin: 0;
|
|
}
|
|
.muted {
|
|
color: var(--mute);
|
|
}
|
|
.small {
|
|
font-size: 13px;
|
|
}
|
|
.mono {
|
|
font-family: var(--mono);
|
|
font-variant-numeric: tabular-nums;
|
|
font-size: 0.94em;
|
|
}
|
|
.strong {
|
|
font-weight: 650;
|
|
}
|
|
.sub {
|
|
font-size: 12.5px;
|
|
color: var(--mute);
|
|
}
|
|
.pre {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
/* ---- top bar */
|
|
.top {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 20;
|
|
height: var(--toph);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 0 20px;
|
|
background: #071323;
|
|
border-bottom: 1px solid rgba(245, 192, 0, 0.35);
|
|
}
|
|
.brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
color: #ffffff;
|
|
}
|
|
.brand:hover {
|
|
text-decoration: none;
|
|
}
|
|
.mark {
|
|
width: 32px;
|
|
height: 32px;
|
|
flex: none;
|
|
}
|
|
.brand .nm {
|
|
font-weight: 800;
|
|
font-size: 17px;
|
|
letter-spacing: 0.01em;
|
|
}
|
|
.brand .sub {
|
|
color: #f5c000;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.1em;
|
|
}
|
|
.ib {
|
|
width: 34px;
|
|
height: 34px;
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(255, 255, 255, 0.28);
|
|
background: transparent;
|
|
color: #ffffff;
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
}
|
|
.ib:hover {
|
|
border-color: #f5c000;
|
|
}
|
|
|
|
/* ---- frame */
|
|
.app {
|
|
display: grid;
|
|
grid-template-columns: var(--side) minmax(0, 1fr);
|
|
min-height: calc(100vh - var(--toph));
|
|
}
|
|
/* the sections stay in place under the top bar on pages of any length; a
|
|
sidebar taller than the window scrolls on its own */
|
|
.side {
|
|
position: sticky;
|
|
top: var(--toph);
|
|
z-index: 10;
|
|
align-self: start;
|
|
height: calc(100vh - var(--toph));
|
|
height: calc(100dvh - var(--toph));
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 18px;
|
|
padding: 18px 12px;
|
|
background: var(--panel);
|
|
border-right: 1px solid var(--line);
|
|
}
|
|
.nav {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
.nav a {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
border-radius: 8px;
|
|
color: var(--fg);
|
|
font-weight: 560;
|
|
}
|
|
.nav a:hover {
|
|
background: var(--panel2);
|
|
text-decoration: none;
|
|
}
|
|
.nav a.on {
|
|
background: var(--accent-s);
|
|
color: var(--hd);
|
|
box-shadow: inset 3px 0 0 var(--accent);
|
|
}
|
|
.who {
|
|
margin-top: auto;
|
|
font-size: 13px;
|
|
color: var(--mute);
|
|
padding: 0 12px;
|
|
}
|
|
.who .k {
|
|
display: block;
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
}
|
|
.who b {
|
|
display: block;
|
|
color: var(--hd);
|
|
font-size: 14px;
|
|
}
|
|
.who p {
|
|
margin: 2px 0 10px;
|
|
}
|
|
main {
|
|
padding: 24px 28px 40px;
|
|
min-width: 0;
|
|
max-width: 1200px;
|
|
width: 100%;
|
|
}
|
|
.ft {
|
|
margin-top: 28px;
|
|
font-size: 12.5px;
|
|
color: var(--mute);
|
|
}
|
|
|
|
/* ---- page heads */
|
|
.crumbs {
|
|
font-size: 13px;
|
|
color: var(--mute);
|
|
margin-bottom: 4px;
|
|
}
|
|
.pagehead {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 14px;
|
|
}
|
|
.pagehead .actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.phead {
|
|
margin-bottom: 18px;
|
|
padding-bottom: 14px;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
.phead .pagehead {
|
|
margin-bottom: 4px;
|
|
}
|
|
.meta {
|
|
margin: 0;
|
|
color: var(--mute);
|
|
}
|
|
.meta .sep {
|
|
margin: 0 6px;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* ---- buttons */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 14px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--stroke);
|
|
background: var(--panel);
|
|
color: var(--fg);
|
|
font: inherit;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
line-height: 1.2;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
}
|
|
.btn:hover {
|
|
border-color: var(--accent);
|
|
text-decoration: none;
|
|
}
|
|
.btn.pri {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
color: var(--on-accent);
|
|
}
|
|
.btn.pri:hover {
|
|
filter: brightness(1.06);
|
|
}
|
|
.btn.sm {
|
|
padding: 5px 10px;
|
|
font-size: 13px;
|
|
}
|
|
.btn.ghost {
|
|
background: transparent;
|
|
}
|
|
.btn.danger {
|
|
color: var(--bad);
|
|
background: transparent;
|
|
}
|
|
.btn.danger:hover {
|
|
border-color: var(--bad);
|
|
background: var(--bad-s);
|
|
}
|
|
.inline-form {
|
|
display: inline;
|
|
margin: 0;
|
|
}
|
|
/* the first submit button of a form with two actions: Enter saves */
|
|
.default-submit {
|
|
position: absolute;
|
|
left: -9999px;
|
|
width: 1px;
|
|
height: 1px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ---- cards */
|
|
.card {
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 12px;
|
|
padding: 18px 20px;
|
|
margin-bottom: 16px;
|
|
box-shadow: var(--shadow);
|
|
min-width: 0;
|
|
}
|
|
.card > header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 12px;
|
|
}
|
|
.card.flush {
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
.cols {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 16px;
|
|
align-items: start;
|
|
}
|
|
.cols > .card {
|
|
margin-bottom: 0;
|
|
}
|
|
.cols .span2 {
|
|
grid-column: 1 / -1;
|
|
}
|
|
@media (max-width: 1060px) {
|
|
.cols {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
|
|
.kv {
|
|
display: grid;
|
|
grid-template-columns: 150px minmax(0, 1fr);
|
|
gap: 6px 14px;
|
|
margin: 0;
|
|
}
|
|
.kv dt {
|
|
color: var(--mute);
|
|
font-size: 13px;
|
|
padding-top: 1px;
|
|
}
|
|
.kv dd {
|
|
margin: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.chip {
|
|
display: inline-block;
|
|
white-space: nowrap;
|
|
padding: 1px 9px;
|
|
border-radius: 999px;
|
|
font-size: 12.5px;
|
|
font-weight: 600;
|
|
background: var(--panel2);
|
|
border: 1px solid var(--line);
|
|
}
|
|
.chip.ok {
|
|
background: var(--ok-s);
|
|
color: var(--ok);
|
|
border-color: transparent;
|
|
}
|
|
.chip.warn {
|
|
background: var(--warn-s);
|
|
color: var(--warn);
|
|
border-color: transparent;
|
|
}
|
|
.chip.bad {
|
|
background: var(--bad-s);
|
|
color: var(--bad);
|
|
border-color: transparent;
|
|
}
|
|
.tag {
|
|
display: inline-block;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.06em;
|
|
text-transform: uppercase;
|
|
padding: 1px 7px;
|
|
border-radius: 5px;
|
|
background: var(--accent-s);
|
|
color: var(--hd);
|
|
}
|
|
.tag.plain {
|
|
background: var(--panel2);
|
|
color: var(--mute);
|
|
}
|
|
|
|
/* ---- notes */
|
|
.notice {
|
|
padding: 10px 14px;
|
|
border-radius: 10px;
|
|
background: var(--panel2);
|
|
border: 1px solid var(--line);
|
|
margin: 0 0 14px;
|
|
}
|
|
.notice.warn {
|
|
background: var(--warn-s);
|
|
border-color: transparent;
|
|
}
|
|
.notice.ok {
|
|
background: var(--ok-s);
|
|
border-color: transparent;
|
|
}
|
|
.okline {
|
|
margin: 0;
|
|
color: var(--ok);
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
}
|
|
.hintline {
|
|
margin: 8px 0 0;
|
|
color: var(--warn);
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* ---- tables */
|
|
.toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 12px;
|
|
}
|
|
.toolbar .filter {
|
|
flex: 1 1 240px;
|
|
max-width: 440px;
|
|
}
|
|
.tblwrap {
|
|
overflow-x: auto;
|
|
}
|
|
.tbl {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
.tbl th {
|
|
text-align: left;
|
|
font-size: 11.5px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--mute);
|
|
background: var(--panel2);
|
|
padding: 9px 14px;
|
|
border-bottom: 1px solid var(--line);
|
|
white-space: nowrap;
|
|
}
|
|
.tbl td {
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--line);
|
|
vertical-align: top;
|
|
}
|
|
.tbl tbody tr:last-child td {
|
|
border-bottom: 0;
|
|
}
|
|
.tbl tbody tr:hover {
|
|
background: var(--panel2);
|
|
}
|
|
.filter-empty {
|
|
margin: 0;
|
|
padding: 14px;
|
|
color: var(--mute);
|
|
}
|
|
@media (max-width: 760px) {
|
|
.tbl .hs {
|
|
display: none;
|
|
}
|
|
.tbl th,
|
|
.tbl td {
|
|
padding: 9px 10px;
|
|
}
|
|
}
|
|
|
|
/* ---- record lists inside cards */
|
|
.item {
|
|
padding: 12px 0;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
.item:first-of-type {
|
|
border-top: 0;
|
|
padding-top: 0;
|
|
}
|
|
.item.old {
|
|
opacity: 0.78;
|
|
}
|
|
.item .row {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 6px;
|
|
}
|
|
.rowactions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px 14px;
|
|
font-size: 13px;
|
|
margin-top: 6px;
|
|
}
|
|
/* a record's documents, next to its Edit */
|
|
.rowactions .doclink {
|
|
padding: 0 7px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 5px;
|
|
background: var(--panel2);
|
|
color: var(--fg);
|
|
}
|
|
.empty-inline {
|
|
margin: 0;
|
|
color: var(--mute);
|
|
}
|
|
.addr {
|
|
margin: 0 0 8px;
|
|
}
|
|
.log {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-size: 13px;
|
|
}
|
|
.log li {
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
padding: 6px 0;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
.log li:first-child {
|
|
border-top: 0;
|
|
}
|
|
.log .when {
|
|
color: var(--mute);
|
|
min-width: 140px;
|
|
}
|
|
|
|
/* ---- forms */
|
|
.form .grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 14px 16px;
|
|
}
|
|
.form .wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
@media (max-width: 700px) {
|
|
.form .grid {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
.field label {
|
|
display: block;
|
|
font-size: 13px;
|
|
font-weight: 650;
|
|
color: var(--hd);
|
|
margin-bottom: 4px;
|
|
}
|
|
input,
|
|
select,
|
|
textarea {
|
|
width: 100%;
|
|
padding: 8px 10px;
|
|
border: 1px solid var(--stroke);
|
|
border-radius: 8px;
|
|
background: var(--field);
|
|
color: var(--fg);
|
|
font: inherit;
|
|
}
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 0;
|
|
border-color: var(--accent);
|
|
}
|
|
.field.has-err input,
|
|
.field.has-err select,
|
|
.field.has-err textarea {
|
|
border-color: var(--bad);
|
|
}
|
|
textarea {
|
|
resize: vertical;
|
|
}
|
|
textarea.mrz {
|
|
font-family: var(--mono);
|
|
font-size: 15px;
|
|
letter-spacing: 0.05em;
|
|
line-height: 1.6;
|
|
}
|
|
.hint {
|
|
font-size: 12.5px;
|
|
color: var(--mute);
|
|
margin: 4px 0 0;
|
|
}
|
|
.lead {
|
|
margin: -4px 0 12px;
|
|
font-size: 14px;
|
|
}
|
|
.err {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--bad);
|
|
margin: 4px 0 0;
|
|
}
|
|
.req {
|
|
color: var(--bad);
|
|
}
|
|
.formactions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
margin-top: 12px;
|
|
}
|
|
.dangerzone {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
margin-top: 22px;
|
|
padding-top: 14px;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
|
|
/* ---- tabs of a person */
|
|
.phead.tabbed {
|
|
border-bottom: 0;
|
|
padding-bottom: 0;
|
|
}
|
|
.tabs {
|
|
display: flex;
|
|
gap: 2px;
|
|
margin-top: 12px;
|
|
border-bottom: 1px solid var(--line);
|
|
overflow-x: auto;
|
|
}
|
|
.tabs a {
|
|
padding: 8px 14px;
|
|
color: var(--mute);
|
|
font-weight: 600;
|
|
border-bottom: 2px solid transparent;
|
|
margin-bottom: -1px;
|
|
white-space: nowrap;
|
|
}
|
|
.tabs a:hover {
|
|
color: var(--hd);
|
|
text-decoration: none;
|
|
}
|
|
.tabs a.on {
|
|
color: var(--hd);
|
|
border-bottom-color: var(--accent);
|
|
}
|
|
.tabs .tab-short {
|
|
display: none;
|
|
}
|
|
/* six tabs fit a phone: "Visa and stay" becomes "Stay" */
|
|
@media (max-width: 560px) {
|
|
.tabs {
|
|
gap: 0;
|
|
}
|
|
.tabs a {
|
|
padding: 8px 6px;
|
|
font-size: 13.5px;
|
|
}
|
|
.tabs .tab-long {
|
|
display: none;
|
|
}
|
|
.tabs .tab-short {
|
|
display: inline;
|
|
}
|
|
}
|
|
@media (max-width: 380px) {
|
|
.tabs a {
|
|
padding: 8px 5px;
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
|
|
/* ---- status and deadlines */
|
|
.stayline {
|
|
margin: 0 0 10px;
|
|
}
|
|
.stayline.bad {
|
|
color: var(--bad);
|
|
font-weight: 600;
|
|
}
|
|
.dl {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.dl li {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: 2px 12px;
|
|
padding: 10px 0;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
.dl li:first-child {
|
|
border-top: 0;
|
|
}
|
|
.dl-what {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 2px 10px;
|
|
align-items: baseline;
|
|
}
|
|
.dl-when {
|
|
color: var(--mute);
|
|
font-size: 13px;
|
|
}
|
|
.dl li > .chip {
|
|
align-self: start;
|
|
justify-self: end;
|
|
}
|
|
.dl-note {
|
|
grid-column: 1 / -1;
|
|
margin: 0;
|
|
font-size: 13.5px;
|
|
color: var(--mute);
|
|
}
|
|
.summary {
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 12px;
|
|
}
|
|
.sel {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.sel select {
|
|
width: auto;
|
|
min-width: 170px;
|
|
max-width: 100%;
|
|
}
|
|
.nowrap {
|
|
white-space: nowrap;
|
|
}
|
|
.tbl .note {
|
|
min-width: 260px;
|
|
max-width: 440px;
|
|
}
|
|
.linkbtn {
|
|
background: none;
|
|
border: 0;
|
|
padding: 0;
|
|
color: var(--link);
|
|
font: inherit;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
.linkbtn:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.hire {
|
|
margin-top: 14px;
|
|
padding-top: 12px;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
.hire label {
|
|
display: block;
|
|
font-size: 13px;
|
|
font-weight: 650;
|
|
color: var(--hd);
|
|
margin-bottom: 4px;
|
|
}
|
|
.hire-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
.hire-row select {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* ---- documents: the upload strip, the list, a preview */
|
|
.vh {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
overflow: hidden;
|
|
clip-path: inset(50%);
|
|
white-space: nowrap;
|
|
}
|
|
.upload {
|
|
margin: 0 0 16px;
|
|
}
|
|
.upload .notice {
|
|
margin-bottom: 10px;
|
|
}
|
|
.drop {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 4px 10px;
|
|
padding: 9px 14px;
|
|
border: 1.5px dashed var(--stroke);
|
|
border-radius: 10px;
|
|
background: var(--field);
|
|
color: var(--mute);
|
|
}
|
|
.drop:hover,
|
|
.drop.over {
|
|
border-color: var(--accent);
|
|
background: var(--accent-s);
|
|
color: var(--fg);
|
|
}
|
|
.drop:focus-within {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
.drop.has-err {
|
|
border-color: var(--bad);
|
|
}
|
|
/* the file input covers the strip: a click opens the chooser, and files
|
|
dropped anywhere on it land in the input, with or without script */
|
|
.drop input[type="file"] {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0;
|
|
border: 0;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
}
|
|
.drop label {
|
|
font-size: 14px;
|
|
}
|
|
.drop label b {
|
|
color: var(--link);
|
|
}
|
|
.drop .hint {
|
|
margin: 0 0 0 auto;
|
|
}
|
|
.drop-icon {
|
|
display: inline-grid;
|
|
place-items: center;
|
|
width: 22px;
|
|
height: 22px;
|
|
border-radius: 6px;
|
|
background: var(--accent-s);
|
|
color: var(--hd);
|
|
font-weight: 800;
|
|
line-height: 1;
|
|
}
|
|
.drop-names {
|
|
color: var(--fg);
|
|
font-size: 13.5px;
|
|
font-weight: 650;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.drop-names:empty {
|
|
display: none;
|
|
}
|
|
.drop-names.bad {
|
|
color: var(--bad);
|
|
}
|
|
.upload-row {
|
|
display: grid;
|
|
grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.5fr) 165px minmax(140px, 1fr) auto;
|
|
gap: 10px 12px;
|
|
align-items: end;
|
|
margin-top: 10px;
|
|
}
|
|
.upload-row.company {
|
|
grid-template-columns: minmax(200px, 1.3fr) 165px minmax(160px, 1.4fr) auto;
|
|
}
|
|
@media (max-width: 1060px) {
|
|
.upload-row,
|
|
.upload-row.company {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
@media (max-width: 560px) {
|
|
.upload-row,
|
|
.upload-row.company {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
.upload-row .field {
|
|
min-width: 0;
|
|
}
|
|
/* ---- a company's office: its photo beside the position on the map */
|
|
.office {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
|
|
gap: 16px 24px;
|
|
align-items: start;
|
|
}
|
|
.office-pic img,
|
|
.office-none {
|
|
display: block;
|
|
width: 100%;
|
|
aspect-ratio: 4 / 3;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--line);
|
|
background: var(--panel2);
|
|
}
|
|
.office-pic img {
|
|
object-fit: cover;
|
|
}
|
|
.office-pic p {
|
|
margin: 6px 0 0;
|
|
}
|
|
.office-none {
|
|
display: grid;
|
|
place-items: center;
|
|
border: 1.5px dashed var(--stroke);
|
|
color: var(--mute);
|
|
font-size: 13.5px;
|
|
}
|
|
.maplinks {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
gap: 2px 14px;
|
|
margin-left: 14px;
|
|
}
|
|
.office-info .hint {
|
|
margin: 10px 0 0;
|
|
}
|
|
.office-up {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: 8px 10px;
|
|
align-items: center;
|
|
margin: 14px 0 0;
|
|
}
|
|
.office-up > .notice {
|
|
grid-column: 1 / -1;
|
|
margin: 0;
|
|
}
|
|
@media (max-width: 700px) {
|
|
.office,
|
|
.office-up {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
.maplinks {
|
|
display: flex;
|
|
margin: 2px 0 0;
|
|
}
|
|
}
|
|
|
|
/* ---- a heading inside a form, over the whole row */
|
|
.fsec {
|
|
grid-column: 1 / -1;
|
|
margin: 18px 0 4px;
|
|
font-size: 14.5px;
|
|
font-weight: 750;
|
|
color: var(--hd);
|
|
}
|
|
.grid > .fsec:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
/* ---- the Forms tab: each form with its links and what it still lacks */
|
|
.paper {
|
|
padding: 12px 0;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
.paper:first-of-type {
|
|
border-top: 0;
|
|
padding-top: 4px;
|
|
}
|
|
.paper-head {
|
|
display: grid;
|
|
grid-template-columns: 62px minmax(0, 1fr) auto;
|
|
gap: 8px 12px;
|
|
align-items: start;
|
|
}
|
|
.paper-code {
|
|
padding: 2px 0;
|
|
border-radius: 6px;
|
|
background: var(--accent-s);
|
|
color: var(--hd);
|
|
font-size: 13px;
|
|
font-weight: 800;
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
}
|
|
.paper-go {
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|
|
.paper-missing {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: 4px 12px;
|
|
margin: 8px 0 0 74px;
|
|
font-size: 13.5px;
|
|
}
|
|
.appform .grid + .fsec {
|
|
margin-top: 20px;
|
|
}
|
|
/* the forms get the wider column */
|
|
.cols.papers {
|
|
grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
|
|
}
|
|
@media (max-width: 1060px) {
|
|
.cols.papers {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
@media (max-width: 560px) {
|
|
.paper-head {
|
|
grid-template-columns: 58px minmax(0, 1fr);
|
|
}
|
|
.paper-go {
|
|
grid-column: 2;
|
|
}
|
|
.paper-missing {
|
|
margin-left: 70px;
|
|
}
|
|
}
|
|
|
|
/* ---- the Pack tab and a company's part of the packs: a checklist */
|
|
.checklist {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.ci {
|
|
display: grid;
|
|
grid-template-columns: 96px minmax(0, 1fr);
|
|
gap: 4px 12px;
|
|
align-items: start;
|
|
padding: 10px 0;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
.ci:first-child {
|
|
border-top: 0;
|
|
padding-top: 2px;
|
|
}
|
|
.ci > .chip {
|
|
justify-self: start;
|
|
margin-top: 1px;
|
|
}
|
|
.ci-what {
|
|
font-weight: 650;
|
|
color: var(--hd);
|
|
}
|
|
.ci-what .paper-code {
|
|
display: inline-block;
|
|
padding: 0 7px;
|
|
margin-right: 2px;
|
|
}
|
|
.ci-note {
|
|
margin: 2px 0 0;
|
|
font-size: 13.5px;
|
|
color: var(--mute);
|
|
}
|
|
.ci-blanks {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: 2px 12px;
|
|
margin: 4px 0 0;
|
|
font-size: 13.5px;
|
|
}
|
|
.ci .rowactions {
|
|
margin-top: 4px;
|
|
}
|
|
.ci:target {
|
|
background: var(--accent-s);
|
|
}
|
|
@media (max-width: 560px) {
|
|
.ci {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
|
|
/* the list runs to the card's edges */
|
|
.tblwrap.bleed {
|
|
margin: 0 -20px -18px;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
/* a kind's name on one or two lines, not broken before its last word */
|
|
.docs .docname {
|
|
min-width: 190px;
|
|
}
|
|
.docs .acts {
|
|
white-space: nowrap;
|
|
text-align: right;
|
|
font-size: 13px;
|
|
}
|
|
.docs .acts a + a {
|
|
margin-left: 12px;
|
|
}
|
|
.docs .fname {
|
|
max-width: 220px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.docs .ps {
|
|
display: none;
|
|
}
|
|
.tbl tbody tr:target td {
|
|
background: var(--accent-s);
|
|
}
|
|
.ftype {
|
|
display: inline-block;
|
|
padding: 0 5px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 4px;
|
|
background: var(--panel2);
|
|
color: var(--mute);
|
|
font: 700 10.5px/1.5 var(--mono);
|
|
}
|
|
@media (max-width: 760px) {
|
|
.docs .ps {
|
|
display: block;
|
|
}
|
|
.docs .acts a + a {
|
|
margin-left: 8px;
|
|
}
|
|
}
|
|
.card > header .actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
.preview {
|
|
display: block;
|
|
margin: 0 0 14px;
|
|
}
|
|
.preview img {
|
|
display: block;
|
|
max-width: 100%;
|
|
max-height: 420px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
background: var(--panel2);
|
|
}
|
|
|
|
/* ---- a page outside the frame */
|
|
.solo {
|
|
max-width: 560px;
|
|
margin: 64px auto;
|
|
padding: 0 16px;
|
|
}
|
|
.solo .eyebrow {
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
color: var(--mute);
|
|
}
|
|
|
|
/* ---- phones */
|
|
@media (max-width: 860px) {
|
|
.app {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
/* on phones the sections are a row that stays under the top bar */
|
|
html {
|
|
scroll-padding-top: calc(var(--toph) + 66px);
|
|
}
|
|
.side {
|
|
height: auto;
|
|
overflow: visible;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
border-right: 0;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
.nav {
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
}
|
|
.nav a {
|
|
padding: 6px 9px;
|
|
font-size: 14px;
|
|
}
|
|
.who {
|
|
margin: 0 0 0 auto;
|
|
padding: 0;
|
|
}
|
|
.who .k,
|
|
.who b,
|
|
.who p {
|
|
display: none;
|
|
}
|
|
main {
|
|
padding: 16px 14px 32px;
|
|
}
|
|
.card {
|
|
padding: 14px;
|
|
}
|
|
.tblwrap.bleed {
|
|
margin: 0 -14px -14px;
|
|
}
|
|
.kv {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
gap: 2px;
|
|
}
|
|
.kv dt {
|
|
margin-top: 8px;
|
|
}
|
|
}
|
|
|
|
/* the passport photo reader: a camera button, and a picture button whose
|
|
file input covers it, so a tap or a click lands on it */
|
|
.mrzphoto {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
.mrzphoto[hidden],
|
|
.mrzphoto [hidden],
|
|
.mrz-status[hidden] {
|
|
display: none;
|
|
}
|
|
.mrzphoto.busy {
|
|
opacity: 0.6;
|
|
pointer-events: none;
|
|
}
|
|
.filebtn {
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
.filebtn input[type="file"] {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
}
|
|
.filebtn:focus-within {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
.mrz-status {
|
|
margin: 0;
|
|
flex-basis: 100%;
|
|
}
|
|
.mrz-status[data-state="error"] {
|
|
color: var(--bad);
|
|
}
|
|
|
|
/* the camera view: the video fills the screen, the frame of the photo page
|
|
darkens what lies outside it, the band marks the two lines */
|
|
.cam-open,
|
|
.cam-open body {
|
|
overflow: hidden;
|
|
}
|
|
.cam {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 1000;
|
|
background: #000;
|
|
color: #fff;
|
|
}
|
|
.cam-video {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
.cam-frame {
|
|
position: absolute;
|
|
border: 2px solid rgba(255, 255, 255, 0.9);
|
|
border-radius: 14px;
|
|
box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
|
|
}
|
|
.cam-band {
|
|
position: absolute;
|
|
left: 3%;
|
|
top: 70%;
|
|
width: 94%;
|
|
height: 27%;
|
|
border: 2px dashed #f5c000;
|
|
border-radius: 6px;
|
|
}
|
|
.cam-band span {
|
|
position: absolute;
|
|
top: -24px;
|
|
left: 0;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #f5c000;
|
|
}
|
|
.cam.good .cam-frame {
|
|
border-color: #3ccf6e;
|
|
}
|
|
.cam.good .cam-band {
|
|
border-style: solid;
|
|
border-color: #3ccf6e;
|
|
}
|
|
.cam.good .cam-band span {
|
|
color: #3ccf6e;
|
|
}
|
|
.cam-hint {
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: 84px;
|
|
transform: translateX(-50%);
|
|
width: max-content;
|
|
max-width: calc(100% - 32px);
|
|
margin: 0;
|
|
padding: 8px 14px;
|
|
border-radius: 8px;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
font-size: 15px;
|
|
text-align: center;
|
|
}
|
|
.cam-bar {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 12px;
|
|
padding: 16px 16px max(16px, env(safe-area-inset-bottom));
|
|
}
|