/* ─── LessIT hub · design system ───────────────────────────────────────────────
   The look and the behaviour follow Loquor: calm Fluent-style tokens, an indigo accent, a slim top bar, a left menu that is a rail
   of icons until it is opened or pinned, and cards with hairline edges. The older page CSS (tokens.css, global.css, layout.css)
   still styles the lab guides; the block of aliases below points its variables at these tokens so every guide wears the same
   palette without being rewritten. */

:root {
  color-scheme: light;
  --font: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.125rem; --text-xl: 1.375rem; --text-2xl: 1.75rem;
  --text-3xl: clamp(1.75rem, 3.2vw, 2.25rem);
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 18px; --radius-xl: 26px; --radius-pill: 999px;

  --bg: #f4f7fb; --surface: #ffffff; --surface-2: #f8fafd; --surface-3: #e8eef7; --surface-sunken: #eef2f8;
  --border: #dbe2ee; --border-strong: #7a869e; --border-btn: #bcc6d8;
  --text: #131a2b; --text-muted: #4a5670; --text-disabled: #6b7690;
  --overlay: rgba(11, 18, 32, 0.45);

  /* LessIT blue */
  --accent: #2563eb; --accent-hover: #1d4ed8; --accent-pressed: #1e40af; --on-accent: #ffffff;
  --accent-text: #1d4ed8; --accent-bg: #e6efff; --accent-border: #a9c3f7; --focus: #2563eb;

  --success: #0e700e; --success-bg: #e9f5e9; --success-border: #6fbf6f;
  --warning: #7a5000; --warning-bg: #fff4ce; --warning-border: #d9b44a;
  --danger: #b10e1c; --danger-bg: #fdf0f1; --danger-border: #e08790;

  --shadow-1: 0 1px 2px rgba(15, 35, 80, 0.05), 0 1px 1px rgba(15, 35, 80, 0.03);
  --shadow-2: 0 2px 6px rgba(15, 35, 80, 0.05), 0 14px 30px -8px rgba(15, 35, 80, 0.14);
  --shadow-3: 0 8px 16px rgba(15, 35, 80, 0.07), 0 30px 60px -14px rgba(15, 35, 80, 0.28);
  --brand-gradient: linear-gradient(135deg, #1e40af 0%, #2563eb 58%, #0e7490 100%);

  --ease: cubic-bezier(0.33, 0, 0.67, 1);
  --topbar-h: 3.5rem;
  --rail-w: 6.25rem;
  --sidebar-w: 16.5rem;
  --nav-h: 3.5rem; /* the older page CSS offsets sticky parts by this */
  font-family: var(--font);
}

[data-theme='dark'] {
  color-scheme: dark;
  --brand-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 58%, #0e7490 100%);
  --bg: #0a0d14; --surface: #121726; --surface-2: #171d2e; --surface-3: #222a40; --surface-sunken: #0d1119;
  --border: #283049; --border-strong: #8993ae; --border-btn: #3b4666;
  --text: #e8eaf2; --text-muted: #b3bbcf; --text-disabled: #8089a3;
  --overlay: rgba(0, 0, 0, 0.6);
  --accent: #2563eb; --accent-hover: #1d4ed8; --accent-pressed: #1e40af;
  --accent-text: #8ab8fb; --accent-bg: #14264a; --accent-border: #2d4f94; --focus: #8ab8fb;
  --success: #6ccb5f; --success-bg: #1f3320; --success-border: #3f8a42;
  --warning: #f2cf63; --warning-bg: #3a3014; --warning-border: #8f7522;
  --danger: #f1707b; --danger-bg: #3b1f23; --danger-border: #a3444d;
  --shadow-1: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 12px 28px -8px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 28px 56px -12px rgba(0, 0, 0, 0.75);
}

/* The lab guides keep their own variable names; these point them at the tokens above. Their blues (--blue, --cyan, --sky) stay as LessIT defined them. */
:root {
  --bg-1: var(--surface-sunken); --bg-2: var(--surface); --bg-3: var(--surface-3);
  --border-2: var(--border-btn);
  --t1: var(--text); --t2: var(--text); --t3: var(--text-muted); --t4: var(--text-disabled);
  --green: var(--success); --green-a: var(--success-bg);
  --orange: var(--warning); --orange-a: var(--warning-bg);
  --red: var(--danger); --red-a: var(--danger-bg);
  --success-a: var(--success-bg); --warning-a: var(--warning-bg); --danger-a: var(--danger-bg); --info: var(--accent-text); --info-a: var(--accent-bg);
  --grad: var(--brand-gradient); --grad-sec: var(--brand-gradient);
  --nav-bg: var(--surface);
  --sans: var(--font);
  --r1: 6px; --r2: var(--radius-sm); --r3: var(--radius); --r4: var(--radius-lg); --r5: var(--radius-pill);
  --shadow-sm: var(--shadow-1); --shadow: var(--shadow-1); --shadow-md: var(--shadow-2); --shadow-lg: var(--shadow-2); --shadow-xl: var(--shadow-3);
}
body { font-family: var(--font); background: var(--bg); color: var(--text); }
a { text-underline-offset: 0.18em; }
::selection { background: var(--accent-bg); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.hx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hx-skip { position: absolute; inset-inline-start: var(--space-2); inset-block-start: -4rem; z-index: 100; padding: var(--space-3) var(--space-4); background: var(--accent); color: var(--on-accent); border-radius: var(--radius); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-2); }
.hx-skip:focus { inset-block-start: var(--space-2); color: var(--on-accent); }

/* ── buttons ── */
.hx-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-block-size: 2.5rem; padding: 0.5rem 1.05rem; border: 1px solid transparent; border-radius: var(--radius); font: 600 var(--text-sm) var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease); }
.hx-btn--primary { background: var(--accent); color: var(--on-accent); }
.hx-btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.hx-btn--primary:active { background: var(--accent-pressed); }
.hx-btn--ghost { background: transparent; color: var(--text); border-color: var(--border-btn); }
.hx-btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.hx-btn--sm { min-block-size: 2.1rem; padding: 0.3rem 0.8rem; }
.hx-icon-btn { display: inline-grid; flex: none; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: none; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.hx-icon-btn:hover { background: var(--surface-3); color: var(--text); }
.hx-icon-btn.is-active { background: var(--accent-bg); color: var(--accent-text); }
.hx-icon-btn svg { inline-size: 20px; block-size: 20px; }

/* ── top bar ── */
.hx-topbar { position: sticky; inset-block-start: 0; z-index: 50; display: flex; align-items: center; gap: var(--space-3); min-block-size: var(--topbar-h); padding: var(--space-2) clamp(0.75rem, 3vw, 2rem); background: var(--surface); border-block-end: 1px solid var(--border); }
.hx-brand { display: inline-flex; align-items: center; min-inline-size: 0; text-decoration: none; }
.hx-brand img { display: block; block-size: 32px; inline-size: auto; }
.hx-logo--dark { display: none !important; }
[data-theme='dark'] .hx-logo--light { display: none !important; }
[data-theme='dark'] .hx-logo--dark { display: block !important; }
.hx-spacer { flex: 1; }
.hx-tools { display: flex; align-items: center; gap: var(--space-1); }
.hx-menu-btn { display: none; }
.hx-topbar .theme-toggle { margin: 0; inline-size: 2.5rem; block-size: 2.5rem; border-radius: var(--radius); color: var(--text-muted); }
.hx-topbar .theme-toggle:hover { background: var(--surface-3); color: var(--text); }
.hx-topbar .theme-toggle svg { inline-size: 20px; block-size: 20px; }
.hx-topbar .theme-toggle .icon-sun { display: none; }
.hx-topbar .theme-toggle .icon-moon { display: block; }
[data-theme='dark'] .hx-topbar .theme-toggle .icon-sun { display: block; }
[data-theme='dark'] .hx-topbar .theme-toggle .icon-moon { display: none; }
.hx-topbar .search-trigger { margin-inline: var(--space-2); inline-size: 15rem; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--text-muted); }
.hx-topbar .search-trigger:focus-within { border-color: var(--accent); }
.hx-topbar .search-trigger__input { color: var(--text); }
.hx-topbar .search-trigger__ai { display: none !important; }

/* on a phone the top bar has to fit the megaphone as well: the round buttons get a little smaller */
@media (max-width: 420px) {
  .hx-topbar .hx-icon-btn, .hx-topbar .theme-toggle { inline-size: 2.25rem; block-size: 2.25rem; }
  .hx-tools { gap: 0; }
}
.hx-user { position: relative; }

/* What's new: a megaphone for signed-in people (drawn from the first frame for a person this browser knows), a dot while something is unseen, a panel under it */
.hx-news { position: relative; display: none; }
html[data-who="in"] .hx-news { display: block; }
.hx-news-btn { position: relative; }
.hx-news-btn:hover, .hx-news-btn[aria-expanded="true"] { background: var(--surface-3); color: var(--text); }
.hx-news-dot { position: absolute; inset-block-start: 0.5rem; inset-inline-end: 0.5rem; inline-size: 0.65rem; block-size: 0.65rem; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }
.hx-news-dot[hidden] { display: none; }
.hx-news-panel { position: absolute; z-index: 60; inset-block-start: calc(100% + 0.4rem); inset-inline-end: 0; inline-size: min(24rem, calc(100vw - 1.5rem)); max-block-size: min(32rem, calc(100vh - var(--topbar-h) - 1.5rem)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3); overflow: hidden; }
.hx-news-panel[hidden] { display: none; }
.hx-news-title { margin: 0; padding: var(--space-3) var(--space-4); border-block-end: 1px solid var(--border); font-weight: 700; }
.hx-news-list { margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.hx-news-list li { padding: var(--space-3) var(--space-4); border-block-end: 1px solid var(--border); }
.hx-news-list li:last-child { border-block-end: 0; }
.hx-news-list li.is-new { background: var(--accent-bg); }
.hx-news-item-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-block-end: 0.15rem; }
.hx-news-item-head time { color: var(--text-muted); font-size: var(--text-xs); }
.hx-news-list a, .hx-news-item-title { color: var(--text); font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.hx-news-list a:hover { color: var(--accent-text); text-decoration: underline; }
.hx-news-item-text { margin: 0.15rem 0 0; color: var(--text-muted); font-size: var(--text-sm); overflow-wrap: anywhere; white-space: pre-line; }
.hx-news-empty { margin: 0; padding: var(--space-4); color: var(--text-muted); font-size: var(--text-sm); }
.hx-news-empty[hidden] { display: none; }
.hx-news-foot { padding: var(--space-3) var(--space-4); border-block-start: 1px solid var(--border); background: var(--surface-2); }
.hx-news-mail { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.hx-news-mail label { cursor: pointer; }
.hx-news-mail input { inline-size: 1.1rem; block-size: 1.1rem; accent-color: var(--accent); flex: none; }
.hx-news-note { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: var(--text-xs); }
.hx-news-note[hidden] { display: none; }
/* a lab that is new, on its card */
.hx-chip.hx-chip--new { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
/* on a phone the panel is as wide as the window, under the top bar, wherever the megaphone sits */
@media (max-width: 640px) {
  .hx-news { position: static; }
  .hx-news-panel { position: fixed; inset-inline: 0.75rem; inset-block-start: calc(var(--topbar-h) + 0.4rem); inline-size: auto; max-block-size: calc(100vh - var(--topbar-h) - 5.5rem); }
}
/* a person this browser last saw signed in never gets the Sign in button back for a moment: hub-shell.js puts their name there at once */
html[data-who="in"] #hxUser > a.hx-btn { visibility: hidden; }
/* ...and until it does, a round placeholder holds the place of the avatar, so the top bar does not move */
html[data-who="in"] #hxUser:not(:has(.hx-user-trigger))::before { content: ''; display: inline-block; inline-size: 2rem; block-size: 2rem; border-radius: 50%; background: var(--surface-3); vertical-align: middle; }
/* the greeting waits for the person's name (home.js, or 1.5 s at most) so it does not change under the reader */
html[data-greet="wait"] #hxGreet, html[data-greet="wait"] #hxHint { visibility: hidden; }
.hx-avatar { display: inline-grid; place-items: center; flex: none; inline-size: 2rem; block-size: 2rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: var(--text-sm); font-weight: 650; text-transform: uppercase; overflow: hidden; }
.hx-avatar > img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.hx-avatar > svg { inline-size: 62%; block-size: 62%; }
/* a drawing: white on a colour that holds at least 3:1 at its lightest end, in either theme */
.hx-avatar[data-kind="preset"] { color: #fff; }
.hx-avatar[data-kind="photo"] { background: var(--surface-3); }
.hx-avatar[data-color="blue"] { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.hx-avatar[data-color="cyan"] { background: linear-gradient(135deg, #0891b2, #155e75); }
.hx-avatar[data-color="teal"] { background: linear-gradient(135deg, #0d9488, #115e59); }
.hx-avatar[data-color="green"] { background: linear-gradient(135deg, #16a34a, #166534); }
.hx-avatar[data-color="amber"] { background: linear-gradient(135deg, #d97706, #92400e); }
.hx-avatar[data-color="orange"] { background: linear-gradient(135deg, #ea580c, #9a3412); }
.hx-avatar[data-color="pink"] { background: linear-gradient(135deg, #db2777, #9d174d); }
.hx-avatar[data-color="violet"] { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.hx-avatar--md { inline-size: 2.75rem; block-size: 2.75rem; font-size: var(--text-lg); }
.hx-avatar--sm { inline-size: 1.75rem; block-size: 1.75rem; font-size: var(--text-xs); }
.hx-who { display: inline-flex; align-items: center; gap: var(--space-2); max-inline-size: 100%; }
.hx-who-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); min-inline-size: 0; overflow-wrap: anywhere; }
.hx-user-trigger { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.2rem 0.5rem 0.2rem 0.2rem; color: var(--text); background: transparent; border: 0; border-radius: var(--radius-pill); font: 600 var(--text-sm) var(--font); cursor: pointer; }
.hx-user-trigger:hover, .hx-user-trigger[aria-expanded='true'] { background: var(--surface-3); }
.hx-user-name { max-inline-size: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-popover { position: absolute; inset-block-start: calc(100% + 0.4rem); inset-inline-end: 0; z-index: 60; min-inline-size: 15rem; padding: var(--space-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3); }
.hx-popover[hidden] { display: none; }
.hx-popover-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3) var(--space-3); border-block-end: 1px solid var(--border); margin-block-end: var(--space-2); }
.hx-popover-who { display: block; min-inline-size: 0; }
.hx-popover-head strong { display: block; overflow-wrap: anywhere; }
.hx-popover-head span { display: block; color: var(--text-muted); font-size: var(--text-xs); }
.hx-popover-head > .hx-avatar { display: inline-grid; color: var(--on-accent); font-size: var(--text-lg); }
.hx-popover-head > .hx-avatar[data-kind="preset"] { color: #fff; }
.hx-popover .hx-avatar svg { color: #fff; }
.hx-popover a, .hx-popover button { display: flex; align-items: center; gap: var(--space-3); inline-size: 100%; padding: 0.55rem var(--space-3); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: 600 var(--text-sm) var(--font); text-align: start; text-decoration: none; cursor: pointer; }
.hx-popover a:hover, .hx-popover button:hover { background: var(--surface-3); color: var(--text); }
.hx-popover svg { color: var(--text-muted); }

/* ── page frame: menu on the left, page on the right ── */
.hx-body { display: flex; align-items: stretch; min-inline-size: 0; min-block-size: calc(100dvh - var(--topbar-h)); }
.hx-main-col { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; }
.hx-main { flex: 1; min-inline-size: 0; }
.hx-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5); padding: var(--space-4) clamp(0.75rem, 3vw, 2rem); padding-inline-end: 5.5rem; border-block-start: 1px solid var(--border); color: var(--text-muted); font-size: var(--text-xs); }
.hx-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.hx-footer a { color: var(--text-muted); text-decoration: none; }
.hx-footer a:hover { color: var(--text); text-decoration: underline; }

/* ── left menu ── */
.hx-sidebar-slot { position: relative; flex: none; z-index: 15; inline-size: var(--rail-w); transition: inline-size 0.2s var(--ease); }
.hx-sidebar-slot.is-pinned { inline-size: var(--sidebar-w); }
.hx-sidebar { position: sticky; inset-block-start: var(--topbar-h); block-size: calc(100dvh - var(--topbar-h)); inline-size: var(--rail-w); display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3) 0.3rem; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-inline-end: 1px solid var(--border); transition: inline-size 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.hx-sidebar.is-expanded { inline-size: var(--sidebar-w); }
.hx-sidebar.is-expanded:not(.is-pinned) { box-shadow: var(--shadow-3); }
.hx-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-block-size: 2.25rem; padding-inline: 0.35rem; }
.hx-sidebar-title { color: var(--text-muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity 0.15s var(--ease); }
.hx-sidebar-pin { opacity: 0; transition: opacity 0.15s var(--ease), background-color 0.15s var(--ease); }
.hx-sidebar.is-expanded .hx-sidebar-title, .hx-sidebar.is-expanded .hx-sidebar-pin { opacity: 1; }
.hx-sidebar:not(.is-expanded) .hx-sidebar-pin { pointer-events: none; }
.hx-sidebar-pin:not(.is-active) svg { transform: rotate(45deg); }
.hx-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-content: start; }
.hx-group-toggle { display: flex; align-items: center; gap: var(--space-3); inline-size: 100%; min-block-size: 2rem; margin: 0 0 var(--space-1); padding: 0.3rem 0.8rem; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-muted); font: 700 var(--text-xs) var(--font); letter-spacing: 0.08em; text-align: start; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
button.hx-group-toggle { cursor: pointer; transition: color 0.15s var(--ease), background-color 0.15s var(--ease); }
button.hx-group-toggle:hover { color: var(--text); background: var(--surface-3); }
.hx-group-icon { display: inline-grid; flex: none; }
.hx-group-label { flex: 1 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
.hx-group-toggle > svg:last-child { flex: none; transition: transform 0.2s var(--ease), opacity 0.15s var(--ease); }
.hx-group.is-folded .hx-group-toggle > svg:last-child { transform: rotate(-90deg); }
.hx-group-body > ul { display: grid; gap: 2px; margin: -3px; padding: 3px; list-style: none; overflow: hidden; }
.hx-sidebar.is-expanded .hx-group-body > ul, .hx-drawer .hx-group-body > ul { margin-inline-start: 0.85rem; }
.hx-group.is-headless .hx-group-body > ul { margin-inline-start: 0 !important; }
.hx-group.is-folded .hx-item:not(.is-pinned) { display: none; }
.hx-sidebar .hx-group-label, .hx-sidebar .hx-group-toggle > svg:last-child { opacity: 0; }
.hx-sidebar.is-expanded .hx-group-label, .hx-sidebar.is-expanded .hx-group-toggle > svg:last-child { opacity: 1; }
.hx-sidebar:not(.is-expanded) .hx-group + .hx-group { padding-block-start: var(--space-3); border-block-start: 1px solid var(--border); }
.hx-sidebar:not(.is-expanded) .hx-group-toggle { max-block-size: 0; min-block-size: 0; margin: 0; padding-block: 0; }
.hx-sidebar:not(.is-expanded) .hx-group.is-folded .hx-group-toggle { background: var(--surface-3); color: var(--text); }
.hx-item { position: relative; }
.hx-item > a { display: flex; align-items: center; gap: var(--space-3); min-block-size: 2.6rem; padding: 0.55rem 0.8rem; border-radius: var(--radius); color: var(--text-muted); font-weight: 600; font-size: var(--text-sm); text-decoration: none; white-space: nowrap; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.hx-item > a svg { flex: none; }
.hx-item > a:hover { color: var(--text); background: var(--surface-3); }
.hx-item > a.is-active { color: var(--accent-text); background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); }
.hx-pin { position: absolute; inset-inline-end: 0.35rem; inset-block-start: 50%; translate: 0 -50%; display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease); }
.hx-pin svg { transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.hx-pin.is-active { opacity: 1; color: var(--accent-text); }
.hx-pin.is-active svg { transform: none; }
.hx-item:hover .hx-pin, .hx-item:focus-within .hx-pin, .hx-drawer .hx-pin { opacity: 1; }
.hx-pin:hover { color: var(--text); background: var(--surface-3); }
.hx-sidebar:not(.is-expanded) .hx-pin { display: none; }
.hx-sidebar.is-expanded .hx-item > a, .hx-drawer .hx-item > a { padding-inline-end: 2.6rem; }
.hx-item.no-pin > a { padding-inline-end: 0.8rem !important; }
/* the slim rail: each page shows its icon with its title under it */
.hx-sidebar:not(.is-expanded) .hx-nav { gap: var(--space-2); }
.hx-sidebar:not(.is-expanded) .hx-item > a { flex-direction: column; justify-content: center; gap: 2px; min-block-size: 3.5rem; padding: 0.4rem 0.1rem; font-size: 0.66rem; line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: break-word; hyphens: auto; }
.hx-sidebar:not(.is-expanded) .hx-item > a.is-active { box-shadow: none; }
.hx-sidebar:not(.is-expanded) .hx-group.is-folded .hx-group-toggle { flex-direction: column; justify-content: center; gap: 2px; max-block-size: none; min-block-size: 3.5rem; padding: 0.4rem 0.15rem; text-align: center; text-transform: none; letter-spacing: 0; white-space: normal; font-size: 0.66rem; line-height: 1.15; }
.hx-sidebar:not(.is-expanded) .hx-group.is-folded .hx-group-label { display: block; opacity: 1; flex: none; }
.hx-sidebar:not(.is-expanded) .hx-group.is-folded .hx-group-toggle > svg:last-child { display: none; }
.hx-sidebar:not(.is-expanded) .hx-group-icon svg { inline-size: 20px; }

/* ── find in the menu: an icon in the rail, a search box when the menu is open; matches stay, the rest steps aside ── */
.hx-menu-search { padding-inline: 0.35rem; }
.hx-mfind-btn { display: grid; margin-inline: auto; }
.hx-mfind { display: none; position: relative; align-items: center; gap: var(--space-2); min-block-size: 2.4rem; padding-inline: 0.7rem 0.4rem; color: var(--text-muted); background: var(--surface-3); border: 1px solid var(--border); border-radius: 999px; }
.hx-mfind:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.hx-sidebar.is-expanded .hx-mfind, .hx-drawer .hx-mfind { display: flex; }
.hx-sidebar.is-expanded .hx-mfind-btn, .hx-drawer .hx-mfind-btn { display: none; }
.hx-mfind-input { flex: 1; min-inline-size: 0; padding: 0; color: var(--text); font: 500 var(--text-sm) var(--font); background: transparent; border: 0; outline: 0; box-shadow: none; appearance: none; }
.hx-mfind-input::-webkit-search-cancel-button { display: none; }
.hx-mfind-clear { display: grid; place-items: center; flex: none; inline-size: 1.7rem; block-size: 1.7rem; padding: 0; color: var(--text-muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.hx-mfind-clear[hidden] { display: none; }
.hx-mfind-clear:hover { color: var(--text); background: var(--surface-2); }
.hx-mfind-clear svg { transform: rotate(45deg); }
.hx-mfind-empty { margin: var(--space-2) 0.4rem 0; color: var(--text-muted); font-size: var(--text-sm); }
.hx-mfind-empty[hidden] { display: none; }
.hx-nav.is-finding .hx-item.is-miss, .hx-nav.is-finding .hx-group.is-miss { display: none; }
.hx-nav.is-finding .hx-group.is-folded .hx-item:not(.is-miss) { display: block; }
.hx-nav.is-finding .hx-group-toggle > svg:last-child { visibility: hidden; }
.hx-drawer .hx-menu-search { padding: 0 0 var(--space-3); }

/* ── phone drawer ── */
.hx-drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease); }
.hx-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.hx-drawer { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 71; inline-size: min(20rem, 88vw); display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--border); box-shadow: var(--shadow-3); transform: translateX(-102%); visibility: hidden; transition: transform 0.22s var(--ease), visibility 0s 0.22s; }
.hx-drawer.is-open { transform: none; visibility: visible; transition: transform 0.22s var(--ease), visibility 0s; }
.hx-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) var(--space-3); min-block-size: var(--topbar-h); border-block-end: 1px solid var(--border); }
.hx-drawer-body { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-2) var(--space-5); }
.hx-drawer .hx-nav { gap: var(--space-3); }
.hx-drawer .hx-group-label, .hx-drawer .hx-group-toggle > svg:last-child { opacity: 1; }
.hx-drawer .hx-group-toggle { min-block-size: 2.5rem; }
body.hx-lock { overflow: hidden; }
@media (max-width: 959px) {
  .hx-sidebar-slot { display: none; }
  .hx-menu-btn { display: inline-grid; }
  .hx-topbar .search-trigger { inline-size: 2.5rem; block-size: 2.5rem; margin-inline: 0; padding: 0; justify-content: center; border: 0; background: transparent; }
  .hx-topbar .search-trigger svg { opacity: 1 !important; inline-size: 20px; block-size: 20px; }
  .hx-topbar .search-trigger__input, .hx-topbar .search-trigger__kbd { display: none; }
  .hx-user-name { display: none; }
}
@media (hover: none) { .hx-pin { opacity: 0.7; } .hx-pin.is-active { opacity: 1; } }

/* ── the older pages, set into the new frame ── */
.hx-main .subsite-banner, .hx-main .page-top, .hx-main .hero--sub { padding-top: 2rem; }
.hx-main section[id], .hx-main div[id] { scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.hx-main a { text-underline-offset: 0.18em; }
.hx-main .btn--primary { background: var(--accent); color: var(--on-accent); }
.hx-main .btn--primary:hover { background: var(--accent-hover); }
.hx-main .btn--glow { background: var(--brand-gradient); box-shadow: var(--shadow-2); }
.hx-main code { color: var(--accent-text); background: var(--surface-3); border-color: var(--border); }

/* ── pages that came from the old admin portal: its own bar, sidebar and 48px offset are gone ── */
.hx-legacy { display: none !important; }
.hx-main > .admin-content { margin: 0; min-inline-size: 0; }
/* long commands and names wrap on a phone; a code block scrolls inside itself instead of widening the page */
.hx-main .admin-content :not(pre) > code { overflow-wrap: anywhere; }
.hx-main .admin-content pre { max-inline-size: 100%; overflow-x: auto; }
.hx-modules { margin: var(--space-4) 1.5rem 0; padding: 0 var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.hx-modules > summary { cursor: pointer; padding: var(--space-3) 0; margin: 0; background: none; border: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); font-weight: 650; }
.hx-modules__name { color: var(--text-muted); font-weight: 500; font-size: var(--text-sm); }
.hx-modules__list { padding-block-end: var(--space-3); display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2px var(--space-3); align-items: start; }
.hx-modules__list a { display: block; padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-size: var(--text-sm); }
.hx-modules__list a:hover { background: var(--surface-3); color: var(--text); }
.hx-modules__list a.active { background: var(--accent-bg); color: var(--accent-text); font-weight: 600; }
.hx-modules__list .lp { display: grid; gap: 2px; align-content: start; }
.hx-modules__list .lp-head { color: var(--text); font-weight: 600; }
.hx-modules__list .lp-mods { display: grid; gap: 2px; padding-inline-start: var(--space-3); }

/* ── the public overview of a lab, and the lock that marks what needs an account ── */
.hx-crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.hx-crumbs a { color: var(--text-muted); text-decoration: none; }
.hx-crumbs a:hover { color: var(--accent-text); text-decoration: underline; }
.hx-guide-gate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); border-color: var(--accent-border); background: var(--accent-bg); }
.hx-guide-gate__text { margin: 0; max-inline-size: 38rem; }
.hx-session-notice { margin: var(--space-3) clamp(0.75rem, 3vw, 2rem) 0; }
html[data-role="visitor"] .hx-item a[data-members] > span::after {
  content: ""; display: inline-block; inline-size: 0.8em; block-size: 0.8em; margin-inline-start: 0.45em; vertical-align: -0.05em; background: currentColor; opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 018 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 018 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── page building blocks ── */
.hx-page { inline-size: 100%; max-inline-size: 76rem; margin-inline: auto; padding: var(--space-6) clamp(0.75rem, 3vw, 2rem) var(--space-7); display: grid; gap: var(--space-6); }
.hx-page--narrow { max-inline-size: 56rem; }
.hx-greeting { margin: 0 0 var(--space-1); color: var(--accent-text); font-size: var(--text-xl); font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.hx-title { margin: 0 0 var(--space-2); font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.08; }
.hx-lede { margin: 0; color: var(--text-muted); font-size: var(--text-lg); max-inline-size: 46rem; }
.hx-h2 { margin: 0; font-size: var(--text-xl); font-weight: 650; }
.hx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-block-end: var(--space-3); }
.hx-more { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.hx-more svg { inline-size: 16px; block-size: 16px; }
.hx-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.hx-muted { color: var(--text-muted); }
.hx-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: 0.28rem 0.8rem; border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--accent-bg); color: var(--accent-text); font: 600 var(--text-sm) var(--font); text-decoration: none; cursor: pointer; }
button.hx-chip:hover, a.hx-chip:hover { border-color: var(--accent-border); color: var(--accent-text); }
.hx-chip--plain { background: var(--surface-3); color: var(--text-muted); font-size: var(--text-xs); padding: 0.15rem 0.55rem; cursor: default; }
.hx-chip--beginner { background: var(--success-bg); color: var(--success); }
.hx-chip--intermediate { background: var(--accent-bg); color: var(--accent-text); }
.hx-chip--advanced { background: var(--warning-bg); color: var(--warning); }

/* greeting + clock */
.hx-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-5) var(--space-6); align-items: center; }
.hx-hero > div:first-child { min-inline-size: 0; }
.hx-clock { position: relative; display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); align-items: center; gap: var(--space-3); inline-size: 26rem; max-inline-size: 100%; padding-inline-start: var(--space-5); border-inline-start: 1px solid var(--border); }
/* the big face (or the digital time) on the left, everything else stacked on the right; the two switches sit together in one small group */
.hx-clock-visual { display: grid; place-items: center; min-block-size: 6.5rem; }
.hx-clock-time { display: inline-flex; align-items: flex-start; gap: 0.25rem; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-clock-time .hm { font-size: 2.6rem; font-weight: 650; letter-spacing: -0.04em; }
.hx-clock-time .sp { display: grid; gap: 0.2rem; padding-block-start: 0.3rem; color: var(--text-muted); font-size: var(--text-xs); font-weight: 650; line-height: 1; }
.hx-clock-face { inline-size: 6.5rem; block-size: 6.5rem; }
.hx-clock-face .face { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.6; }
.hx-clock-face .tick { stroke: var(--border-strong); stroke-width: 0.9; stroke-linecap: round; }
.hx-clock-face .tick.hr { stroke: var(--text-muted); stroke-width: 1.8; }
.hx-clock-face .num { fill: var(--text); font: 650 11px var(--font); text-anchor: middle; dominant-baseline: central; }
.hx-clock-face .hand { stroke: var(--text); stroke-linecap: round; }
.hx-clock-face .hand.s { stroke: var(--accent-text); }
.hx-clock-face .cap { fill: var(--accent-text); }
.hx-clock.is-digital .hx-clock-face { display: none; }
.hx-clock.is-face .hx-clock-time { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hx-clock-info { display: grid; gap: 0.2rem; min-inline-size: 0; justify-items: start; }
.hx-clock-date { color: var(--text); font-size: var(--text-sm); font-weight: 650; white-space: nowrap; }
.hx-clock-zone { color: var(--text-muted); font-size: var(--text-xs); line-height: 1.3; }
.hx-clock-wx { display: flex; align-items: center; gap: var(--space-2); max-inline-size: 100%; min-block-size: 1.25rem; margin: 0; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; }
.hx-clock-wx > * { flex: none; }
.hx-clock-wx .hx-muted:last-child { flex: 0 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
.hx-clock-wx svg { display: block; inline-size: 18px; block-size: 18px; color: var(--accent-text); }
.hx-clock.no-wx .hx-clock-wx, .hx-clock.no-wx .hx-toggle--units, .hx-clock.no-wx .hx-clock-sep { display: none; }
.hx-clock:not(.has-wx):not(.no-wx) .hx-toggle--units, .hx-clock:not(.has-wx):not(.no-wx) .hx-clock-sep { visibility: hidden; }
/* one group holds both switches: both choices of each are on screen, the current one is filled, one press changes it */
.hx-clock-controls { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px; max-inline-size: 100%; background: var(--surface-sunken); border: 1px solid var(--border-btn); border-radius: var(--radius-pill); }
.hx-clock-sep { inline-size: 1px; block-size: 1rem; background: var(--border-btn); flex: none; }
.hx-toggle { display: inline-flex; gap: 2px; flex: none; }
.hx-toggle button { display: inline-flex; align-items: center; gap: 5px; padding: 0.2rem 0.6rem; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-muted); font: 650 var(--text-xs) var(--font); cursor: pointer; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.hx-toggle button:hover { color: var(--text); }
.hx-toggle button[aria-checked='true'] { background: var(--accent); color: var(--on-accent); cursor: default; }
.hx-toggle button svg { inline-size: 14px; block-size: 14px; }
@media (max-width: 720px) {
  .hx-hero { grid-template-columns: 1fr; }
  .hx-clock { inline-size: auto; padding: var(--space-3) 0 0; border-inline-start: 0; border-block-start: 1px solid var(--border); }
}
/* on a phone the filters scroll with the page, and the pills sit in one row each that scrolls sideways, so they never take half the screen */
@media (max-width: 720px) {
  .hx-filters { position: static; margin-inline: 0; padding: var(--space-2) 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-block-end: 0; }
  .hx-filters .hx-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block-end: 2px; }
  .hx-filters .hx-pills::-webkit-scrollbar { display: none; }
  .hx-filters .hx-pill, .hx-filters .hx-chip { flex: none; }
}
@media (max-width: 420px) {
  .hx-toggle--style button svg { display: none; }
}


/* tiles */
.hx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--space-3); }
.hx-tile { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); text-decoration: none; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease); }
.hx-tile:hover { border-color: var(--accent-border); box-shadow: var(--shadow-2); color: var(--text); transform: translateY(-1px); }
.hx-tile-ic { display: grid; place-items: center; flex: none; inline-size: 3rem; block-size: 3rem; border-radius: var(--radius); background: var(--accent-bg); color: var(--accent-text); }
.hx-tile-ic svg { inline-size: 24px; block-size: 24px; }
.hx-tile strong { display: block; font-size: var(--text-md); }
.hx-tile span.hx-tile-sub { display: block; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.35; }
.hx-tile em { display: block; margin-block-start: 2px; color: var(--accent-text); font-style: normal; font-size: var(--text-xs); font-weight: 700; }


/* lab rows and cards */
.hx-labs { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: var(--space-3); }
.hx-lab { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); text-decoration: none; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.hx-lab:hover { border-color: var(--accent-border); box-shadow: var(--shadow-2); color: var(--text); }
.hx-lab h3 { margin: 0; font-size: var(--text-md); font-weight: 650; line-height: 1.3; }
.hx-lab p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hx-lab-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-block-start: auto; padding-block-start: var(--space-1); }
.hx-lab-meta .hx-muted { font-size: var(--text-xs); display: inline-flex; align-items: center; gap: 4px; }
.hx-lab-meta svg { inline-size: 14px; block-size: 14px; }
.hx-lab-top { display: flex; align-items: center; gap: var(--space-2); color: var(--text-muted); font-size: var(--text-xs); font-weight: 600; }
.hx-lab-group { margin-inline-end: auto; }
.hx-lab-n { display: inline-grid; place-items: center; flex: none; inline-size: 1.5rem; block-size: 1.5rem; border-radius: 50%; background: var(--accent-bg); color: var(--accent-text); font-weight: 700; font-size: var(--text-xs); }
.hx-lab[hidden], .hx-track[hidden], .hx-path[hidden], .hx-btn[hidden] { display: none; }

/* catalog */
.hx-filters { display: grid; gap: var(--space-3); position: sticky; inset-block-start: var(--topbar-h); z-index: 10; margin-inline: calc(-1 * clamp(0.75rem, 3vw, 2rem)); padding: var(--space-3) clamp(0.75rem, 3vw, 2rem); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-block-end: 1px solid var(--border); }
.hx-find { display: flex; align-items: center; gap: var(--space-2); max-inline-size: 34rem; padding: 0.15rem var(--space-3); background: var(--surface); border: 1px solid var(--border-btn); border-radius: var(--radius-pill); }
.hx-find:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.hx-find svg { color: var(--text-muted); inline-size: 18px; block-size: 18px; }
.hx-find input { flex: 1; min-inline-size: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 var(--text-md) var(--font); padding: 0.5rem 0; }
.hx-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.hx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0.35rem 0.85rem; border: 1px solid var(--border-btn); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-muted); font: 600 var(--text-sm) var(--font); cursor: pointer; }
.hx-pill:hover { color: var(--text); background: var(--surface-3); }
.hx-pill[aria-pressed='true'] { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent-text); }
.hx-pill svg { inline-size: 16px; block-size: 16px; }
.hx-pill small { font-size: var(--text-xs); opacity: 0.8; }
/* level pills: the colour of the level on the lab cards (green, blue, amber), a dot as well as the word, and a filled pill when chosen; "Any level" shows the three dots */
.hx-pill[data-level='beginner'] { --lv: var(--success); --lv-bg: var(--success-bg); --lv-border: var(--success-border); }
.hx-pill[data-level='intermediate'] { --lv: var(--accent-text); --lv-bg: var(--accent-bg); --lv-border: var(--accent-border); }
.hx-pill[data-level='advanced'] { --lv: var(--warning); --lv-bg: var(--warning-bg); --lv-border: var(--warning-border); }
.hx-pill[data-level='beginner'], .hx-pill[data-level='intermediate'], .hx-pill[data-level='advanced'] { color: var(--text); border-color: var(--lv-border); }
.hx-pill[data-level='beginner']::before, .hx-pill[data-level='intermediate']::before, .hx-pill[data-level='advanced']::before { content: ''; flex: none; inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--lv); }
.hx-pill[data-level='beginner']:hover, .hx-pill[data-level='intermediate']:hover, .hx-pill[data-level='advanced']:hover { background: var(--lv-bg); color: var(--lv); }
.hx-pill[data-level='beginner'][aria-pressed='true'], .hx-pill[data-level='intermediate'][aria-pressed='true'], .hx-pill[data-level='advanced'][aria-pressed='true'] { background: var(--lv-bg); border-color: var(--lv); color: var(--lv); box-shadow: inset 0 0 0 1px var(--lv); }
.hx-pill[data-level=''][aria-pressed='true'] { background: var(--surface-3); border-color: var(--text-muted); color: var(--text); box-shadow: inset 0 0 0 1px var(--text-muted); }
.hx-dots { display: inline-flex; gap: 3px; }
.hx-dots i { inline-size: 7px; block-size: 7px; border-radius: 50%; }
.hx-dots i:nth-child(1) { background: var(--success); }
.hx-dots i:nth-child(2) { background: var(--accent-text); }
.hx-dots i:nth-child(3) { background: var(--warning); }
.hx-track { display: grid; gap: var(--space-3); scroll-margin-top: calc(var(--topbar-h) + 9rem); }
.hx-track-head { display: flex; align-items: center; gap: var(--space-3); }
.hx-track-head .hx-tile-ic { inline-size: 2.5rem; block-size: 2.5rem; }
.hx-track-head h2 { margin: 0; font-size: var(--text-xl); }
.hx-track-head p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.hx-path { display: grid; gap: var(--space-3); padding-block-start: var(--space-3); scroll-margin-top: calc(var(--topbar-h) + 9rem); }
.hx-path + .hx-path { border-block-start: 1px solid var(--border); margin-block-start: var(--space-2); }
.hx-path-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); }
.hx-path-head h3 { margin: 0; font-size: var(--text-lg); }
.hx-path-head p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); max-inline-size: 60rem; }
.hx-path-meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-weight: 600; font-size: var(--text-xs) !important; }
.hx-empty { padding: var(--space-6); text-align: center; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.hx-empty[hidden] { display: none; }

/* steps strip and help */
.hx-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--space-3); counter-reset: step; }
.hx-step { padding: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hx-step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; inline-size: 1.75rem; block-size: 1.75rem; margin-block-end: var(--space-2); border-radius: 50%; background: var(--accent-bg); color: var(--accent-text); font-weight: 700; font-size: var(--text-sm); }
.hx-step strong { display: block; }
.hx-step span { color: var(--text-muted); font-size: var(--text-sm); }
.hx-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--space-3); }
.hx-faq { display: grid; gap: var(--space-2); }
.hx-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hx-faq summary { cursor: pointer; padding: var(--space-3) var(--space-4); font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: var(--space-3); }
.hx-faq summary::-webkit-details-marker { display: none; }
.hx-faq summary::after { content: '+'; color: var(--accent-text); font-weight: 700; font-size: var(--text-lg); line-height: 1; }
.hx-faq details[open] summary::after { content: '\2212'; }
.hx-faq details > div { padding: 0 var(--space-4) var(--space-4); color: var(--text-muted); }
.hx-faq details > div p:last-child { margin-bottom: 0; }
.hx-disclaimer { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius); color: var(--text); font-size: var(--text-sm); }
.hx-disclaimer button { margin-inline-start: auto; flex: none; padding: 0.2rem 0.6rem; border: 1px solid var(--border-btn); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: 600 var(--text-xs) var(--font); cursor: pointer; }
.hx-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: var(--space-4); }
.hx-list { display: grid; }
.hx-list a { display: flex; align-items: center; gap: var(--space-3); padding: 0.7rem var(--space-4); color: var(--text); text-decoration: none; border-block-start: 1px solid var(--border); }
.hx-list a:first-child { border-block-start: 0; }
.hx-list a:hover { background: var(--surface-3); }
.hx-list a > span:nth-child(3) { margin-inline-start: auto; color: var(--text-muted); font-size: var(--text-xs); }
.hx-pathlist { margin: 0; padding-inline-start: 1.5rem; display: block; }
.hx-pathlist li { padding: 0.3rem 0; overflow-wrap: anywhere; }
.hx-pathlist li::marker { color: var(--text-muted); font-weight: 600; }
.hx-pathlist a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.hx-pathlist a:hover { text-decoration: underline; }
.hx-pathlist .hx-muted { font-size: var(--text-xs); white-space: nowrap; }
.hx-pathlist li[aria-current='step'] { color: var(--text); }
.hx-btn--wrap { white-space: normal; text-align: start; block-size: auto; min-block-size: 2.25rem; line-height: 1.3; padding-block: 0.45rem; max-inline-size: 100%; }
.hx-mono { display: inline-grid; place-items: center; min-inline-size: 2.5rem; padding: 0.2rem 0.4rem; border-radius: var(--radius-sm); background: var(--accent-bg); color: var(--accent-text); font: 700 0.65rem var(--font); letter-spacing: 0.04em; }

@media print { .hx-topbar, .hx-sidebar-slot, .hx-drawer, .hx-footer { display: none !important; } }

/* ── Asha, the lab assistant, is for signed-in people. She is never in a public page: hub-shell.js sets data-hx-asha only after the server has shown a signed-in session, whether the loader is added by the shell or is already a tag of the guide. Until then every control that could reach her is hidden. ── */
html:not([data-hx-asha]) .search-modal__ai-btn,
html:not([data-hx-asha]) .search-trigger__ai,
html:not([data-hx-asha]) #lessit-assistant-launcher { display: none !important; }
/* Asha's pill rests in the bottom right corner: the footer keeps clear of it (its last line ends above the pill, and its links never run under it) */
html[data-hx-asha] .hx-footer { padding-block-end: 4.75rem; padding-inline-end: 8rem; }

/* ── sign-in pages ── */
.hx-login-page { margin: 0; min-block-size: 100dvh; background: var(--bg); color: var(--text); }
.hx-login { min-block-size: 100dvh; display: grid; align-content: center; justify-items: center; gap: var(--space-5); padding: var(--space-5) var(--space-4); }
.hx-login-brand img { display: block; block-size: 40px; inline-size: auto; }
.hx-login-card { inline-size: 100%; max-inline-size: 28rem; padding: var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.hx-login-card h1 { margin: 0 0 var(--space-2); font-size: var(--text-2xl); font-weight: 650; }
.hx-login-card, .hx-login-card *, .hx-login-card *::before, .hx-login-card *::after { box-sizing: border-box; }
.hx-login-card > p { margin: 0 0 var(--space-5); color: var(--text-muted); }
.hx-login-error { display: none; margin-block-end: var(--space-4); padding: var(--space-3) var(--space-4); background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: var(--radius); color: var(--danger); font-size: var(--text-sm); }
.hx-login-btn { display: flex; align-items: center; justify-content: center; gap: var(--space-3); inline-size: 100%; min-block-size: 3rem; padding: 0.6rem 1rem; background: var(--surface); border: 1px solid var(--border-btn); border-radius: var(--radius); color: var(--text); font: 600 var(--text-md) var(--font); text-decoration: none; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease); }
.hx-login-btn:hover { background: var(--surface-3); border-color: var(--accent-border); color: var(--text); }
.hx-login-btn svg { inline-size: 20px; block-size: 20px; }
.hx-login-or { display: flex; align-items: center; gap: var(--space-3); margin-block: var(--space-4); color: var(--text-muted); font-size: var(--text-sm); }
.hx-login-or::before, .hx-login-or::after { content: ''; flex: 1; block-size: 1px; background: var(--border); }
.hx-login-card .hx-login-foot { margin: var(--space-5) 0 0; color: var(--text-muted); font-size: var(--text-xs); text-align: center; }
.hx-login-foot a { color: var(--accent-text); }
.hx-plainlist { margin: 0 0 var(--space-4); padding-inline-start: 1.25rem; color: var(--text); }
.hx-plainlist li { margin-block: 0.25rem; }
.hx-login-card .hx-field-hint { margin-block: var(--space-3) 0; }
.hx-login-card .hx-field-hint a { color: var(--accent-text); }
/* the heading of a view takes focus when the view changes (for screen readers); it is not a control, so it shows no ring */
.hx-view h1:focus { outline: none; }
.hx-chip[hidden] { display: none; }
@media (max-width: 640px) {
  .hx-topbar { gap: var(--space-1); padding-inline: var(--space-2); }
  .hx-brand { flex: none; }
  .hx-brand img { block-size: 28px; max-inline-size: 7.5rem; }
  .hx-topbar .search-trigger { inline-size: 2.5rem; min-inline-size: 0; margin-inline: 0; flex: none; }
}
/* ── Help (the layout and look of Loquor's Help: a boxed list of topics, one card per topic, ruled questions with a round plus) ── */
.hx-help { display: grid; gap: var(--space-5); min-inline-size: 0; line-height: 1.5; }
.hx-help .hx-title { font-size: clamp(1.75rem, 3.4vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }
.hx-help .hx-lede { margin-block-start: var(--space-2); font-size: var(--text-lg); max-inline-size: 62ch; }
.hx-help-search { display: grid; gap: var(--space-1); max-inline-size: 40rem; }
.hx-help-search label { font-weight: 600; font-size: var(--text-sm); }
.hx-help-search input { inline-size: 100%; min-block-size: 2.75rem; padding: 0.55rem 0.85rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-btn); border-radius: var(--radius); font: 400 var(--text-md) var(--font); }
.hx-help-search input::placeholder { color: var(--text-disabled); }
.hx-help-search input:hover { border-color: var(--border-strong); }
.hx-help-search input:focus-visible { outline-offset: 1px; border-color: var(--accent); }
.hx-help-status { margin: 0; font-size: var(--text-sm); min-block-size: 1.3em; }
.hx-help-quick > h2 { margin: 0 0 var(--space-3); font-size: var(--text-xl); }
.hx-help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-3); }
.hx-help-card { display: grid; gap: var(--space-1); padding: var(--space-4); color: var(--text); text-decoration: none; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); transition: border-color 0.15s, transform 0.15s; }
.hx-help-card strong { color: var(--accent-text); font-size: var(--text-lg); }
.hx-help-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hx-help-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
@media (min-width: 62rem) { .hx-help-layout:has(.hx-help-toc:not([hidden])) { grid-template-columns: 15rem minmax(0, 1fr); } }
.hx-help-toc { position: sticky; inset-block-start: calc(var(--topbar-h) + var(--space-4)); padding: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hx-help-toc ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.hx-help-toc a { display: block; padding: var(--space-2) var(--space-3); color: var(--text); text-decoration: none; border-radius: var(--radius-sm); }
.hx-help-toc a:hover { background: var(--accent-bg); color: var(--accent-text); }
.hx-help-toc[hidden], .hx-help-quick[hidden], .hx-help-topic[hidden], .hx-help-item[hidden] { display: none; }
@media (max-width: 61.99rem) { .hx-help-toc { position: static; } .hx-help-toc ul { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; } }
.hx-help-topics { display: grid; gap: var(--space-5); min-inline-size: 0; }
.hx-help-topic { scroll-margin-block-start: calc(var(--topbar-h) + var(--space-4)); padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hx-help-topic > h2 { margin: 0 0 var(--space-3); font-size: var(--text-xl); font-weight: 600; }
.hx-help-item { border-block-start: 1px solid var(--border); scroll-margin-block-start: calc(var(--topbar-h) + var(--space-4)); }
.hx-help-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; font-weight: 600; cursor: pointer; list-style: none; }
.hx-help-item summary::-webkit-details-marker { display: none; }
/* the plus and minus are two bars centred on the circle, so they sit in the middle whatever the font does */
.hx-help-item summary::after { content: ''; flex: none; box-sizing: border-box; inline-size: 1.75rem; block-size: 1.75rem; color: var(--accent-text); border: 2px solid var(--accent-border); border-radius: 50%; background: linear-gradient(currentColor, currentColor) center / 0.75rem 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 0.75rem no-repeat; }
.hx-help-item[open] summary::after { background: linear-gradient(currentColor, currentColor) center / 0.75rem 2px no-repeat; }
.hx-help-item summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.hx-help-item.is-target { padding-inline: var(--space-3); background: var(--accent-bg); border-radius: var(--radius); }
.hx-help-answer { padding-block-end: var(--space-3); max-inline-size: 46rem; }
.hx-help-answer p { margin: 0 0 var(--space-2); }
.hx-help-group { margin-block-start: var(--space-4); }
.hx-help-group > h3 { margin: 0 0 var(--space-1); font-size: var(--text-md); font-weight: 600; color: var(--accent-text); }
.hx-help-group[hidden] { display: none; }
.hx-shortcut-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-5); }
.hx-shortcut-groups h3 { margin: 0 0 var(--space-2); font-size: var(--text-md); font-weight: 600; }
.hx-shortcut-list { margin: 0; padding: 0; }
.hx-shortcut-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-2) 0; border-block-end: 1px solid var(--border); }
.hx-shortcut-row dt { flex: 1 1 12rem; margin: 0; }
.hx-shortcut-row dd { margin: 0; display: inline-flex; flex-wrap: wrap; gap: var(--space-1); }
.hx-help-stuck { padding: var(--space-4) var(--space-5); background: var(--accent-bg); border: 2px solid var(--accent-border); border-radius: var(--radius-lg); }
.hx-help-stuck h2 { margin: 0 0 var(--space-2); font-size: var(--text-xl); font-weight: 600; }
.hx-help-stuck p { margin: 0 0 var(--space-2); }
.hx-btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
kbd.hx-kbd { display: inline-block; min-inline-size: 1.9em; padding: 0.15em 0.5em; font: 600 0.85em/1.4 var(--mono); text-align: center; color: var(--text); background: var(--surface-sunken); border: 1px solid var(--border-strong); border-block-end-width: 3px; border-radius: var(--radius-sm); white-space: nowrap; }

/* ── accounts: sign in, My account and People ── */
:where(.hx-login-card, .hx-account, .hx-users, .hx-dialog) [hidden], .hx-panel[hidden], .hx-view[hidden], .hx-doors[hidden] { display: none !important; }
.hx-login-lede { margin: 0 0 var(--space-4); color: var(--text-muted); }
.hx-login-error { margin-block-end: var(--space-4); }
.hx-login-card .hx-notice { margin-block-end: var(--space-4); }
.hx-view > h1 { margin-block-end: var(--space-2); }

/* forms */
.hx-form { display: grid; gap: var(--space-4); }
.hx-field { display: grid; gap: 6px; min-inline-size: 0; }
.hx-field label { font-weight: 600; font-size: var(--text-sm); }
.hx-field input, .hx-field textarea { inline-size: 100%; min-block-size: 2.75rem; padding: 0.55rem 0.85rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-btn); border-radius: var(--radius); font: 400 var(--text-md) var(--font); }
.hx-field textarea { resize: vertical; line-height: 1.5; }
.hx-field input::placeholder, .hx-field textarea::placeholder { color: var(--text-disabled); }
.hx-field input:hover, .hx-field textarea:hover { border-color: var(--border-strong); }
.hx-field input:focus-visible, .hx-field textarea:focus-visible { outline-offset: 1px; border-color: var(--accent); }
.hx-field input[aria-invalid='true'], .hx-field textarea[aria-invalid='true'] { border-color: var(--danger); }
.hx-field-hint { margin: 0; color: var(--text-muted); font-size: var(--text-xs); }
.hx-field-error { margin: 0; color: var(--danger); font-size: var(--text-sm); font-weight: 500; }
.hx-input-wrap { position: relative; }
.hx-input-wrap input { padding-inline-end: 2.9rem; }
.hx-eye { position: absolute; inset-block: 2px; inset-inline-end: 2px; inline-size: 2.5rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.hx-eye:hover { color: var(--text); background: var(--surface-3); }
.hx-eye svg:last-child, .hx-eye[aria-pressed='true'] svg:first-child { display: none; }
.hx-eye[aria-pressed='true'] svg:last-child { display: block; }
.hx-form-aside { display: flex; justify-content: flex-end; margin-block-start: calc(-1 * var(--space-2)); }
.hx-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block-start: var(--space-4); }
.hx-link { padding: 0; border: 0; background: none; color: var(--accent-text); font: 600 var(--text-sm) var(--font); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.hx-link:hover { color: var(--accent-hover); }
.hx-btn--block { inline-size: 100%; min-block-size: 3rem; }
.hx-btn--danger { background: var(--danger); color: var(--on-danger, #fff); }
.hx-btn--danger:hover { filter: brightness(0.92); }
[data-theme='dark'] { --on-danger: #1b0a0d; }
.hx-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.hx-btn-row--center { justify-content: center; }
.hx-btn-row--end { justify-content: flex-end; }

/* messages and status tags */
.hx-notice { padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-size: var(--text-sm); }
.hx-notice p { margin: 0 0 var(--space-2); }
.hx-notice p:last-child { margin-block-end: 0; }
.hx-notice a { font-weight: 600; }
.hx-notice--info { background: var(--accent-bg); border-color: var(--accent-border); }
.hx-notice--success { background: var(--success-bg); border-color: var(--success-border); }
.hx-notice--warn { background: var(--warning-bg); border-color: var(--warning-border); }
.hx-notice--error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.hx-tag { display: inline-flex; align-items: center; padding: 0.12rem 0.6rem; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--text-muted); font: 600 var(--text-xs) var(--font); white-space: nowrap; }
.hx-tag--ok { background: var(--success-bg); color: var(--success); }
.hx-tag--warn { background: var(--warning-bg); color: var(--warning); }
.hx-tag--danger { background: var(--danger-bg); color: var(--danger); }
.hx-tag--info { background: var(--accent-bg); color: var(--accent-text); }

/* tabs: a segmented switch on the sign-in card, a line under the page title on People */
.hx-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-block: var(--space-4); padding: 4px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius); }
.hx-tab { min-block-size: 2.4rem; padding: 0.4rem 0.8rem; border: 0; border-radius: calc(var(--radius) - 3px); background: transparent; color: var(--text-muted); font: 600 var(--text-sm) var(--font); cursor: pointer; }
.hx-tab:hover { color: var(--text); }
.hx-tab[aria-selected='true'] { background: var(--surface); color: var(--accent-text); box-shadow: 0 0 0 1px var(--border-btn), var(--shadow-1); }
.hx-tabs--line { display: flex; gap: var(--space-1); margin-block: 0; padding: 0; background: none; border: 0; border-block-end: 1px solid var(--border); border-radius: 0; }
.hx-tabs--line .hx-tab { padding: 0.65rem 1rem; border-radius: 0; border-block-end: 2px solid transparent; margin-block-end: -1px; }
.hx-tabs--line .hx-tab[aria-selected='true'] { background: none; box-shadow: none; border-block-end-color: var(--accent); }

/* password strength: a bar that fills and changes colour while typing, the word beside it, and a button that suggests a strong password */
.hx-pw { display: grid; gap: 6px; margin-block-start: var(--space-1); }
.hx-pw-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.hx-pw-bar span { block-size: 4px; border-radius: 2px; background: var(--surface-3); transition: background-color 0.15s var(--ease); }
.hx-pw[data-level='weak'] .hx-pw-bar span:first-child { background: var(--danger); }
.hx-pw[data-level='fair'] .hx-pw-bar span:nth-child(-n + 2) { background: var(--warning-border); }
.hx-pw[data-level='strong'] .hx-pw-bar span { background: var(--success-border); }
.hx-pw-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px var(--space-3); }
.hx-pw-label { margin: 0; color: var(--text-muted); font-size: var(--text-xs); font-weight: 600; }
.hx-pw[data-level='weak'] .hx-pw-label { color: var(--danger); }
.hx-pw[data-level='fair'] .hx-pw-label { color: var(--warning); }
.hx-pw[data-level='strong'] .hx-pw-label { color: var(--success); }
.hx-pw-suggest { display: inline-flex; align-items: center; gap: 4px; padding: 0; background: none; border: 0; font: inherit; font-size: var(--text-xs); font-weight: 600; cursor: pointer; }
.hx-pw-suggest svg { flex: none; }
.hx-pw-note { margin: 0; font-size: var(--text-xs); color: var(--text-muted); }
.hx-pw-note[data-tone='problem'] { color: var(--danger); font-weight: 600; }

/* the doors below or beside the form */
.hx-doors { display: grid; gap: var(--space-3); margin-block-start: var(--space-5); }
.hx-doors .hx-login-or { margin: 0; }
.hx-login-btn { justify-content: flex-start; padding-inline: 1.1rem; text-align: start; }
.hx-login-btn span { display: grid; }
.hx-login-btn small { font-size: var(--text-xs); font-weight: 400; opacity: 0.85; }
.hx-login-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hx-login-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.hx-login-new { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: var(--text-sm); text-align: center; }
.hx-login-new a { color: var(--accent-text); font-weight: 600; }
.hx-login-new .hx-link { color: var(--accent-text); font-weight: 600; }
.hx-passkey-box { display: grid; gap: var(--space-2); }
.hx-passkey-box .hx-field-hint { margin: 0; text-align: center; }
#siInviteLine { margin-block-start: var(--space-4); }
.hx-passkeys { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.hx-passkey { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius); }
.hx-passkey-main { display: grid; gap: var(--space-1); min-inline-size: 0; }
.hx-passkey-main strong { overflow-wrap: anywhere; }
.hx-passkey-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin: 0; color: var(--text-muted); font-size: var(--text-sm); }

/* My account */
.hx-account { gap: var(--space-5); }
.hx-anchor { position: absolute; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.hx-jump { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hx-jump[hidden] { display: none; }
.hx-jump a { padding: 0.3rem 0.8rem; border: 1px solid var(--border-btn); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-muted); font: 600 var(--text-sm) var(--font); text-decoration: none; }
.hx-jump a:hover { color: var(--text); background: var(--surface-3); }
.hx-account-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); }
.hx-avatar--lg { inline-size: 3.5rem; block-size: 3.5rem; font-size: var(--text-xl); }
.hx-avatar--xl { inline-size: 5.5rem; block-size: 5.5rem; font-size: 2rem; }
/* My account, Profile: the picture, the photo button, and the drawings and colours to choose from */
.hx-picture { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.hx-picture-actions { display: grid; gap: var(--space-2); min-inline-size: 0; }
.hx-picture-actions .hx-panel-text { font-size: var(--text-sm); }
.hx-avatar-pick { display: grid; gap: var(--space-2); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.hx-avatar-pick legend { padding: 0; font-size: var(--text-sm); font-weight: 650; }
.hx-avatar-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); max-inline-size: 28rem; }
.hx-av-opt { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent; cursor: pointer; }
.hx-av-opt .hx-avatar { inline-size: 2.25rem; block-size: 2.25rem; }
.hx-av-opt:hover { border-color: var(--border-btn); }
.hx-av-opt[aria-pressed="true"] { border-color: var(--accent-text); }
.hx-av-opt--color .hx-avatar { inline-size: 1.75rem; block-size: 1.75rem; }
.hx-av-opt--color { inline-size: 2.25rem; block-size: 2.25rem; }
.hx-av-note { margin: 0; font-size: var(--text-sm); }
.hx-eyebrow { margin: 0; color: var(--accent-text); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hx-title--sm { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.1rem); overflow-wrap: anywhere; }
.hx-account-mail { margin: 0; color: var(--text-muted); overflow-wrap: anywhere; }
.hx-panel { display: grid; gap: var(--space-4); padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); scroll-margin-top: calc(var(--topbar-h) + 1rem); min-inline-size: 0; }
.hx-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.hx-panel-head h2 { margin: 0; font-size: var(--text-lg); font-weight: 650; }
.hx-panel-text { margin: 0; color: var(--text-muted); }
.hx-panel .hx-form, .hx-panel .hx-field { max-inline-size: 28rem; }
.hx-panel .hx-form--inline { max-inline-size: none; }
.hx-panel p { margin: 0; }
.hx-qr { inline-size: fit-content; max-inline-size: 100%; padding: 0.6rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); line-height: 0; }
.hx-qr img { display: block; inline-size: 200px; max-inline-size: 100%; block-size: auto; aspect-ratio: 1; }
.hx-key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.hx-key code, .hx-codes code { padding: 0.25rem 0.55rem; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: 600 var(--text-md) var(--mono); letter-spacing: 0.06em; overflow-wrap: anywhere; }
.hx-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); max-inline-size: 22rem; margin: 0; padding: 0; list-style: none; }
.hx-codes code { display: block; text-align: center; }
.hx-btn svg { inline-size: 16px; block-size: 16px; }

/* People */
.hx-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block: var(--space-4); }
.hx-toolbar .hx-find { flex: 1 1 18rem; margin: 0; }
.hx-toolbar p { margin: 0; font-size: var(--text-sm); }
.hx-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hx-table { inline-size: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.hx-table th, .hx-table td { padding: 0.7rem var(--space-3); text-align: start; border-block-end: 1px solid var(--border); vertical-align: middle; }
.hx-table thead th { background: var(--surface-2); color: var(--text-muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.hx-table tbody th { font-weight: 600; }
.hx-table tbody tr:last-child > * { border-block-end: 0; }
.hx-table tbody tr:hover { background: var(--surface-2); }
.hx-table-wrap:has(> .hx-table[hidden]) { display: none; }
.hx-table[hidden] { display: none; }
.hx-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-1); }
.hx-users > section { display: grid; gap: var(--space-4); }
.hx-form--inline { grid-template-columns: minmax(0, 24rem) auto; align-items: start; justify-content: start; }
.hx-form--inline .hx-btn { margin-block-start: 1.75rem; }
.hx-dialog { inline-size: min(28rem, calc(100vw - 2rem)); padding: var(--space-5); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); }
.hx-dialog::backdrop { background: var(--overlay); }
.hx-dialog h2 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.hx-dialog p { margin: 0 0 var(--space-4); color: var(--text-muted); }

@media (max-width: 900px) {
  .hx-table--stack thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hx-table--stack, .hx-table--stack tbody, .hx-table--stack tr, .hx-table--stack th, .hx-table--stack td { display: block; }
  .hx-table--stack tr { padding: var(--space-3) var(--space-4); border-block-end: 1px solid var(--border); }
  .hx-table--stack tbody tr:last-child { border-block-end: 0; }
  .hx-table--stack th, .hx-table--stack td { padding: 0.2rem 0; border: 0; }
  .hx-table--stack tbody th { padding-block-end: var(--space-2); font-size: var(--text-md); }
  .hx-table--stack td { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-block-size: 1.9rem; text-align: end; overflow-wrap: anywhere; }
  .hx-table--stack td::before { content: attr(data-label); flex: none; color: var(--text-muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-align: start; }
  .hx-table--stack td.hx-cell-actions { justify-content: flex-start; padding-block-start: var(--space-2); }
  .hx-table--stack td.hx-cell-actions::before { display: none; }
  .hx-row-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .hx-login { padding-inline: var(--space-3); }
  .hx-login-card { padding: var(--space-5) var(--space-4); }
  .hx-panel { padding: var(--space-4); }
  .hx-account-head { grid-template-columns: auto minmax(0, 1fr); }
  .hx-account-head .hx-tag { grid-column: 2; justify-self: start; }
  .hx-form--inline { grid-template-columns: 1fr; }
  .hx-form--inline .hx-btn { margin-block-start: 0; }
}
