/* Generated by dev/design-system.py from tokens.json; do not edit. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url(/assets/fonts/atkinson-hyperlegible-next-latin.woff2) format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url(/assets/fonts/atkinson-hyperlegible-next-latin-italic.woff2) format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url(/assets/fonts/atkinson-hyperlegible-next-latin-ext.woff2) format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url(/assets/fonts/atkinson-hyperlegible-next-latin-ext-italic.woff2) format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url(/assets/fonts/atkinson-hyperlegible-mono-latin.woff2) format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url(/assets/fonts/atkinson-hyperlegible-mono-latin-ext.woff2) format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  src: url(/assets/fonts/fraunces-soft-latin.woff2) format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url(/assets/fonts/fraunces-soft-latin-ext.woff2) format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  color-scheme: light;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --control-sm: 28px;
  --control-md: 36px;
  --control-lg: 44px;
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
  --row-comfortable: 48px;
  --row-compact: 36px;
  --tile-min: 176px;
  --rail-width: 76px;
  --sidebar-width: 232px;
  --inspector-width: 320px;
  --topbar-height: 56px;
  --measure: 640px;
  --layer-sticky: 10;
  --layer-chrome: 20;
  --layer-menu: 100;
  --layer-dialog: 200;
  --layer-toast: 300;
  --font-display: Fraunces, Georgia, serif;
  --font-sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --surface: #fbf9f5;
  --surface-sunken: #eee7dc;
  --surface-raised: #fffefb;
  --surface-hover: #e8e0d3;
  --line: #e3dbcf;
  --line-strong: #877c6f;
  --ink: #2a241e;
  --ink-muted: #685e53;
  --accent: #1f5c4c;
  --accent-strong: #174a3d;
  --accent-soft: #dcebe3;
  --on-accent: #fffdfa;
  --highlight: #f2a35e;
  --highlight-soft: #fbe6d0;
  --highlight-ink: #94460f;
  --on-highlight: #3a2210;
  --success: var(--accent);
  --success-soft: var(--accent-soft);
  --warning: #86560a;
  --warning-soft: #f7ebcc;
  --danger: #b3361f;
  --danger-soft: #f9e0d8;
  --on-danger: #fffdfa;
  --scrim: #2a241e80;
  --link: var(--accent);
  --focus: var(--accent);
  --id-lake: #23527a;
  --id-lake-soft: #dbe8f3;
  --id-moss: #45632a;
  --id-moss-soft: #e2ecd3;
  --id-apricot: #94460f;
  --id-apricot-soft: #fbe1cc;
  --id-berry: #9b2f4f;
  --id-berry-soft: #f6dde3;
  --id-plum: #5e4386;
  --id-plum-soft: #e9e1f2;
  --id-sand: #6b5a3e;
  --id-sand-soft: #eee5d6;
  --shadow-card: 0 1px 2px #2a241e0f, 0 2px 8px -2px #2a241e14;
  --shadow-lift: 0 2px 4px #2a241e14, 0 12px 24px -8px #2a241e33;
  --shadow-overlay: 0 4px 12px -2px #2a241e1f, 0 24px 48px -12px #2a241e40;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #201d1a;
    --surface-sunken: #141210;
    --surface-raised: #29251f;
    --surface-hover: #332e28;
    --line: #38332d;
    --line-strong: #8b8174;
    --ink: #f2ede5;
    --ink-muted: #b5ab9f;
    --accent: #86c9ae;
    --accent-strong: #a6dbc4;
    --accent-soft: #1f3a31;
    --on-accent: #10221b;
    --highlight: #f4ab69;
    --highlight-soft: #3d2a19;
    --highlight-ink: #f4b67c;
    --on-highlight: #2e1a08;
    --success: var(--accent);
    --success-soft: var(--accent-soft);
    --warning: #e8b65a;
    --warning-soft: #3a2c12;
    --danger: #ff8f73;
    --danger-soft: #45201a;
    --on-danger: #2a0d06;
    --scrim: #000000a6;
    --link: var(--accent);
    --focus: var(--accent);
    --id-lake: #9cc5ea;
    --id-lake-soft: #1e3346;
    --id-moss: #b5d38f;
    --id-moss-soft: #26331b;
    --id-apricot: #f2b98c;
    --id-apricot-soft: #3f2817;
    --id-berry: #f0a3b9;
    --id-berry-soft: #3f1f2a;
    --id-plum: #c9b5ec;
    --id-plum-soft: #2f2640;
    --id-sand: #d8c6a5;
    --id-sand-soft: #322b20;
    --shadow-card: 0 1px 2px #00000066, 0 0 0 1px #38332d;
    --shadow-lift: 0 0 0 1px #4a443c, 0 12px 24px -8px #000000b3;
    --shadow-overlay: 0 0 0 1px #38332d, 0 24px 48px -12px #000000cc;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #201d1a;
  --surface-sunken: #141210;
  --surface-raised: #29251f;
  --surface-hover: #332e28;
  --line: #38332d;
  --line-strong: #8b8174;
  --ink: #f2ede5;
  --ink-muted: #b5ab9f;
  --accent: #86c9ae;
  --accent-strong: #a6dbc4;
  --accent-soft: #1f3a31;
  --on-accent: #10221b;
  --highlight: #f4ab69;
  --highlight-soft: #3d2a19;
  --highlight-ink: #f4b67c;
  --on-highlight: #2e1a08;
  --success: var(--accent);
  --success-soft: var(--accent-soft);
  --warning: #e8b65a;
  --warning-soft: #3a2c12;
  --danger: #ff8f73;
  --danger-soft: #45201a;
  --on-danger: #2a0d06;
  --scrim: #000000a6;
  --link: var(--accent);
  --focus: var(--accent);
  --id-lake: #9cc5ea;
  --id-lake-soft: #1e3346;
  --id-moss: #b5d38f;
  --id-moss-soft: #26331b;
  --id-apricot: #f2b98c;
  --id-apricot-soft: #3f2817;
  --id-berry: #f0a3b9;
  --id-berry-soft: #3f1f2a;
  --id-plum: #c9b5ec;
  --id-plum-soft: #2f2640;
  --id-sand: #d8c6a5;
  --id-sand-soft: #322b20;
  --shadow-card: 0 1px 2px #00000066, 0 0 0 1px #38332d;
  --shadow-lift: 0 0 0 1px #4a443c, 0 12px 24px -8px #000000b3;
  --shadow-overlay: 0 0 0 1px #38332d, 0 24px 48px -12px #000000cc;
}

.hero {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 46px;
  font-weight: 560;
  letter-spacing: -0.015em;
}

.display {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 36px;
  font-weight: 560;
  letter-spacing: -0.01em;
}

.title {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 28px;
  font-weight: 560;
}

.heading {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 650;
}

.body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}

.ui {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.ui-strong {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 650;
}

.label {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.caption {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
}

.mono-sm {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

/* Rime UI: framework-agnostic component classes, prefixed rm-.
   Loads after tokens.css; every color, space, radius, size and layer is a token.
   Motion cannot live in tokens.json, so its durations, easings and keyframes are declared here. */

:root {
  --motion-quick: 120ms;   /* hover, press, toggles */
  --motion-base: 200ms;    /* menus, lifts, the folder opening */
  --motion-slow: 320ms;    /* dialogs, sheets, settle, peek, tuck */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-settle: cubic-bezier(0.3, 1.4, 0.5, 1);   /* a small overshoot, like something coming to rest */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion-quick: 0ms; --motion-base: 0ms; --motion-slow: 0ms; }
  *, *::before, *::after { animation-duration: 0ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Named motions ---------- */

@keyframes rm-settle { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes rm-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes rm-turn { to { transform: rotate(60deg); } }
@keyframes rm-frost { 0% { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes rm-peek { from { transform: translateY(70%); } to { transform: none; } }
@keyframes rm-tuck { to { opacity: 0; transform: translate(-24px, 24px) scale(0.4) rotate(-8deg); } }
@keyframes rm-drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-4px) rotate(12deg); } }
@keyframes rm-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.rm-settle { animation: rm-settle var(--motion-slow) var(--ease-settle) both; }
.rm-pop { animation: rm-pop var(--motion-base) var(--ease-out) both; }

/* ---------- Base ---------- */

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.rm-icon { width: var(--icon-md); height: var(--icon-md); flex: none; fill: currentColor; }
.rm-icon-sm { width: var(--icon-sm); height: var(--icon-sm); }
.rm-icon-lg { width: var(--icon-lg); height: var(--icon-lg); }

.rm-row { display: flex; align-items: center; gap: var(--space-2); }
.rm-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.rm-spacer { flex: 1; }
.rm-muted { color: var(--ink-muted); }
.rm-num { font-variant-numeric: tabular-nums; }
.rm-voice { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.01em; }

a, .rm-link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- The crystal: Rime's mark for "settled" ---------- */

.rm-crystal { width: var(--icon-md); height: var(--icon-md); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; overflow: visible; }
.rm-crystal circle { fill: currentColor; stroke: none; }
.rm-crystal-turning { animation: rm-turn 900ms var(--ease-out) infinite; }
.rm-frost-burst { position: relative; display: inline-grid; place-items: center; }
.rm-frost-burst::after {
  content: ""; position: absolute; inset: -6px; border-radius: var(--radius-full);
  background: radial-gradient(circle, currentColor 1.5px, transparent 2px) 0 0 / 8px 8px;
  -webkit-mask: radial-gradient(circle, transparent 35%, #000 36%, #000 70%, transparent 71%);
          mask: radial-gradient(circle, transparent 35%, #000 36%, #000 70%, transparent 71%);
  opacity: 0; animation: rm-frost 700ms var(--ease-out) 1;
}

/* ---------- Button ---------- */

.rm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--control-md); padding: 0 var(--space-4);
  font: inherit; font-size: 14px; line-height: 20px; font-weight: 650;
  color: var(--ink); background: var(--surface-raised);
  border: 1px solid var(--line-strong); border-radius: var(--radius-full);
  cursor: pointer; white-space: nowrap;
  transition: background var(--motion-quick) var(--ease-out), transform var(--motion-quick) var(--ease-out), box-shadow var(--motion-quick) var(--ease-out);
}
.rm-btn:hover { background: var(--surface-hover); }
.rm-btn:active { transform: scale(0.97); }
.rm-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rm-btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.rm-btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.rm-btn-soft:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.rm-btn-quiet { background: transparent; border-color: transparent; }
.rm-btn-quiet:hover { background: var(--surface-hover); }
.rm-btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.rm-btn-danger:hover { filter: brightness(0.92); }
.rm-btn-sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; gap: var(--space-1); }
.rm-btn-sm .rm-icon { width: var(--icon-sm); height: var(--icon-sm); }
.rm-btn-lg { height: var(--control-lg); padding: 0 var(--space-5); font-size: 15px; }
.rm-btn-icon { width: var(--control-md); padding: 0; }
.rm-btn-icon.rm-btn-sm { width: var(--control-sm); }
.rm-btn-icon.rm-btn-lg { width: var(--control-lg); }
.rm-btn[disabled], .rm-btn[aria-disabled="true"] {
  background: var(--surface-sunken); border-color: var(--line); color: var(--ink-muted); cursor: default; transform: none; filter: none;
}
.rm-btn-quiet[disabled] { background: transparent; border-color: transparent; }

/* ---------- Text field ---------- */

.rm-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.rm-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink); }
.rm-hint { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.rm-error { display: flex; gap: var(--space-1); align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--danger); animation: rm-settle var(--motion-base) var(--ease-out) both; }
.rm-error .rm-icon { width: var(--icon-sm); height: var(--icon-sm); margin-top: 1px; }
.rm-input, .rm-select {
  height: var(--control-md); padding: 0 var(--space-3); box-sizing: border-box; width: 100%;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  transition: box-shadow var(--motion-quick) var(--ease-out), border-color var(--motion-quick) var(--ease-out);
}
/* Fields show focus as a 2px Spruce edge (border plus an inner ring) with a soft halo, instead of the offset outline. */
.rm-input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.rm-input::placeholder { color: var(--ink-muted); opacity: 1; }
.rm-input[aria-invalid="true"] { border-color: var(--danger); }
.rm-input-wrap { position: relative; display: flex; align-items: center; }
.rm-input-wrap > .rm-icon, .rm-input-wrap > .rm-affix { position: absolute; left: var(--space-3); color: var(--ink-muted); pointer-events: none; }
.rm-input-wrap > .rm-affix { font-size: 14px; }
.rm-input-wrap > .rm-input { padding-left: 32px; }
.rm-select {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.rm-select-quiet { border-color: transparent; background-color: transparent; width: auto; border-radius: var(--radius-full); }
.rm-select-quiet:hover { background-color: var(--surface-hover); }

/* ---------- Checkbox and switch ---------- */

.rm-choice { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; cursor: pointer; }
.rm-check {
  appearance: none; margin: 0; flex: none; width: 20px; height: 20px; display: grid; place-content: center;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); cursor: pointer;
  transition: background var(--motion-quick) var(--ease-out), border-color var(--motion-quick) var(--ease-out), transform var(--motion-quick) var(--ease-settle);
}
.rm-check::after {
  content: ""; width: 10px; height: 5px; margin-top: -2px; opacity: 0;
  border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg);
}
.rm-check:active { transform: scale(0.9); }
.rm-check:checked { background: var(--accent); border-color: var(--accent); }
.rm-check:checked::after { opacity: 1; animation: rm-draw var(--motion-base) var(--ease-out) both; }
.rm-check:indeterminate { background: var(--accent); border-color: var(--accent); }
.rm-check:indeterminate::after { opacity: 1; width: 8px; height: 0; margin: 0; border-left: 0; transform: none; }
.rm-switch {
  appearance: none; margin: 0; flex: none; position: relative; width: 40px; height: 24px;
  background: var(--surface-sunken); border: 1.5px solid var(--line-strong); border-radius: var(--radius-full); cursor: pointer;
  transition: background var(--motion-base) var(--ease-out), border-color var(--motion-base) var(--ease-out);
}
.rm-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: var(--radius-full);
  background: var(--ink-muted); transition: transform var(--motion-base) var(--ease-settle), width var(--motion-quick) var(--ease-out);
}
.rm-switch:active::after { width: 19px; }
.rm-switch:checked { background: var(--accent); border-color: var(--accent); }
.rm-switch:checked::after { background: var(--on-accent); transform: translateX(16px); }
.rm-switch:checked:active::after { transform: translateX(12px); }

/* ---------- Segmented control and tabs ---------- */

.rm-segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-sunken); border-radius: var(--radius-full); }
.rm-segmented button {
  display: inline-flex; align-items: center; gap: var(--space-1); height: calc(var(--control-md) - 6px); padding: 0 var(--space-3);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-muted); background: transparent; border: 0; border-radius: var(--radius-full); cursor: pointer;
  transition: background var(--motion-base) var(--ease-out), color var(--motion-base) var(--ease-out);
}
.rm-segmented button[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-card); }
.rm-tabs { display: flex; gap: var(--space-1); }
.rm-tab {
  height: 32px; padding: 0 var(--space-3); font: inherit; font-size: 13px; line-height: 18px; font-weight: 500;
  color: var(--ink-muted); background: none; border: 0; border-radius: var(--radius-full); cursor: pointer;
}
.rm-tab:hover { background: var(--surface-hover); color: var(--ink); }
.rm-tab[aria-selected="true"] { color: var(--ink); background: var(--surface-sunken); font-weight: 650; }

/* ---------- Menu and keyboard hints ---------- */

.rm-menu {
  min-width: 220px; padding: var(--space-1); box-sizing: border-box; transform-origin: top left;
  background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay);
  animation: rm-pop var(--motion-base) var(--ease-out) both;
}
.rm-menu-item {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; height: 34px; padding: 0 var(--space-3); box-sizing: border-box;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--ink); background: none; border: 0; border-radius: var(--radius-md); text-align: left; cursor: pointer;
}
.rm-menu-item .rm-icon { color: var(--ink-muted); }
.rm-menu-item:hover, .rm-menu-item[data-active] { background: var(--surface-hover); }
.rm-menu-item .rm-kbd { margin-left: auto; }
.rm-menu-item-danger, .rm-menu-item-danger .rm-icon { color: var(--danger); }
.rm-menu-item-danger:hover { background: var(--danger-soft); }
.rm-menu-sep { height: 1px; margin: var(--space-1) var(--space-3); background: var(--line); }
.rm-menu-heading { padding: var(--space-2) var(--space-3) var(--space-1); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.rm-kbd {
  display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; min-width: 12px; justify-content: center;
  font-family: var(--font-sans); font-size: 12px; line-height: 18px; color: var(--ink-muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--radius-sm); background: var(--surface);
}

/* ---------- Command palette ---------- */

.rm-palette { width: 580px; max-width: 100%; background: var(--surface-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-overlay); overflow: hidden; animation: rm-pop var(--motion-base) var(--ease-out) both; }
.rm-palette-input { display: flex; align-items: center; gap: var(--space-3); height: 56px; padding: 0 var(--space-5); border-bottom: 1px solid var(--line); }
.rm-palette-input input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.rm-palette-input input::placeholder { color: var(--ink-muted); }
.rm-palette-input .rm-icon { color: var(--ink-muted); }
.rm-palette-body { padding: var(--space-1) var(--space-2) var(--space-2); }
.rm-palette-item { display: flex; align-items: center; gap: var(--space-3); height: 42px; padding: 0 var(--space-3); border-radius: var(--radius-md); font-size: 14px; }
.rm-palette-item[data-active] { background: var(--accent-soft); }
.rm-palette-item .rm-palette-meta { margin-left: auto; font-size: 12px; color: var(--ink-muted); }
.rm-palette-foot { display: flex; gap: var(--space-4); padding: var(--space-2) var(--space-5); border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-muted); background: var(--surface); }

/* ---------- Avatar, person, audience ---------- */

.rm-avatar {
  --size: 32px; --id: var(--accent); --id-soft: var(--accent-soft);
  display: inline-grid; place-content: center; flex: none; width: var(--size); height: var(--size); overflow: hidden;
  border-radius: var(--radius-full); background: var(--id-soft); color: var(--id);
  font-size: calc(var(--size) * 0.42); font-weight: 650; line-height: 1;
}
.rm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rm-avatar-xs { --size: 20px; }
.rm-avatar-sm { --size: 24px; }
.rm-avatar-lg { --size: 40px; }
.rm-avatar-xl { --size: 64px; }
.rm-avatar-team { border-radius: var(--radius-md); }
.rm-avatar-team.rm-avatar-xs, .rm-avatar-team.rm-avatar-sm { border-radius: var(--radius-sm); }
.rm-avatar-app { border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.rm-avatar-app.rm-avatar-lg, .rm-avatar-app.rm-avatar-xl { border-radius: var(--radius-lg); }
.rm-avatar-app .rm-icon { width: calc(var(--size) * 0.6); height: calc(var(--size) * 0.6); }
.rm-id-lake { --id: var(--id-lake); --id-soft: var(--id-lake-soft); }
.rm-id-moss { --id: var(--id-moss); --id-soft: var(--id-moss-soft); }
.rm-id-apricot { --id: var(--id-apricot); --id-soft: var(--id-apricot-soft); }
.rm-id-berry { --id: var(--id-berry); --id-soft: var(--id-berry-soft); }
.rm-id-plum { --id: var(--id-plum); --id-soft: var(--id-plum-soft); }
.rm-id-sand { --id: var(--id-sand); --id-soft: var(--id-sand-soft); }
.rm-avatar-stack { display: inline-flex; }
.rm-avatar-stack .rm-avatar { box-shadow: 0 0 0 2px var(--surface-raised); }
.rm-avatar-stack .rm-avatar + .rm-avatar { margin-left: -6px; }
.rm-person { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.rm-person-text { display: flex; flex-direction: column; min-width: 0; }
.rm-person-name { font-size: 14px; line-height: 20px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-person-handle { font-size: 13px; line-height: 18px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-audience {
  display: inline-flex; align-items: center; gap: var(--space-1); height: 26px; padding: 0 var(--space-3) 0 4px; box-sizing: border-box;
  font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); white-space: nowrap;
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-full);
}
.rm-audience > .rm-icon { width: var(--icon-sm); height: var(--icon-sm); margin-left: 4px; }
.rm-audience .rm-avatar { --size: 18px; font-size: 10px; }
.rm-audience .rm-avatar-stack .rm-avatar + .rm-avatar { margin-left: -5px; }
button.rm-audience { font-family: inherit; cursor: pointer; transition: background var(--motion-quick) var(--ease-out); }
button.rm-audience:hover { background: var(--surface-hover); color: var(--ink); }

/* ---------- Badge and count ---------- */

.rm-badge {
  display: inline-flex; align-items: center; gap: var(--space-1); height: 22px; padding: 0 var(--space-2); box-sizing: border-box;
  font-size: 12px; line-height: 16px; font-weight: 650; border-radius: var(--radius-full);
  background: var(--surface-sunken); color: var(--ink);
}
.rm-badge .rm-icon, .rm-badge .rm-crystal { width: 14px; height: 14px; }
.rm-badge-accent { background: var(--accent-soft); color: var(--accent-strong); }
.rm-badge-new { background: var(--highlight-soft); color: var(--highlight-ink); }
.rm-badge-success { background: var(--success-soft); color: var(--success); }
.rm-badge-warning { background: var(--warning-soft); color: var(--warning); }
.rm-badge-danger { background: var(--danger-soft); color: var(--danger); }
.rm-count {
  display: inline-grid; place-content: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  font-size: 11px; font-weight: 750; line-height: 1; border-radius: var(--radius-full);
  background: var(--highlight); color: var(--on-highlight); animation: rm-pop var(--motion-base) var(--ease-settle) both;
}

/* ---------- Objects: folders, files and photos in the grid ---------- */

.rm-objects { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr)); gap: var(--space-5) var(--space-4); }
.rm-obj { --obj: var(--accent-soft); --obj-ink: var(--accent); position: relative; display: flex; flex-direction: column; gap: var(--space-2); cursor: default; }
.rm-obj.rm-id-lake { --obj: var(--id-lake-soft); --obj-ink: var(--id-lake); }
.rm-obj.rm-id-moss { --obj: var(--id-moss-soft); --obj-ink: var(--id-moss); }
.rm-obj.rm-id-apricot { --obj: var(--id-apricot-soft); --obj-ink: var(--id-apricot); }
.rm-obj.rm-id-berry { --obj: var(--id-berry-soft); --obj-ink: var(--id-berry); }
.rm-obj.rm-id-plum { --obj: var(--id-plum-soft); --obj-ink: var(--id-plum); }
.rm-obj.rm-id-sand { --obj: var(--id-sand-soft); --obj-ink: var(--id-sand); }
.rm-obj-art { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); transition: transform var(--motion-base) var(--ease-out); }
.rm-obj:hover .rm-obj-art { transform: translateY(-3px); }
.rm-obj-name { display: flex; align-items: center; gap: var(--space-2); padding: 0 2px; font-size: 14px; line-height: 20px; font-weight: 500; min-width: 0; }
.rm-obj-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-obj-meta { padding: 0 2px; margin-top: -6px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.rm-obj[aria-selected="true"] .rm-obj-art { outline: 2px solid var(--accent); outline-offset: 4px; }
.rm-obj-check {
  position: absolute; top: -6px; left: -6px; z-index: 3; display: grid; place-content: center; width: 24px; height: 24px; border-radius: var(--radius-full);
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px var(--surface); animation: rm-pop var(--motion-base) var(--ease-settle) both;
}
.rm-obj-check .rm-icon { width: 14px; height: 14px; }

/* A folder: a back panel with its tab, papers inside, a front flap that tips open on hover, faces peeking over the edge. */
.rm-fold-back { position: absolute; inset: 14px 0 0 0; border-radius: var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-lg); background: color-mix(in oklab, var(--obj) 82%, var(--obj-ink)); }
.rm-fold-back::before { content: ""; position: absolute; left: 0; top: -14px; width: 42%; height: 22px; border-radius: var(--radius-md) var(--radius-md) 0 0; background: inherit; }
.rm-fold-paper {
  position: absolute; left: 12%; right: 12%; top: 16%; height: 58%; border-radius: var(--radius-sm);
  background: var(--surface-raised); box-shadow: 0 0 0 1px var(--line);
  transition: transform var(--motion-base) var(--ease-settle);
}
.rm-fold-paper + .rm-fold-paper { left: 24%; right: 6%; transform: translateY(5px) rotate(4deg); }
.rm-fold-front {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74%; z-index: 2; border-radius: var(--radius-lg);
  background: var(--obj); color: var(--obj-ink); display: flex; align-items: flex-end; padding: var(--space-3); box-sizing: border-box;
  transform-origin: 50% 100%; transition: transform var(--motion-base) var(--ease-out);
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--obj) 50%, var(--surface-raised));
}
.rm-obj:hover .rm-fold-front { transform: perspective(500px) rotateX(-16deg); }
.rm-obj:hover .rm-fold-paper { transform: translateY(-6px); }
.rm-obj:hover .rm-fold-paper + .rm-fold-paper { transform: translateY(-3px) rotate(6deg); }
.rm-fold-front .rm-icon { width: var(--icon-lg); height: var(--icon-lg); }
.rm-peek { position: absolute; right: 12%; top: calc(26% - 18px); z-index: 1; display: flex; }
.rm-peek .rm-avatar { --size: 28px; box-shadow: 0 0 0 2px var(--surface); animation: rm-peek var(--motion-slow) var(--ease-settle) both; }
.rm-peek .rm-avatar + .rm-avatar { margin-left: -8px; animation-delay: 80ms; }
.rm-peek .rm-avatar + .rm-avatar + .rm-avatar { animation-delay: 160ms; }

/* A file: a sheet with a folded corner. */
.rm-sheet-file {
  position: absolute; inset: 4% 22%; border-radius: var(--radius-sm) 0 var(--radius-sm) var(--radius-sm); background: var(--surface-raised);
  box-shadow: var(--shadow-card); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  transition: transform var(--motion-base) var(--ease-out); padding: 30px 14px 0; box-sizing: border-box;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 2px, transparent 2px 10px); background-size: calc(100% - 28px) 52%; background-repeat: no-repeat; background-position: 14px 30px;
}
.rm-sheet-file::after { content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px; background: var(--surface-hover); border-bottom-left-radius: var(--radius-sm); }
.rm-obj:hover .rm-sheet-file { transform: rotate(-2deg); }
.rm-sheet-type { position: absolute; left: 10px; bottom: 10px; padding: 0 6px; font-size: 11px; line-height: 18px; font-weight: 750; letter-spacing: 0.02em; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-muted); }

/* A photo: a print with a border, a little crooked until you point at it. */
.rm-print {
  position: absolute; inset: 6% 10%; padding: 6px 6px 18px; box-sizing: border-box; background: var(--surface-raised);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card); transform: rotate(-2deg);
  transition: transform var(--motion-base) var(--ease-settle), box-shadow var(--motion-base) var(--ease-out);
}
.rm-obj:nth-child(even) .rm-print { transform: rotate(1.5deg); }
.rm-obj:hover .rm-print { transform: none; box-shadow: var(--shadow-lift); }
.rm-print > img, .rm-print > svg { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }

/* ---------- File list ---------- */

.rm-filelist { background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-1) 6px; }
.rm-filelist-head, .rm-filerow {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 176px 136px 80px 40px; align-items: center;
  padding: 0 var(--space-2);
}
.rm-filelist-head { height: 36px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.rm-filelist-head .rm-sorted { color: var(--ink); display: inline-flex; align-items: center; gap: var(--space-1); }
.rm-filerow { height: var(--row-comfortable); font-size: 14px; line-height: 20px; border-radius: var(--radius-md); cursor: default; transition: background var(--motion-quick) var(--ease-out); }
.rm-filerow + .rm-filerow { box-shadow: 0 -1px 0 var(--line); }
.rm-filerow:hover, .rm-filerow:hover + .rm-filerow, .rm-filerow[aria-selected="true"], .rm-filerow[aria-selected="true"] + .rm-filerow { box-shadow: none; }
.rm-filerow:hover { background: var(--surface-hover); }
.rm-filerow[aria-selected="true"] { background: var(--accent-soft); }
.rm-filerow.rm-settle { animation: rm-settle var(--motion-slow) var(--ease-settle) both; }
.rm-filerow.rm-tucking { animation: rm-tuck var(--motion-slow) var(--ease-in) both; }
.rm-filelist-compact .rm-filerow { height: var(--row-compact); }
.rm-filerow .rm-check { opacity: 0; transition: opacity var(--motion-quick) var(--ease-out); }
.rm-filerow:hover .rm-check, .rm-filerow[aria-selected="true"] .rm-check, .rm-filelist[data-selecting] .rm-check, .rm-check:focus-visible { opacity: 1; }
.rm-filename { display: flex; align-items: center; gap: var(--space-3); min-width: 0; padding-right: var(--space-3); }
.rm-filename span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-fileicon { color: var(--ink-muted); }
.rm-fileicon-folder { color: var(--accent); }
.rm-filemeta { font-size: 13px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.rm-filerow .rm-btn-icon { opacity: 0; }
.rm-filerow:hover .rm-btn-icon, .rm-filerow[aria-selected="true"] .rm-btn-icon, .rm-filerow .rm-btn-icon:focus-visible { opacity: 1; }
.rm-dot-saving { width: 14px; height: 14px; color: var(--accent); }

/* ---------- Breadcrumbs ---------- */

.rm-crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 14px; line-height: 20px; }
.rm-crumbs a, .rm-crumbs button {
  display: inline-flex; align-items: center; gap: var(--space-2); height: 28px; padding: 0 var(--space-2); border-radius: var(--radius-full);
  color: var(--ink-muted); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.rm-crumbs a:hover, .rm-crumbs button:hover { background: var(--surface-hover); color: var(--ink); }
.rm-crumbs [aria-current="page"] { color: var(--ink); font-weight: 650; padding: 0 var(--space-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-crumbs .rm-crumb-sep { width: 14px; height: 14px; color: var(--ink-muted); flex: none; }

/* ---------- Selection bar ---------- */

.rm-selbar {
  display: flex; align-items: center; gap: var(--space-1); height: 52px; padding: 0 var(--space-2); box-sizing: border-box;
  background: var(--ink); color: var(--surface); border-radius: var(--radius-full); box-shadow: var(--shadow-overlay);
  animation: rm-settle var(--motion-slow) var(--ease-settle) both;
}
.rm-selbar-count { font-size: 14px; font-weight: 650; margin: 0 var(--space-3) 0 var(--space-1); white-space: nowrap; }
.rm-selbar .rm-btn-quiet { color: var(--surface); }
.rm-selbar .rm-btn-quiet:hover { background: color-mix(in oklab, var(--ink) 80%, var(--surface)); }

/* ---------- Progress, storage meter ---------- */

.rm-progress { height: 6px; border-radius: var(--radius-full); background: var(--surface-hover); overflow: hidden; }
.rm-progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width var(--motion-slow) linear; }
.rm-progress-done > span { background: var(--success); }
.rm-progress-error > span { background: var(--danger); }
.rm-meter { display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.rm-meter .rm-progress { background: var(--surface-hover); }
.rm-meter-warn .rm-progress > span { background: var(--warning); }

/* ---------- Upload tray ---------- */

.rm-uploads { width: 360px; background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); overflow: hidden; animation: rm-settle var(--motion-slow) var(--ease-settle) both; }
.rm-uploads-head { display: flex; align-items: center; gap: var(--space-2); height: 52px; padding: 0 var(--space-2) 0 var(--space-4); font-size: 14px; font-weight: 650; }
.rm-upload { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.rm-upload-name { font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-upload-status { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 12px; line-height: 16px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rm-upload .rm-progress { grid-column: 2 / 4; }

/* ---------- Save status ---------- */

.rm-sync {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 var(--space-3) 0 var(--space-2); border-radius: var(--radius-full);
  font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); background: none; border: 0; font-family: inherit; cursor: pointer;
}
.rm-sync:hover { background: var(--surface-hover); }
.rm-sync .rm-icon, .rm-sync .rm-crystal { width: var(--icon-sm); height: var(--icon-sm); }
.rm-sync-busy { color: var(--accent); }
.rm-sync-busy .rm-crystal { animation: rm-turn 900ms var(--ease-out) infinite; }
.rm-sync-waiting { color: var(--warning); }
.rm-sync-failed { color: var(--danger); background: var(--danger-soft); }

/* ---------- Toast and banner ---------- */

.rm-toast {
  display: inline-flex; align-items: center; gap: var(--space-3); max-width: 480px; min-height: 44px; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4); box-sizing: border-box;
  font-size: 14px; line-height: 20px; color: var(--surface); background: var(--ink); border-radius: var(--radius-full); box-shadow: var(--shadow-overlay);
  animation: rm-settle var(--motion-slow) var(--ease-settle) both;
}
.rm-toast > .rm-icon, .rm-toast > .rm-crystal { width: var(--icon-sm); height: var(--icon-sm); }
.rm-toast-text { flex: 1; }
.rm-toast .rm-btn { color: var(--surface); background: transparent; border-color: transparent; }
.rm-toast .rm-btn:hover { background: color-mix(in oklab, var(--ink) 80%, var(--surface)); }
.rm-toast .rm-toast-action { text-decoration: underline; text-underline-offset: 3px; }
.rm-banner {
  display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  font-size: 14px; line-height: 20px; border-radius: var(--radius-lg); background: var(--surface-sunken); color: var(--ink);
}
.rm-banner > .rm-icon, .rm-banner > .rm-crystal { color: var(--accent); flex: none; }
.rm-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rm-banner-text strong { font-weight: 650; }
.rm-banner .rm-btn { margin: -2px 0; }
.rm-banner-new { background: var(--highlight-soft); }
.rm-banner-new > .rm-icon { color: var(--highlight-ink); }
.rm-banner-success { background: var(--success-soft); }
.rm-banner-warning { background: var(--warning-soft); }
.rm-banner-warning > .rm-icon { color: var(--warning); }
.rm-banner-danger { background: var(--danger-soft); }
.rm-banner-danger > .rm-icon { color: var(--danger); }

/* ---------- Spot illustrations ---------- */

.rm-ill { display: block; overflow: visible; }
.rm-ill .ill-desk { fill: var(--surface-sunken); }
.rm-ill .ill-paper { fill: var(--surface-raised); stroke: var(--line-strong); stroke-width: 1.5; }
.rm-ill .ill-line { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.rm-ill .ill-fold { fill: var(--accent-soft); }
.rm-ill .ill-fold-back { fill: color-mix(in oklab, var(--accent-soft) 80%, var(--accent)); }
.rm-ill .ill-ink { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rm-ill .ill-accent { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.rm-ill .ill-accent-dot { fill: var(--accent); }
.rm-ill .ill-glow { fill: var(--highlight); }
.rm-ill .ill-drift { transform-box: fill-box; transform-origin: center; animation: rm-drift 6s ease-in-out infinite; }
.rm-ill .ill-drift-2 { animation-delay: -2s; animation-duration: 7s; }
.rm-ill .ill-drift-3 { animation-delay: -4s; animation-duration: 8s; }

/* ---------- Empty state ---------- */

.rm-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-6) var(--space-5); max-width: 420px; margin: 0 auto; }
.rm-empty .rm-ill { margin-bottom: var(--space-3); }
.rm-empty-title { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 28px; font-weight: 560; }
.rm-empty-text { margin: 0 0 var(--space-3); font-size: 15px; line-height: 22px; color: var(--ink-muted); }

/* ---------- Dialog ---------- */

.rm-scrim { position: fixed; inset: 0; z-index: var(--layer-dialog); display: grid; place-items: center; padding: var(--space-4); background: var(--scrim); }
.rm-dialog {
  width: 480px; max-width: 100%; display: flex; flex-direction: column; box-sizing: border-box;
  background: var(--surface-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-overlay);
  animation: rm-settle var(--motion-slow) var(--ease-settle) both;
}
.rm-dialog-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-5) var(--space-5) 0; }
.rm-dialog-title { flex: 1; margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 28px; font-weight: 560; }
.rm-dialog-head .rm-btn-icon { margin: -4px -8px 0 0; }
.rm-dialog-body { padding: var(--space-3) var(--space-5) var(--space-5); font-size: 15px; line-height: 22px; display: flex; flex-direction: column; gap: var(--space-4); }
.rm-dialog-body p { margin: 0; }
.rm-dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding: 0 var(--space-5) var(--space-5); }
.rm-dialog-foot .rm-dialog-foot-start { margin-right: auto; }

/* ---------- Share sheet ---------- */

.rm-share-add { display: flex; gap: var(--space-2); }
.rm-share-add .rm-input-wrap { flex: 1; }
.rm-suggest { display: flex; flex-direction: column; padding: var(--space-1); background: var(--surface); border-radius: var(--radius-lg); }
.rm-suggest-item { display: flex; align-items: center; gap: var(--space-3); padding: 6px var(--space-2); border-radius: var(--radius-md); }
.rm-suggest-item[data-active] { background: var(--accent-soft); }
.rm-suggest-item .rm-badge { margin-left: auto; }
.rm-access-list { display: flex; flex-direction: column; }
.rm-access-row { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; }
.rm-access-row .rm-person { flex: 1; }
.rm-access-row .rm-access-role { font-size: 14px; color: var(--ink-muted); padding-right: var(--space-3); }
.rm-section-label { margin: 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.rm-note { display: flex; gap: var(--space-2); margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.rm-note .rm-icon { width: var(--icon-sm); height: var(--icon-sm); margin-top: 1px; flex: none; }

/* ---------- Permission prompt ---------- */

.rm-consent-app { display: flex; align-items: center; gap: var(--space-4); }
.rm-consent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.rm-consent-list li { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); font-size: 14px; line-height: 20px; background: var(--surface); border-radius: var(--radius-md); }
.rm-consent-list li > .rm-icon { color: var(--accent); }
.rm-consent-list .rm-consent-detail { display: block; color: var(--ink-muted); font-size: 13px; line-height: 18px; }

/* ---------- Inspector ---------- */

.rm-inspector { width: var(--inspector-width); box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.rm-inspector-art { width: var(--tile-min); }
.rm-inspector-name { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 28px; font-weight: 560; overflow-wrap: anywhere; }
.rm-props { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: var(--space-2) var(--space-3); margin: 0; font-size: 14px; line-height: 20px; }
.rm-props dt { color: var(--ink-muted); }
.rm-props dd { margin: 0; display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.rm-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
.rm-activity li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; padding: var(--space-2) 0; font-size: 14px; line-height: 20px; }
.rm-activity li:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 36px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--line); }
.rm-activity .rm-activity-when { display: block; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.rm-activity .rm-badge { margin-top: 2px; }

/* ---------- Shell: the desk, the content sheet, the rail, the sidebar with its fused tab ---------- */

.rm-shell { display: grid; grid-template-columns: var(--rail-width) var(--sidebar-width) minmax(0, 1fr); grid-template-rows: var(--topbar-height) minmax(0, 1fr); height: 100%; background: var(--surface-sunken); }
.rm-shell > .rm-rail { grid-row: 1 / 3; }
.rm-shell > .rm-topbar { grid-column: 2 / 4; }
.rm-shell-solo { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
.rm-shell-solo > .rm-topbar { grid-column: 2 / 3; }
.rm-shell-solo > .rm-desk-sheet { margin-left: 0; }
.rm-desk-sheet { position: relative; min-width: 0; margin: 0 var(--space-2) var(--space-2) 0; background: var(--surface); border-radius: var(--radius-xl); overflow: hidden; }

.rm-rail { width: var(--rail-width); box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-3) 0; }
.rm-rail-home { display: grid; place-content: center; height: 40px; margin-bottom: var(--space-2); font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.rm-rail-app {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 68px; padding: 2px 0;
  font: inherit; font-size: 12px; line-height: 16px; color: var(--ink-muted); background: none; border: 0; text-decoration: none; cursor: pointer;
}
.rm-rail-icon { display: grid; place-content: center; width: 44px; height: 44px; border-radius: var(--radius-lg); color: var(--ink); transition: background var(--motion-quick) var(--ease-out), transform var(--motion-base) var(--ease-settle), box-shadow var(--motion-base) var(--ease-out); }
.rm-rail-app .rm-icon { width: var(--icon-lg); height: var(--icon-lg); }
.rm-rail-app:hover .rm-rail-icon { background: var(--surface-hover); transform: translateY(-1px); }
.rm-rail-app[aria-current="page"] { color: var(--ink); font-weight: 650; }
.rm-rail-app[aria-current="page"] .rm-rail-icon { background: var(--surface-raised); color: var(--accent); box-shadow: var(--shadow-card); }
.rm-rail-app[aria-current="page"]::before { content: ""; position: absolute; left: -4px; top: 12px; width: 4px; height: 20px; border-radius: 0 var(--radius-full) var(--radius-full) 0; background: var(--accent); }
.rm-rail-sep { width: 32px; height: 1px; margin: var(--space-1) 0; background: var(--line-strong); opacity: 0.5; }
.rm-rail-end { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }

.rm-topbar { display: flex; align-items: center; gap: var(--space-3); height: var(--topbar-height); box-sizing: border-box; padding: 0 var(--space-3) 0 var(--space-2); }
.rm-topbar-title { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 560; white-space: nowrap; padding-left: var(--space-3); }
.rm-search {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; max-width: 460px; height: var(--control-md); padding: 0 var(--space-2) 0 var(--space-4); box-sizing: border-box; margin: 0 auto;
  font: inherit; font-size: 14px; color: var(--ink-muted); text-align: left; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-full); cursor: text;
  transition: box-shadow var(--motion-base) var(--ease-out);
}
.rm-search:hover { box-shadow: var(--shadow-card); }
.rm-search .rm-kbd { margin-left: auto; }
.rm-topbar-actions { display: flex; align-items: center; gap: var(--space-1); }
.rm-badged { position: relative; }
.rm-badged .rm-count { position: absolute; top: 0; right: -2px; box-shadow: 0 0 0 2px var(--surface-sunken); }

.rm-sidenav { width: var(--sidebar-width); box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) 0 var(--space-3) var(--space-2); overflow: visible; }
.rm-sidenav-item {
  position: relative; display: flex; align-items: center; gap: var(--space-3); height: 38px; padding: 0 var(--space-3); margin-right: var(--space-2); box-sizing: border-box;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--ink); background: none; border: 0; border-radius: var(--radius-md); text-decoration: none; cursor: pointer; text-align: left;
  transition: background var(--motion-quick) var(--ease-out);
}
.rm-sidenav-item > .rm-icon { color: var(--ink-muted); }
.rm-sidenav-item:hover { background: var(--surface-hover); }
/* The current place is a tab of the content sheet: same paper, joined to it with two inverted corners. */
.rm-sidenav-item[aria-current="page"] { background: var(--surface); font-weight: 650; margin-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.rm-sidenav-item[aria-current="page"] > .rm-icon { color: var(--accent); }
.rm-sidenav-item[aria-current="page"]::before, .rm-sidenav-item[aria-current="page"]::after {
  content: ""; position: absolute; right: 0; width: var(--radius-md); height: var(--radius-md); pointer-events: none;
}
.rm-sidenav-item[aria-current="page"]::before { bottom: 100%; background: radial-gradient(circle at 0 0, transparent calc(var(--radius-md) - 0.5px), var(--surface) var(--radius-md)); }
.rm-sidenav-item[aria-current="page"]::after { top: 100%; background: radial-gradient(circle at 0 100%, transparent calc(var(--radius-md) - 0.5px), var(--surface) var(--radius-md)); }
.rm-sidenav-item .rm-count, .rm-sidenav-item .rm-sidenav-meta { margin-left: auto; }
.rm-sidenav-meta { font-size: 12px; color: var(--ink-muted); }
.rm-sidenav-heading { display: flex; align-items: center; justify-content: space-between; margin: var(--space-4) var(--space-2) var(--space-1) 0; padding: 0 0 0 var(--space-3); font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.rm-sidenav-foot { margin-top: auto; padding: var(--space-4) var(--space-4) var(--space-2) var(--space-3); }

/* ---------- Home ---------- */

.rm-home { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-6); }
.rm-greeting { display: flex; flex-direction: column; gap: var(--space-1); }
.rm-greeting h1 { margin: 0; font-family: var(--font-display); font-size: 40px; line-height: 46px; font-weight: 560; letter-spacing: -0.015em; }
.rm-greeting p { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.rm-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); }
.rm-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); background: var(--surface-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); min-width: 0; transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out); }
a.rm-card:hover, .rm-card[data-link]:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.rm-card-head { display: flex; align-items: center; gap: var(--space-2); }
.rm-card-title { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 28px; font-weight: 560; }
.rm-card-new { background: var(--highlight-soft); box-shadow: none; }
.rm-card-safe .rm-crystal { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.6; }
.rm-card-text { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.rm-card-foot { display: flex; gap: var(--space-2); margin-top: auto; }
.rm-span-2 { grid-column: span 2; }
.rm-span-3 { grid-column: span 3; }
.rm-span-4 { grid-column: span 4; }
.rm-span-6 { grid-column: span 6; }
@media (max-width: 1023px) { .rm-bento { grid-template-columns: minmax(0, 1fr); } .rm-bento > * { grid-column: auto; } }
.rm-team-row { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; font-size: 14px; font-weight: 650; }
.rm-team-row .rm-avatar-stack { margin-left: auto; }
.rm-app-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); }
.rm-app-tile {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-lg);
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); text-decoration: none;
  transition: background var(--motion-quick) var(--ease-out);
}
.rm-app-tile:hover { background: var(--surface-hover); }
.rm-app-tile:hover .rm-avatar { transform: rotate(-6deg); }
.rm-app-tile .rm-avatar { transition: transform var(--motion-base) var(--ease-settle); }
.rm-card-safe { background: var(--accent-soft); box-shadow: none; }

/* ---------- Phones: the floating dock and sheets ---------- */

.rm-dock { display: flex; justify-content: space-around; align-items: center; height: 64px; margin: 0 var(--space-3) var(--space-3); padding: 0 var(--space-2); background: var(--surface-raised); border-radius: var(--radius-full); box-shadow: var(--shadow-overlay); }
.rm-dock .rm-rail-app { width: auto; flex: 1; }
.rm-dock .rm-rail-icon { width: 40px; height: 32px; border-radius: var(--radius-full); }
.rm-dock .rm-rail-app[aria-current="page"] .rm-rail-icon { background: var(--accent-soft); box-shadow: none; }
.rm-dock .rm-rail-app[aria-current="page"]::before { display: none; }
@media (max-width: 767px) { .rm-objects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); } }
.rm-phone-title { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 560; letter-spacing: -0.01em; }
.rm-phone-sheet { background: var(--surface-raised); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-overlay); padding: var(--space-2) var(--space-2) var(--space-4); animation: rm-settle var(--motion-slow) var(--ease-settle) both; }
.rm-phone-sheet-grip { width: 36px; height: 4px; margin: 0 auto var(--space-3); border-radius: var(--radius-full); background: var(--line-strong); }
.rm-phone-sheet .rm-menu-item { height: var(--control-lg); font-size: 15px; }

/* The app directory's own site (decision 0050), after the design system's
   tokens and components. The desk is the page; content sits on sheets. */

html { background: var(--surface-sunken); }
body.site { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--surface-sunken); color: var(--ink); font-family: var(--font-sans); }
.site h1, .site h2, .site p { margin: 0; }
.site a { color: var(--link); }

.site-bar { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-6); max-width: 1080px; width: 100%; box-sizing: border-box; margin: 0 auto; }
.site-brand { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--ink) !important; text-decoration: none; }
.site-brand .rm-logo { width: 36px; height: 36px; transition: transform var(--motion-base) var(--ease-settle); }
.site-brand:hover .rm-logo { transform: rotate(-6deg); }
.site-nav { margin-left: auto; display: flex; gap: var(--space-4); }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }

.site-main { flex: 1; width: 100%; max-width: 1080px; box-sizing: border-box; margin: 0 auto; padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); }
.site-lead { max-width: 62ch; font-size: 18px; line-height: 28px; color: var(--ink-muted); }
.site-text { max-width: 66ch; font-size: 16px; line-height: 26px; }

/* The landing page: the icon tipped on the desk, a few words, one way in. */
.site-hero { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); padding: var(--space-7) 0 var(--space-5); }
.site-hero-logo .rm-logo { width: 96px; height: 96px; transform: rotate(-4deg); animation: site-settle 700ms var(--ease-settle) both; }
.site-hero-title { max-width: 18ch; font-size: clamp(34px, 6vw, 56px); line-height: 1.08; }
.site-actions { padding-top: var(--space-2); }
.site-section { display: flex; flex-direction: column; gap: var(--space-3); }
.site-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.site-chip { padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); background: var(--surface); box-shadow: var(--shadow-card); font-size: 14px; }
@keyframes site-settle { from { transform: rotate(-14deg) translateY(-8px); opacity: 0; } to { transform: rotate(-4deg); opacity: 1; } }

/* The directory: cards that lift and tip their icon when hovered. */
.site-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); }
.site-app-card { display: flex; gap: var(--space-4); align-items: flex-start; height: 100%; box-sizing: border-box; color: var(--ink) !important; text-decoration: none; transition: transform var(--motion-base) var(--ease-settle), box-shadow var(--motion-base) var(--ease-settle); }
.site-app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.site-app-card:hover .site-app-icon { transform: rotate(-6deg); }
.site-app-text { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.site-app-icon { flex: none; border-radius: var(--radius-lg); transition: transform var(--motion-base) var(--ease-settle); }

/* An app's page. */
.site-back { font-size: 14px; }
.site-back a { color: var(--ink-muted); }
.site-app-head { display: flex; align-items: center; gap: var(--space-4); }
.site-app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-4); align-items: start; }
.site-app-grid .rm-card { display: flex; flex-direction: column; gap: var(--space-3); }
.site-asks, .site-steps { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-2); line-height: 22px; }
.site-link, .site-sha { overflow-wrap: anywhere; }
.site-sha { font-size: 12px; }
.site-facts { max-width: 560px; }
.site-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }

.site-foot { padding: var(--space-5) var(--space-6) var(--space-6); max-width: 1080px; width: 100%; box-sizing: border-box; margin: 0 auto; color: var(--ink-muted); font-size: 14px; }

@media (max-width: 640px) {
  .site-bar, .site-main, .site-foot { padding-left: var(--space-4); padding-right: var(--space-4); }
  .site-hero { padding-top: var(--space-5); }
  .site-apps, .site-app-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .site-hero-logo .rm-logo { animation: none; }
}
