/* Hallmark · shape: app screen · genre: modern-minimal · theme: Dusk (by request, the el zone system of the life app) · redesign: full
 * nav: floating glass controls on the board (name, people, a dock), the wordmark centred on the index · signature: the board edge to edge, its controls afloat in smoked glass · states: empty, full, editing, locked, conflict, sync error · dusk: no hour (app screens)/periwinkle-apricot/glass
 * axes: dark/grotesk-sans/cool · posture: committed · contrast: pass · finish-review: subagent · 8 findings · 8 resolved · gap: the glass reads as slate over the dark canvas · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R3 V4 · weakest: R, three floating clusters are one more than a bar; each holds one job (where you are, who is here, what you make) */
/* Hallmark · waive 64 · the text is a note body, typed by the user in space-aligned columns · a fixed-width face keeps a note's columns lined up, as on the life noteboard */
/* Hallmark · dismissed 29 · smoked glass with a lit edge is the Dusk theme's own product surface, used once, for the controls afloat over the canvas */
/* Hallmark · dropped "Home", "Open", "My Boards" · the wordmark links home, a whole card opens its board, and the index heading is Boards */
/* Hallmark · reworded "Start a new collaborative workspace" and "Enter a token to join a workspace" to "Create a board to start a new collaborative workspace, or enter a token to join one." · the two action cards became two buttons, their lines moved to the empty index */
/* Hallmark · reworded "Danger Zone" to "Delete board" · 54 names a label that only announces; the plain action is the heading */
:root {
  color-scheme: dark;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px;
  --text-2xs: 0.6875rem; --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem; --text-2xl: 1.728rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 220ms;
  --container: 46rem; --gutter: var(--space-lg); --bar-h: 56px; --note-ctl: 28px; --ctl-h: 36px; --ctl-h-sm: 32px; --hit: 44px;
  --z-raised: 10; --z-dropdown: 100; --z-sticky-nav: 300; --z-toast: 500; --z-fullscreen: 9999; --z-fullscreen-tools: 10000;
  --color-paper: oklch(17.5% 0.014 268); --color-paper-2: oklch(21% 0.016 268); --color-paper-3: oklch(25% 0.017 268); --color-sunk: oklch(14.5% 0.014 268);
  --color-ink: oklch(96% 0.006 75); --color-ink-2: oklch(85% 0.010 262); --color-muted: oklch(72% 0.016 262);
  --color-rule: oklch(30% 0.016 266); --color-edge: oklch(56% 0.02 266); --color-dot: oklch(30% 0.016 266);
  --color-split: oklch(100% 0 0 / 0.07); --color-lift: oklch(100% 0 0 / 0.05); --color-lift-2: oklch(100% 0 0 / 0.1); --color-lit: oklch(100% 0 0 / 0.35);
  --color-accent: oklch(77% 0.10 274); --color-accent-hi: oklch(84% 0.085 274); --color-accent-ink: oklch(19% 0.035 274); --color-accent-dim: oklch(30% 0.05 274); --color-focus: oklch(80% 0.10 274);
  --color-accent-2: oklch(83% 0.095 62); --color-accent-2-ink: oklch(22% 0.04 62); --color-accent-2-dim: oklch(30% 0.04 62);
  --color-error: oklch(76% 0.13 27); --color-error-dim: oklch(27% 0.05 27);
  --color-scrim: oklch(9% 0.02 268);
  --glass: oklch(23% 0.018 268 / 0.74); --glass-blur: 20px;
  --note-ink: oklch(27% 0.012 268); --note-muted: oklch(42% 0.012 268); --note-line: oklch(27% 0.012 268 / 0.14); --note-ring: oklch(100% 0 0 / 0.5); --note-lift: oklch(100% 0 0 / 0.5);
  --panel-edge: inset 0 1px 0 oklch(100% 0 0 / 0.09), inset 0 0 0 1px oklch(100% 0 0 / 0.05);
  --shadow-pop: 0 32px 64px -24px oklch(8% 0.02 268 / 0.7);
  --shadow-note: 0 6px 16px -6px oklch(8% 0.02 268 / 0.6);
  --font-display: "Wix Madefor Display", ui-sans-serif, system-ui, sans-serif; --font-body: "Wix Madefor Text", ui-sans-serif, system-ui, sans-serif;
  --font-outlier: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-card: 18px; --radius-inner: 10px; --radius-pill: 999px; --radius-note: 6px;
  --tracking-display: -0.022em; --display-weight: 500;
  --i-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23d5d8e2' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m4 4 8 8M12 4l-8 8'/%3E%3C/svg%3E");
}

/* Bootstrap, re-pointed at the tokens */
html:root {
  --bs-body-bg: var(--color-paper); --bs-body-color: var(--color-ink); --bs-emphasis-color: var(--color-ink);
  --bs-secondary-color: var(--color-muted); --bs-tertiary-color: var(--color-muted); --bs-secondary-bg: var(--color-paper-3); --bs-tertiary-bg: var(--color-paper-2);
  --bs-border-color: var(--color-rule); --bs-border-color-translucent: var(--color-split); --bs-heading-color: var(--color-ink);
  --bs-link-color: var(--color-ink); --bs-link-hover-color: var(--color-accent-hi); --bs-code-color: var(--color-ink-2);
  --bs-body-font-family: var(--font-body); --bs-body-font-size: var(--text-md); --bs-body-line-height: 1.5;
  --bs-border-radius: var(--radius-inner); --bs-border-radius-sm: var(--radius-inner); --bs-border-radius-lg: var(--radius-card);
  --bs-focus-ring-color: transparent;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-rule) var(--color-paper); }
body { margin: 0; min-height: 100dvh; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); font-synthesis: none; }
::selection { background: color-mix(in oklab, var(--color-accent) 30%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.15; color: var(--color-ink); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { font-size: var(--text-2xl); } h2 { font-size: var(--text-lg); } h3 { font-size: var(--text-md); letter-spacing: 0; }
p { margin: 0 0 var(--space-sm); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
button, input, select, textarea { font: inherit; }
svg { display: block; flex-shrink: 0; }
code { font-family: var(--font-outlier); font-size: var(--text-sm); color: var(--color-ink-2); }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); }
.skip:focus-visible { top: var(--space-md); }
.muted { color: var(--color-muted); }

/* shell */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.top { padding-block: var(--space-lg); }
.brand { display: inline-flex; align-items: baseline; flex-shrink: 0; font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: var(--tracking-display); line-height: 1.2; color: var(--color-muted); text-decoration: none; white-space: nowrap; transition: color var(--dur-micro) var(--ease-out); }
.brand b { margin-right: var(--space-2xs); font-weight: 600; color: var(--color-ink); }
.brand span { margin-left: var(--space-xs); color: var(--color-ink); }
.brand:hover { color: var(--color-ink-2); }
.main { padding-block: var(--space-md) var(--space-3xl); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-lg); margin-bottom: var(--space-lg); }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-sm); min-width: 0; }
.crumbs a { color: var(--color-muted); text-decoration: none; transition: color var(--dur-micro) var(--ease-out); }
.crumbs a:hover { color: var(--color-ink); }
.crumbs-sep { color: var(--color-edge); }
.panel { border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--panel-edge); }
.chip { display: inline-flex; align-items: center; flex-shrink: 0; min-height: calc(var(--space-md) + var(--space-2xs)); padding: 0 var(--space-xs); border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--color-rule); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0; line-height: 1; white-space: nowrap; color: var(--color-muted); }
.state { padding: var(--space-2xl) var(--space-lg); color: var(--color-muted); font-size: var(--text-sm); text-align: center; }
.state h2 { margin-bottom: var(--space-xs); }
.state p { max-width: 45ch; margin-inline: auto; }

/* buttons */
.btn { --bs-btn-padding-x: var(--space-md); --bs-btn-padding-y: 0; --bs-btn-font-size: var(--text-sm); --bs-btn-font-weight: 500; --bs-btn-line-height: 1; --bs-btn-border-radius: var(--radius-pill); --bs-btn-border-width: 1px; --bs-btn-focus-box-shadow: none; --bs-btn-disabled-opacity: 0.55;
  --bs-btn-color: var(--color-ink); --bs-btn-bg: var(--color-lift); --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--color-ink); --bs-btn-hover-bg: var(--color-lift-2); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--color-ink); --bs-btn-active-bg: var(--color-lift-2); --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: var(--color-ink); --bs-btn-disabled-bg: var(--color-lift); --bs-btn-disabled-border-color: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--ctl-h); white-space: nowrap; text-decoration: none; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; box-shadow: none; }
.btn:disabled, .btn.disabled { pointer-events: auto; cursor: not-allowed; transform: none; }
.btn-sm { --bs-btn-padding-x: var(--space-sm); --bs-btn-border-radius: var(--radius-pill); min-height: var(--ctl-h-sm); }
.btn-primary { --bs-btn-color: var(--color-accent-ink); --bs-btn-bg: var(--color-accent); --bs-btn-border-color: var(--color-accent);
  --bs-btn-hover-color: var(--color-accent-ink); --bs-btn-hover-bg: var(--color-accent-hi); --bs-btn-hover-border-color: var(--color-accent-hi);
  --bs-btn-active-color: var(--color-accent-ink); --bs-btn-active-bg: var(--color-accent-hi); --bs-btn-active-border-color: var(--color-accent-hi);
  --bs-btn-disabled-color: var(--color-accent-ink); --bs-btn-disabled-bg: var(--color-accent); --bs-btn-disabled-border-color: var(--color-accent);
  box-shadow: inset 0 1px 0 var(--color-lit); }
.btn-danger { --bs-btn-color: var(--color-error); --bs-btn-hover-color: var(--color-error); --bs-btn-hover-bg: var(--color-error-dim); --bs-btn-active-color: var(--color-error); --bs-btn-active-bg: var(--color-error-dim); --bs-btn-disabled-color: var(--color-error); }
.btn-close { --bs-btn-close-bg: var(--i-close); --bs-btn-close-opacity: 0.8; --bs-btn-close-hover-opacity: 1; --bs-btn-close-focus-shadow: none; width: var(--space-md); height: var(--space-md); padding: var(--space-xs); border-radius: var(--radius-pill); box-sizing: content-box; filter: none; transition: opacity var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.btn-close:hover { background-color: var(--color-lift); }
.btn-close:active { background-color: var(--color-lift-2); }
.icon-btn { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: var(--ctl-h-sm); height: var(--ctl-h-sm); padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); cursor: pointer; transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.icon-btn::before { content: ""; position: absolute; inset: calc(-1 * var(--space-2xs)); }
.icon-btn:hover { color: var(--color-ink); background: var(--color-lift); }
.icon-btn:active { background: var(--color-lift-2); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; background: transparent; }

/* fields */
.form-label { margin-bottom: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
.form-text { min-height: 1lh; margin-top: var(--space-2xs); font-size: var(--text-xs); color: var(--color-muted); }
.form-control { min-height: var(--ctl-h); padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-edge); border-radius: var(--radius-inner); background-color: var(--color-sunk); color: var(--color-ink); font-size: var(--text-sm); line-height: 1.4; box-shadow: none; transition: background-color var(--dur-micro) var(--ease-out); }
.form-control::placeholder { color: var(--color-muted); opacity: 1; }
.form-control:focus { border-color: var(--color-edge); background-color: var(--color-sunk); color: var(--color-ink); box-shadow: none; outline: 2px solid var(--color-focus); outline-offset: -1px; }
.form-control:disabled { opacity: 0.55; cursor: not-allowed; background-color: var(--color-sunk); }
.form-control[readonly] { color: var(--color-ink-2); font-family: var(--font-outlier); }
textarea.form-control { min-height: calc(var(--ctl-h) * 2.5); }
.field { margin-bottom: var(--space-md); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-lg); }
.copy-row { display: flex; gap: var(--space-xs); }
.copy-row .form-control { flex: 1; min-width: 0; }

/* dialogs */
.modal { --bs-modal-bg: var(--color-paper-2); --bs-modal-color: var(--color-ink); --bs-modal-border-width: 0; --bs-modal-border-radius: var(--radius-card); --bs-modal-inner-border-radius: var(--radius-card); --bs-modal-padding: var(--space-lg); --bs-modal-header-padding: var(--space-md) var(--space-lg); --bs-modal-header-border-width: 0; --bs-modal-box-shadow: none; --bs-modal-width: 28rem; }
.modal-content { background-color: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--panel-edge), var(--shadow-pop); }
.modal-header { padding-bottom: 0; }
.modal-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.3; }
.modal-body { font-size: var(--text-sm); }
.modal-body > p { color: var(--color-muted); }
.modal-backdrop { --bs-backdrop-bg: var(--color-scrim); --bs-backdrop-opacity: 0.72; }
.people { margin: 0 calc(-1 * var(--space-lg)) calc(-1 * var(--space-sm)); padding: 0; list-style: none; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-lg); font-size: var(--text-sm); }
.people li + li { box-shadow: inset 0 1px 0 var(--color-split); }

/* tables */
.table { --bs-table-color: var(--color-ink); --bs-table-bg: transparent; --bs-table-border-color: var(--color-split); margin: 0; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.table > :not(caption) > * > * { padding: var(--space-sm) var(--space-lg); border-bottom-width: 0; border-top: 1px solid var(--color-split); box-shadow: none; vertical-align: middle; }
.table > thead > tr > th { border-top: 0; font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); white-space: nowrap; }
.table td:last-child { width: 1%; text-align: right; white-space: nowrap; }

/* messages */
.alert { --bs-alert-padding-x: var(--space-md); --bs-alert-padding-y: var(--space-sm); --bs-alert-margin-bottom: var(--space-md); --bs-alert-border-radius: var(--radius-inner); --bs-alert-border-color: transparent; --bs-alert-bg: var(--color-paper-3); --bs-alert-color: var(--color-ink); font-size: var(--text-sm); }
.alert-danger, .alert-error { --bs-alert-bg: var(--color-error-dim); --bs-alert-color: var(--color-error); }
.alert-success { --bs-alert-bg: var(--color-accent-dim); --bs-alert-color: var(--color-ink); }
.alert-warning, .alert-info { --bs-alert-bg: var(--color-accent-2-dim); --bs-alert-color: var(--color-accent-2); }
.notes-notification { position: fixed; bottom: calc(var(--space-lg) + var(--float-h) + var(--space-sm)); left: 50%; z-index: var(--z-toast); display: flex; align-items: center; gap: var(--space-sm); width: max-content; max-width: calc(100% - var(--space-xl)); margin: 0; transform: translateX(-50%); box-shadow: var(--shadow-pop); }

/* settings */
.settings { display: grid; gap: var(--space-md); }
.settings .panel { overflow: hidden; }
.settings h2 { padding: var(--space-md) var(--space-lg) 0; }
.settings-body { padding: var(--space-md) var(--space-lg) var(--space-lg); }
.settings-body > p { max-width: 65ch; font-size: var(--text-sm); color: var(--color-muted); }
.settings .table { margin-top: var(--space-xs); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); margin: 0; }
.facts dt { font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); }
.facts dd { margin: 0; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.link-btn { position: relative; padding: 0; border: 0; background: transparent; font-size: var(--text-sm); font-weight: 500; color: var(--color-error); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; cursor: pointer; transition: text-decoration-color var(--dur-micro) var(--ease-out); }
.link-btn::before { content: ""; position: absolute; inset: calc(-1 * var(--space-sm)) calc(-1 * var(--space-xs)); }
.link-btn:hover { text-decoration-color: currentColor; }

/* the board: a sunk canvas of notes */
.notes-canvas { position: relative; isolation: isolate; width: 100%; background-color: var(--color-sunk); background-image: radial-gradient(circle, var(--color-dot) 1px, transparent 1px); background-size: var(--space-lg) var(--space-lg); overflow: auto; scrollbar-color: var(--color-rule) transparent; }
.notes-canvas-spacer { position: absolute; pointer-events: none; }
.sticky-note { position: absolute; display: flex; flex-direction: column; min-width: 11rem; min-height: 7.5rem; border-radius: var(--radius-note); box-shadow: 0 0 0 1px var(--note-ring), var(--shadow-note); color: var(--note-ink); overflow: hidden; transition: opacity var(--dur-micro) var(--ease-out); }
.sticky-note.dragging, .sticky-note.resizing { opacity: 0.9; cursor: grabbing; }
.sticky-note.editing { box-shadow: 0 0 0 2px var(--color-sunk), 0 0 0 4px var(--color-accent), var(--shadow-note); }
.sticky-note.conflict { box-shadow: 0 0 0 2px var(--color-sunk), 0 0 0 4px var(--color-error), var(--shadow-note); }
.sticky-note.locked { box-shadow: 0 0 0 2px var(--color-sunk), 0 0 0 4px var(--color-accent-2), var(--shadow-note); opacity: 0.86; pointer-events: none; }
.note-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: var(--space-2xs); padding: var(--space-2xs) var(--space-2xs) 0 var(--space-xs); cursor: grab; }
.note-header:active { cursor: grabbing; }
.note-title { flex: 1; min-width: 0; min-height: var(--ctl-h-sm); padding: var(--space-3xs) var(--space-2xs); border: 0; border-radius: var(--space-2xs); background: transparent; font-size: var(--text-sm); font-weight: 600; color: var(--note-ink); text-overflow: ellipsis; }
.note-title:focus { background: var(--note-lift); outline: 2px solid var(--note-ink); outline-offset: -2px; }
.note-title::placeholder, .note-content::placeholder { color: var(--note-muted); opacity: 1; }
.note-actions { display: flex; flex-shrink: 0; align-items: center; gap: var(--space-2xs); }
.note-btn { position: relative; display: inline-grid; place-items: center; width: var(--note-ctl); height: var(--note-ctl); padding: 0; border: 0; border-radius: var(--space-2xs); background: transparent; color: var(--note-muted); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.note-btn::before { content: ""; position: absolute; inset: calc(-1 * var(--space-3xs)); }
.note-btn:hover { background: var(--note-line); color: var(--note-ink); }
.note-btn:active { background: var(--note-lift); }
.note-btn:focus-visible { outline: 2px solid var(--note-ink); outline-offset: -2px; }
.note-swatch { width: var(--space-sm); height: var(--space-sm); border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.note-lock-indicator { display: inline-grid; place-items: center; width: var(--note-ctl); height: var(--note-ctl); color: var(--note-ink); }
.note-content { flex: 1; padding: var(--space-2xs) var(--space-sm) var(--space-xs); border: 0; background: transparent; font-family: inherit; font-size: var(--text-sm); line-height: 1.45; color: var(--note-ink); resize: none; }
.note-content:focus { outline: 0; }
/* Note bodies are user-typed plain text with space-aligned columns, so they keep a fixed-width face. */
.note-content.mono-content { font-family: var(--font-outlier); font-size: var(--text-xs); line-height: 1.5; white-space: pre; tab-size: 4; }
.note-footer { padding: 0 var(--space-sm) var(--space-2xs); font-size: var(--text-xs); color: var(--note-muted); }
.note-footer:has(.note-meta:empty) { display: none; }
.note-resize-handle { position: absolute; right: 0; bottom: 0; width: var(--space-md); height: var(--space-md); background: linear-gradient(135deg, transparent 50%, var(--note-line) 50%); cursor: se-resize; }
.color-picker-popup { position: absolute; top: 100%; right: 0; z-index: var(--z-dropdown); display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-2xs); min-width: 8.5rem; padding: var(--space-xs); border-radius: var(--radius-inner); background: var(--color-paper-3); box-shadow: var(--panel-edge), var(--shadow-note); }
.color-picker-option { width: var(--space-lg); height: var(--space-lg); border: 2px solid transparent; border-radius: 50%; cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out); }
.color-picker-option:hover { border-color: var(--color-ink); }
.canvas-empty { position: sticky; top: 0; left: 0; display: none; place-content: center; width: 100%; height: 100%; padding: var(--space-lg); color: var(--color-muted); font-size: var(--text-sm); text-align: center; pointer-events: none; }
.notes-canvas:not(:has(.sticky-note)) .canvas-empty { display: grid; }
.canvas-empty h2 { margin-bottom: var(--space-2xs); }
#sync-status { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
#sync-status.syncing { color: var(--color-accent-2); }
#sync-status.error { color: var(--color-error); }
#active-editors .editor-badge { display: inline-flex; align-items: center; min-height: calc(var(--space-md) + var(--space-2xs)); margin-left: var(--space-2xs); padding: 0 var(--space-xs); border-radius: var(--radius-pill); background: var(--color-accent-dim); font-size: var(--text-xs); font-weight: 500; color: var(--color-ink); }
.notes-fullscreen-mode { overflow: hidden; }
.notes-fullscreen-mode .notes-canvas.fullscreen { position: fixed; inset: 0; z-index: var(--z-fullscreen); width: 100%; height: 100dvh; min-height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; }
.fullscreen-controls { position: fixed; top: var(--space-md); right: var(--space-md); z-index: var(--z-fullscreen-tools); display: flex; align-items: center; gap: var(--space-xs); }

@media (max-width: 40rem) {
  :root { --gutter: var(--space-md); }
  h1 { font-size: var(--text-xl); }
  .form-control { font-size: var(--text-md); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
  .table > :not(caption) > * > * { padding-inline: var(--space-xs); white-space: nowrap; }
  .table > :not(caption) > * > :first-child { max-width: 7rem; overflow: hidden; padding-left: var(--space-md); text-overflow: ellipsis; }
  .table > :not(caption) > * > :last-child { padding-right: var(--space-md); }
  .settings h2 { padding-inline: var(--space-md); }
  .settings-body { padding-inline: var(--space-md); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .btn:active { transform: none; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* B · Dock: a centred index of board cards, floating glass controls over an edge-to-edge canvas */
:root { --container: 60rem; --float-h: 48px; --strip: calc(var(--float-h) + var(--space-lg)); --avatar: 22px; }
.top { padding-block: var(--space-xl) 0; text-align: center; }
.page-head { flex-direction: column; justify-content: center; gap: var(--space-md); margin-bottom: var(--space-xl); padding-top: var(--space-lg); text-align: center; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.board-card { display: flex; flex-direction: column; gap: var(--space-2xs); height: 100%; min-height: 9.5rem; padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: var(--panel-edge); color: inherit; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.board-card:hover { background-color: var(--color-paper-3); }
.board-card:active { background-color: var(--color-paper-2); }
.board-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.3; }
.board-desc { display: -webkit-box; overflow: hidden; font-size: var(--text-sm); line-height: 1.5; color: var(--color-muted); -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: calc(var(--space-md) + var(--space-2xs)); margin-top: auto; padding-top: var(--space-md); box-sizing: content-box; font-size: var(--text-xs); color: var(--color-muted); }
.narrow { max-width: 46rem; }
.form-page { max-width: 26rem; margin-inline: auto; }
.form-page h1 { margin-block: var(--space-lg); text-align: center; }
.form-page .form-actions { justify-content: center; }
.narrow .page-head { margin-bottom: var(--space-lg); }
.crumbs-from { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.15; color: var(--color-muted); }
.narrow .crumbs { justify-content: center; }
.crumbs a, .crumbs-sep { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.15; }

.board-page { height: 100dvh; overflow: hidden; }
#conflict-banner.d-none { display: none; }
/* The top strip keeps the note origin clear of the floating controls; the dot grid runs on under it. */
.board-page .notes-canvas { height: 100dvh; border-top: var(--strip) solid transparent; }
.float { position: fixed; z-index: var(--z-sticky-nav); display: flex; align-items: center; gap: var(--space-xs); min-height: var(--float-h); padding: var(--space-xs); border-radius: var(--radius-pill); background: var(--glass); box-shadow: var(--panel-edge), var(--shadow-pop); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.35); backdrop-filter: blur(var(--glass-blur)) saturate(1.35); }
.float--name { top: var(--space-sm); left: var(--space-sm); gap: var(--space-sm); max-width: calc(100% - 21rem); padding-inline: var(--space-md) var(--space-md); }
/* Optical lift: an all-lowercase wordmark centres its box, not its x-height, so it reads low beside the title. */
.float--name .brand { font-size: var(--text-lg); transform: translateY(-1.5px); }
/* Drawn, not typed: a glyph slash sits on the baseline, a line centres on the flex axis. */
.float--name .crumbs-sep { flex-shrink: 0; width: 1px; height: 1.125rem; font-size: 0; background: var(--color-edge); transform: rotate(20deg); }
.bar-title { overflow: hidden; font-size: var(--text-md); letter-spacing: 0; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.float--people { top: var(--space-sm); right: var(--space-sm); }
.float--dock { bottom: var(--space-lg); left: 50%; transform: translateX(-50%); }
.bar-rule { width: 1px; height: var(--space-md); margin-inline: var(--space-2xs); background: var(--color-rule); }
.people-btn { gap: var(--space-xs); padding-left: var(--space-2xs); }
.avatars { display: inline-flex; padding-left: var(--space-2xs); }
.avatar { display: inline-block; width: var(--avatar); height: var(--avatar); margin-left: calc(-1 * var(--space-2xs)); overflow: hidden; border-radius: 50%; background: var(--color-rule); box-shadow: 0 0 0 2px var(--color-paper-2); font-size: 0; font-weight: 600; line-height: var(--avatar); text-align: center; text-transform: uppercase; color: var(--color-ink); }
.avatar::first-letter { font-size: var(--text-2xs); }
.avatar:nth-child(n + 5) { display: none; }
#conflict-banner { display: flex; align-items: center; gap: var(--space-sm); position: fixed; top: var(--strip); left: 50%; z-index: var(--z-sticky-nav); width: max-content; max-width: calc(100% - var(--space-xl)); margin: 0; transform: translateX(-50%); box-shadow: var(--shadow-pop); }

@media (max-width: 62rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .board-card { min-height: 0; }
  .float--name { max-width: calc(100% - var(--space-lg)); }
  .float--people { top: calc(var(--space-sm) + var(--float-h) + var(--space-xs)); right: auto; left: var(--space-sm); }
  :root { --strip: calc(var(--float-h) * 2 + var(--space-lg) + var(--space-xs)); }
  .float--dock { bottom: var(--space-md); }
}

/* flash messages: under the page head on the document pages, afloat and passing on the board */
.flash { max-width: 28rem; margin-inline: auto; }
.flash:empty { display: none; }
.flash .alert { margin: 0 0 var(--space-lg); text-align: center; }
.board-page .flash { position: fixed; top: var(--space-sm); left: 50%; z-index: var(--z-toast); width: max-content; max-width: calc(100% - var(--space-xl)); transform: translateX(-50%); animation: flash-out var(--dur-short) var(--ease-out) 6s forwards; }
.board-page .flash .alert { display: flex; align-items: center; min-height: var(--float-h); margin: 0; padding-inline: var(--space-lg); border-radius: var(--radius-pill); box-shadow: var(--shadow-pop); }
@keyframes flash-out { to { opacity: 0; visibility: hidden; } }
@media (max-width: 62rem) {
  .board-page .flash { top: var(--strip); }
}
@media (prefers-reduced-motion: reduce) {
  .board-page .flash { animation-duration: 0.01ms; }
}

/* Hallmark · welcome (signed out): the three things a board does, written on sample notes in the board's own colours */
:root { --note-yellow: #FFF9C4; --note-blue: #BBDEFB; --note-pink: #F8BBD9; }
.welcome .page-head h1 { max-width: 20ch; font-size: clamp(var(--text-2xl), 4vw, 2.5rem); }
.welcome-lead { max-width: 46ch; margin: 0; color: var(--color-ink-2); }
.sample { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); margin: var(--space-2xl) 0 0; padding: 0; list-style: none; }
.sample-note { min-height: 11rem; padding: var(--space-md) var(--space-md) var(--space-lg); border-radius: var(--radius-note); box-shadow: 0 0 0 1px var(--note-ring), var(--shadow-note); color: var(--note-ink); }
.sample-note h2 { margin-bottom: var(--space-xs); font-family: var(--font-body); font-size: var(--text-md); font-weight: 600; letter-spacing: 0; color: var(--note-ink); }
.sample-note p { margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--note-ink); }
.sample-note--yellow { background: var(--note-yellow); transform: rotate(-1.5deg); }
.sample-note--blue { background: var(--note-blue); transform: translateY(var(--space-md)) rotate(1deg); }
.sample-note--pink { background: var(--note-pink); transform: rotate(-0.5deg); }
.welcome-foot { margin: var(--space-2xl) 0 0; color: var(--color-muted); font-size: var(--text-sm); text-align: center; }
@media (max-width: 44rem) {
  .sample { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .sample-note { min-height: 0; }
  .sample-note--yellow, .sample-note--blue, .sample-note--pink { transform: none; }
}
