/* STEM LM — editorial design system.
   Light grey paper, near-black ink, nothing else: the theme is black and white. A tight neo-grotesk at line-height 1,
   mono labels in caps, dotted rules, square outlined buttons with a corner arrow, and type that
   scales with the viewport. The 3D gems (fx/gem.js) are the only imagery. */

:root {
  color-scheme: light;
  --bg: #e8e8e8;
  --bg-2: #f1f1f1;
  --paper: #fafafa;
  --surface: #ffffff;
  --ink: #101010;
  --muted: rgba(16, 16, 16, 0.5);
  --faint: rgba(16, 16, 16, 0.3);
  --border: rgba(16, 16, 16, 0.14);
  --rule: rgba(16, 16, 16, 0.4);
  --accent: #101010;
  --accent-hover: #3a3a3a; /* solid black controls lift to charcoal on hover */
  --soft: #f3f3f3;
  --plot: var(--accent);
  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: var(--display);
  --ui: var(--display);
  --mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --g: clamp(16px, 2.08vw, 40px);
  --fs-display: clamp(40px, 5.6vw, 128px);
  --fs-statement: clamp(26px, 3.3vw, 70px);
  --fs-huge: clamp(60px, 8.6vw, 190px);
  --fs-h3: clamp(20px, 1.7vw, 34px);
  --fs-caps: clamp(13px, 1.05vw, 20px);
  --fs-body: clamp(14px, 1.05vw, 20px);
  --fs-mono: clamp(11px, 0.78vw, 14px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 500 var(--fs-body) / 1.25 var(--display);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.gate-open {
  overflow: hidden;
}
::selection {
  background: var(--accent);
  color: #fff;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- type ---------- */
.display {
  font: 500 var(--fs-display) / 0.94 var(--display);
  letter-spacing: -0.045em;
}
/* The first line hangs in from the left, leaving room for the logo (as in the reference). */
.display.indent {
  text-indent: clamp(96px, 17.2vw, 360px);
}
.statement {
  font: 500 var(--fs-statement) / 1 var(--display);
  letter-spacing: -0.035em;
}
.caps {
  font-size: var(--fs-caps);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.mono {
  font: 400 var(--fs-mono) / 1.25 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.accent {
  color: var(--accent);
}
.faint {
  opacity: 0.35;
}
.muted {
  color: var(--muted);
  font-size: var(--fs-mono);
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: clamp(140px, 10.6vw, 210px);
  height: clamp(42px, 3.2vw, 62px);
  padding: 0 clamp(16px, 1.25vw, 24px);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn .corner {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  transition: transform 0.3s var(--ease);
}
.btn:hover {
  background: var(--ink);
  color: #fff;
}
.btn:hover .corner {
  transform: translate(2px, -2px);
}
.btn-solid {
  background: var(--ink);
  color: #fff;
}
.btn-solid:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-white {
  border-color: #fff;
  color: #fff;
}
.btn-white:hover {
  background: #fff;
  color: var(--accent);
}
/* Buttons the lesson engine and dialogs render (.button.primary / .secondary / .danger / .small). */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.button .icon {
  width: 15px;
  height: 15px;
}
.button.primary {
  background: var(--ink);
  color: #fff;
}
.button.primary:not(:disabled):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.button.secondary:not(:disabled):hover {
  background: var(--ink);
  color: #fff;
}
.button.danger {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button.danger:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.button.small {
  min-height: 32px;
  padding: 0 12px;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.icon-button:hover {
  background: #fff;
}

/* ---------- logo ---------- */
.logo {
  display: block;
  line-height: 0;
}
.logo-mark {
  display: block;
  width: clamp(56px, 4.6vw, 88px);
  height: clamp(56px, 4.6vw, 88px);
}

/* The intro (gate) and the onboarding page are styled in css/hero.css. */

/* ---------- header: pill navigation (React Bits PillNav) ---------- */
.app-shell {
  position: relative;
}
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: var(--g) var(--g) 0;
  pointer-events: none;
}
.site-header > * {
  pointer-events: auto;
}
.pill-nav {
  --nav-h: clamp(42px, 3vw, 52px);
  --base: var(--ink);
  --pill-bg: var(--paper);
  --pill-text: var(--ink);
  --hover-text: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pill-logo {
  display: grid;
  place-items: center;
  width: var(--nav-h);
  height: var(--nav-h);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.pill-logo-mark {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease);
}
.pill-logo:hover .pill-logo-mark {
  transform: rotate(360deg);
}
.pill-nav-items {
  height: var(--nav-h);
  border-radius: 999px;
  background: var(--base);
}
.pill-list {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 100%;
  margin: 0;
  padding: 3px;
  list-style: none;
}
.pill-list > li {
  display: flex;
}
.pill-nav .pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 clamp(14px, 1.2vw, 20px);
  overflow: hidden;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-nav .hover-circle {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  display: block;
  border-radius: 50%;
  background: var(--base);
  pointer-events: none;
  transform: translateX(-50%) scale(0);
  transition: transform 0.35s var(--ease);
}
.pill-nav .label-stack {
  position: relative;
  z-index: 2;
  display: inline-block;
  line-height: 1;
}
.pill-nav .pill-label,
.pill-nav .pill-label-hover {
  display: inline-block;
  transition:
    transform 0.35s var(--ease),
    opacity 0.35s var(--ease);
}
.pill-nav .pill-label-hover {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hover-text);
  opacity: 0;
  transform: translateY(calc(var(--pill-h, 40px) + 12px));
}
.pill-nav .pill:hover .hover-circle,
.pill-nav .pill:focus-visible .hover-circle {
  transform: translateX(-50%) scale(1.2);
}
.pill-nav .pill:hover .pill-label,
.pill-nav .pill:focus-visible .pill-label {
  transform: translateY(calc(-1 * var(--pill-h, 40px) - 8px));
}
.pill-nav .pill:hover .pill-label-hover,
.pill-nav .pill:focus-visible .pill-label-hover {
  opacity: 1;
  transform: none;
}
.pill-nav .pill.is-active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  z-index: 4;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.pill-burger {
  display: none;
  place-content: center;
  gap: 4px;
  width: var(--nav-h);
  height: var(--nav-h);
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}
.pill-burger span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s var(--ease);
}
.pill-burger.is-open span:first-child {
  transform: translateY(3px) rotate(45deg);
}
.pill-burger.is-open span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}
.pill-menu {
  position: absolute;
  top: calc(var(--g) + clamp(42px, 3vw, 52px) + 8px);
  left: var(--g);
  right: var(--g);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 3px;
  list-style: none;
  border-radius: 26px;
  background: var(--ink);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.pill-menu[hidden] {
  display: none;
}
.pill-menu a {
  display: block;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--paper);
  font: 400 var(--fs-mono) / 1 var(--mono);
  text-transform: uppercase;
  transition:
    background 0.2s,
    color 0.2s;
}
.pill-menu a:hover,
.pill-menu a.is-active {
  background: var(--accent);
  color: #fff;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vault-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(42px, 3vw, 52px);
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.2s;
}
.vault-chip:hover {
  background: #fff;
}
.vault-glyph {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.avatar-btn {
  display: grid;
  place-items: center;
  width: clamp(42px, 3vw, 52px);
  height: clamp(42px, 3vw, 52px);
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 500 clamp(13px, 0.95vw, 18px) / 1 var(--display);
  letter-spacing: -0.02em;
  transition: background 0.2s;
}
.avatar-btn:hover {
  background: var(--accent-hover);
}
.avatar-btn {
  overflow: hidden;
}
.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sign-in-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(42px, 3vw, 52px);
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  transition: background 0.2s;
}
.sign-in-btn:hover {
  background: var(--ink);
}
.sign-in-btn .icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-transform: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover {
  color: var(--ink);
}

/* ---------- home: quick start and recent folders ---------- */
main {
  position: relative;
}
.dash {
  display: grid;
  gap: clamp(8px, 1vw, 20px);
  padding: calc(var(--g) * 2 + clamp(42px, 3vw, 52px) + clamp(28px, 4vw, 80px)) var(--g) clamp(40px, 4vw, 80px);
}
.quick {
  max-width: 1180px;
}
.quick > .mono {
  margin-bottom: clamp(16px, 1.6vw, 28px);
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quick-action {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: clamp(170px, 15vw, 280px);
  padding: clamp(18px, 1.6vw, 30px);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.quick-action .icon {
  position: absolute;
  top: clamp(18px, 1.6vw, 30px);
  left: clamp(18px, 1.6vw, 30px);
  width: clamp(24px, 1.9vw, 34px);
  height: clamp(24px, 1.9vw, 34px);
}
.quick-action .corner {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  transition: transform 0.3s var(--ease);
}
.quick-action strong {
  font: 500 var(--fs-statement) / 1 var(--display);
  letter-spacing: -0.035em;
}
.quick-action small {
  opacity: 0.6;
}
.quick-action:hover {
  background: var(--ink);
  color: #fff;
}
.quick-action:hover .corner {
  transform: translate(3px, -3px);
}
.quick-action.is-record {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.quick-action.is-record:hover {
  background: var(--ink);
  border-color: var(--ink);
}
.quick-account {
  margin-top: 14px;
  opacity: 0.75;
}
.quick-account[hidden] {
  display: none;
}
/* The gem tray: the codex as a quiet row of specimens, commonest to rarest. It sits where the
   folders' lessons float up, so it steps back while a folder is open. */
.gem-tray {
  --cell: clamp(30px, 3.3vw, 54px);
  margin-top: clamp(28px, 3vw, 56px);
  transition: opacity 0.3s var(--ease);
}
.dash:has(.folder-float[data-open]) .gem-tray {
  opacity: 0.12;
  pointer-events: none;
}
.gem-tray-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}
.gem-tray-head a {
  color: var(--accent);
  text-decoration: none;
}
.gem-tray-head a:hover {
  color: var(--ink);
}
.gem-tray-read {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gem-tray-read.is-reading {
  opacity: 0.85;
  text-transform: none;
}
.gem-tray-list,
.gem-tray-group ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gem-tray-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(12px, 1.6vw, 28px);
  margin-top: clamp(8px, 0.8vw, 14px);
  cursor: pointer;
}
.gem-tray-group {
  display: grid;
  gap: 5px;
}
/* Each rarity stands on its own short shelf in the rarity's colour. */
.gem-tray-group ol {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--rarity) 70%, transparent);
}
.gem-tray-group > span {
  font: 400 10px / 1 var(--mono);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  opacity: 0.4;
}
.gem-tray-gem canvas {
  display: block;
  width: var(--cell);
  height: var(--cell);
  transition:
    opacity 0.25s,
    transform 0.25s var(--ease);
}
.gem-tray-gem:not(.is-found) canvas {
  filter: brightness(0);
  opacity: 0.13;
}
.gem-tray-gem:not(.is-found):hover canvas {
  filter: brightness(0) drop-shadow(0 0 2px var(--rarity));
  opacity: 0.4;
}
.gem-tray-gem:hover canvas {
  transform: translateY(-3px);
}
.recent {
  margin-top: clamp(20px, 2vw, 36px);
}
/* Room between the folders' rows for their lessons to float up into. The first row floats over
   the gem tray above it. */
.folders {
  display: flex;
  flex-wrap: wrap;
  gap: 150px clamp(20px, 2.4vw, 44px);
  padding-top: clamp(24px, 2.4vw, 44px);
}
.folders .folder-float {
  font-family: var(--mono);
  letter-spacing: -0.04em;
}
.folders .folder-float:hover,
.folders .folder-float[data-open] {
  z-index: 5;
}
.folders .folder-float__label {
  font: 500 var(--fs-caps) / 1.05 var(--display);
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folders .folder-float__sub {
  text-transform: uppercase;
}
.folders .folder-float__item {
  font: 400 12px / 1 var(--mono);
  letter-spacing: -0.03em;
}
.recent-hint {
  margin-top: 18px;
}
.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* A folder's own menu sits on its back tab, above the flap. */
.folders .folder-float {
  position: relative;
}
.folder-menu {
  position: absolute;
  top: 16px;
  right: 4px;
  z-index: 6;
}
.folder-menu summary {
  display: grid;
  place-items: center;
  width: 28px;
  height: 24px;
  color: #fff;
  list-style: none;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.folder-menu summary::-webkit-details-marker {
  display: none;
}
.folder-menu .icon {
  width: 16px;
  height: 16px;
}
.folder-float:hover .folder-menu summary,
.folder-menu summary:focus-visible,
.folder-menu[open] summary {
  opacity: 1;
}
.folder-menu summary:hover,
.folder-menu[open] summary {
  background: rgba(255, 255, 255, 0.16);
}
@media (hover: none) {
  .folder-menu summary {
    opacity: 0.7;
  }
}
.folder-menu .session-options {
  top: calc(100% + 4px);
  right: -4px;
}
/* A lesson dragged over a folder: the folder lifts and its flap opens a little. */
.folders .folder-float[data-drop] {
  z-index: 6;
}
.folders .folder-float[data-drop] .folder-float__folder {
  transform: translateY(-6px);
}
.folders .folder-float[data-drop] .folder-float__front {
  transform: perspective(600px) rotateX(-28deg);
}
.folders .folder-float__folder {
  transition: transform 0.25s var(--ease);
}
.folder-new-tile {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  width: 172px;
  height: 128px;
  margin-top: 14px;
  border: 1px dashed var(--rule);
  background: transparent;
  color: var(--muted);
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.folder-new-plus {
  font: 300 34px / 0.8 var(--display);
}
.folder-new-tile:hover,
.folder-new-tile[data-drop] {
  border-color: var(--ink);
  border-style: solid;
  color: var(--ink);
  background: var(--bg-2);
}
body.is-filing .folder-new-tile {
  border-color: var(--ink);
  color: var(--ink);
}

/* Unfiled lessons, under the folders. The whole list is a drop target too (back to Unfiled). */
.unfiled {
  margin-top: clamp(36px, 3.6vw, 64px);
  padding: 4px 0 0;
  outline: 1px dashed transparent;
  outline-offset: 8px;
  transition: outline-color 0.2s;
}
.unfiled[data-drop] {
  outline-color: var(--ink);
}
.unfiled-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.unfiled-head sup {
  font-size: 0.8em;
}
.unfiled-empty {
  padding: 14px 0;
}
.ai-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.2s,
    opacity 0.2s;
}
.ai-sort .icon {
  width: 15px;
  height: 15px;
}
.ai-sort:not(:disabled):hover {
  background: var(--accent-hover);
}
.ai-sort:disabled {
  opacity: 0.35;
  cursor: default;
}
.ai-sort.is-busy {
  opacity: 1;
  cursor: progress;
}
.ai-sort.is-busy .icon {
  animation: ai-spin 1.1s linear infinite;
}
@keyframes ai-spin {
  to {
    transform: rotate(360deg);
  }
}
.ai-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--paper);
}
.ai-note[hidden] {
  display: none;
}

/* Lesson rows in the unfiled list and on a folder's page: gem, title, length and date, Move to. */
.file-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px dotted var(--rule);
}
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px dotted var(--rule);
  cursor: grab;
  transition:
    background 0.2s var(--ease),
    opacity 0.2s;
}
.file-row:hover {
  background: #fff;
}
.file-row.is-dragging {
  opacity: 0.35;
}
.file-open {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 1.1vw, 20px);
  padding: 8px 0 8px 4px;
  color: inherit;
  text-decoration: none;
}
.file-gem canvas {
  display: block;
  width: 44px;
  height: 44px;
}
.file-title {
  font: 500 var(--fs-h3) / 1.05 var(--display);
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.3s var(--ease);
}
.file-row:hover .file-title {
  transform: translateX(6px);
}
.file-meta {
  color: var(--muted);
  white-space: nowrap;
}
.file-move select {
  max-width: 180px;
  height: 32px;
  margin-right: 4px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23101010' stroke-width='1.2'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
}
.file-move select:hover,
.file-move select:focus-visible {
  border-color: var(--ink);
}

/* ---------- a folder's page ---------- */
.folder-top {
  display: grid;
  gap: 4px;
}
.folder-back {
  color: var(--accent);
  margin-right: 10px;
}
.folder-name {
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  outline: none;
  text-overflow: ellipsis;
}
.folder-name:not([readonly]) {
  cursor: text;
}
.folder-name:not([readonly]):hover,
.folder-name:not([readonly]):focus {
  border-bottom-color: var(--rule);
}
.folder-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: clamp(16px, 1.6vw, 28px);
}
.folder-tools [hidden] {
  display: none;
}
.folder-rows {
  margin: 0 var(--g) clamp(60px, 6vw, 120px);
}

/* ---------- stat rows (profile) ---------- */
.stat-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px dotted var(--rule);
}
.stat-rows li {
  position: relative;
  display: grid;
  align-items: start;
  gap: 16px;
  padding: clamp(12px, 1.1vw, 22px) var(--g);
  border-top: 1px dotted var(--rule);
}
.stat-num {
  font: 400 var(--fs-huge) / 0.86 var(--display);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.stat-rows.compact li {
  grid-template-columns: 3vw 1fr auto;
  padding-left: 0;
  padding-right: 0;
}
.stat-rows.compact .stat-num {
  font-size: clamp(44px, 5.2vw, 110px);
}

/* ---------- home: lesson index ---------- */
.index {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: clamp(60px, 7vw, 140px) 0 clamp(40px, 4vw, 80px);
}
.index-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 var(--g);
  margin-bottom: clamp(24px, 2.5vw, 48px);
}
.index-head .mono {
  margin-bottom: 14px;
}
.index-head sup {
  font: 400 var(--fs-mono) / 1 var(--mono);
  color: var(--accent);
  margin-left: 6px;
  vertical-align: top;
  letter-spacing: 0;
}
.index-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 var(--g);
  margin-bottom: clamp(20px, 2vw, 36px);
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 420px;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: var(--fs-caps);
  letter-spacing: -0.02em;
}
.search input::placeholder {
  color: var(--faint);
}
.chips-frame {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-chips {
  display: flex;
}
.filter-chips button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  margin-left: -1px;
  background: transparent;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s;
}
.filter-chips button:hover {
  background: #fff;
}
.filter-chips button[aria-checked="true"] {
  background: var(--ink);
  color: #fff;
}
.row-labels,
.lesson-row .session-open {
  display: grid;
  grid-template-columns: 4.5vw clamp(56px, 5vw, 96px) minmax(0, 1fr) 15vw 7vw 7vw 11vw 24px;
  align-items: center;
  gap: clamp(10px, 1.1vw, 22px);
}
.row-labels {
  padding: 0 calc(var(--g) + 52px) 10px var(--g);
}
.lesson-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px dotted var(--rule);
}
.lesson-row {
  position: relative;
  display: flex;
  align-items: center;
  border-top: 1px dotted var(--rule);
  transition: background 0.25s var(--ease);
}
.lesson-row:hover {
  background: #fff;
}
.lesson-row .session-open {
  flex: 1;
  min-width: 0;
  padding: clamp(10px, 0.9vw, 18px) 0 clamp(10px, 0.9vw, 18px) var(--g);
  border: 0;
  background: none;
  text-align: left;
}
.lr-gem {
  width: clamp(56px, 5vw, 96px);
  height: clamp(56px, 5vw, 96px);
}
.lr-gem canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.lr-title {
  font: 500 clamp(20px, 2.1vw, 44px) / 1 var(--display);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  transition: transform 0.35s var(--ease);
}
.lesson-row:hover .lr-title {
  transform: translateX(8px);
}
.lr-tier {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lr-tier::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border: 1px solid var(--ink);
}
.lr-tier.is-rough::before {
  background: linear-gradient(135deg, var(--ink) 50%, transparent 50%);
}
.lr-tier.is-cut::before {
  background: var(--accent);
  border-color: var(--accent);
}
.lr-go {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  transition: transform 0.3s var(--ease);
}
.lesson-row:hover .lr-go {
  transform: translate(3px, -3px);
  stroke: var(--accent);
}
.session-row-actions {
  position: relative;
  flex-shrink: 0;
  margin-right: calc(var(--g) - 8px);
  margin-left: 8px;
}
.session-row-actions summary {
  list-style: none;
  cursor: pointer;
}
.session-row-actions summary::-webkit-details-marker {
  display: none;
}
.session-row-actions[open] summary {
  background: var(--ink);
  color: #fff;
}
.session-options {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  width: 180px;
  padding: 6px;
  background: var(--paper);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.35);
}
.session-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 10px;
  background: none;
  text-align: left;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.session-option:hover {
  background: var(--ink);
  color: #fff;
}
.session-option .icon {
  width: 15px;
  height: 15px;
}
.session-delete:hover {
  background: var(--accent-hover);
}
.empty-state {
  padding: clamp(50px, 6vw, 120px) var(--g);
}
.empty-state .mono {
  margin-top: 14px;
}
.library-footnote {
  padding: 18px var(--g) 0;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: clamp(40px, 4vw, 80px) var(--g) var(--g);
  overflow: hidden;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.footer-cols a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* ---------- inner pages ---------- */
.page-top {
  padding: calc(var(--g) * 2 + clamp(42px, 3.65vw, 73px)) var(--g) clamp(30px, 3vw, 60px);
}
.page-top > .mono {
  margin-bottom: 16px;
}
.page-top .display {
  max-width: 70vw;
}
.page-sub {
  max-width: 34vw;
  margin-top: clamp(16px, 1.6vw, 30px);
  margin-left: clamp(96px, 17.2vw, 360px);
}
.faint-ink {
  color: var(--faint);
}

/* ---------- new lesson ---------- */
.new-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 30vw, 580px);
  gap: var(--g);
  padding: 0 var(--g) clamp(60px, 6vw, 120px);
  align-items: start;
}
.new-preview {
  position: sticky;
  top: calc(var(--g) * 2 + 60px);
  background: var(--bg-2);
  padding: var(--g);
}
.new-gem {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
}
.new-preview p {
  display: flex;
  justify-content: space-between;
}
.new-stepper.stepper {
  --stepper-pad: 0px;
  --stepper-inset: 0px;
  --stepper-bleed: 10px;
}
.new-stepper .stepper__header {
  padding: 0;
}
.new-stepper .stepper__track {
  gap: 0;
  padding: 0;
  border-radius: 0;
  border: 1px solid var(--ink);
}
.new-stepper .stepper__glider {
  border-radius: 0;
  box-shadow: none;
}
.new-stepper .stepper__segment {
  height: clamp(42px, 3.2vw, 62px);
  border-radius: 0;
  font-family: var(--mono);
  justify-content: flex-start;
  padding: 0 14px;
}
.new-stepper .stepper__segment + .stepper__segment {
  border-left: 1px solid var(--ink);
}
.new-stepper .stepper__title {
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.new-stepper .stepper__segment[data-status="active"] .stepper__title,
.new-stepper .stepper__segment[data-status="active"] .stepper__badge {
  color: #fff;
}
.new-stepper .stepper__badge {
  border-radius: 0;
  font-family: var(--mono);
}
.new-stepper .stepper__badge[data-status="active"] {
  box-shadow: inset 0 0 0 1px #fff;
}
.new-stepper .stepper__badge[data-status="complete"] {
  background: var(--accent);
  color: #fff;
}
.new-stepper .stepper__body {
  padding-top: clamp(28px, 3vw, 56px);
}
.new-stepper .stepper__footer {
  padding-top: clamp(28px, 3vw, 56px);
  border-top: 1px dotted var(--rule);
  margin-top: clamp(20px, 2vw, 40px);
}
.new-stepper .stepper__button {
  border-radius: 0;
  height: clamp(42px, 3.2vw, 62px);
  padding: 0 18px;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.new-stepper .stepper__button--back {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ink);
}
.new-stepper .stepper__button--next {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}
.new-stepper .stepper__button--next:not(:disabled):hover {
  background: var(--accent-hover);
  filter: none;
}
.new-stepper .stepper__rim {
  display: none;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 56px);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field legend {
  padding: 0;
  margin-bottom: 14px;
}
.big-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  padding: 6px 0 12px;
  font: 500 var(--fs-statement) / 1.05 var(--display);
  letter-spacing: -0.035em;
  outline: none;
}
.big-input::placeholder {
  color: var(--faint);
}
.big-input:focus {
  border-bottom-color: var(--accent);
}
.field textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  font: 500 var(--fs-body) / 1.35 var(--display);
  resize: vertical;
  outline: none;
}
.field textarea:focus {
  border-color: var(--accent);
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.source-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-height: clamp(200px, 15vw, 300px);
  padding: 16px;
  border: 0;
  background: var(--paper);
  text-align: left;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease);
}
.source-card .mono {
  color: var(--accent);
}
.source-card strong {
  margin-top: auto;
}
.source-desc {
  font-size: clamp(12px, 0.9vw, 17px);
  line-height: 1.1;
  opacity: 0.7;
}
.source-card:hover {
  background: #fff;
}
.source-card[aria-checked="true"] {
  background: var(--ink);
  color: #fff;
}
.launch-summary {
  margin: 0;
  border-bottom: 1px dotted var(--rule);
}
.launch-summary > div {
  display: grid;
  grid-template-columns: 10vw 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px dotted var(--rule);
}
.launch-summary dd {
  margin: 0;
  font: 500 var(--fs-h3) / 1.05 var(--display);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.launch-next {
  max-width: 44ch;
  line-height: 1.15;
}
.wizard-done {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(20px, 3vw, 60px) 0;
}

/* New lesson steps after Source: material, syllabus, shape, focus, transcript, create. */
.wiz-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wiz-why {
  max-width: 52ch;
  font-size: var(--fs-body);
  line-height: 1.25;
  color: var(--muted);
}
.wiz-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 7px;
  background: var(--ink);
  color: #fff;
}
.wiz-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wiz-kinds li {
  padding: 9px 12px;
  background: var(--paper);
  text-transform: uppercase;
  letter-spacing: -0.04em;
}
.wiz-drop {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 1.4vw, 28px);
  padding: clamp(28px, 3.4vw, 64px) clamp(18px, 2vw, 36px);
  border: 1px dashed var(--rule);
  background: var(--paper);
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.wiz-drop.is-over {
  border-style: solid;
  border-color: var(--ink);
  background: #fff;
}
.wiz-drop > .icon {
  width: clamp(26px, 2.2vw, 40px);
  height: clamp(26px, 2.2vw, 40px);
}
.wiz-drop-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.wiz-drop-text strong {
  font: 500 var(--fs-h3) / 1.05 var(--display);
  letter-spacing: -0.03em;
}
.wiz-files {
  margin: 0;
  padding: 0;
  list-style: none;
}
.wiz-files:empty {
  display: none;
}
.wiz-file {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 28px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px dotted var(--rule);
}
.wiz-file:last-child {
  border-bottom: 1px dotted var(--rule);
}
.wiz-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiz-file-detail {
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.wiz-file.is-uploading .icon {
  opacity: 0.15;
}
.wiz-file.is-uploading .wiz-file-detail {
  animation: start-pulse 1.2s ease-in-out infinite;
}
.wiz-file.is-error .icon {
  visibility: hidden;
}
.wiz-file.is-error .wiz-file-detail {
  color: #bc6a5d;
  white-space: normal;
}
.wiz-file-remove {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
}
.wiz-file-remove:hover {
  color: var(--ink);
}

/* Shape: the length as a huge number over one tile per possible slide, then the depth cards. */
.shape-length {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.4vw, 26px);
}
.shape-readout {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 0.8vw, 16px);
  margin: 0;
}
.shape-minutes {
  font: 500 var(--fs-huge) / 0.82 var(--display);
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
.shape-unit {
  font: 500 var(--fs-statement) / 1 var(--display);
  letter-spacing: -0.035em;
}
.shape-kind {
  margin-left: auto;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.shape-slides {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shape-slides li {
  height: clamp(22px, 2vw, 38px);
  border: 1px solid var(--border);
  transform: scaleY(0.6);
  transform-origin: bottom;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.4s var(--ease);
}
.shape-slides li.is-maybe {
  border-color: var(--ink);
  transform: scaleY(0.85);
}
.shape-slides li.is-on {
  border-color: var(--ink);
  background: var(--ink);
  transform: none;
}
.shape-range {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.shape-range::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--ink) var(--fill, 0%), var(--border) var(--fill, 0%));
}
.shape-range::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg, var(--ink) var(--fill, 0%), var(--border) var(--fill, 0%));
}
.shape-range::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -11px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  -webkit-appearance: none;
}
.shape-range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}
.shape-range:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}
.shape-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-transform: uppercase;
}
.shape-scale #shape-count {
  color: var(--ink);
}
.shape-depth {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.shape-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: clamp(170px, 12.5vw, 250px);
  padding: 16px;
  border: 0;
  background: var(--paper);
  text-align: left;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease);
}
.shape-card:hover {
  background: #fff;
}
.shape-card[aria-checked="true"] {
  background: var(--ink);
  color: #fff;
}
.shape-dots {
  display: flex;
  gap: 4px;
}
.shape-dots i {
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
}
.shape-dots i.is-on {
  background: currentColor;
}
.shape-card strong {
  margin-top: auto;
  font: 500 var(--fs-h3) / 1 var(--display);
  letter-spacing: -0.03em;
}
.shape-hint {
  font-size: clamp(12px, 0.9vw, 17px);
  line-height: 1.15;
  opacity: 0.7;
}
.shape-note {
  margin: 0;
  text-transform: uppercase;
}

/* Focus: the call first (a black card, the tutor's ball while it runs), then dictate or type. */
.focus-call {
  display: grid;
  grid-template-columns: clamp(110px, 11vw, 210px) minmax(0, 1fr);
  gap: clamp(18px, 2vw, 40px);
  align-items: center;
  padding: clamp(20px, 2.2vw, 44px);
  background: var(--ink);
  color: #fff;
}
.focus-ball {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.focus-ball-gl {
  position: absolute;
  inset: -12%;
}
.focus-ball-icon {
  width: 42%;
  height: 42%;
  padding: 18%;
  box-sizing: content-box;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  stroke-width: 1.1;
  transition: opacity 0.3s var(--ease);
}
.focus-call:not([data-state="idle"]) .focus-ball-icon {
  opacity: 0;
}
.focus-call[data-state="idle"] .focus-ball-icon {
  animation: focus-ring 2.4s var(--ease) infinite;
}
@keyframes focus-ring {
  0%,
  60%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.28);
  }
  30% {
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0);
  }
}
.focus-call-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.focus-call-tag {
  margin: 0;
  opacity: 0.6;
  text-transform: uppercase;
}
.focus-call-body > strong {
  font-size: var(--fs-h3);
}
.focus-call-desc {
  max-width: 54ch;
  margin: 0;
  line-height: 1.25;
  opacity: 0.75;
}
.focus-call-status {
  margin: 0;
  text-transform: uppercase;
}
.focus-call-status:empty {
  display: none;
}
.focus-call:not([data-state="idle"]) .focus-call-status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #fff;
  animation: start-pulse 1.2s ease-in-out infinite;
}
.focus-call-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.focus-call-log li {
  display: grid;
  grid-template-columns: 9ch minmax(0, 1fr);
  gap: 12px;
  line-height: 1.25;
}
.focus-call-log strong {
  font-weight: 400;
  opacity: 0.55;
  text-transform: uppercase;
}
.focus-call-log li.is-note span {
  text-decoration: underline;
}
.focus-call-type {
  display: flex;
  gap: 8px;
  width: 100%;
}
.focus-call-type input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  font: inherit;
  outline: none;
}
.focus-call-type input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.focus-call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.focus-call .btn {
  border-color: #fff;
  color: #fff;
}
.focus-call .btn:hover {
  background: #fff;
  color: var(--ink);
}
.focus-call .btn-solid {
  background: #fff;
  color: var(--ink);
}
.focus-call .btn-solid:hover {
  background: #d8d8d8;
  border-color: #d8d8d8;
}
.focus-call-type .btn {
  min-width: 0;
  height: 36px;
}
.focus-write {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.focus-write-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.focus-box {
  position: relative;
}
.focus-box textarea {
  display: block;
  width: 100%;
  min-height: 150px;
  padding: 14px 14px 58px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  font: 500 var(--fs-body) / 1.35 var(--display);
  resize: vertical;
  outline: none;
}
.focus-mic {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  text-transform: uppercase;
}
.focus-mic:hover,
.focus-mic.is-live {
  background: var(--ink);
  color: #fff;
}
.focus-mic.is-live .icon {
  animation: start-pulse 1.2s ease-in-out infinite;
}
.launch-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--g);
}
.launch-options select,
.launch-options input {
  width: 100%;
  padding: 6px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font: 500 var(--fs-h3) / 1.1 var(--display);
  letter-spacing: -0.03em;
  outline: none;
}
.launch-options input::placeholder {
  color: var(--faint);
}
.launch-summary dd.is-long {
  font-size: var(--fs-body);
  line-height: 1.3;
  white-space: pre-line;
}
@media (max-width: 900px) {
  /* Seven steps do not fit in a row: only the current one keeps its title. */
  .new-stepper .stepper__segment {
    padding: 0 8px;
    justify-content: center;
  }
  .new-stepper .stepper__segment:not([data-status="active"]) .stepper__text {
    display: none;
  }
  .wiz-drop {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .wiz-drop .wiz-browse {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .wiz-file {
    grid-template-columns: 18px minmax(0, 1fr) 28px;
  }
  .wiz-file-detail {
    grid-column: 2;
    grid-row: 2;
  }
  .wiz-file-remove {
    grid-column: 3;
    grid-row: 1;
  }
  .shape-readout {
    flex-wrap: wrap;
  }
  .shape-kind {
    flex-basis: 100%;
    margin-left: 0;
  }
  .shape-slides {
    gap: 2px;
  }
  .shape-depth {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shape-card {
    min-height: 0;
  }
  .focus-call {
    grid-template-columns: 1fr;
  }
  .focus-ball {
    width: 96px;
  }
  .launch-options {
    grid-template-columns: 1fr;
  }
}

/* ---------- profile ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: clamp(260px, 26.6vw, 520px) minmax(0, 1fr);
  gap: var(--g);
  padding: 0 var(--g) clamp(60px, 6vw, 120px);
  align-items: start;
}
.member-card {
  position: sticky;
  top: calc(var(--g) * 2 + 60px);
  background: #fff;
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.45);
}
.member-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px;
}
.member-top .logo-mark {
  width: 44px;
  height: 44px;
}
.member-gem {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg);
  margin: 0 10px;
}
.member-body {
  padding: 16px;
}
.member-body .mono {
  margin-top: 6px;
}
.member-facts {
  margin: 20px 0 0;
  border-bottom: 1px dotted var(--rule);
}
.member-facts > div {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-top: 1px dotted var(--rule);
}
.member-facts dd {
  margin: 0;
}
.profile-main {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 100px);
}
.vault-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.rank-bar {
  height: 2px;
  background: var(--border);
  margin-bottom: 18px;
}
.rank-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 1.2s var(--ease);
}
.vault-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 11vw, 220px), 1fr));
  gap: 6px;
}
.vault-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 10px 10px 14px;
  background: var(--paper);
  transition: background 0.2s;
}
.vault-item:hover {
  background: #fff;
}
.vault-item canvas {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 6px;
}
.vault-item strong {
  font-size: clamp(13px, 0.95vw, 18px);
  line-height: 1.05;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.settings {
  display: flex;
  flex-direction: column;
}
.settings > .mono {
  margin: clamp(26px, 2.5vw, 48px) 0 10px;
}
.settings > .mono:first-child {
  margin-top: 0;
}
.set-row {
  display: grid;
  grid-template-columns: minmax(140px, 18vw) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px dotted var(--rule);
}
.set-row input:not([type="checkbox"]):not([type="range"]),
.set-row select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 6px 0;
  font: 500 var(--fs-h3) / 1.1 var(--display);
  letter-spacing: -0.03em;
  outline: none;
  appearance: none;
}
.set-row input::placeholder {
  color: var(--faint);
}
.set-row input:focus,
.set-row select:focus {
  border-bottom-color: var(--accent);
}
.set-row output {
  color: var(--accent);
  margin-left: 6px;
}
.set-row.toggle {
  grid-template-columns: 1fr auto;
}
input[type="range"] {
  accent-color: var(--accent);
  width: 100%;
}
.switch {
  appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}
.switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--ink);
  transition:
    transform 0.3s var(--ease),
    background 0.2s;
}
.switch:checked {
  background: var(--ink);
}
.switch:checked::before {
  transform: translateX(20px);
  background: var(--accent);
}

.account-card {
  margin-top: clamp(30px, 3vw, 56px);
}
.account-card[hidden] {
  display: none;
}
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 16px 0;
  border-top: 1px dotted var(--rule);
  border-bottom: 1px dotted var(--rule);
}
.account-who {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.account-who strong {
  font: 500 var(--fs-h3) / 1 var(--display);
  letter-spacing: -0.03em;
}

/* ---------- session ---------- */
#session-view {
  padding: calc(var(--g) * 2 + clamp(42px, 3.65vw, 73px)) var(--g) clamp(60px, 6vw, 120px);
}
.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: clamp(24px, 2.5vw, 48px);
  transition: color 0.2s;
}
.back-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}
.back-link:hover {
  color: var(--accent);
}
.back-link:hover .icon {
  transform: translateX(-4px);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.session-heading {
  margin-bottom: clamp(24px, 2.5vw, 48px);
}
.title-group {
  min-width: 0;
  flex: 1;
}
.title-group .mono {
  margin-bottom: 14px;
}
.session-heading h1 {
  font-size: clamp(36px, 4.6vw, 104px);
}
.session-heading input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: none;
  padding: 0 0 4px;
  font: inherit;
  letter-spacing: inherit;
  outline: none;
}
.session-heading input:not([readonly]):hover {
  border-bottom-color: var(--border);
}
.session-heading input:not([readonly]):focus {
  border-bottom-color: var(--accent);
}
#session-subtitle {
  margin-top: 12px;
  font-size: var(--fs-mono);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  opacity: 0.45;
}
/* Signed out, on the example lesson: building one's own starts with signing in. */
.title-group .session-nudge {
  max-width: 64ch;
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  line-height: 1.5;
}
.session-actions {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.session-gem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  background: var(--bg-2);
  transition: background 0.2s;
}
.session-gem:hover {
  background: #fff;
}
.session-gem canvas {
  width: clamp(52px, 4.2vw, 80px);
  height: clamp(52px, 4.2vw, 80px);
}
.timer {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--ink);
}
.record-wrap {
  display: inline-flex;
}
#record-btn {
  height: 100%;
  min-height: clamp(52px, 4.2vw, 80px);
  padding: 0 22px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
#record-btn:not(:disabled):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
body[data-recording="true"] #record-btn {
  background: var(--ink);
  border-color: var(--ink);
  animation: rec 1.4s ease-in-out infinite;
}
@keyframes rec {
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent);
  }
}
body[data-recording="true"] .timer {
  color: var(--accent);
  border-color: var(--accent);
}
#error {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--accent);
  color: #fff;
  font: 400 var(--fs-mono) / 1.3 var(--mono);
  letter-spacing: -0.03em;
}
.document {
  position: relative;
  background: #fff;
  min-height: 60vh;
}
.document-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px dotted var(--rule);
}
.tabs {
  display: flex;
}
.tab {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  margin-left: -1px;
  background: transparent;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s;
}
.tab:first-child {
  margin-left: 0;
}
.tab:hover {
  background: var(--bg-2);
}
.tab.active {
  background: var(--ink);
  color: #fff;
}
.document-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
#note-settings {
  position: relative;
}
#note-settings summary {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
#note-settings summary::-webkit-details-marker {
  display: none;
}
#note-settings summary:hover,
#note-settings[open] summary {
  background: var(--ink);
  color: #fff;
}
#note-settings summary .icon {
  width: 15px;
  height: 15px;
}
.settings-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  width: 340px;
  padding: 18px;
  background: var(--paper);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
}
.settings-menu h2 {
  font: 500 var(--fs-h3) / 1 var(--display);
  letter-spacing: -0.03em;
}
.settings-menu > p {
  margin: 8px 0 14px;
  font-size: 13px;
  opacity: 0.6;
}
.settings-menu label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-top: 1px dotted var(--rule);
  cursor: pointer;
}
.settings-menu strong {
  display: block;
  font-weight: 500;
}
.settings-menu small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.55;
}
.settings-menu .settings-footnote {
  margin: 10px 0 0;
  font: 400 11px/1.3 var(--mono);
  text-transform: uppercase;
  opacity: 0.45;
}
.document-content {
  max-width: 980px;
  padding: clamp(28px, 3vw, 60px) var(--g) clamp(40px, 4vw, 80px);
}
.document-label {
  font: 400 var(--fs-mono) / 1.25 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.document-content h2 {
  font: 500 var(--fs-statement) / 1 var(--display);
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.document-content h3 {
  font-size: var(--fs-caps);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 34px 0 12px;
}
.document-content p:not(.document-label) {
  font-size: clamp(15px, 1.15vw, 21px);
  line-height: 1.35;
  margin-bottom: 14px;
}
.document-content ul {
  padding-left: 20px;
  margin: 12px 0 22px;
  font-size: clamp(15px, 1.15vw, 21px);
  line-height: 1.35;
}
.document-content li {
  margin-bottom: 8px;
}
.document-content li::marker {
  color: var(--accent);
}
.document-content strong {
  font-weight: 600;
}
.equation {
  padding: 24px;
  margin: 24px 0;
  background: var(--bg-2);
  text-align: center;
  font: 500 var(--fs-statement) / 1.1 var(--display);
  letter-spacing: -0.03em;
}
.document-content ol {
  padding-left: 22px;
  margin: 12px 0 22px;
  font-size: clamp(15px, 1.15vw, 21px);
  line-height: 1.35;
}
.document-content .notes-summary {
  font-size: clamp(18px, 1.5vw, 26px) !important;
  letter-spacing: -0.02em;
  max-width: 46em;
}
.notes-glossary {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 10px 24px;
  margin: 12px 0 22px;
  font-size: clamp(15px, 1.15vw, 21px);
  line-height: 1.35;
}
.notes-glossary dt {
  font-weight: 600;
}
.notes-glossary dd {
  margin: 0;
}
.notes-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dotted var(--rule);
  font: 400 var(--fs-mono) / 1.3 var(--mono);
}
@media (max-width: 600px) {
  .notes-glossary {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .notes-glossary dd {
    margin-bottom: 10px;
  }
}
.document-content .sample-disclaimer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dotted var(--rule);
  font: 400 var(--fs-mono) / 1.3 var(--mono) !important;
  text-transform: uppercase;
  opacity: 0.45;
}
.transcript {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: clamp(17px, 1.35vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.transcript.empty {
  font-size: var(--fs-body);
  opacity: 0.45;
}
.transcript-partial {
  color: var(--accent);
}
.embellishment {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px dotted var(--rule);
}
.embellishment .document-label {
  margin-bottom: 8px;
}
.embellishment h3 {
  margin: 0 0 16px;
}
.embellishment > svg {
  width: 100%;
  display: block;
}
.embellishment > p:last-child {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 13px !important;
  opacity: 0.6;
}
.graph-grid {
  stroke: var(--border);
  fill: none;
  stroke-width: 1;
}
.graph-axis {
  stroke: var(--ink);
  fill: none;
  stroke-width: 1;
}
.graph-line {
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.5;
}
.graph-labels {
  font: 10px var(--mono);
  fill: var(--ink);
}
.energy-diagram {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 18px;
  background: var(--bg-2);
  text-align: center;
}
.energy-diagram > div {
  flex: 1;
}
.energy-diagram span,
.energy-diagram small {
  display: block;
  font: 400 11px/1.3 var(--mono);
  text-transform: uppercase;
  opacity: 0.6;
}
.energy-diagram strong {
  display: block;
  margin: 10px 0;
  font: 500 var(--fs-h3) / 1 var(--display);
  letter-spacing: -0.03em;
}
.energy-diagram .energy-arrow {
  font-size: 28px;
  color: var(--accent);
  opacity: 1;
}
.embellishment-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.spring-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}
.spring-mass {
  fill: var(--accent);
}
.simulation-controls {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-top: 14px;
}
.simulation-controls label {
  flex: 1;
  font: 400 12px/1.3 var(--mono);
  text-transform: uppercase;
}
.simulation-controls output {
  float: right;
}
.simulation-controls input {
  display: block;
  margin-top: 11px;
}
.period {
  min-width: 85px;
  text-align: right;
}
.period span {
  display: block;
  font: 400 11px/1.3 var(--mono);
  text-transform: uppercase;
  opacity: 0.6;
}
.period strong {
  font: 500 var(--fs-h3) / 1 var(--display);
}
.model-placeholder {
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px dotted var(--rule);
}

/* ---------- dialogs and toast ---------- */
dialog {
  width: min(460px, calc(100% - 32px));
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.5);
}
dialog[open] {
  animation: dialog-in 0.4s var(--ease);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
dialog::backdrop {
  background: rgba(232, 232, 232, 0.75);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
:is(#rename-dialog, #delete-dialog, #folder-dialog, #folder-delete-dialog) h2 {
  font: 500 var(--fs-statement) / 1 var(--display);
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
:is(#rename-dialog, #delete-dialog, #folder-dialog, #folder-delete-dialog) label {
  display: block;
  margin-bottom: 10px;
  font: 400 var(--fs-mono) / 1 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
:is(#rename-dialog, #delete-dialog, #folder-dialog, #folder-delete-dialog) p {
  line-height: 1.2;
  overflow-wrap: anywhere;
}
:is(#rename-dialog, #delete-dialog, #folder-dialog, #folder-delete-dialog) strong {
  font-weight: 600;
}
#rename-dialog input,
#folder-dialog input {
  width: 100%;
  padding: 6px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font: 500 var(--fs-h3) / 1.1 var(--display);
  letter-spacing: -0.03em;
  outline: none;
}
#rename-dialog input:focus,
#folder-dialog input:focus {
  border-bottom-color: var(--accent);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 26px;
}
.toast {
  position: fixed;
  left: var(--g);
  bottom: var(--g);
  z-index: 120;
  max-width: min(90vw, 520px);
  padding: 14px 16px;
  background: var(--ink);
  color: #fff;
  font: 400 var(--fs-mono) / 1.3 var(--mono);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.4s var(--ease);
}
.toast::before {
  content: "◆ ";
  color: var(--accent);
}
.toast.visible {
  opacity: 1;
  transform: none;
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .vault-chip {
    display: none;
  }
  .display.indent {
    text-indent: clamp(84px, 22vw, 200px);
  }
  .site-header {
    padding-top: 12px;
  }
  .pill-nav-items {
    display: none;
  }
  .pill-burger {
    display: grid;
  }
  .dash {
    padding-top: calc(12px + 42px + 40px);
  }
  .quick-actions {
    grid-template-columns: 1fr;
  }
  .quick-action {
    min-height: 140px;
  }
  .folders {
    gap: 130px 16px;
  }
  .file-open {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .file-gem canvas {
    width: 36px;
    height: 36px;
  }
  .file-meta {
    display: none;
  }
  .file-move select {
    max-width: 120px;
  }
  .gem-tray-read {
    flex-basis: 100%;
    text-align: left;
  }
  .row-labels {
    display: none;
  }
  .lesson-row .session-open {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas: "gem title go" "gem meta meta";
    row-gap: 6px;
  }
  .lr-no,
  .lr-len,
  .lr-date {
    display: none;
  }
  .lr-gem {
    grid-area: gem;
    width: 56px;
    height: 56px;
  }
  .lr-title {
    grid-area: title;
  }
  .lr-subject {
    grid-area: meta;
    font-size: 11px;
  }
  .lr-tier {
    display: none;
  }
  .lr-go {
    grid-area: go;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
  .page-top .display {
    max-width: none;
  }
  .page-sub {
    max-width: none;
    margin-left: 0;
  }
  .new-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .new-preview {
    position: relative;
    top: auto;
    order: -1;
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px;
  }
  .new-gem {
    aspect-ratio: 1;
  }
  .new-preview p {
    flex-direction: column;
    gap: 4px;
  }
  .source-grid {
    grid-template-columns: 1fr;
  }
  .source-card {
    min-height: 0;
  }
  .launch-summary > div {
    grid-template-columns: 90px 1fr;
  }
  .member-card {
    position: relative;
    top: auto;
    max-width: 420px;
  }
  .stat-rows.compact li {
    grid-template-columns: 24px 1fr auto;
  }
  .set-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .session-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .session-actions {
    flex-wrap: wrap;
  }
  .document-toolbar {
    flex-wrap: wrap;
  }
  .tab {
    padding: 0 10px;
  }
  #note-settings summary > span {
    display: none;
  }
  .settings-menu {
    right: -40px;
    width: min(340px, calc(100vw - 32px));
  }
}
@media (max-width: 520px) {
  .filter-chips button {
    padding: 0 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
