/* ==========================================================================
   FijyOS 5 base: tokens and shared components (D-032).
   Every colour, font, corner and shadow comes from a token. A theme
   (public/assets/themes/<key>/theme.css) sets the "theme tokens" below;
   the older component tokens (--face, --win, --sel…) are derived from them,
   so a theme only needs to fill in about 30 values. See THEMES.md.
   ========================================================================== */

[hidden] { display: none !important; }

/* ---------- shared fonts (each theme adds its own @font-face rules) ---------- */
@font-face { font-family: "Mono"; font-weight: 400; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mono"; font-weight: 600; src: url("../fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "VT323"; font-weight: 400; src: url("../fonts/vt323-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Hebrew"; font-weight: 400; src: url("../fonts/frank-ruhl-libre-hebrew-400-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+FB1D-FB4F; font-display: swap; }
@font-face { font-family: "Hebrew"; font-weight: 700; src: url("../fonts/frank-ruhl-libre-hebrew-700-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+FB1D-FB4F; font-display: swap; }

:root {
  /* ── theme tokens (a theme overrides these) ── */
  --bg: #e9ecf1;                 /* behind everything */
  --scene-dim: rgba(10, 14, 22, .25); /* veil over the scenery */
  --ink: #ffffff;                /* text drawn straight on the scenery (Home greeting) */
  --ink-soft: rgba(255, 255, 255, .78);
  --surface: #ffffff;            /* pages, cards, sheets */
  --surface-2: #f4f6f9;          /* zebra rows, wells */
  --surface-text: #161b22;
  --panel: #eef1f5;              /* toolbars, buttons, quiet chrome */
  --panel-text: #161b22;
  --muted: #59636f;
  --faint: #7b8591;
  --line: rgba(20, 30, 45, .14);
  --accent: #2f5bea;
  --accent-text: #ffffff;
  --accent-2: #e8833a;
  --link: #2448c8;
  --ok: #1d7d3a; --warn: #9a5a00; --bad: #b3261e; --info: #2448c8;
  --ok-bg: #e2f4e5; --warn-bg: #fff3d6; --bad-bg: #fbe3e1; --info-bg: #e3edfb;
  --acc-a: #2f5bea; --acc-b: #23a26b; --acc-c: #e8833a; --acc-d: #8a5ad8;
  --chart-1: var(--acc-a); --chart-2: var(--acc-c); --chart-3: var(--acc-b); --chart-4: var(--bad); --chart-5: var(--acc-d);
  --tip: #fff8dc;
  --lcd: #0e1a2b;
  --glow-a: .3;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-display: var(--f-body);
  --f-mono: "Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --f-hebrew: "Hebrew", "Frank Ruhl Libre", "Times New Roman", serif;
  --f-term: "VT323", var(--f-mono);
  --head-weight: 700;
  --head-color: inherit;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(10, 20, 40, .08), 0 4px 14px rgba(10, 20, 40, .08);
  --shadow-lg: 0 18px 50px rgba(10, 20, 40, .28);
  --btn-bg: var(--panel); --btn-text: var(--panel-text); --btn-line: var(--line);
  --field-bg: var(--surface); --field-line: rgba(20, 30, 45, .28);
  --bar-bg: rgba(255, 255, 255, .72); --bar-text: var(--surface-text); --bar-blur: 14px;
  --tile-bg: rgba(255, 255, 255, .86); --tile-text: var(--surface-text); --tile-sub: var(--muted);
  --tile-radius: 18px; --tile-shadow: var(--shadow); --tile-ico: var(--accent);
  --sheet-bg: var(--surface); --sheet-radius: var(--radius-lg); --sheet-shadow: var(--shadow-lg);
  --page-max: 1080px;

  /* ── component tokens, derived (themes may override any of them) ── */
  --desk: var(--bg);
  --face: var(--panel); --face-hi: #fff; --face-lt: color-mix(in srgb, var(--panel) 60%, #fff); --face-sh: var(--line); --face-dk: color-mix(in srgb, var(--panel-text) 60%, transparent);
  --text: var(--panel-text); --text-dim: var(--muted); --text-faint: var(--faint);
  --win: var(--surface); --win-text: var(--surface-text); --win-alt: var(--surface-2);
  --title-1: var(--accent); --title-2: color-mix(in srgb, var(--accent) 70%, #fff); --title-text: var(--accent-text);
  --sel: var(--accent); --sel-text: var(--accent-text);
  --link-visited: var(--link);
  --raised: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06);
  --raised-soft: 0 0 0 1px var(--line);
  --sunken: inset 0 0 0 1px var(--line);
  --sunken-soft: inset 0 0 0 1px var(--line);
  --pressed: inset 0 0 0 1px var(--line), inset 0 2px 4px rgba(0, 0, 0, .12);
  --drop: var(--shadow-lg);
  --f-ui: var(--f-body); --f-head: var(--f-display);
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667' stroke-width='1.6'/%3E%3C/svg%3E");

  /* ── type scale and space ── */
  --fs: 16px;
  --fs-0: calc(var(--fs) * .875);
  --fs-1: var(--fs);
  --fs-2: calc(var(--fs) * 1.125);
  --fs-3: calc(var(--fs) * 1.4);
  --fs-4: calc(var(--fs) * 1.85);
  --fs-5: calc(var(--fs) * 2.4);
  --icon: 32px;
  --s-1: 4px; --s-2: 6px; --s-3: 10px; --s-4: 14px; --s-5: 20px; --s-6: 28px; --s-7: 40px; --s-8: 56px;
  --t-fast: 120ms; --t-med: 220ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
[data-mode="dark"] { color-scheme: dark; }
[data-scale="2"] { --fs: 18px; --icon: 40px; }
[data-scale="3"] { --fs: 20px; --icon: 48px; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--surface-text); font-family: var(--f-body), var(--f-hebrew); font-size: var(--fs); line-height: 1.6; }
img, video, svg, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:visited { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-4) 0; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: var(--head-weight); line-height: 1.2; margin: 0 0 var(--s-3); color: var(--head-color); text-wrap: balance; }
h1 { font-size: var(--fs-4); }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-2); }
h4 { font-size: var(--fs-1); }
p { margin: 0 0 var(--s-3); }
small, .small { font-size: var(--fs-0); }
code, pre, kbd { font-family: var(--f-mono); font-size: .9em; }
code { background: var(--surface-2); padding: 0 .3em; border-radius: 4px; }
pre { background: var(--surface-2); padding: var(--s-3); overflow: auto; border-radius: var(--radius-sm); }
pre code { background: none; padding: 0; }
kbd, .kbd { display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--panel); color: var(--panel-text); box-shadow: inset 0 -1px 0 var(--line), 0 0 0 1px var(--line); font-size: .85em; }
blockquote { margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-4); border-left: 3px solid var(--accent); font-style: italic; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 10px; vertical-align: top; }
.he, [lang="he"] { font-family: var(--f-hebrew); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 6px; z-index: 10000; background: var(--surface); color: var(--surface-text); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono, .typewriter { font-family: var(--f-mono); }
.term { font-family: var(--f-mono); }
.stack > * + * { margin-top: var(--s-3); }
.stack-sm > * + * { margin-top: var(--s-2); }
.row { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--s-3); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.eyebrow { display: block; font-size: var(--fs-0); color: var(--muted); margin-bottom: 2px; }
.glow-text, .foil, .display { color: inherit; }
.corner, .fleuron { display: none; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }

/* ---------- surfaces ---------- */
.raised { background: var(--panel); box-shadow: var(--raised); border-radius: var(--radius-sm); }
.sunken { background: var(--surface); color: var(--surface-text); box-shadow: var(--sunken); border-radius: var(--radius-sm); }
.panel { background: var(--panel); color: var(--panel-text); box-shadow: var(--raised); padding: var(--s-4); border-radius: var(--radius); }
.panel.inset, .well { background: var(--surface-2); color: var(--surface-text); box-shadow: var(--sunken); padding: var(--s-3); border-radius: var(--radius-sm); }
.group { position: relative; margin: var(--s-3) 0 var(--s-4); padding: var(--s-4) var(--s-3) var(--s-3); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.group > .group-t { position: absolute; top: -.75em; left: 10px; padding: 0 6px; background: var(--surface); font-size: var(--fs-1); }
fieldset { position: relative; margin: var(--s-3) 0 var(--s-4); padding: var(--s-2) var(--s-3) var(--s-3); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
fieldset > legend { padding: 0 6px; margin-left: -4px; font-weight: 600; color: var(--muted); }

/* ---------- buttons ---------- */
.btn, button.btn, a.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 0; padding: 8px 18px;
  font: inherit; font-size: var(--fs-1); font-weight: 600; line-height: 1.2; color: var(--btn-text); text-decoration: none;
  background: var(--btn-bg); border: 0; border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--btn-line);
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), background-color var(--t-fast), filter var(--t-fast);
}
.btn:visited { color: var(--btn-text); }
.btn:hover { text-decoration: none; filter: brightness(1.04); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, var(--btn-line)); }
.btn:active, .btn[aria-pressed="true"], .btn.is-pressed { transform: translateY(1px) scale(.99); box-shadow: var(--pressed); }
/* the main action: filled with the accent */
.btn.primary, form .btn[type="submit"]:not(.ghost):not(.sm):not(.danger):not(.linkish) { background: var(--accent); color: var(--accent-text); box-shadow: 0 1px 0 rgba(0, 0, 0, .12), inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, #000); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--btn-line); }
.btn.danger { color: var(--bad); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn.sm { min-height: 36px; padding: 4px 12px; font-size: var(--fs-0); }
.btn.lg { min-height: 52px; padding: 10px 26px; font-size: var(--fs-2); }
.btn.icon { width: 44px; padding: 0; }
.btn.sm.icon { width: 36px; }
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn img.px { width: 18px; height: 18px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.danger { color: var(--bad); }
.ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; }

/* ---------- forms ---------- */
label { display: block; margin: 0 0 4px; font-size: var(--fs-1); }
.field { margin-bottom: var(--s-4); }
.field .hint, .hint { font-size: var(--fs-0); color: var(--muted); margin-top: 4px; }
input:not([type]), input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=time], input[type=tel], input[type=month], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px;
  font: inherit; font-size: max(16px, var(--fs-1)); color: var(--surface-text);
  background: var(--field-bg); border: 0; border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--field-line);
  transition: box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[disabled], select[disabled], textarea[disabled] { opacity: .6; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--f-mono); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: var(--arrow); background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px; }
select option { background: var(--surface); color: var(--surface-text); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 20px; height: 20px; margin: 0; vertical-align: -4px; }
.check { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; min-height: 32px; }
input[type=file] { font: inherit; color: var(--surface-text); }
input[type=file]::file-selector-button { font: inherit; color: var(--btn-text); background: var(--btn-bg); border: 0; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--btn-line); padding: 8px 14px; margin-right: 10px; cursor: pointer; }
input[type=range] { accent-color: var(--accent); width: 100%; }
input[type=color] { width: 44px; height: 36px; padding: 2px; background: var(--panel); border: 0; border-radius: 6px; }
.form-actions { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; margin-top: var(--s-4); }
.inline-form { display: inline; }
.form-grid { display: grid; gap: 0 var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.seg { display: inline-flex; flex-wrap: wrap; border-radius: var(--radius-sm); overflow: hidden; box-shadow: inset 0 0 0 1px var(--btn-line); }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; background: var(--btn-bg); color: var(--btn-text); }
.seg label + label span { box-shadow: inset 1px 0 0 var(--btn-line); }
.seg input:checked + span { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { margin: 0; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }

/* ---------- messages ---------- */
.flash { display: block; padding: 10px 14px; margin-bottom: var(--s-3); border-radius: var(--radius-sm); background: var(--info-bg); color: var(--surface-text); box-shadow: inset 4px 0 0 var(--info); font-size: var(--fs-1); }
.flash.ok { background: var(--ok-bg); box-shadow: inset 4px 0 0 var(--ok); }
.flash.error { background: var(--bad-bg); box-shadow: inset 4px 0 0 var(--bad); }
.flash.warn { background: var(--warn-bg); box-shadow: inset 4px 0 0 var(--warn); }
[data-mode="dark"] .flash { color: var(--surface-text); }
.note { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.note.warn { background: var(--warn-bg); }

/* ---------- badges, dots ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; font-size: var(--fs-0); line-height: 1.6; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.pill.public, .pill.published, .pill.ok, .pill.online, .pill.works, .pill.approved, .pill.connected { color: var(--ok); background: var(--ok-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 40%, transparent); }
.pill.shared, .pill.manual, .pill.info { color: var(--info); background: var(--info-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 40%, transparent); }
.pill.stale, .pill.pending, .pill.partial, .pill.estimate, .pill.suspected, .pill.paused { color: var(--warn); background: var(--warn-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
.pill.error, .pill.bad, .pill.broken, .pill.unreachable, .pill.rejected, .pill.spam, .pill.missing, .pill.disconnected, .pill.withdrawn { color: var(--bad); background: var(--bad-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 40%, transparent); }
.dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: var(--faint); }
.dot.ok { background: #2fbf55; } .dot.stale { background: #e3a21a; } .dot.bad { background: #d63a2f; } .dot.info { background: var(--info); }

/* ---------- progress ---------- */
.gauge { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.gauge-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.gauge-label img { height: 16px; width: auto; }
.gauge-track { position: relative; height: 12px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.gauge-fill { position: relative; height: 100%; width: var(--p, 0%); min-width: 4px; border-radius: inherit; background: var(--gauge-c, var(--accent)); transition: width .8s var(--ease); }
.gauge-pct { font-size: var(--fs-0); min-width: 3em; text-align: right; color: var(--muted); }

/* ---------- lists and tables ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); color: var(--surface-text); border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); }
.dtable, .table-wrap table { background: var(--surface); color: var(--surface-text); }
.dtable th, .table-wrap th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: var(--fs-0); white-space: nowrap; padding: 8px 10px; }
.dtable td, .table-wrap td { border-bottom: 1px solid var(--line); }
.dtable tbody tr:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); text-align: center; padding: var(--s-6) var(--s-4); color: var(--muted); }
.empty img { display: block; margin: 0 auto; max-height: 64px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: var(--s-3); }
.tabs a, .tabs button { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border-radius: 999px; color: var(--surface-text); text-decoration: none; background: transparent; font: inherit; border: 0; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.tabs .active, .tabs [aria-current="page"], .tabs [aria-selected="true"] { background: var(--accent); color: var(--accent-text); box-shadow: none; font-weight: 600; }

/* ---------- prose ---------- */
.prose { max-width: 68ch; line-height: 1.7; }
.prose h2 { margin-top: var(--s-5); }
.prose h3 { margin-top: var(--s-4); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .25em 0; }
.prose img { max-width: 100%; border-radius: var(--radius-sm); }

dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: min(96vw, 760px); }
dialog::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ---------- motion guard: device setting, or Animations off in Look ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not([data-effects="on"]) *, html:not([data-effects="on"]) *::before, html:not([data-effects="on"]) *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html[data-fx="off"] *, html[data-fx="off"] *::before, html[data-fx="off"] *::after { animation: none !important; transition: none !important; }

/* ---------- uploader (Photos, friend page, dashboard) ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; padding: 22px; text-align: center; color: var(--surface-text); background: var(--surface-2); border-radius: var(--radius); outline: 2px dashed var(--line); outline-offset: -8px; }
.dropzone.over { background: var(--info-bg); }
.dropzone:focus-within { outline-color: var(--accent); }
.up-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 240px; overflow: auto; }
.up-list li { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 2px 8px; align-items: center; padding: 4px 0; font-size: var(--fs-0); }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.up-msg { grid-column: 1 / -1; color: var(--muted); }
.up-msg.err { color: var(--bad); }
.up-msg.ok { color: var(--ok); }
.up-list .btn { grid-column: 1 / -1; justify-self: start; }

/* password boxes (fijy.js adds the button): Show / Hide inside the box, and a Caps Lock warning under it */
.pw-wrap, .pw-box { display: block; }
.pw-box { position: relative; }
.pw-box > input { width: 100%; padding-right: 72px; }
.pw-eye { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); min-width: 56px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: var(--fs-0); font-weight: 600; opacity: .72; cursor: pointer; }
.pw-eye:hover, .pw-eye:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.pw-caps { display: block; margin-top: 6px; font-size: var(--fs-0); font-weight: 600; color: var(--warn, #e3b45c); }
.pw-caps[hidden] { display: none; }
