/* ProScale Kit, admin surface. v0.1.0
   Ported from the DZEN passport system's app.css (build 20261126), which the owner asked
   to keep the look of. Load it after brands/<id>/brand.css.

   Rules this file keeps, and tests check:
   - No colour of its own. Every colour is var(--token) from brand.css, so one stylesheet
     serves every brand and theme. No hex, rgb() or hsl() anywhere below.
   - Sized for older eyes: body 19px, data 18px, nothing under 16px, buttons 52px,
     segmented controls and switches 44px or more, every target 44px or more.
   - Colour never carries meaning alone: every badge, chip and status has words.
   - Nothing appears only on hover. Hover only deepens what is already visible.
   - No inline style is needed anywhere (the CSP forbids it). Widths and ratios are classes.

   Class names are DZEN's where DZEN had the thing. New pieces are marked NEW. */

/* ============ BASE ============ */
*,*::before,*::after{box-sizing:border-box}
/* touch-action: no double-tap zoom on a phone (a quick second tap zoomed the page in, and a zoomed
   page pans left and right), as on the Mesra form. Pinch zoom still works. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation}
/* The page never moves left and right on a phone (Kayden, 1 Dec 2026): anything wider than the
   screen is clipped at its edge. clip, not hidden: it makes no scroll box, so sticky parts and the
   page's own scrolling keep working. Older iPhones without clip get hidden on body only. */
html,body{overflow-x:clip}
@supports not (overflow:clip){body{overflow-x:hidden}}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);
  font-size:var(--fs-body);line-height:1.65;-webkit-font-smoothing:antialiased;overflow-wrap:break-word}
html[lang^="zh"] body{font-family:var(--zh)}
h1{font-size:var(--fs-h1);font-weight:600;letter-spacing:-.02em;margin:0 0 6px;line-height:1.25}
h2,h3,h4{line-height:1.3}
a{color:var(--link);text-underline-offset:2px}
img{max-width:100%;height:auto}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
[hidden]{display:none !important}
.hidden{display:none !important}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.spacer{margin-left:auto}
.stack-gap{display:flex;flex-direction:column;gap:20px}
.card{background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--r-lg);box-shadow:var(--sh-sm)}
.pad{padding:20px 24px}
.mono{font-family:var(--mono);font-size:var(--fs-data)}
.dim{color:var(--text-3)}
.num{text-align:right;font-variant-numeric:tabular-nums}
.ic{width:20px;height:20px;flex:none}
.skip{position:absolute;left:-9999px;min-height:48px;display:inline-flex;align-items:center}
.skip:focus{left:16px;top:16px;z-index:99;background:var(--surface);color:var(--text);padding:12px 18px;
  border-radius:var(--r);border:2px solid var(--focus)}

/* ============ SHELL ============ */
.page{display:flex;min-height:100vh;min-height:100dvh}
.side{width:264px;flex:none;background:var(--side);color:var(--side-text);padding:18px 14px;
  display:flex;flex-direction:column;gap:20px}
.side-brand{display:flex;align-items:center;gap:12px;padding:0 6px;color:var(--side-strong);
  text-decoration:none;min-height:44px}
/* A wide lockup (GIT) never sits in colour on the dark ground: it goes on a white plate,
   with the app name under it. */
.side-brand.is-plate{flex-direction:column;align-items:flex-start;gap:10px}
.side-plate{display:inline-flex;align-items:center;background:var(--plate);border-radius:var(--r-sm);padding:8px 12px}
.side-plate img{display:block;width:120px;height:auto}
.side-logo{width:40px;height:40px;border-radius:50%;flex:none;display:block;object-fit:contain}
.side-logo.on-disc{background:var(--plate);padding:3px}
.side-name{color:var(--side-strong);font-weight:600;font-size:var(--fs-data);line-height:1.3}
.side-name small{display:block;font-weight:400;font-size:var(--fs-small);color:var(--side-muted);margin-top:2px}
.side nav{display:flex;flex-direction:column;gap:4px}
.side nav a{display:flex;align-items:center;gap:12px;color:var(--side-text);text-decoration:none;
  font-size:var(--fs-data);padding:13px 14px;border-radius:var(--r);font-weight:500;min-height:54px;line-height:1.3}
.side nav a:hover{background:var(--side-hover);color:var(--side-strong)}
/* Where you are is said three ways: a filled row, bold words and a bar at the edge. */
.side nav a.on,.side nav a[aria-current="page"]{background:var(--side-on);color:var(--side-strong);
  font-weight:600;box-shadow:inset 4px 0 0 var(--side-strong)}
.side-end{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.side-foot{padding:0 10px;color:var(--side-muted);font-size:var(--fs-small);line-height:1.5}
.side-who{padding:14px 10px 0;border-top:1px solid var(--side-line);color:var(--side-muted);
  font-size:var(--fs-small);line-height:1.4}
.side-who b{display:block;color:var(--side-strong);font-weight:600;font-size:var(--fs-data);
  overflow-wrap:anywhere;margin-top:2px}
.side-out{margin:0}
.side-out button,.side-in{display:flex;align-items:center;gap:12px;width:100%;font:inherit;
  font-size:var(--fs-data);font-weight:500;color:var(--side-text);background:none;border:0;
  padding:13px 14px;border-radius:var(--r);min-height:54px;cursor:pointer;text-align:left;text-decoration:none}
.side-out button:hover,.side-in:hover{background:var(--side-hover);color:var(--side-strong)}

.content{flex:1;min-width:0;display:flex;flex-direction:column}
.content-head{background:var(--surface);border-bottom:1px solid var(--line-soft);
  padding:18px 28px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
/* A title with no spaces (a pasted link, a long run of letters) breaks anywhere instead of making
   the page scroll sideways: the heading may shrink below its longest word (min-width:0). */
.content-head h1{margin:0;font-size:var(--fs-h2);font-weight:600;letter-spacing:-.01em;min-width:0;overflow-wrap:anywhere}
.content-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.content-body{padding:28px;background:var(--bg);flex:1}
.wrap{max-width:1180px;margin:0 auto}
.wrap-narrow{max-width:780px}

/* Desktop: the sidebar is pinned so Sign out never scrolls away on a long page. */
@media (min-width:901px){
  .side{position:sticky;top:0;align-self:flex-start;height:100vh;height:100dvh;overflow-y:auto}
}

/* Phone and tablet: the sidebar is a drawer behind a Menu button with words on it. The button
   sits in the space the content head keeps for it (76px) and scrolls away with the page, so it
   never floats over what is being read or pressed. */
.menu-btn{display:none;position:absolute;top:12px;left:12px;z-index:70;align-items:center;gap:10px;
  font:inherit;font-size:var(--fs-data);font-weight:600;min-height:52px;padding:10px 18px;margin:0;
  background:var(--surface);color:var(--text);border:1px solid var(--field);border-radius:var(--r);
  box-shadow:var(--sh);cursor:pointer}
.menu-btn .ic{width:24px;height:24px}
.scrim{display:none;position:fixed;inset:0;z-index:65;background:var(--scrim)}
@media (max-width:900px){
  .menu-btn{display:inline-flex}
  body.nav-open .scrim{display:block}
  .side{position:fixed;inset:0 auto 0 0;z-index:68;width:min(300px,84vw);
    transform:translateX(-102%);visibility:hidden;
    transition:transform .22s ease-out,visibility 0s linear .22s;
    overflow-y:auto;box-shadow:var(--sh-lg);padding-top:84px}
  /* visibility, not only the slide: a closed drawer must not take Tab focus. */
  body.nav-open .side{transform:translateX(0);visibility:visible;transition:transform .22s ease-out}
  .menu-btn .ic-close{display:none}
  body.nav-open .menu-btn .ic-menu{display:none}
  body.nav-open .menu-btn .ic-close{display:block}
  .side nav a{min-height:56px}
  .content-head{padding:76px 16px 16px;row-gap:10px}
  .content-head h1{width:100%}
  .content-head .spacer{display:none}
  .content-body{padding:16px}
  .seg{flex-wrap:wrap;justify-content:flex-start}
}
@media (max-width:900px) and (prefers-reduced-motion:reduce){.side{transition:none}}

/* ============ SEGMENTED CONTROL ============ */
/* Language and theme switches, and filters. Links or buttons, 44px tall, words always. */
.seg{display:inline-flex;flex-wrap:wrap;background:var(--surface-2);border:1px solid var(--line);
  border-radius:var(--r);padding:3px;gap:2px}
.seg button,.seg a{font:inherit;font-size:var(--fs-label);font-weight:600;border:0;background:none;
  color:var(--text-2);padding:8px 16px;border-radius:var(--r-sm);cursor:pointer;min-height:44px;
  display:inline-flex;align-items:center;gap:8px;text-decoration:none;white-space:nowrap;margin:0;line-height:1.3}
.seg .on,.seg [aria-pressed="true"],.seg [aria-current="true"],.seg [aria-current="page"]{background:var(--accent);color:var(--on-accent)}
.seg button:not(.on):hover,.seg a:not(.on):hover{background:var(--surface);color:var(--text)}
.seg-n{font-weight:500;font-variant-numeric:tabular-nums}

/* ============ BUTTONS ============ */
.btn{font:inherit;font-weight:600;font-size:var(--fs-data);line-height:1.3;border:1px solid transparent;
  border-radius:var(--r-sm);text-decoration:none;padding:12px 22px;margin:0;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;text-align:center;
  box-shadow:var(--sh-sm);transition:background-color .15s ease-out,border-color .15s ease-out}
.btn:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.btn .ic{width:20px;height:20px}
.btn-primary{background:var(--accent);color:var(--on-accent)}
.btn-primary:hover{background:var(--accent-hover)}
.btn-secondary{background:var(--surface);color:var(--text);border-color:var(--field)}
.btn-secondary:hover{background:var(--surface-2)}
/* NEW: for removing or cancelling something that matters. Used rarely, never as the
   only way forward on a screen. */
.btn-danger{background:var(--danger);color:var(--on-danger)}
.btn-danger:hover{background:var(--danger-hover)}
/* NEW: a button that reads like a link, for the less likely choice. Still 52px. */
.btn-quiet{background:none;color:var(--link);box-shadow:none;text-decoration:underline;padding-left:8px;padding-right:8px}
.btn-quiet:hover{background:var(--surface-2)}
.btn-lg{padding:16px 32px;font-size:21px;min-height:62px}
.btn-block{width:100%}
.btn[disabled],.btn[aria-disabled="true"]{background:var(--disabled-bg);color:var(--disabled-fg);
  border-color:var(--line);cursor:not-allowed;box-shadow:none;text-decoration:none}
.btn[aria-busy="true"]{cursor:progress}
.spin{width:18px;height:18px;border:2.5px solid currentColor;border-right-color:transparent;border-radius:50%;
  display:inline-block;flex:none;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
/* DZEN's quiet text button, still a 44px target. */
/* The copy button keeps its width when its words change to "Copied". */
.copy{min-width:120px}
.copy.is-done{background:var(--ok-bg);color:var(--ok-fg);border-color:var(--ok-line)}
.linkbtn{background:none;border:0;padding:10px 0;margin:0;min-height:44px;font:inherit;font-size:var(--fs-small);
  font-weight:600;color:var(--link);text-decoration:underline;cursor:pointer}
/* NEW: the inline "Change" link in a summary. A word, underlined, 44px tall. */
.change{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;font-weight:600;
  font-size:var(--fs-data);color:var(--link);text-decoration:underline;white-space:nowrap}

/* ============ BADGES, CHIPS, PILLS ============ */
.badge{display:inline-flex;align-items:center;gap:8px;font-size:var(--fs-small);font-weight:600;
  padding:5px 14px;border-radius:999px;white-space:nowrap;border:1.5px solid;line-height:1.4}
.badge i{width:9px;height:9px;border-radius:50%;flex:none}
.b-ok{background:var(--ok-bg);color:var(--ok-fg);border-color:var(--ok-line)} .b-ok i{background:var(--ok-dot)}
.b-warn{background:var(--warn-bg);color:var(--warn-fg);border-color:var(--warn-line)} .b-warn i{background:var(--warn-dot)}
.b-err{background:var(--err-bg);color:var(--err-fg);border-color:var(--err-line)} .b-err i{background:var(--err-dot)}
.b-info{background:var(--info-bg);color:var(--info-fg);border-color:var(--info-line)} .b-info i{background:var(--info-dot)}
.b-neutral{background:var(--surface-2);color:var(--text-2);border-color:var(--line)} .b-neutral i{background:var(--field)}

/* NEW: status chip. Words always, and each kind has its own marker shape as well as its
   colour (round, diamond, square), so it reads for colour-blind eyes too. */
.chip{display:inline-flex;align-items:center;gap:8px;font-size:var(--fs-small);font-weight:600;
  padding:4px 12px;border-radius:var(--r-sm);border:1px solid;line-height:1.45;white-space:nowrap}
.chip i{width:10px;height:10px;flex:none}
.c-ok{background:var(--ok-bg);color:var(--ok-fg);border-color:var(--ok-line)} .c-ok i{background:var(--ok-dot);border-radius:50%}
.c-warn{background:var(--warn-bg);color:var(--warn-fg);border-color:var(--warn-line)} .c-warn i{background:var(--warn-dot);transform:rotate(45deg);width:9px;height:9px}
.c-err{background:var(--err-bg);color:var(--err-fg);border-color:var(--err-line)} .c-err i{background:var(--err-dot)}
.c-info{background:var(--info-bg);color:var(--info-fg);border-color:var(--info-line)} .c-info i{background:var(--info-dot);border-radius:50%}
.c-neutral{background:var(--surface-2);color:var(--text-2);border-color:var(--line)} .c-neutral i{border:2px solid var(--field);border-radius:50%}

/* ============ ALERTS ============ */
.alert{display:flex;gap:14px;padding:16px 18px;border-radius:var(--r);font-size:var(--fs-data);
  margin:0 0 12px;border:1.5px solid;line-height:1.55}
.alert > div,.alert .alert-body{flex:1;min-width:0}
.alert .ai{width:28px;height:28px;flex:none;border-radius:50%;display:grid;place-items:center;margin-top:1px}
.alert .ai svg{width:18px;height:18px}
.alert .alert-t{display:block;font-weight:600;margin-bottom:2px;font-size:var(--fs-data)}
.alert b{font-weight:700}
/* The disc is the alert's own words colour with its ground as the sign, so the sign
   always has the contrast the words have. */
.a-ok{background:var(--ok-bg);color:var(--ok-fg);border-color:var(--ok-line)} .a-ok .ai{background:var(--ok-fg);color:var(--ok-bg)}
.a-warn{background:var(--warn-bg);color:var(--warn-fg);border-color:var(--warn-line)} .a-warn .ai{background:var(--warn-fg);color:var(--warn-bg)}
.a-err{background:var(--err-bg);color:var(--err-fg);border-color:var(--err-line)} .a-err .ai{background:var(--err-fg);color:var(--err-bg)}
.a-info{background:var(--info-bg);color:var(--info-fg);border-color:var(--info-line)} .a-info .ai{background:var(--info-fg);color:var(--info-bg)}
.note-ok{display:flex;align-items:center;gap:10px;padding:14px 18px;border-radius:var(--r);
  background:var(--ok-bg);border:1px solid var(--ok-line);color:var(--ok-fg);font-size:var(--fs-data)}
.retry{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:16px 20px;
  border:2px solid var(--warn-line);background:var(--warn-bg);border-radius:var(--r);color:var(--warn-fg)}
.retry .t{flex:1;min-width:220px;font-size:var(--fs-data)}
.retry .t b{display:block;font-weight:600;margin-bottom:2px}

/* ============ EMPTY STATE ============ */
.empty{text-align:center;padding:44px 20px;border:2px dashed var(--line);border-radius:var(--r-lg);background:var(--surface)}
.empty svg{width:44px;height:44px;margin:0 auto 12px;display:block;color:var(--text-3)}
.empty p,.empty .empty-t{margin:0 0 4px;font-weight:600;font-size:20px}
.empty span,.empty .empty-hint{color:var(--text-2);font-size:var(--fs-data);display:block;margin:0 auto 20px;max-width:56ch}
.empty .row{justify-content:center}

/* ============ FORMS ============ */
label{display:block;font-size:var(--fs-data);font-weight:600;color:var(--text);margin-bottom:7px}
input[type=text],input[type=password],input[type=date],input[type=time],input[type=search],input[type=email],
input[type=tel],input[type=number],input[type=url],select,textarea,.inp{
  font:inherit;font-size:var(--fs-data);width:100%;padding:12px 14px;border:2px solid var(--field);
  border-radius:var(--r-sm);background:var(--surface);color:var(--text);min-height:52px;line-height:1.4;margin:0}
textarea{min-height:120px;resize:vertical;line-height:1.55}
select{-webkit-appearance:none;appearance:none;padding-right:44px;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--text-2) 50%),linear-gradient(135deg,var(--text-2) 50%,transparent 50%);
  background-position:calc(100% - 23px) 50%,calc(100% - 16px) 50%;background-size:7px 7px,7px 7px;background-repeat:no-repeat}
input:focus,select:focus,textarea:focus{outline:3px solid var(--focus);outline-offset:1px;border-color:var(--focus)}
input::placeholder,textarea::placeholder{color:var(--text-3);opacity:1}
input.bad,select.bad,textarea.bad,[aria-invalid="true"]{border-color:var(--err-fg)}
input:disabled,select:disabled,textarea:disabled{background:var(--disabled-bg);color:var(--disabled-fg);cursor:not-allowed}
.help{color:var(--text-2);font-size:var(--fs-small);margin:8px 0 0}

/* NEW: one field = label, optional hint, control, room for the error. */
.field{margin:0 0 22px;scroll-margin-top:96px}
.field .lbl,.lbl{display:block;font-size:var(--fs-data);font-weight:600;color:var(--text);margin:0 0 6px}
.lbl-opt{font-weight:400;color:var(--text-2)}
.field .hint{display:block;margin:-2px 0 8px;font-size:var(--fs-small);color:var(--text-2)}
.err{display:flex;gap:8px;align-items:flex-start;margin:8px 0 0;font-size:var(--fs-small);font-weight:600;color:var(--err-fg)}
.err:empty{display:none}
/* A message line that was shown keeps its space when its words go or it is hidden (kit.js adds
   .is-kept and the old height), so the page never gets shorter under the finger. */
.is-kept:empty,.is-kept[hidden]{display:block !important;visibility:hidden}
.err.is-kept:empty{display:flex !important}
.err::before{content:"!";flex:0 0 22px;height:22px;margin-top:1px;border-radius:50%;background:var(--err-fg);
  color:var(--err-bg);font-size:16px;font-weight:700;line-height:22px;text-align:center}
/* NEW: a message line with its room from the start (Field room or note): one line of the message's
   own size (its 8px margin and one line of words), so a message that comes while she types (a
   half-typed date or time, which Chrome sends on every part) pushes nothing down. A note (the
   weekday under a date, a reminder) shares the room and gives it to the message while the field
   has one, so the two never stack. */
.err-room{display:grid;min-height:calc(8px + 1.65 * var(--fs-small))}
.err-room > *{grid-area:1 / 1;min-width:0}
.field.bad .err-room > :not(.err){visibility:hidden}
.field.bad .inp,.field.bad select,.field.bad textarea,.field.bad .upz,.field.bad .opt{border-color:var(--err-fg)}
fieldset{margin:0;padding:0;border:0;min-width:0}
legend{padding:0}
/* Type to find, above a long list (DZENFind, generalised). */
.find{margin:0 0 8px}
.find-lbl{display:block;font-size:var(--fs-small);font-weight:600;color:var(--text-2);margin:0 0 4px}
/* A search box: the magnifier sits inside, on the left, and never takes a tap. */
.inp-search{position:relative;display:block;min-width:0}
.inp-search>.ic{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--text-2);pointer-events:none}
.inp-search>.inp{padding-left:42px;width:100%}
/* Page numbers under a long list (Pager). */
.pager{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:20px 0 8px}
.pager-nums{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.pager-num,.pager-step{display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:48px;padding:0 14px;
  border:1px solid var(--field);border-radius:var(--r);background:var(--surface);color:var(--text);font-weight:600;text-decoration:none}
.pager-num.is-current{background:var(--text);border-color:var(--text);color:var(--surface)}
.pager-step.is-off{opacity:.4}
.pager-gap{display:inline-flex;align-items:center;min-height:48px;padding:0 4px;color:var(--text-2)}
/* One searchable dropdown (Field find): the box, an arrow on the right, the list under it on
   top of what follows (so nothing below moves when it opens). */
.combo{position:relative}
.combo-inp{padding-right:44px}
.combo-arrow{position:absolute;right:13px;top:50%;transform:translateY(-50%) rotate(90deg);color:var(--text-2);pointer-events:none;display:flex}
.combo.is-open .combo-arrow{transform:translateY(-50%) rotate(-90deg)}
.combo-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:40;margin:0;padding:6px 0;list-style:none;
  max-height:min(330px,55vh);overflow-y:auto;overscroll-behavior:contain;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-lg)}
.combo-opt{padding:12px 16px;min-height:48px;line-height:1.45;cursor:pointer;overflow-wrap:anywhere}
.combo-opt.is-active{background:var(--surface-2)}
@media (hover:hover){.combo-opt:hover{background:var(--surface-2)}}
.combo-opt[aria-selected=true]{font-weight:600}
.combo-opt[aria-disabled=true]{color:var(--text-3);cursor:default;background:none}
.combo-none{padding:12px 16px;color:var(--warn-fg);font-weight:600}
.combo-group{padding:10px 16px 4px;font-size:var(--fs-small);font-weight:600;color:var(--text-2)}
.find-none{margin:6px 0 0;font-size:var(--fs-small);color:var(--warn-fg);font-weight:600}
/* "Nothing found" answers typing, so its line is kept from the start: the list below never moves. */
.find-none[hidden]{display:block !important;visibility:hidden}

/* NEW: option rows instead of small radio dots and tick boxes (from the GIT form). */
.opt{position:relative;display:flex;align-items:flex-start;gap:14px;min-height:60px;margin:0 0 10px;
  padding:15px 16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  cursor:pointer;font-weight:400}
.opt input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.opt .dot,.opt .box{flex:0 0 26px;height:26px;margin-top:1px;border:2px solid var(--field);background:var(--surface);position:relative}
.opt .dot{border-radius:50%}
.opt .box{border-radius:6px}
.opt-text{min-width:0}
.opt-main{display:block;font-weight:600}
.opt-sub{display:block;margin-top:2px;font-size:var(--fs-small);color:var(--text-2)}
.opt.on,.opt:has(input:checked){border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:var(--accent-soft)}
.opt.on .dot,.opt:has(input:checked) .dot{border-color:var(--accent);background:radial-gradient(circle,var(--accent) 0 6px,var(--surface) 7px)}
.opt.on .box,.opt:has(input:checked) .box{border-color:var(--accent);background:var(--accent)}
.opt.on .box::after,.opt:has(input:checked) .box::after{content:"";position:absolute;left:7px;top:2px;width:7px;height:13px;
  border:solid var(--on-accent);border-width:0 3px 3px 0;transform:rotate(45deg)}
.opt:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px}
.opt.off,.opt:has(input:disabled){cursor:not-allowed;background:var(--surface-2);color:var(--text-2)}
.opt.off .dot,.opt.off .box,.opt:has(input:disabled) .dot,.opt:has(input:disabled) .box{background:var(--disabled-bg);border-color:var(--line)}

/* NEW: a 44px switch that also says On or Off in words. */
.switch{position:relative;display:inline-flex;align-items:center;gap:12px;min-height:44px;margin:0;cursor:pointer;
  font-weight:600;font-size:var(--fs-data)}
.switch input{position:absolute;left:0;top:50%;width:56px;height:32px;margin:-16px 0 0;opacity:0;cursor:pointer}
.switch-track{position:relative;flex:none;width:56px;height:32px;border-radius:16px;background:var(--surface-2);
  border:2px solid var(--field);transition:background-color .15s ease-out}
.switch-knob{position:absolute;top:4px;left:4px;width:20px;height:20px;border-radius:50%;background:var(--field);
  transition:transform .15s ease-out}
.switch input:checked + .switch-track{background:var(--accent);border-color:var(--accent)}
.switch input:checked + .switch-track .switch-knob{transform:translateX(24px);background:var(--on-accent)}
.switch input:focus-visible + .switch-track{outline:3px solid var(--focus);outline-offset:2px}
.switch input:disabled + .switch-track{background:var(--disabled-bg);border-color:var(--line)}
.switch-label{min-width:0}
.switch-state{color:var(--text-2);font-weight:600;min-width:3ch}
.switch .when-on{display:none}
.switch input:checked ~ .switch-state .when-on{display:inline}
.switch input:checked ~ .switch-state .when-off{display:none}

/* NEW: the list of problems at the top of a form, each a link to its field. */
.err-summary{margin:0 0 22px;padding:12px 0 6px;border-top:3px solid var(--err-fg);border-bottom:1px solid var(--line);
  color:var(--text);scroll-margin-top:16px}
/* kit.js focuses the list when its page opens. After a click or a tap on Save it is calm: the
   red rule says what it is and no ring is drawn round it. After the keyboard (kit.js sets
   html[data-kit-keys], kept from the page before) it gets the kit's own focus ring. */
.err-summary:focus,.err-summary:focus-visible{outline:none}
[data-kit-keys] .err-summary:focus{outline:3px solid var(--focus);outline-offset:2px}
.err-summary-t{margin:0 0 2px;font-weight:700;font-size:var(--fs-data);color:var(--err-fg)}
.err-summary ul{margin:0;padding-left:22px}
.err-summary a{color:var(--err-fg);font-weight:600;display:inline-flex;align-items:center;min-height:44px}
/* A line she has fixed (kit.js): a tick where the dot was and plain muted words, at the same height.
   The tick is placed absolutely: in the flow it would take a line of its own and the list would grow. */
.err-summary li{position:relative}
.err-summary li.is-fixed{list-style:none}
.err-summary li.is-fixed::before{content:"\2713";position:absolute;left:-22px;top:0;width:20px;line-height:44px;color:var(--ok-fg);font-weight:800}
.err-summary li.is-fixed a{color:var(--text-2);font-weight:400;text-decoration:none}

/* ============ PAGE PARTS (NEW) ============ */
/* Page header inside the content: what this page is, and the one or two things to do. */
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px 20px;margin:0 0 20px}
.page-head-t{min-width:0;flex:1 1 320px}
.page-title{margin:0;font-size:var(--fs-h2);font-weight:650;line-height:1.3;letter-spacing:-.01em}
.page-sub{margin:4px 0 0;color:var(--text-2);font-size:var(--fs-data)}
.page-actions{display:flex;flex-wrap:wrap;gap:10px}

/* Filter bar: a search box with a real Search button, and a segmented filter. */
.filters{display:flex;flex-wrap:wrap;gap:16px 24px;align-items:flex-end;padding:16px 18px;margin:0 0 18px;
  background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--r-lg)}
.filters-search{flex:1 1 340px;min-width:0}
.filters-row{display:flex;gap:10px}
.filters-row .inp-search{flex:1;min-width:0}
.filters-group{min-width:0}
.filters-group .lbl{margin-bottom:6px}

/* Data list: a table on a wide screen, a stack of cards below 1180px. One markup, the label
   for each value comes from the cell's data-label. The cards start at 1179px, not at phone width:
   with the side menu (264px) and the page's padding, a 1024px screen leaves 704px for the list,
   and seven columns with their padding, a status chip and a button need about 770px in Chinese and
   920px in English (measured on the GIT registrations list, 30 Nov 2026), so the table scrolled the
   page sideways. A chip in a table wraps, so the table is narrow enough from 1180px on. */
.dl{width:100%;border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-lg);overflow:hidden;font-size:var(--fs-data)}
.dl caption{caption-side:top;text-align:left;font-weight:600;padding:0 0 10px}
.dl th{text-align:left;font-size:var(--fs-small);font-weight:600;color:var(--text-2);padding:12px 18px;
  background:var(--surface-2);border-bottom:2px solid var(--line);white-space:nowrap}
.dl td{padding:16px 18px;border-bottom:1px solid var(--line-soft);vertical-align:top}
.dl tbody tr:last-child td{border-bottom:0}
.dl tbody tr:hover td{background:var(--accent-soft)}
.dl .num{text-align:right;font-variant-numeric:tabular-nums}
.dl-primary .dl-v{font-weight:600}
.dl-primary a{font-weight:600}
.dl td.dl-act{text-align:right;white-space:nowrap}
.dl-act .dl-v{display:inline-flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.dl .chip{white-space:normal}
@media (max-width:1179px){
  .dl,.dl tbody,.dl tr,.dl td{display:block;width:100%}
  .dl{border:0;background:none;border-radius:0;overflow:visible}
  .dl thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .dl caption{display:block}
  .dl tr{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:4px 16px;
    margin:0 0 12px;box-shadow:var(--sh-sm)}
  .dl tbody td{border:0;padding:10px 0;display:grid;grid-template-columns:minmax(96px,36%) minmax(0,1fr);
    gap:12px;text-align:left}
  .dl tbody td + td{border-top:1px solid var(--line-soft)}
  .dl tbody td::before{content:attr(data-label);font-size:var(--fs-small);font-weight:600;color:var(--text-2)}
  .dl tbody td.dl-primary{display:block;font-size:20px;padding-top:14px}
  .dl tbody td.dl-primary::before,.dl tbody td.dl-act::before{display:none}
  .dl tbody td.dl-act{display:block;padding:12px 0 14px;text-align:left}
  .dl-act .dl-v{justify-content:flex-start}
  .dl .num{text-align:left}
  .dl tbody tr:hover td{background:none}
}

/* Summary: a definition list with an inline Change link on each row. */
.sum{margin:0;background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--r-lg);padding:4px 20px}
.sum-row{display:grid;grid-template-columns:minmax(150px,30%) minmax(0,1fr) auto;gap:4px 20px;align-items:baseline;
  padding:12px 0;border-top:1px solid var(--line-soft)}
.sum-row:first-child{border-top:0}
.sum dt{font-weight:600;color:var(--text-2);font-size:var(--fs-data)}
.sum dd{margin:0;min-width:0;overflow-wrap:anywhere}
.sum dd.sum-act{justify-self:end}
.sum-missing{display:inline-flex;align-items:center;gap:8px;color:var(--warn-fg);font-weight:600}
.sum-missing::before{content:"";width:9px;height:9px;flex:none;background:var(--warn-dot);transform:rotate(45deg)}
@media (max-width:640px){
  .sum{padding:4px 16px}
  .sum-row{grid-template-columns:minmax(0,1fr) auto}
  .sum dt{grid-column:1 / -1}
}

/* Step indicator: "Step 2 of 7" in words, then every step with its name. */
.stepbar{margin:0 0 22px}
.stepbar-now{margin:0 0 10px;font-size:var(--fs-data);color:var(--text-2)}
.stepbar-count{font-variant-numeric:tabular-nums}
.stepbar-name{color:var(--text);font-weight:650;margin-left:6px}
.stepbar-list{list-style:none;margin:0;padding:0;display:flex;gap:6px}
.stepbar-list li{flex:1 1 0;min-width:0;display:flex;align-items:center;gap:10px;padding:8px 12px;min-height:52px;
  background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--r-sm);
  font-size:var(--fs-small);font-weight:500;color:var(--text-2);line-height:1.3}
.stepbar-list a{display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none;min-height:44px;width:100%}
.stepbar-list a:hover .t{text-decoration:underline}
.stepbar-list .n{width:30px;height:30px;border-radius:50%;flex:none;display:grid;place-items:center;
  font-weight:700;background:var(--track);color:var(--text-2);font-size:var(--fs-small)}
.stepbar-list .is-done{background:var(--ok-bg);border-color:var(--ok-line);color:var(--ok-fg)}
.stepbar-list .is-done .n{background:var(--ok-fg);color:var(--ok-bg)}
.stepbar-list .is-now{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text);
  font-weight:700;box-shadow:inset 0 0 0 1px var(--accent)}
.stepbar-list .is-now .n{background:var(--accent);color:var(--on-accent)}
@media (max-width:900px){
  .stepbar-list{gap:8px;flex-wrap:wrap}
  .stepbar-list li{flex:0 0 auto;padding:0;border:0;background:none;box-shadow:none;min-height:44px}
  .stepbar-list li.is-now,.stepbar-list li.is-done{background:none;box-shadow:none}
  .stepbar-list .t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .stepbar-list .n{width:40px;height:40px}
  .stepbar-list .is-now .n{box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--accent)}
}

/* "Still missing": calm and amber, never red. Saving is allowed, this only says what is
   left before the thing can go live. */
.missing{background:var(--warn-bg);border:1.5px solid var(--warn-line);border-left:6px solid var(--warn-dot);
  border-radius:var(--r);padding:14px 20px 8px;margin:0 0 20px;color:var(--text)}
.missing-t{margin:0 0 2px;font-size:var(--fs-data);font-weight:650;color:var(--warn-fg)}
.missing-hint{margin:0 0 6px;color:var(--text-2);font-size:var(--fs-small)}
.missing-list{list-style:none;margin:0;padding:0}
.missing-list li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:2px 16px;
  padding:4px 0;min-height:52px;border-top:1px solid var(--warn-line)}
.missing-list li:first-child{border-top:0}
.missing-name{display:inline-flex;align-items:center;gap:10px;font-weight:600}
.missing-name::before{content:"";width:9px;height:9px;flex:none;background:var(--warn-dot);transform:rotate(45deg)}

/* Autosave line: a dot and words, "Saved 10:42". */
.autosave{display:inline-flex;align-items:center;gap:9px;margin:0;min-height:44px;font-size:var(--fs-small);
  font-weight:600;color:var(--text-2)}
.autosave i{width:10px;height:10px;border-radius:50%;flex:none;background:var(--field)}
.autosave-t{font-variant-numeric:tabular-nums}
/* Words for without and with the script in one place (Autosave noScriptText): the line is as tall
   as the taller of the two from the first paint, so the swap kit.js makes moves nothing. */
.autosave-w{display:inline-grid;min-width:0}
.autosave-w > .autosave-t,.autosave-w > .autosave-room{grid-area:1 / 1}
.autosave-room{visibility:hidden}
.autosave[data-state="saved"]{color:var(--ok-fg)} .autosave[data-state="saved"] i{background:var(--ok-dot)}
.autosave[data-state="dirty"]{color:var(--warn-fg)} .autosave[data-state="dirty"] i{background:var(--warn-dot)}
.autosave[data-state="failed"]{color:var(--err-fg)} .autosave[data-state="failed"] i{background:var(--err-dot)}
/* 422: a field needs fixing. Same red as the field message it points to. */
.autosave[data-state="invalid"]{color:var(--err-fg)} .autosave[data-state="invalid"] i{background:var(--err-dot)}
.autosave[data-state="saving"] i{width:14px;height:14px;background:none;border:2px solid var(--accent);
  border-right-color:transparent;animation:spin 1s linear infinite}

/* Sticky bottom action bar: Save and the autosave line stay in reach on a long form. */
.actionbar{position:sticky;bottom:0;z-index:30;margin:28px 0 0;padding:12px 18px;
  padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));background:var(--surface);
  border:1px solid var(--line);border-bottom:0;border-radius:var(--r-lg) var(--r-lg) 0 0;box-shadow:var(--sh)}
.actionbar-in{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.actionbar-btns{margin-left:auto;display:flex;flex-wrap:wrap;gap:10px}
@media (max-width:640px){
  .actionbar{margin-left:-16px;margin-right:-16px;border-radius:0;border-left:0;border-right:0}
  .actionbar-btns{width:100%}
  .actionbar-btns .btn,.actionbar-btns form{flex:1 1 auto}
  .actionbar-btns form .btn{width:100%}
}

/* Poster preview: the picture at its real shape, never cropped. */
.poster{margin:0;max-width:360px}
.poster-in,.poster-a4 .poster-in{position:relative;aspect-ratio:210 / 297;background:var(--surface-2);border:1px solid var(--line);
  border-radius:var(--r);overflow:hidden;display:grid;place-items:center}
.poster-square .poster-in{aspect-ratio:1 / 1}
.poster-portrait .poster-in{aspect-ratio:4 / 5}
.poster-story .poster-in{aspect-ratio:9 / 16}
/* Landscape 3:2, the shape of most class posters (GIT: 3:2, 16:9 and A4 landscape; the picture is
   never cropped, a wider or squarer one gets a thin band). As wide as its column. */
.poster-landscape{max-width:none}
.poster-landscape .poster-in{aspect-ratio:3 / 2}
.poster-in img{display:block;width:100%;height:100%;object-fit:contain}
.poster-empty{border:2px dashed var(--line);color:var(--text-2);text-align:center;padding:20px}
.poster-empty p{margin:0;font-weight:600}
.poster figcaption{margin-top:8px;font-size:var(--fs-small);color:var(--text-2)}

/* ============ FILES ============ */
.drop{position:relative;border:3px dashed var(--line-accent);background:var(--accent-soft);border-radius:var(--r-lg);
  padding:48px 24px;text-align:center;cursor:pointer;transition:background-color .15s ease-out,border-color .15s ease-out}
.drop.is-over{background:var(--accent-soft-2);border-color:var(--accent)}
.drop input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.drop-title{font-size:26px;font-weight:600;margin:0 0 6px}
.drop-hint{color:var(--text-2);font-size:var(--fs-data);margin:0 0 18px}
.drop-meta{color:var(--text-2);font-size:var(--fs-small);margin:18px 0 0}
/* NEW: upload zone with two worded buttons, "Take a photo" and "Choose file". */
.upz{padding:16px;background:var(--surface-2);border:1.5px dashed var(--field);border-radius:var(--r)}
.upz-btns{display:flex;flex-wrap:wrap;gap:10px}
.upz-btn{position:relative;flex:1 1 200px;overflow:hidden}
.upz-btn input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.upz-btn:focus-within{outline:3px solid var(--focus);outline-offset:2px}
.upz-types{margin:10px 0 0;font-size:var(--fs-small);color:var(--text-2)}
.upz-chosen{display:flex;align-items:center;gap:10px;margin:12px 0 0;padding:10px 12px;background:var(--ok-bg);
  color:var(--ok-fg);border:1px solid var(--ok-line);border-radius:var(--r-sm);font-weight:600;overflow-wrap:anywhere}
.upz-chosen .ic{color:var(--ok-fg)}

.stack{list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--r-lg);overflow:hidden}
.stack > li{display:flex;align-items:center;gap:14px;padding:14px 18px;border-top:1px solid var(--line-soft);min-height:64px}
.stack > li:first-child{border-top:0}

/* A bar with words beside it, for "used against the free limit". */
.meter{-webkit-appearance:none;appearance:none;display:block;width:100%;height:14px;border:0;border-radius:7px;
  background:var(--track);color:var(--accent);overflow:hidden}
.meter::-webkit-progress-bar{background:var(--track);border-radius:7px}
.meter::-webkit-progress-value{background:var(--accent);border-radius:7px}
.meter::-moz-progress-bar{background:var(--accent);border-radius:7px}
.meter.k-warn{color:var(--warn-dot)} .meter.k-warn::-webkit-progress-value{background:var(--warn-dot)} .meter.k-warn::-moz-progress-bar{background:var(--warn-dot)}
.meter.k-bad{color:var(--err-dot)} .meter.k-bad::-webkit-progress-value{background:var(--err-dot)} .meter.k-bad::-moz-progress-bar{background:var(--err-dot)}

/* ============ UNDO BAR ============ */
/* The house replacement for "are you sure?" dialogs: do it, then offer Undo for ten
   seconds. The clock waits while the pointer or keyboard is on the bar. */
.undobar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(22px + env(safe-area-inset-bottom,0px));z-index:60;
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;width:max-content;max-width:min(680px,calc(100vw - 32px));
  background:var(--toast-bg);color:var(--toast-fg);padding:12px 14px 12px 20px;border-radius:var(--r);
  border:1px solid var(--toast-bg);box-shadow:var(--sh-lg);font-size:var(--fs-data);animation:rise .18s ease-out}
.undobar .msg{flex:1;min-width:200px}
.undobar form{margin:0}
.undobar .btn-undo{background:var(--toast-fg);color:var(--toast-bg);border-color:var(--toast-fg);font-weight:700;min-height:48px;padding:10px 20px;box-shadow:none}
.undobar .btn-undo:hover{text-decoration:underline}
.undobar .btn-undo:focus-visible{outline:3px solid var(--toast-fg);outline-offset:2px}
.undobar-demo{position:static;transform:none;left:auto;bottom:auto;animation:none;width:auto;max-width:min(560px,100%)}
@keyframes rise{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}

/* ============ DIALOG ============ */
.dlg{border:0;border-radius:var(--r-lg);padding:0;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);
  background:var(--surface);color:var(--text);box-shadow:var(--sh-lg)}
.dlg::backdrop{background:var(--scrim)}
.dlg:not([open]){display:none}
.dlg-in{padding:24px 24px 0}
.dlg-title{margin:0 0 14px;font-size:22px;font-weight:600;letter-spacing:-.01em}
.dlg-body{font-size:var(--fs-data)}
.dlg-body > :first-child{margin-top:0}
.dlg-actions{position:sticky;bottom:0;z-index:1;display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;
  background:var(--surface);padding:16px 0 22px;margin-top:18px}
.dlg-actions form{margin:0}
@media (max-width:768px){
  .dlg-in{padding:20px 18px 0}
  .dlg-actions .btn,.dlg-actions form{flex:1 1 auto}
  .dlg-actions form .btn{width:100%}
}

/* ============ TABLES ============ */
table{width:100%;border-collapse:collapse;font-size:var(--fs-data)}
th{font-size:var(--fs-small);font-weight:600;color:var(--text-2);text-align:left;padding:12px 18px;
  background:var(--surface-2);border-bottom:2px solid var(--line)}
td{padding:16px 18px;border-top:1px solid var(--line-soft)}

/* ============ SIGN IN ============ */
/* One card in the middle of the screen. No sidebar full of places a stranger cannot go. */
.login-body{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px 16px;margin:0}
.login-card{width:100%;max-width:480px;background:var(--surface);border:1px solid var(--line-soft);
  border-radius:var(--r-lg);box-shadow:var(--sh);padding:32px 32px 24px}
.login-card.is-wide{max-width:620px}
.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.login-brand img{flex:none;display:block}
.login-brand .is-mark{width:56px;height:56px;border-radius:50%;object-fit:contain}
.login-brand.is-plate{flex-direction:column;align-items:flex-start;gap:12px}
.login-brand .is-lockup{width:132px;height:auto}
.login-name{font-weight:600;font-size:20px;line-height:1.25}
.login-owner{color:var(--text-2);font-size:var(--fs-small)}
.login-title{font-size:var(--fs-h1);margin:0 0 18px}
.login-note{margin:0 0 16px}
.login-field{display:flex;gap:8px;align-items:stretch}
.login-field input{flex:1;min-width:0;font-family:var(--mono);letter-spacing:.04em}
.login-eye{font:inherit;font-size:var(--fs-label);font-weight:600;border:2px solid var(--field);background:var(--surface);
  color:var(--text);border-radius:var(--r-sm);padding:0 16px;margin:0;min-width:88px;min-height:52px;cursor:pointer;white-space:nowrap}
.login-eye:hover{background:var(--surface-2)}
.login-eye[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent)}
.login-caps{color:var(--warn-fg);font-weight:600}
/* The Caps Lock line answers typing, so its line is kept from the start: Sign in never moves. */
.login-caps[hidden]{display:block !important;visibility:hidden}
.login-left{display:block;margin-top:4px;font-size:var(--fs-small);font-weight:600}
.alert [data-countdown]{display:inline;font-weight:700;font-variant-numeric:tabular-nums}
.login-form .alert{margin:16px 0 0}
.login-submit{width:100%;margin-top:18px}
.login-form .help{text-align:center;margin-top:14px}
.login-foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:22px;padding-top:18px;
  border-top:1px solid var(--line-soft)}
@media (max-width:520px){
  .login-card{padding:24px 20px 18px}
  .login-foot{justify-content:center}
}
/* NEW: after the password, the person taps their own name once on this device. */
.who-lede{margin:-8px 0 0;color:var(--text-2);font-size:var(--fs-data)}
.who-list{display:grid;gap:12px;margin:20px 0 0}
.who-btn{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:76px;
  padding:14px 20px;margin:0;font:inherit;font-size:22px;font-weight:650;line-height:1.3;text-align:left;color:var(--text);
  background:var(--surface);border:2px solid var(--field);border-radius:var(--r);cursor:pointer;box-shadow:var(--sh-sm)}
.who-btn:hover{border-color:var(--accent);background:var(--accent-soft)}
.who-btn.on{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.who-name{display:block;overflow-wrap:anywhere}
.who-sub{display:block;font-size:var(--fs-small);font-weight:500;color:var(--text-2)}
.who-btn .ic{color:var(--accent-text);width:24px;height:24px}
.who-note{margin:18px 0 0;font-size:var(--fs-small);color:var(--text-2)}
@media (min-width:600px){.who-list{grid-template-columns:1fr 1fr}}

/* ============ HELP ============ */
/* Built around one fact: someone screenshots one card and sends it on WhatsApp, so a card
   carries its own title, its own "when" and its own steps. App-size type, not small print. */
.help-top{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:0 0 22px}
.help-logo{width:auto;height:72px;flex:0 0 auto;display:block}
.help-lede{margin:0;font-size:20px;color:var(--text-2);max-width:56ch;line-height:1.55}
.help-jump{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:0 0 18px}
.help-jump a{display:flex;flex-direction:column;gap:3px;padding:14px 16px;min-height:64px;justify-content:center;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);text-decoration:none;box-shadow:var(--sh-sm)}
.help-jump a:hover{border-color:var(--accent);background:var(--accent-soft)}
.help-jump b{font-size:18px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.help-jump span{font-size:var(--fs-small);color:var(--text-3)}
.help-hint{font-size:var(--fs-small);color:var(--text-2);background:var(--surface-2);border:1px dashed var(--line);
  border-radius:var(--r);padding:12px 16px;margin:0 0 30px;line-height:1.6}
.help-group{scroll-margin-top:18px;margin:0 0 12px}
.help-h2{font-size:var(--fs-h2);font-weight:700;color:var(--text);margin:34px 0 16px;padding-bottom:9px;border-bottom:2px solid var(--line)}
.uc{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:22px 24px;margin:0 0 16px;
  box-shadow:var(--sh-sm);scroll-margin-top:18px;break-inside:avoid}
.uc-key{border-left:5px solid var(--accent)}
.uc-head{display:flex;align-items:center;gap:10px;margin:0 0 6px;flex-wrap:wrap}
.uc-id{font-family:var(--mono);font-size:var(--fs-small);font-weight:600;letter-spacing:.06em;color:var(--text-3);
  text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.uc-id:hover{color:var(--accent-text);text-decoration:underline}
.uc-star{font-size:var(--fs-small);font-weight:600;color:var(--accent-text);background:var(--accent-soft);
  border:1px solid var(--line-soft);border-radius:999px;padding:1px 12px}
.uc-title{font-size:22px;font-weight:650;line-height:1.35;margin:0 0 10px;color:var(--text)}
.uc-when{font-size:var(--fs-body);color:var(--text-2);margin:0 0 14px;line-height:1.6}
.uc-when b{color:var(--text);font-weight:600;margin-right:6px}
.uc-steps{margin:0;padding:0;list-style:none;counter-reset:uc}
.uc-steps li{counter-increment:uc;position:relative;padding:0 0 0 42px;margin:0 0 11px;font-size:18px;line-height:1.6;color:var(--text)}
.uc-steps li::before{content:counter(uc);position:absolute;left:0;top:0;width:29px;height:29px;border-radius:50%;
  background:var(--accent-soft);color:var(--accent-text);font-size:16px;font-weight:700;
  display:flex;align-items:center;justify-content:center}
.uc-shot{margin:16px 0 0;padding:0}
.uc-shot img{max-width:100%;height:auto;display:block;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-sm)}
/* The last thing read lowers the stakes. No card ends on a warning. */
.uc-calm{display:flex;align-items:flex-start;gap:9px;margin:16px 0 0;padding:12px 15px;background:var(--ok-bg);
  border:1px solid var(--ok-line);border-radius:var(--r);font-size:var(--fs-small);line-height:1.6;color:var(--ok-fg)}
.uc-calm svg{flex:0 0 auto;width:18px;height:18px;margin-top:3px;color:var(--ok-fg)}
.help-top-link{display:inline-flex;align-items:center;min-height:44px;margin:4px 0 18px;font-size:var(--fs-small);
  color:var(--link);text-decoration:none}
.help-top-link:hover{text-decoration:underline}
.help-foot{margin:32px 0 0;padding-top:18px;border-top:1px solid var(--line-soft);font-size:var(--fs-small);color:var(--text-2)}
@media (max-width:640px){
  .help-jump{grid-template-columns:1fr 1fr}
  .uc{padding:18px 16px}
  .uc-title{font-size:20px}
  .help-lede{font-size:18px}
}

/* ============ VERSION ============ */
.ver-card{max-width:560px}
.ver-hero{padding:22px 24px;border-bottom:1px solid var(--line-soft)}
.ver-lab{margin:0 0 8px;font-size:var(--fs-small);font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--text-3)}
.ver-hash{font-family:var(--mono);font-size:clamp(24px,6vw,32px);font-weight:500;line-height:1.1;color:var(--text);
  overflow-wrap:anywhere;user-select:all}
.ver-note{margin:12px 0 0;font-size:var(--fs-small);color:var(--text-2);max-width:44ch}
.ver-rows{display:grid;grid-template-columns:max-content 1fr;gap:14px 28px;margin:0;padding:20px 24px}
.ver-rows dt{font-size:var(--fs-small);color:var(--text-3)}
.ver-rows dd{margin:0;font-family:var(--mono);font-size:var(--fs-small);color:var(--text-2);overflow-wrap:anywhere;user-select:all}
.ver-alert{margin-top:20px;max-width:560px}
.ver-cmd{margin:22px 0 0;max-width:560px}
.ver-cmd p{margin:0 0 8px;font-size:var(--fs-small);color:var(--text-2)}
.ver-cmd code{display:block;padding:12px 14px;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--line-soft);
  font-family:var(--mono);font-size:var(--fs-small);color:var(--text-2);overflow-x:auto;white-space:pre;user-select:all}
@media (max-width:560px){
  .ver-hero,.ver-rows{padding:18px}
  .ver-rows{grid-template-columns:1fr;gap:0}
  .ver-rows dt{margin-top:14px}
  .ver-rows dt:first-of-type{margin-top:0}
  .ver-rows dd{margin-top:2px}
}

/* ============ OPS ============ */
/* Kayden's pages, not the staff's. Denser on purpose, but still 16px at the smallest. */
body.ops{font-size:var(--fs-small)}
.ops-bar{display:flex;align-items:center;gap:14px 18px;flex-wrap:wrap;padding:8px 22px;background:var(--opsbar-bg);
  color:var(--side-strong);position:sticky;top:0;z-index:20}
.ops-brand{display:flex;align-items:center;gap:10px;color:var(--side-strong);text-decoration:none;font-size:18px;min-height:44px}
.ops-brand .side-plate{padding:4px 8px}
.ops-brand .side-plate img{width:76px}
.ops-brand .side-logo{width:32px;height:32px}
.ops-nav{display:flex;gap:4px;flex-wrap:wrap}
.ops-nav a{color:var(--side-text);text-decoration:none;padding:8px 14px;border-radius:var(--r-sm);font-weight:600;
  min-height:44px;display:inline-flex;align-items:center}
.ops-nav a:hover{background:var(--side-hover);color:var(--side-strong)}
.ops-nav a.on,.ops-nav a[aria-current="page"]{background:var(--side-on);color:var(--side-strong)}
.ops-sp{flex:1}
.ops-out{color:var(--side-text);text-decoration:underline;min-height:44px;display:inline-flex;align-items:center}
.ops-out:hover{color:var(--side-strong)}
.ops-main{max-width:1180px;margin:0 auto;padding:26px 22px 70px}
.ops-h1{font-size:26px;font-weight:700;margin:0 0 6px}
.ops-h2{font-size:19px;font-weight:650;margin:32px 0 12px;padding-bottom:7px;border-bottom:1px solid var(--line-soft)}
.ops-h2 .dim{font-weight:400}
.ops-lede{color:var(--text-2);margin:0 0 20px;max-width:74ch;line-height:1.6}
.ops-note{color:var(--text-2);font-size:var(--fs-small);margin:10px 0 0;line-height:1.6;max-width:80ch}
.ops-when{color:var(--text-2);font-size:var(--fs-small);font-weight:400}
.ops-rule{border-left:3px solid var(--warn-dot);padding-left:12px;margin:0 0 16px}
.ops-verdict{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 20px;border-radius:var(--r);
  border:1px solid var(--line);background:var(--surface);font-size:var(--fs-data);margin:0 0 20px}
.ops-verdict .dot{width:12px;height:12px;border-radius:50%;background:var(--ok-dot);flex:0 0 auto}
.ops-verdict.k-warn{background:var(--warn-bg);border-color:var(--warn-line);color:var(--warn-fg)} .ops-verdict.k-warn .dot{background:var(--warn-dot)}
.ops-verdict.k-bad{background:var(--err-bg);border-color:var(--err-line);color:var(--err-fg)} .ops-verdict.k-bad .dot{background:var(--err-dot)}
.ops-verdict.k-off{background:var(--surface-2)} .ops-verdict.k-off .dot{background:none;border:2px solid var(--field)}
.ops-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px}
.kpi span{display:block;font-size:var(--fs-small);color:var(--text-2);margin-bottom:4px}
.kpi b{font-size:28px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}
.kpi b small{font-size:16px;font-weight:500;color:var(--text-2)}
.kpi.k-bad b{color:var(--err-fg)} .kpi.k-warn b{color:var(--warn-fg)} .kpi.k-ok b{color:var(--ok-fg)}
.ops-table{width:100%;border-collapse:collapse;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;font-size:var(--fs-small)}
.ops-table th{text-align:left;font-size:var(--fs-small);font-weight:600;color:var(--text-2);padding:9px 13px;
  background:var(--surface-2);border-bottom:1px solid var(--line);white-space:nowrap}
.ops-table td{padding:9px 13px;border-top:0;border-bottom:1px solid var(--line-soft);vertical-align:top}
.ops-table tr:last-child td{border-bottom:0}
.ops-table tr.total td{border-top:2px solid var(--line);background:var(--surface-2)}
.ops-table a{color:var(--link)}
.ops-log tr.is-bad td{background:var(--err-bg)}
.pill{display:inline-block;padding:1px 10px;border-radius:999px;font-size:var(--fs-small);font-weight:600;
  border:1px solid var(--line);line-height:1.5;white-space:nowrap}
.pill.k-ok{background:var(--ok-bg);color:var(--ok-fg);border-color:var(--ok-line)}
.pill.k-warn{background:var(--warn-bg);color:var(--warn-fg);border-color:var(--warn-line)}
.pill.k-bad{background:var(--err-bg);color:var(--err-fg);border-color:var(--err-line)}
.pill.k-off{background:var(--surface-2);color:var(--text-2);border-color:var(--line)}
.k-ok{color:var(--ok-fg)} .k-warn{color:var(--warn-fg)} .k-bad{color:var(--err-fg)}
.ops-fail{background:var(--err-bg);border:1px solid var(--err-line);border-radius:var(--r);padding:15px 18px;color:var(--err-fg)}
.ops-fail .row-1{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.ops-fail p{margin:0 0 12px;font-family:var(--mono);font-size:var(--fs-small);word-break:break-word}
.ops-filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);padding:14px 16px;margin:0 0 18px}
.ops-filters label{display:flex;flex-direction:column;gap:4px;margin:0;font-size:var(--fs-small);color:var(--text-2);font-weight:600}
.ops-filters input,.ops-filters select{font-size:var(--fs-small);padding:8px 12px;border-width:1px;min-height:48px;width:auto;min-width:150px}
.ops-filters select{padding-right:40px}
.ops-filters .btn{min-height:48px;padding:8px 16px;font-size:var(--fs-small)}
.ops-filters .switch{flex-direction:row;font-size:var(--fs-small);color:var(--text)}
.ops-count{color:var(--text-2);font-size:var(--fs-small);margin:0 0 8px}
.ops-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}
.ops-card{display:flex;flex-direction:column;gap:7px;padding:18px 20px;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-lg);text-decoration:none;color:var(--text);box-shadow:var(--sh-sm)}
.ops-card:hover{border-color:var(--accent)}
.ops-card b{font-size:19px}
.ops-card span{color:var(--text-2);line-height:1.55}
.ops-card em{font-style:normal;font-size:var(--fs-small);color:var(--text-2);margin-top:auto;padding-top:6px}
.ops-card em.k-ok{color:var(--ok-fg)} .ops-card em.k-warn{color:var(--warn-fg)} .ops-card em.k-bad{color:var(--err-fg)}
.usage{margin:0;padding:0;list-style:none;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:4px 16px}
.usage li{display:grid;grid-template-columns:minmax(160px,1fr) minmax(120px,2fr);gap:6px 18px;align-items:center;padding:12px 0;
  border-top:1px solid var(--line-soft)}
.usage li:first-child{border-top:0}
.usage-name{font-weight:600}
.usage-words{grid-column:2;color:var(--text-2)}
@media (max-width:640px){.usage li{grid-template-columns:1fr} .usage-words{grid-column:1}}
.ops-switches{display:flex;gap:14px;flex-wrap:wrap;margin:0 0 8px}
.ops-demo{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:20px;margin:0 0 12px}
.ops-demo.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.ops-demo > p:first-child{margin-top:0}
.swatches{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.sw{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:10px;font-size:var(--fs-small)}
.sw span{display:block;height:38px;border-radius:var(--r-sm);border:1px solid var(--line);margin-bottom:7px}
.sw code{display:block;color:var(--text-2);font-family:var(--mono)}
.sw em{font-style:normal;color:var(--text-2);font-family:var(--mono);overflow-wrap:anywhere}
.ops-phone{width:390px;max-width:100%;height:640px;border:1px solid var(--line);border-radius:var(--r);background:var(--bg);display:block}
.ops-marks figure{margin:0;text-align:center}
.ops-marks figcaption{font-size:var(--fs-small);color:var(--text-2);margin-top:7px}
.ops-marks .on-dark{background:var(--side);padding:14px 18px;border-radius:var(--r)}
.ops-marks .on-dark figcaption{color:var(--side-text)}
.ops-type p{margin:0 0 8px}
.fs-h2{font-size:var(--fs-h2);font-weight:700}
.fs-body{font-size:var(--fs-body)}
.fs-data{font-size:var(--fs-data)}
.fs-small{font-size:var(--fs-small)}
@media (max-width:760px){
  .ops-bar{gap:8px 10px;padding:8px 14px}
  .ops-main{padding:18px 14px 60px}
  .ops-table{display:block;overflow-x:auto}
}

/* ============ HTMX ============ */
/* htmx's own indicator style is turned off (its inline <style> would break the CSP). */
.htmx-indicator{opacity:0;transition:opacity .2s ease-in}
.htmx-request .htmx-indicator,.htmx-request.htmx-indicator{opacity:1}

/* ============ PRINT ============ */
/* A printout needs no sign-in and no working screen, which is why help gets printed and
   taped beside the computer. brand.css switches every token back to the light theme. */
@media print{
  .side,.menu-btn,.scrim,.seg,.help-jump,.help-top-link,.skip,.content-actions,.actionbar,.undobar,.ops-bar{display:none !important}
  .page,.content{display:block}
  .content-head{border:0;padding:0 0 12px}
  .content-body{padding:0;background:none}
  .uc,.card,.dl tr{box-shadow:none;page-break-inside:avoid}
  body{background:none;font-size:12pt}
}

/* ============ MOTION ============ */
@media (prefers-reduced-motion:reduce){
  .spin,.autosave[data-state="saving"] i{animation-duration:2.4s}
  .undobar{animation:none}
  .btn,.switch-track,.switch-knob,.drop{transition:none}
}
