/* Xnyl Admin Center. Colours only as theme tokens, light (default) and dark: the Owner Console's approved design
   (docs/design/owner-console in the docs repository), with Geist, self-hosted. The earlier colours and the Inter and
   Space Grotesk fonts were removed on 23 November 2026, once Russell had seen the new look. */

@font-face { font-family: 'Geist'; font-weight: 100 900; font-display: swap; src: url(/admin/fonts/geist-latin-wght-normal.woff2) format('woff2'); }
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F0F2F5; --sidebar: #FFFFFF;
  --border: #E2E5EA; --text: #111418; --muted: #5D6673;
  --accent: #1D5FD6; --accent-hover: #174FB8; --on-accent: #FFFFFF; --focus: #1D5FD6;
  --ok: #0B7A50; --ok-bg: #E3F6EC; --warn: #8A5A00; --warn-bg: #FFF4D9;
  --bad: #B42323; --bad-bg: #FDECEA; --info-bg: #E8F0FD;
  --mark: #111418; --shadow: 0 1px 2px rgba(17, 20, 24, .06);
  --rail: #F5F6F8; --hover: #E8EBF0; --nav-on: #1D5FD6; --on-nav: #FFFFFF; --link: #1D5FD6;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0B0D; --surface: #111317; --surface-2: #181B21; --sidebar: #0C0D10;
  --border: #1F2329; --text: #ECEEF1; --muted: #A4ABB6;
  --accent: #2F6FEB; --accent-hover: #2862D4; --on-accent: #FFFFFF; --focus: #4C8DFF;
  --ok: #34D399; --ok-bg: rgba(52, 211, 153, .12); --warn: #FBBF24; --warn-bg: rgba(251, 191, 36, .12);
  --bad: #F87171; --bad-bg: rgba(248, 113, 113, .12); --info-bg: rgba(76, 141, 255, .16);
  --mark: #ECEEF1; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --rail: #0A0B0D; --hover: #181B21; --nav-on: #2F6FEB; --on-nav: #FFFFFF; --link: #4C8DFF;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 Geist, system-ui, sans-serif; }
h1, h2, h3 { font-family: Geist, system-ui, sans-serif; font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 500 14px Geist, system-ui, sans-serif; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn-link { background: none; border: none; color: var(--link); padding: 0; min-height: 24px; text-decoration: underline; cursor: pointer; font: inherit; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-wide { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions select, .actions input[type=text], .actions input[type=number] { width: auto; max-width: 100%; }
td select { width: auto; min-width: 130px; }
td .btn { white-space: nowrap; }
[tabindex="-1"]:focus { outline: none; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; max-width: 680px; }
.field label, .label { font-weight: 500; font-size: 14px; }
.field .help { font-size: 13px; color: var(--muted); }
.field-error { display: block; font-size: 13px; font-weight: 500; color: var(--bad); margin-top: 4px; }
[aria-invalid="true"] { border-color: var(--bad) !important; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; min-height: 40px; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.check { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; margin-bottom: 10px; } /* row: with .field (a column) the box sat on a line of its own, apart from its label (x037) */
.check label { padding-top: 2px; }
.check input, td input[type="checkbox"] { width: 24px; height: 24px; margin-top: 0; accent-color: var(--accent); flex: none; } /* WCAG 2.2 target size */
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }

/* Messages and badges */
.msg { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--border); }
.msg-error { background: var(--bad-bg); border-color: var(--bad); }
.msg-ok { background: var(--ok-bg); border-color: var(--ok); }
.msg-info { background: var(--info-bg); border-color: var(--accent); }
.msg-warn { background: var(--warn-bg); border-color: var(--warn); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  border: 1px solid currentColor; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); background: var(--ok-bg); }
.badge-warn { color: var(--warn); background: var(--warn-bg); }
.badge-bad { color: var(--bad); background: var(--bad-bg); }
.badge-muted { color: var(--muted); }
.badge-info { color: var(--text); background: var(--info-bg); border-color: var(--accent); }
.sample-tag { white-space: nowrap; display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; background: var(--warn-bg); color: var(--warn); border: 1px dashed var(--warn); }

/* Cards and tables */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; }
.content h2 { font-family: Geist, system-ui, sans-serif; font-size: 16px; font-weight: 600; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; position: relative; } /* keeps the .sr-only header labels inside the scroll box */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tr:last-child td, tr:last-child th { border-bottom: none; }
.table-wrap + h2, .empty + h2 { margin-top: 28px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.list li:last-child { border-bottom: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Narrow pages: sign-in, invitation, setup */
.narrow { background: var(--rail); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.panel { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-family: Geist, system-ui, sans-serif; font-weight: 600; font-size: 17px; }
.brand svg { width: 28px; height: 32px; fill: var(--mark); flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.codes { columns: 2; padding: 14px 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; list-style: none; margin: 0 0 14px; }
.codes li { font-family: ui-monospace, Consolas, monospace; padding: 2px 0; }
.secret { word-break: break-all; font-family: ui-monospace, Consolas, monospace; background: var(--bg); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); letter-spacing: .08em; }
.foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* App shell, as Lynxdesk's Admin Centre (public/assets/admin-shell.css): top bar, icon rail, section menu, content. */
.app-page { overflow: hidden; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.app { display: grid; grid-template-rows: 52px auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); height: 100vh; }
.top { display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--rail); }
/* Pressable things are at least 24 by 24 pixels (WCAG 2.2, 2.5.8; launch gate v022): the mark is 22 wide, so its link is padded out. */
.logo { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; }
/* A link that stands on its own line (not inside a sentence): tall enough for a finger. */
.tap { display: inline-block; min-height: 24px; line-height: 24px; }
.logo svg { width: 22px; height: 26px; fill: var(--mark); }
.switcher { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; background: none; border: none; color: var(--text); font: 600 14px Geist, system-ui, sans-serif; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.switcher:hover { background: var(--hover); }
.chev { width: 16px; height: 16px; }
.acct { padding-left: 14px; border-left: 1px solid var(--border); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.search { position: relative; margin-left: auto; width: 340px; max-width: 34vw; }
.search input { border-radius: 8px; min-height: 34px; padding: 6px 14px 6px 34px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2368737d' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 12px center; }
.search-key { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }
kbd { font: 12px Geist, system-ui, sans-serif; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--muted); background: var(--surface-2); margin-right: 3px; }

/* Quick search: the search box is the largest thing in the panel; the panel is lifted with a shadow */
dialog.palette { width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 80px)); margin: 10vh auto auto; padding: 0; border-radius: 14px; overflow: hidden; display: none; flex-direction: column; box-shadow: var(--shadow); }
dialog.palette[open] { display: flex; }
.palette #pal-input { min-height: 68px; font-size: 20px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 22px; background: var(--surface); }
.palette #pal-input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
.palette ul { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.pal-group { font-size: 12px; color: var(--muted); padding: 10px 12px 4px; }
.pal-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.pal-row[aria-selected="true"] { background: var(--hover); }
.pal-row .muted { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
.palette mark { background: none; color: var(--link); font-weight: 700; }
.pal-empty { padding: 18px 12px; color: var(--muted); }
/* The end of setup: a clear, pleasant confirmation */
.done-mark { width: 64px; height: 64px; color: var(--ok); margin: 4px 0 12px; animation: done-pop 320ms cubic-bezier(.2, 1.4, .4, 1); }
.done-mark svg { width: 64px; height: 64px; display: block; }
@keyframes done-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.pal-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--nav-on); color: var(--on-nav); font: 700 12px Geist, system-ui, sans-serif; cursor: pointer; flex: none; }
.menu-wrap { position: relative; }
.menu { position: absolute; top: 40px; left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); padding: 6px; list-style: none; margin: 0; z-index: 40; }
.menu-right { left: auto; right: 0; }
.menu-label { margin: 6px 10px; font-size: 12px; color: var(--muted); }
.menu-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 4px; color: var(--text); text-decoration: none; background: none; border: none; font: 14px Geist, system-ui, sans-serif; text-align: left; cursor: pointer; }
a.menu-item { color: var(--text); }
a.menu-item:hover, button.menu-item:hover, .menu-item[aria-selected="true"] { background: var(--hover); }
.menu-item.on { background: var(--nav-on); color: var(--on-nav); }
.menu-item.is-off { color: var(--muted); cursor: default; }
a.menu-item.is-off { cursor: pointer; }
.menu-sep { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.theme-row { cursor: default; }
.theme-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.theme-switch button { background: none; border: none; color: var(--muted); padding: 4px 12px; font: 500 13px Geist, system-ui, sans-serif; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--nav-on); color: var(--on-nav); }

.body { grid-row: 3; display: grid; grid-template-columns: 56px 240px minmax(0, 1fr); min-height: 0; background: var(--rail); }
.body.no-sidenav { grid-template-columns: 56px minmax(0, 1fr); }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding-top: 10px; gap: 4px; }
.rail a { width: 36px; height: 36px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.rail a:hover { background: var(--hover); color: var(--text); }
.rail a[aria-current] { background: var(--nav-on); color: var(--on-nav); }
.rail svg { width: 18px; height: 18px; }
.sidenav { overflow: auto; padding: 16px 12px; background: var(--rail); }
.sidenav h2 { font-size: 20px; margin: 0 0 12px 10px; font-weight: 600; }
.sidenav .grp { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 16px 0 4px 10px; }
.sidenav h2 + .grp { margin-top: 0; }
.sidenav .grp::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.sidenav li + li { margin-top: 2px; }
.sidenav a, .sidenav .menu-item { display: flex; justify-content: space-between; align-items: center; min-height: 32px; padding: 5px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 14px; }
.sidenav a:hover { background: var(--hover); }
.sidenav a[aria-current] { background: var(--nav-on); color: var(--on-nav); }
.sidenav .count { font-size: 12px; margin-left: 8px; } /* no opacity: it took the count below 4.5:1 */
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.content { overflow: auto; padding: 28px 40px 0; background: var(--bg); border-top-left-radius: 10px; box-shadow: -1px -1px 0 var(--border); position: relative; }
.content > div { padding-bottom: 48px; }
/* Xnyl's chat button floats over the bottom right corner: the page scrolls far enough that nothing stays under it (WCAG 2.4.11). */
.has-chat .content > div { padding-bottom: 104px; }
.content > div { max-width: 1240px; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.crumbs span { margin: 0 6px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-family: Geist, system-ui, sans-serif; font-weight: 400; font-size: 26px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 760px; }
.home-head h1 { font-size: 28px; }
.updates-link { display: inline-block; font-size: 19px; margin: 6px 0 14px; }
.updates-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px 18px; margin-bottom: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 12px 0 10px; color: var(--text); font: 14px Geist, system-ui, sans-serif; cursor: pointer; }
.tab:first-child { padding-left: 0; }
.tab[aria-selected="true"] { color: var(--link); border-bottom-color: var(--link); }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { display: flex; gap: 20px; padding: 4px 0; font-size: 13px; }
.updates time { color: var(--muted); white-space: nowrap; min-width: 84px; }
.status-line { margin-top: 30px; font-size: 14px; }
.later, .later .muted { color: var(--muted); } /* words say "Later"; no opacity, which broke contrast */
.learn { font-size: inherit; white-space: nowrap; }
.foot-line { margin-top: 12px; }
/* A short list of plain statements inside a box: small solid bullets on the box's own text margin, level with the first
   line of a two-line item. (It used to share the name .rules with the password checklist, whose hollow circles it took.) */
.points { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 8px; }
.points li { position: relative; padding-left: 14px; }
.points li::before { content: ''; position: absolute; left: 0; top: .75em; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: currentColor; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0 0 18px; }
.stat { border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.stat small { color: var(--muted); display: block; margin-bottom: 4px; font-size: 13px; }
.stat b { font-size: 20px; font-weight: 600; }

/* Pages in the reference layout: product panels, a fixed save bar, the seats box, people with initials */
.box { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 16px; background: var(--surface); overflow: hidden; }
.box .ph { background: var(--surface-2); padding: 12px 16px; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.box .pr { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.box .pr:last-child { border-bottom: 0; }
.box .pr small { color: var(--muted); display: block; font-size: 12.5px; }
.box .pb { padding: 12px 16px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0; margin-top: 24px; background: var(--bg); border-top: 1px solid var(--border); z-index: 5; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.head-row > :first-child { flex: 1 1 380px; }
tbody th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.seats-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 13px; background: var(--surface-2); min-width: 200px; }
.seats-box strong { display: block; margin-bottom: 4px; }
.warn-text { color: var(--warn); }
.who { display: flex; align-items: center; gap: 10px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.block { display: block; }
.brand-logo { display: block; max-width: 160px; max-height: 64px; margin-bottom: 8px; object-fit: contain; }
.brand-logo-sm { display: inline-block; max-width: 48px; max-height: 24px; margin: 0 8px 0 0; vertical-align: middle; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; border: 1px solid var(--border); }
.nowrap { white-space: nowrap; }
.empty { padding: 48px 0; color: var(--muted); }
.empty h3 { color: var(--text); font-weight: 500; }
.field .actions { margin-top: 4px; }
#tm-search { max-width: 420px; }

/* Dialogs */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 24px; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(3, 6, 12, .6); }
dialog h2 { margin-bottom: 14px; }
.toast { position: fixed; bottom: 20px; right: 20px; left: auto; max-width: calc(100vw - 40px); z-index: 10; background: var(--surface); border: 1px solid var(--ok); border-radius: 10px; padding: 12px 16px; box-shadow: var(--shadow); }

/* Launchpad: checklist with progress and tabs, and the help box beside it */
.rail-end { margin-top: auto; margin-bottom: 12px; }
.lp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.lp-card, .lp-help { border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; background: var(--surface); }
.lp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lp-head h2, .lp-help h2 { margin: 0 0 8px; }
.lp-bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; margin: 4px 0 14px; border: 0; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.lp-bar::-webkit-progress-bar { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); border-radius: 4px; }
.lp-bar::-webkit-progress-value { background: var(--nav-on); border-radius: 4px; }
.lp-bar::-moz-progress-bar { background: var(--nav-on); border-radius: 4px; }
.lp-list { list-style: none; margin: 0; padding: 0; }
.lp-task { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.lp-task:first-child { border-top: 0; }
.lp-tick { width: 22px; height: 22px; color: var(--muted); display: block; }
.lp-tick.on { color: var(--ok); }
.lp-tick svg { width: 22px; height: 22px; display: block; }
.lp-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.lp-later { padding: 18px 0 8px; color: var(--muted); }

@media (max-width: 900px) {
  .lp-grid { grid-template-columns: minmax(0, 1fr); }
  .body { grid-template-columns: 56px 180px minmax(0, 1fr); }
  .head-side { align-items: flex-start; margin-bottom: 16px; }
  .content { padding: 20px; }
  .acct { display: none; }
  .sidenav a, .sidenav .menu-item { min-height: 44px; } /* touch screens keep finger-sized rows */
}
@media (max-width: 640px) {
  .app-page { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .top { gap: 8px; padding: 0 10px; min-width: 0; }
  .switcher { padding: 6px 4px; }
  .sample-tag { font-size: 10px; padding: 2px 6px; }
  .search { flex: 1 1 auto; width: auto; max-width: none; min-width: 0; margin-left: 4px; }
  .search-key { display: none; }
  .search input { padding-left: 30px; background-position: 10px center; }
  .body, .body.no-sidenav { grid-template-columns: 48px minmax(0, 1fr); }
  .rail { grid-row: 1 / span 2; }
  .sidenav { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 12px; }
  .sidenav h2, .sidenav .grp { display: none; }
  .sidenav ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidenav li + li { margin-top: 0; }
  .content { padding: 18px 14px 0; overflow: visible; border-radius: 12px 0 0 0; }
  .menu { position: fixed; left: 8px; right: 8px; top: 52px; min-width: 0; }
  .lp-task { grid-template-columns: 24px minmax(0, 1fr); }
  .lp-act { grid-column: 2; justify-content: flex-start; }
  /* Tables marked .stack read as one block per row on a phone */
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack tr { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .stack th, .stack td { display: block; padding: 0; border: 0; }
  .stack th, .stack td { flex: 1 1 100%; }
  /* A stacked table that is its own card keeps the card's side margin; one inside a card already has it. */
  .table-wrap > .stack tr { padding: 12px 14px; }
  :is(.card, .box, form:has(> .savebar)) .table-wrap > .stack tr { padding: 12px 0; }
  .stack tr:last-child { border-bottom: 0; }
  .stack .nowrap { white-space: normal; }
  .wrap-any { overflow-wrap: anywhere; }
  .stack td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: 13px; }
}
/* On a phone everything pressable is at least 44 by 44 pixels (Russell, 12 November 2026; launch gate v022). Wider
   screens keep their sizes (WCAG 2.2's 24 by 24 at least). Checked on every page by test/browser.test.mjs. */
@media (max-width: 640px) {
  .btn, .btn-small { min-height: 44px; min-width: 44px; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], select, .search input { min-height: 44px; }
  .btn-link, .tap { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .logo, .rail a, .avatar { width: 44px; height: 44px; min-width: 44px; }
  .switcher { min-height: 44px; padding: 6px 2px; gap: 4px; }
  /* Room for them in the top bar at 375: tighter gaps, the mark's link reaching into the bar's edge, and quick search
     as its magnifying glass alone (pressing it opens the full search, as before). */
  .top { gap: 4px; padding: 0 6px; }
  .logo { margin: 0 -4px; }
  .search { flex: 0 0 44px; margin-left: auto; }
  .search input { padding-right: 0; }
  .tab { min-height: 44px; min-width: 44px; }
}
/* At 320 pixels (the smallest phones, and 400 percent zoom) the top bar still fits with 44-pixel parts: the
   "Sample data" label goes onto two lines and the gaps close up. */
@media (max-width: 360px) {
  .top { gap: 2px; }
  .sample-tag { white-space: normal; width: min-content; line-height: 1.15; text-align: center; padding: 2px 4px; }
}
/* Feel: buttons, rows and links answer the instant they are pressed (no delay, no fade in); panels (quick search,
   menus, dialogs) come in on a short spring with a small overshoot, as a transition, so closing or reopening mid-way
   takes effect at once and nobody waits for one to finish. */
:where(.btn, .menu-item, .tab, .rail a, .pal-row, .help-nav a, .theme-switch button, .switcher, .avatar) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:where(.btn, .menu-item, .tab, .rail a, .theme-switch button, .switcher, .avatar):active:not(:disabled) { transform: scale(.97); }
.btn:active:not(:disabled), .menu-item:active, .pal-row:active, .tab:active, .rail a:active, .help-nav a:active { background-color: var(--hover); }
.btn-primary:active:not(:disabled) { background-color: var(--accent-hover); }
dialog.palette[open], dialog[open], .menu:not([hidden]) { transition: opacity 160ms ease-out, transform 220ms cubic-bezier(.34, 1.4, .64, 1); }
@starting-style { dialog.palette[open], dialog[open], .menu:not([hidden]) { opacity: 0; transform: translateY(-6px) scale(.98); } }
/* Respect "reduce motion" everywhere: nothing moves, nothing fades. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  *:active { transform: none !important; }
}

/* Help articles (/admin/help): one column of reading text, the list of articles beside it. */
.help-top { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--rail); }
.help-top a:first-child { font-family: Geist, system-ui, sans-serif; font-weight: 600; font-size: 17px; color: var(--text); text-decoration: none; }
.help-body { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 32px; padding: 24px; }
.help-nav ul { list-style: none; margin: 0; padding: 0; }
.help-nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; min-height: 44px; }
.help-nav a:hover { background: var(--hover); }
.help-nav a[aria-current="page"] { background: var(--nav-on); color: var(--on-nav); }
.help-article h2 { margin-top: 1.6em; }
.help-article li { margin-bottom: .35em; }
@media (max-width: 760px) { .help-body { grid-template-columns: 1fr; padding: 16px; gap: 16px; } .help-nav { order: 2; } }

/* Xnyl support visit: on every page while it lasts (server/visits.js) */
.visit-banner { grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 16px; background: var(--warn-bg); color: var(--text); border-bottom: 1px solid var(--warn); }
.visit-banner[hidden] { display: none; }
.visit-banner p { margin: 0; flex: 1 1 280px; }

/* The console look (x037, 22 November 2026): the Owner Console's approved design (docs/design/owner-console in the docs
   repository: Geist, its colours, its 10 px cards), for pages that carry class="console-look" on <html>. The invitation
   page first, then every page (22 November). Its colours are the tokens at the top of this file since 23 November; the
   rules below still hang on the class, which every page carries. */
.console-look body { font: 14px/1.5 Geist, system-ui, sans-serif; }
.console-look .panel h1 { font: 600 22px/1.25 Geist, system-ui, sans-serif; letter-spacing: -.01em; margin-bottom: 16px; overflow-wrap: anywhere; }
.console-look .brand { font: 600 15px Geist, system-ui, sans-serif; margin-bottom: 24px; }
.console-look .brand svg { width: 22px; height: 26px; }
.console-look .panel { max-width: 460px; border-radius: 10px; padding: 28px; }
.console-look .btn { font-family: Geist, system-ui, sans-serif; border-radius: 7px; }
.console-look input { border-radius: 7px; }
.console-look .panel .field { margin-bottom: 16px; }
.step { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.step-bar { display: inline-flex; gap: 4px; }
.step-bar i { width: 24px; height: 4px; border-radius: 2px; background: var(--border); }
.step-bar i.on { background: var(--accent); }
.summary { margin: 0 0 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.summary div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 9px 14px; }
.summary div + div { border-top: 1px solid var(--border); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.role-line { margin: 0 0 20px; color: var(--muted); }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 48px; }
.btn-eye { position: absolute; top: 0; right: 0; bottom: 0; width: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 7px; color: var(--muted); cursor: pointer; }
.btn-eye:hover, .btn-eye[aria-pressed="true"] { color: var(--text); }
.btn-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn-eye .slash { display: none; }
.btn-eye[aria-pressed="true"] .slash { display: inline; }
.rules { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.rules li::before { content: '○'; width: 14px; text-align: center; }
.rules li.met { color: var(--ok); }
.rules li.met::before { content: '✓'; font-weight: 600; }
.console-look .panel .help { font-size: 13px; color: var(--muted); margin: -4px 0 16px; }
.console-look .field > a.small { align-self: flex-start; display: inline-flex; align-items: center; min-height: 24px; }
.console-look .secret, .console-look .codes { border-radius: 7px; }
@media (max-width: 640px) { .console-look .field > a.small { min-height: 44px; min-width: 44px; } }

/* The console look inside (Russell, 22 November 2026): the screens after sign-in and the help pages, in the same Geist
   type, colours and 10 px cards. As the approved design: the top bar and menus on the sidebar colour with a line under
   and beside them, the page behind the cards on the page colour, titles 20 px, content up to 1320 px wide with 24 px at
   its sides. Looks only: no screen behaves differently. Phones keep the paddings and stacking of the rules above. */
.console-look :is(h1, h2, h3, button, input, select, textarea, kbd, .switcher, .tab, .menu-item, .help-top a:first-child) { font-family: Geist, system-ui, sans-serif; }
.console-look h2 { font-size: 17px; letter-spacing: -.005em; }
.console-look h3 { font-size: 15px; }
.console-look .top, .console-look .body, .console-look .rail, .console-look .sidenav, .console-look .help-top { background: var(--sidebar); }
.console-look .top { border-bottom: 1px solid var(--border); }
.console-look .content { background: var(--rail); border-top-left-radius: 0; box-shadow: -1px 0 0 var(--border); }
.console-look .help-page { background: var(--rail); }
.console-look .content > div { max-width: 1320px; }
.console-look .page-head h1, .console-look .help-article h1 { margin: 0; font: 600 20px/1.25 Geist, system-ui, sans-serif; letter-spacing: -.01em; }
.console-look .help-article h1 { margin-bottom: 12px; }
.console-look .home-head h1 { font-size: 22px; }
.console-look .content h2 { font-size: 15px; }
.console-look .sidenav h2 { font-size: 16px; }
.console-look .sidenav a, .console-look .menu-item, .console-look .help-nav a { border-radius: 7px; }
.console-look .rail a { border-radius: 7px; }
.console-look .card, .console-look .updates-card, .console-look .menu, .console-look dialog, .console-look fieldset { border-radius: 10px; }
.console-look .card, .console-look .updates-card { background: var(--surface); box-shadow: var(--shadow); }
.console-look .help-article { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px 28px; box-shadow: var(--shadow); }
.console-look th { font-size: 12px; font-weight: 500; }
.console-look td, .console-look .kv dd { font-variant-numeric: tabular-nums; }
.console-look .search input { background-color: var(--surface-2); }
.console-look select, .console-look textarea { border-radius: 7px; }
@media (min-width: 901px) { .console-look .content { padding: 24px 24px 0; } }
@media (max-width: 760px) { .console-look .help-article { padding: 16px; } }
.console-look .stat, .console-look .box, .console-look .seats-box { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); }
.console-look .box { overflow: hidden; }
/* A table on the page sits in its own card, as in the approved design; one already inside a card or a dialog does not get a second frame. */
.console-look .content .table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.console-look .content :is(.card, .box, dialog) .table-wrap { background: none; border: 0; border-radius: 0; box-shadow: none; }
.console-look .sidenav a { gap: 8px; }
/* The selected row of a menu, as the approved design: its quiet grey ("raised, selected") with the text colour, in
   semibold so it is not told by colour alone (Russell, 23 November 2026). The accent stays for buttons and progress. */
.console-look :is(.rail a[aria-current], .sidenav a[aria-current], .help-nav a[aria-current="page"], .menu-item.on) { background: var(--surface-2); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--border); }

/* Polish pass (Russell, 25 November 2026): one width and one left edge for every card on a page, tables whose columns
   are as wide as what they hold, forms and empty states in a card of their own, like the cards around them. */
.card-head .btn { max-width: 100%; text-align: center; }
@media (min-width: 641px) {
  /* Columns sized to their content; the last one takes what is left. */
  .fit :is(th, td) { white-space: nowrap; width: 1%; padding-right: 40px; }
  .fit :is(th, td):last-child { width: auto; white-space: normal; }
  /* A table's first and last cells keep the card's own 18 px margin, whether the table is the card or sits inside one. */
  .console-look .content .table-wrap :is(th, td):first-child { padding-left: 18px; }
  .console-look .content .table-wrap :is(th, td):last-child { padding-right: 18px; }
  .console-look .content :is(.card, .box, form:has(> .savebar)) .table-wrap :is(th, td):first-child { padding-left: 0; }
  .console-look .content :is(.card, .box, form:has(> .savebar)) .table-wrap :is(th, td):last-child { padding-right: 0; }
}
/* A form saved with the Cancel / Save bar is one card, the bar its foot. */
.console-look .content form:has(> .savebar) { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 16px 18px 0; margin-bottom: 16px; }
.console-look .content form:has(> .savebar) > .savebar { background: var(--surface); margin: 16px -18px 0; padding: 12px 18px; border-radius: 0 0 10px 10px; }
.console-look .content form:has(> .savebar) .table-wrap { background: none; border: 0; border-radius: 0; box-shadow: none; }
/* Nothing here yet: a card with its words in the middle. */
.console-look .content .empty { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 40px 24px; margin-bottom: 16px; text-align: center; }
.console-look .content :is(.card, .box) .empty { background: none; border: 0; box-shadow: none; margin-bottom: 0; padding: 24px 0; }
.empty h2 { color: var(--text); margin: 10px 0 6px; }
.empty p { max-width: 560px; margin-left: auto; margin-right: auto; }
.empty > :last-child { margin-bottom: 0; }
/* A row of buttons standing above a card keeps the same gap as between two cards. */
.content .actions + :is(.card, .box, .table-wrap) { margin-top: 16px; }
