/* Xnyl Admin Center. Colours only as theme tokens: dark (default) and light, as the Xnyl console design. */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/admin/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(/admin/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/admin/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url(/admin/fonts/space-grotesk-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url(/admin/fonts/space-grotesk-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url(/admin/fonts/space-grotesk-latin-700-normal.woff2) format('woff2'); }

:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F5F6F8; --sidebar: #0A1222;
  --border: #DFE3E9; --text: #0A1222; --muted: #5B6573;
  --accent: #3B6FC4; --accent-hover: #2F5FB0; --on-accent: #FFFFFF; --focus: #2F5FB0;
  --ok: #19734D; --ok-bg: #E3F6EC; --warn: #8A5A00; --warn-bg: #FFF4D9;
  --bad: #B42318; --bad-bg: #FDECEA; --info-bg: #E6EEFA;
  --mark: #0A1222; --shadow: 0 8px 28px rgba(10, 18, 34, .14);
  --rail: #EAF0F8; --hover: #DCE5F2; --nav-on: #3B6FC4; --on-nav: #FFFFFF; --link: #2F5FB0;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060A13; --surface: #0F1B31; --surface-2: #1A2B47; --sidebar: #0A1222;
  --border: #1F3150; --text: #E8EDF4; --muted: #A9B6C8;
  --accent: #3B6FC4; --accent-hover: #4A7FD6; --on-accent: #FFFFFF; --focus: #8FB4F0;
  --ok: #5BE3A8; --ok-bg: rgba(61, 220, 151, .12); --warn: #FFD27A; --warn-bg: rgba(255, 210, 122, .12);
  --bad: #FF9C9C; --bad-bg: rgba(255, 156, 156, .12); --info-bg: rgba(59, 111, 196, .18);
  --mark: #AEBBD0; --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --rail: #0A1222; --hover: #13213A; --nav-on: #3B6FC4; --on-nav: #FFFFFF; --link: #8FB4F0;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
h1, h2, h3 { font-family: 'Space Grotesk', Inter, 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 Inter, sans-serif; cursor: pointer; }
.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; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.check input, td input[type="checkbox"] { width: 24px; height: 24px; margin-top: 0; accent-color: var(--accent); } /* 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: Inter, 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: 'Space Grotesk', 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 Inter, 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 Inter, 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 Inter, 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 Inter, 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 Inter, 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: 18px 14px; background: var(--rail); }
.sidenav h2 { font-size: 20px; margin: 0 0 14px 8px; font-weight: 600; }
.sidenav .grp { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 14px 0 6px 8px; }
.sidenav .grp::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.sidenav a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 7px 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: Inter, 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; max-width: 1240px; 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 Inter, 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; }
.rules { margin: 0; padding: 12px 16px 12px 34px; display: grid; gap: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0 0 18px; max-width: 1000px; }
.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; max-width: 980px; 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)); max-width: 980px; }
.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; max-width: 1240px; }
.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; }
  .content { padding: 20px; }
  .acct { display: none; }
}
@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; }
  .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 { flex: 1 1 100%; }
  .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: 'Space Grotesk', Inter, 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; }
