/* BoothMaster Service: the owner's /admin and the labels' /portal in the desktop app's look
   (redesign 2026-11, frontend/styles/tokens.css): three looks set on <html data-look>,
   Light, Dark blue (the default) and Black; near-achromatic surfaces, hairline edges, pill
   controls, one main action as a white (dark) or ink (light) pill, a floating sidebar.
   No build step, no scripts, no inline styles (the pages' Content-Security-Policy). */

/* ------------------------------------------------------------------ fonts (SIL OFL) */

@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url(/static/fonts/dm-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url(/static/fonts/dm-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/geist-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/geist-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ------------------------------------------------------------------ Dark blue (default) */

:root,
[data-look="blue"] {
  color-scheme: dark;
  --bg: #0A1022;
  --sidebar: #0E1530;
  --panel: #141D3A;
  --panel-2: #0F1730;
  --panel-raised: #1B2547;
  --hover: rgba(200, 215, 255, 0.06);
  --fill-on: rgba(200, 215, 255, 0.14);

  --text: #EEF1F8;
  --head: #FFFFFF;
  --text-2: #C3CBE0;
  --muted: #8E9AB8;

  --edge: rgba(200, 215, 255, 0.10);
  --edge-strong: rgba(200, 215, 255, 0.18);
  --control: rgba(200, 215, 255, 0.24);
  --control-hover: rgba(200, 215, 255, 0.46);
  --field-bg: transparent;

  --primary: #B9CCFF;
  --primary-hover: #D4E0FF;
  --focus: #B9CCFF;
  --sel: rgba(107, 98, 242, 0.24);

  --action: #FFFFFF;
  --action-hover: #E3E7F2;
  --on-action: #0A1022;

  --btn-bg: transparent;
  --btn-bg-hover: rgba(200, 215, 255, 0.07);
  --btn-edge: rgba(200, 215, 255, 0.26);
  --btn-shadow: none;

  --ok: #6FDC98;
  --ok-bg: rgba(111, 220, 152, 0.14);
  --warn: #F0B27A;
  --warn-bg: rgba(240, 163, 107, 0.15);
  --danger: #FF9A8C;
  --danger-solid: #DC2626;
  --danger-bg: rgba(255, 138, 122, 0.14);
  --danger-edge: rgba(255, 138, 122, 0.38);
  --info-bg: rgba(157, 183, 255, 0.13);
  --tag-bg: rgba(200, 215, 255, 0.10);

  --panel-shadow: inset 0 1px 0 rgba(200, 215, 255, 0.06), inset 0 0 0 1px rgba(200, 215, 255, 0.10);
  --float-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(200, 215, 255, 0.14);
  --violet-wash: linear-gradient(90deg, transparent, transparent 40%, rgba(107, 98, 242, 0.565) 50%, transparent 60%, transparent);

  --brand-tile: #2D3C5D;
  --brand-tile-edge: #4C6290;
  --brand-glyph: #8AAEFF;
  --brand-word: #FFFFFF;

  --scroll: rgba(200, 215, 255, 0.14);
}

/* ------------------------------------------------------------------ Black */

[data-look="black"] {
  color-scheme: dark;
  --bg: #0A0A0A;
  --sidebar: #101010;
  --panel: #161616;
  --panel-2: #111111;
  --panel-raised: #1F1F1F;
  --hover: rgba(255, 255, 255, 0.05);
  --fill-on: rgba(255, 255, 255, 0.12);

  --text: #EDEDED;
  --head: #FFFFFF;
  --text-2: #C2C2C2;
  --muted: #8F8F8F;

  --edge: rgba(255, 255, 255, 0.08);
  --edge-strong: rgba(255, 255, 255, 0.14);
  --control: rgba(229, 229, 229, 0.22);
  --control-hover: rgba(229, 229, 229, 0.45);

  --primary: #C9D6FF;
  --primary-hover: #E0E8FF;
  --focus: #C9D6FF;
  --sel: rgba(107, 98, 242, 0.20);

  --action: #FFFFFF;
  --action-hover: #E9E9E9;
  --on-action: #0A0A0A;

  --btn-bg-hover: rgba(255, 255, 255, 0.06);
  --btn-edge: rgba(229, 229, 229, 0.24);

  --tag-bg: rgba(255, 255, 255, 0.08);
  --info-bg: rgba(255, 255, 255, 0.07);

  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --float-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.10);

  --scroll: rgba(255, 255, 255, 0.12);
}

/* ------------------------------------------------------------------ Light */

[data-look="light"] {
  color-scheme: light;
  --bg: #F1F1EF;
  --sidebar: #FFFFFF;
  --panel: #FFFFFF;
  --panel-2: #F7F7F6;
  --panel-raised: #FFFFFF;
  --hover: rgba(0, 0, 0, 0.04);
  --fill-on: #EEEEEE;

  --text: #161616;
  --head: #000000;
  --text-2: #474747;
  --muted: #6B6B6B;

  --edge: rgba(0, 0, 0, 0.08);
  --edge-strong: rgba(0, 0, 0, 0.14);
  /* Fields keep a 3:1 outline on white: a hairline would vanish round an input. */
  --control: #94948F;
  --control-hover: #62625E;
  --field-bg: #FFFFFF;

  --primary: #2547B5;
  --primary-hover: #1D3A9E;
  --focus: #2547B5;
  --sel: rgba(107, 98, 242, 0.10);

  --action: #1C1C1C;
  --action-hover: #3A3A3A;
  --on-action: #FFFFFF;

  --btn-bg: #EEEEEE;
  --btn-bg-hover: #E4E4E4;
  --btn-edge: #FFFFFF;
  --btn-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.10);

  --ok: #17703F;
  --ok-bg: #DCF5E4;
  --warn: #9A4508;
  --warn-bg: #FFE2CC;
  --danger: #B42318;
  --danger-bg: #FFDBD6;
  --danger-edge: rgba(180, 35, 24, 0.35);
  --info-bg: #DDE8FF;
  --tag-bg: #ECECEC;

  --panel-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.03);
  --float-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 14px 36px rgba(0, 0, 0, 0.14);

  --brand-tile: #DCEAFD;
  --brand-tile-edge: #B9CEF4;
  --brand-glyph: #283FAB;
  --brand-word: #101729;

  --scroll: rgba(0, 0, 0, 0.15);
}

/* ------------------------------------------------------------------ shared */

:root {
  --font-ui: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Geist", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-panel: 22px;
  --pill: 9999px;
  --sidebar-width: 244px;
  --inset: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; scrollbar-color: var(--scroll) transparent; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--sel); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 30;
  background: var(--action); color: var(--on-action); padding: 8px 14px; border-radius: var(--pill);
}
.skip:focus { left: 16px; }

.ic { flex: none; display: block; }

/* ------------------------------------------------------------------ logo */

.mark { width: 30px; height: 30px; flex: none; display: block; }
.mark-tile { fill: var(--brand-tile); stroke: var(--brand-tile-edge); }
.mark-glyph { fill: var(--brand-glyph); }
.word { height: 12px; width: auto; aspect-ratio: 681.5 / 56; flex: none; display: block; fill: var(--brand-word); fill-rule: evenodd; }
.sb-sub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.2; }
/* The tagline under the lettering, as in the app's sidebar (.sb-tagline there): the dog's blue, one line,
   sized to run as wide as the wordmark above it (0.945 of the caps: 11.35px under the sidebar's 12px caps,
   12.3px under the 13px sign-in caps). The app draws 11px caps over 10.4px; the portal stays at 11px or more. */
.sb-tagline { display: block; color: var(--brand-glyph); font-size: 11.35px; font-weight: 500; line-height: 1.2; letter-spacing: 0; white-space: nowrap; }

/* ------------------------------------------------------------------ signed in: floating sidebar */

.shell { min-height: 100vh; padding-left: calc(var(--sidebar-width) + var(--inset)); }

.sb {
  position: fixed; top: var(--inset); left: var(--inset); bottom: var(--inset);
  width: var(--sidebar-width); z-index: 10;
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px 10px 12px;
  border-radius: 24px;
  background: var(--sidebar);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

/* The dog sits level with the lettering and the lines run on below it, as in the app's sidebar. */
.sb-brand { display: flex; align-items: flex-start; gap: 10px; padding: 0 6px; color: inherit; }
.sb-brand:hover { text-decoration: none; }
.sb-brand-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 2px; }

.sb-nav { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 1px; }
.sb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; border: 1px solid transparent; border-radius: var(--pill);
  color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.sb-link .ic { color: var(--muted); }
.sb-link:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.sb-link[aria-current="page"] { color: var(--head); background: var(--fill-on); }
.sb-link[aria-current="page"] .ic { color: var(--head); }
[data-look="light"] .sb-link[aria-current="page"] { border-color: #FFFFFF; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06); }
.sb-link-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-badge { flex: none; min-width: 20px; padding: 0 6px; border-radius: var(--pill); background: var(--action); color: var(--on-action); font-family: var(--mono); font-size: 11.5px; font-weight: 500; line-height: 18px; text-align: center; }

.sb-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--edge); }
.sb-foot form { margin: 0; }
.sb-who { margin: 0 0 2px; padding: 0 10px; display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.35; }
.sb-who-name { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-who-sub { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-foot-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border: 0; border-radius: var(--pill); background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.sb-foot-link:hover { color: var(--text); background: var(--hover); }
.sb-ver { margin: 4px 0 0; padding: 0 10px; color: var(--muted); font-size: 11.5px; }
.sb-ver .mono { font-size: 11.5px; color: var(--text-2); }

/* Light · Blue · Black */
.looks {
  display: flex; gap: 2px; margin: 4px 2px 0; padding: 2px;
  border-radius: var(--pill); background: var(--hover); box-shadow: inset 0 0 0 1px var(--edge);
}
.look {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 4px 6px; border: 0; border-radius: var(--pill); background: transparent;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.look:hover { color: var(--text); }
.look[aria-pressed="true"] { color: var(--text); background: var(--fill-on); }
[data-look="light"] .look[aria-pressed="true"] { background: #FFFFFF; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.08); }
.look-dot { width: 10px; height: 10px; flex: none; border-radius: var(--pill); box-shadow: inset 0 0 0 1px var(--control); }
.look-dot-light { background: #F1F1EF; }
.look-dot-blue { background: #0A1022; }
.look-dot-black { background: #0A0A0A; }

/* ------------------------------------------------------------------ signed out: a centred card */

.solo { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 9vh 16px 28px; gap: 22px; }
.solo-brand { display: flex; align-items: flex-start; gap: 11px; }
.solo-brand .mark { width: 36px; height: 36px; }
.solo-brand .word { height: 13px; }
.solo-brand .sb-tagline { font-size: 12.3px; }
.solo-brand-text { display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.solo .page { flex: 0 1 auto; width: 100%; padding: 0; }
.solo-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.solo-foot .looks { margin: 0; width: 240px; }
.solo-foot .sb-ver { padding: 0; }

/* ------------------------------------------------------------------ page */

.page { width: 100%; max-width: 1140px; margin: 0 auto; padding: 30px 26px 56px; }
.page-narrow { max-width: 460px; }
.page-medium { max-width: 760px; }
.solo .page-narrow { margin: 0 auto; }

h1 {
  margin: 0 0 6px; font-family: var(--font-head); font-size: 30px; line-height: 1.1;
  font-weight: 500; letter-spacing: -0.03em; color: var(--head);
}
h2 {
  margin: 0 0 14px; font-family: var(--font-head); font-size: 17px; line-height: 1.3;
  font-weight: 500; letter-spacing: -0.01em; color: var(--head);
}
.lede { color: var(--text-2); margin: 6px 0 24px; max-width: 74ch; }
.muted { color: var(--muted); }
h2 .muted { font-family: var(--mono); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
p { margin: 0 0 12px; }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.head .lede { margin-bottom: 0; }

/* ------------------------------------------------------------------ panels */

.panel {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius-panel);
  box-shadow: var(--panel-shadow);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.panel > :last-child { margin-bottom: 0; }
/* The design's one chromatic accent: a violet wash along the top edge of a key panel. */
.panel-accent { overflow: hidden; }
.panel-accent::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--violet-wash); }
.panel-danger { box-shadow: var(--panel-shadow), inset 0 0 0 1px var(--danger-edge); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.grid-2 > .panel { margin-bottom: 0; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ stats */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel); border-radius: 18px; box-shadow: var(--panel-shadow); padding: 14px 18px 13px; }
.stat .num { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; color: var(--head); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 3px; }

.num, .tnum { font-variant-numeric: tabular-nums; }
td.num, td.tnum { font-family: var(--mono); font-size: 13px; }
td.tnum { white-space: nowrap; color: var(--text-2); }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
  padding: 0 10px 9px; white-space: nowrap;
}
td { padding: 10px; border-top: 1px solid var(--edge); vertical-align: top; }
tbody tr:hover td { background: var(--hover); }
td:first-child { color: var(--head); font-weight: 500; min-width: 170px; }
td:first-child .sub { font-weight: 400; }
td.num, th.num { text-align: right; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; font-family: var(--font-ui); }
.empty { color: var(--muted); padding: 10px 0 2px; margin: 0; }

.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-actions form { display: flex; gap: 6px; margin: 0; }
.row-actions input[type="text"] { width: 180px; }

/* ------------------------------------------------------------------ badges (the app's tags) */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 500; line-height: 1.5;
  padding: 1px 9px; border-radius: var(--pill);
  background: var(--tag-bg); color: var(--text-2); white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-off { background: var(--danger-bg); color: var(--danger); }

/* ------------------------------------------------------------------ forms */

form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.fields-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.fields-row .field { flex: 1; min-width: 180px; }
.fields-top { align-items: flex-start; }
.fields-row .field-button { flex: 0 0 auto; min-width: 0; }
.fields-row .field-narrow { flex: 0 0 150px; min-width: 150px; }
.fields-row .field-wide { flex: 2; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"],
input[type="url"], input[type="file"], select, textarea {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--field-bg); border: 1px solid var(--control); border-radius: 10px;
  padding: 8px 12px; width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: var(--control-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--sel); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 120px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
textarea.prose { font-family: var(--font-ui); font-size: 14px; line-height: 1.6; min-height: 190px; }
select, input[type="date"], input[type="file"] { height: 40px; }
select { cursor: pointer; }
select option { background: var(--panel); color: var(--text); }
input[type="file"] { padding: 6px 10px; cursor: pointer; }
input[type="file"]::file-selector-button {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer;
  background: var(--btn-bg); border: 1px solid var(--btn-edge); box-shadow: var(--btn-shadow);
  border-radius: var(--pill); padding: 3px 12px; margin-right: 12px;
}
input[type="file"]::file-selector-button:hover { background: var(--btn-bg-hover); }

.check { display: flex; gap: 9px; align-items: center; color: var(--text-2); font-size: 14px; margin-bottom: 16px; }
.check input { accent-color: var(--action); width: 16px; height: 16px; }
.check[data-field] { align-items: flex-start; color: var(--text); }
.check[data-field] input { margin-top: 2px; flex: none; }
.check .sub { display: block; color: var(--muted); font-size: 12.5px; }

/* Who a track goes to: a grid of tick boxes that light up when chosen. */
fieldset.pick {
  border: 0; padding: 0; margin: 0 0 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px;
}
fieldset.pick legend { margin-bottom: 10px; padding: 0; }
fieldset.pick .check {
  margin: 0; padding: 9px 12px; align-items: flex-start; color: var(--text);
  border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--control); cursor: pointer;
}
fieldset.pick .check:hover { background: var(--hover); }
fieldset.pick .check input { margin-top: 3px; flex: none; }
fieldset.pick .check:has(input:checked) { background: var(--sel); box-shadow: inset 0 0 0 1px var(--control-hover); }

/* ------------------------------------------------------------------ buttons (pills) */

/* The main action of a form: a white pill on dark, an ink pill on light. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 500; line-height: 1.4; cursor: pointer;
  padding: 7px 16px; border-radius: var(--pill);
  border: 1px solid var(--action); background: var(--action); color: var(--on-action);
  white-space: nowrap; user-select: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--on-action); text-decoration: none; }
.btn-quiet { background: var(--btn-bg); border-color: var(--btn-edge); box-shadow: var(--btn-shadow); color: var(--text); }
.btn-quiet:hover { background: var(--btn-bg-hover); border-color: var(--control-hover); color: var(--text); }
.btn-danger { background: transparent; border-color: var(--danger-edge); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger-edge); color: var(--danger); }
/* The button that really does it, inside a confirm box: solid red. */
.confirm-body .btn-danger { background: var(--danger-solid); border-color: var(--danger-solid); color: #FFFFFF; }
.confirm-body .btn-danger:hover { filter: brightness(0.92); }
.btn-small { padding: 4px 12px; font-size: 13px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.btn-link:hover { color: var(--text); text-decoration: underline; }

/* ------------------------------------------------------------------ messages */

.notice, .alert { border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }
.notice { background: var(--info-bg); color: var(--text); }
.alert { background: var(--danger-bg); color: var(--danger); }

/* ------------------------------------------------------------------ code and secrets */

code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--edge); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; color: var(--text); }
pre {
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--edge); border-radius: var(--radius);
  padding: 14px 16px; margin: 0; overflow-x: auto; white-space: pre-wrap; word-break: break-all; color: var(--text);
}
.secret { min-height: 150px; word-break: break-all; }
.secret.secret-short { min-height: 72px; }

dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

.error-page { text-align: center; padding-top: 4vh; }
.error-page .code { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; margin-bottom: 8px; }
.error-lede { margin: 8px auto 24px; }

/* ------------------------------------------------------------------ label portal */

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
textarea.prose-short { min-height: 96px; }

/* Sign-up (service 1.6) */
/* A field only robots fill in: off-screen, not display:none (some robots skip hidden fields). */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
details.terms { margin: 4px 0 14px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--edge); background: var(--panel-2); }
details.terms > summary { cursor: pointer; padding: 10px 14px; font-weight: 500; color: var(--text); }
details.terms[open] > summary { border-bottom: 1px solid var(--edge); }
.terms-text { margin: 0; padding: 14px 16px; max-height: 320px; overflow-y: auto; background: transparent; box-shadow: none;
  font-family: var(--font-ui); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: normal; color: var(--text-2); }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-list form { display: block; }
.btn.choice { width: 100%; justify-content: flex-start; padding: 10px 16px; }

.login-foot { margin: 18px 0 0; }

/* Destructive actions ask once more without JavaScript: a <details> that opens a confirm box. */
details.confirm { display: inline-block; }
details.confirm > summary { list-style: none; }
details.confirm > summary::-webkit-details-marker { display: none; }
details.confirm[open] > summary { background: var(--danger-bg); }
details.confirm .confirm-body {
  margin-top: 10px; padding: 14px 16px; max-width: 360px;
  border-radius: var(--radius); background: var(--panel-raised); box-shadow: var(--float-shadow);
}
details.confirm .confirm-body p { margin: 0 0 10px; font-size: 14px; }
td details.confirm .confirm-body { white-space: normal; }

/* Label websites (service 1.8): long addresses wrap; "Another address" opens a small form in place. */
.url { overflow-wrap: anywhere; min-width: 160px; }
details.more { display: inline-block; }
details.more > summary { list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .more-body { margin-top: 8px; }

.caution { overflow: hidden; }
.caution::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--warn); }
.caution h2 { margin-bottom: 6px; }
.caution-text { margin: 0; max-width: 80ch; color: var(--text-2); }

ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 4px 0; }
form.inline { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.lede .badge { vertical-align: 1px; margin-right: 4px; }

/* ------------------------------------------------------------------ narrow windows and phones */

@media (max-width: 860px) {
  .shell { padding: 10px 0 0; }
  .sb {
    position: static; width: auto; margin: 0 10px;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px;
    padding: 12px 12px; border-radius: 20px;
  }
  .sb-brand { padding: 0 4px; }
  .sb-nav { order: 3; flex: 1 1 100%; flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 2px; scrollbar-width: none; }
  .sb-link { padding: 5px 11px; }
  .sb-foot { order: 2; flex: 1 1 auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 6px; padding: 0; border: 0; }
  .sb-who { display: none; }
  .sb-foot .looks { margin: 0; flex: 0 0 auto; }
  .sb-ver { display: none; }
  .page { padding: 22px 16px 44px; }
  h1 { font-size: 26px; }
}
@media (max-width: 520px) {
  .look { padding: 4px 7px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 16px 16px; border-radius: 18px; }
  .solo { padding-top: 6vh; }
}

/* Owner second factor (admin_enrol.html, admin_recovery.html): the QR code stays black on
   white in every look so phones can read it; recovery codes sit in a two-column list. */
.qr { display: block; max-width: 100%; height: auto; margin: 4px 0 18px; border-radius: 8px; background: #fff; }
.codes { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.codes code { font-size: 14px; letter-spacing: 0.04em; }
