
@font-face { font-family: Geist; src: url('/assets/geist-variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/geist-mono-variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #07070b; --bg-sunken: #050508; --surface-1: #0c0c12; --surface-2: #111118; --surface-3: #17171f; --sidebar-bg: #09090e;
  --hover: #111118; --pressed: #17171f;
  --border-subtle: #1b1b23; --border: #272731; --border-strong: #363642; --border-focus: #c4b5ff;
  /* Controls carry their own edge: #686874 is the lowest value that holds 3:1 (WCAG 2.2 SC 1.4.11)
     against every surface in the ladder, bg through --surface-3. Grouping borders above are not
     controls and stay quiet on purpose. */
  --border-control: #686874;
  --text-1: #ffffff; --text-2: #b3b0c4; --text-3: #8a87a0;
  --accent: #703efc; --accent-fill: #703efc; --accent-hover: #5e2ee6; --accent-bright: #9d7dff; --accent-text: #c4b5ff; --accent-soft: rgba(112,62,252,.14); --accent-line: rgba(112,62,252,.4); --accent-glow: rgba(112,62,252,0);
  --ok: #43c98d; --ok-soft: rgba(67,201,141,.12); --ok-line: rgba(67,201,141,.3); --ok-glow: rgba(67,201,141,0);
  --warn: #e7b24f; --gold: #e7b24f; --sky: #3ddae9; --accent-surface: #150d2c; --warn-soft: rgba(231,178,79,.12); --warn-line: rgba(231,178,79,.3); --warn-glow: rgba(231,178,79,0);
  --bad: #f07272; --bad-soft: rgba(240,114,114,.12); --bad-line: rgba(240,114,114,.3); --bad-glow: rgba(240,114,114,0);
  --sale: #ff5c8a; --sale-text: #ff8fb0; --sale-ink: #1d0610; --sale-surface: #1f0b14; --sale-line: #5c2138;
  --info: #6cb3f7; --info-soft: rgba(108,179,247,.11); --info-line: rgba(108,179,247,.28); --info-glow: rgba(108,179,247,0);
  --neutral-soft: rgba(236,235,244,.055); --neutral-glow: rgba(255,255,255,0);
  --stripe: #8f8cff; --stripe-soft: rgba(143,140,255,.12); --discord: #5865F2; --discord-soft: rgba(88,101,242,.14);
  --chart-1: #c4b5ff; --chart-2: #703efc; --chart-down: #f07272;
  /* The running-total line and the solid, opaque violet under it. */
  --chart-line: #3ddae9; --chart-fill: #0b2a30; --presence-online: #23a55a; --presence-idle: #f0b232; --presence-dnd: #f23f43;
  /* Opaque tinted surfaces for tone tiles, the same idea as --accent-surface. */
  --ok-surface: #0c1a14; --warn-surface: #1b160b; --bad-surface: #1d0f11; --info-surface: #0c1522;
  --lean: 62.5deg; --skew: -27.5deg;
  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13px; --fs-md: 13.5px; --fs-lg: 15px; --fs-xl: 18px; --fs-2xl: 20px;
  --lh-tight: 1.15; --lh: 1.5;
  --font: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --s1: 4px; --s2: 6px; --s3: 10px; --s4: 12px; --s5: 16px; --s6: 20px; --s7: 24px; --s8: 32px; --s9: 40px;
  --r-tag: 4px; --r-control: 6px; --r-panel: 8px; --r-dialog: 12px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .28);
  --shadow-2: 0 8px 24px rgb(0 0 0 / .28);
  /* Motion explains a state change and nothing else: 120-220ms for ordinary UI, up to 320ms for larger contextual moves. */
  --ease: cubic-bezier(.2,.8,.2,1); --ease-out: cubic-bezier(.2,.8,.2,1); --ease-exit: cubic-bezier(.4,0,1,1); --d1: 100ms; --d2: 160ms; --d3: 200ms; --d4: 220ms;
  --z-sticky: 20; --z-menu: 40; --z-overlay: 60; --z-toast: 80;
  --sidebar: 208px; --w-page: 2000px; --w-read: 760px; --appbar: 49px;
  --control-sm: 26px; --control: 30px; --control-lg: 34px;
  font-family: var(--font); font-size: var(--fs-base); line-height: var(--lh); font-synthesis: none; letter-spacing: 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
*, *::before, *::after { box-sizing: border-box; }
/* The scrollbar’s room stays reserved when a page stops scrolling, so a short list never widens everything by its width. */
/* No reserved scrollbar strip: an empty one showed as a black band down the right edge of pages that do not scroll. */
html { background: var(--bg); min-width: 320px; }
body { margin: 0; min-height: 100vh; color: var(--text-1); background: var(--bg); }
/* Signal: no ambient light. The ground is flat Ink; hierarchy comes from surfaces and rules. */
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
/* Browsers draw headings and <strong> at 700; Lance’s type is lighter. Components still set their own weight. */
h1, h2, h3, h4 { font-weight: 520; }
strong, b { font-weight: 560; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; color: inherit; }
img { max-width: 100%; }
/* Focus is an outline, not a shadow: cards and buttons draw their own shadows, and an outline can never be cancelled by them. */
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
/* An anchored panel never lands under the sticky app bar, so focus is never hidden (playbook section 20). */
[id] { scroll-margin-top: calc(var(--appbar) + var(--s4)); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
.palette-input input:focus-visible { outline: none; }
::selection { background: rgba(112,62,252,.4); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); } .soft { color: var(--text-2); }
.small { font-size: var(--fs-sm); } .xsmall { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s3); top: -60px; z-index: var(--z-toast); padding: 10px 14px; border-radius: var(--r-control); background: var(--accent-fill); color: #fff; font-weight: 470; text-decoration: none; transition: top var(--d2) var(--ease); }
.skip-link:focus { top: var(--s3); }
[hidden] { display: none !important; }
/* A native dropdown list is drawn by the browser from its options. With a see-through select (the editor toolbar) Windows
   paints the list white under light text, so every option gets the app's own surface and text colour. */
select option, select optgroup { background-color: var(--surface-2); color: var(--text-1); }
select option:checked { background-color: var(--surface-3); }
html:not(.js) .js-only { display: none !important; }
html.js .no-js { display: none !important; }
/* One column that never grows past the page: a wide table scrolls inside its own panel instead of widening it. */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-content: start; }
.stack-lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); align-content: start; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.icon { flex: none; width: 16px; height: 16px; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--s5); padding: var(--s6) var(--s4) var(--s4); border-right: 1px solid var(--border); background: var(--sidebar-bg); overflow-y: auto; scrollbar-width: thin; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 28px; padding: 0 var(--s2); }
.brand-row img { display: block; width: 88px; height: auto; }
/* Test mode: a plain tag, the word and one amber dot. No tint, so it reads as a fact, not an alarm. */
.env { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-2); background: none; font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.env::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.jump { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 30px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-1); color: var(--text-3); font-size: var(--fs-sm); text-align: left; cursor: pointer; transition: border-color var(--d1) var(--ease), color var(--d1) var(--ease), background var(--d1) var(--ease); }
.jump:hover { border-color: var(--border-strong); color: var(--text-2); background: var(--hover); }
.jump svg { width: 14px; height: 14px; }
.jump kbd { margin-left: auto; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-tag); color: var(--text-3); font-family: var(--font); font-size: 11px; font-weight: 470; }
.nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.nav-group { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) var(--s2) var(--s1); color: var(--text-3); font-size: var(--fs-sm); font-weight: 500; }
.nav-group::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.nav:not(.nav-settings) .nav-group { margin-top: 0; }
.nav a { position: relative; display: flex; align-items: center; gap: 9px; min-height: 28px; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--r-control); color: var(--text-1); font-size: var(--fs-sm); font-weight: 450; text-decoration: none; transition: background var(--d1) var(--ease), color var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.nav a:hover { color: var(--text-1); background: var(--hover); }
.nav a[aria-current="page"] { color: var(--text-1); border-color: var(--border); background: var(--surface-2); }
/* The selected item carries the Lance chip: a 10x4 parallelogram at the verified 62.5° lean, sitting in the gutter. */
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -13px; top: 50%; width: 10px; height: 4px; margin-top: -2px; background: var(--accent); transform: skewX(var(--skew)); }
.nav svg { flex: none; width: 15px; height: 15px; color: var(--text-3); transition: color var(--d1) var(--ease); }
.nav a:hover svg { color: var(--text-2); }
.nav a[aria-current="page"] svg { color: var(--accent-text); }
/* Something new to look at (an unread message, a member or payment to check): just the number, in a soft red. No box. */
.nav .count { margin-left: auto; min-width: 16px; padding: 0; color: #f4a0a0; background: none; font-size: 12px; font-weight: 600; line-height: 16px; text-align: right; font-variant-numeric: tabular-nums; }
/* Settings sits at the foot of the sidebar, directly above the viewer; the plan keeps its gold star. */
.nav-settings { margin-top: auto; }
.nav-settings + .sidebar-foot { margin-top: 0; }
.nav-settings .nav-group { margin-top: 0; }
.nav .nav-plan svg, .nav .nav-plan:hover svg, .nav .nav-plan[aria-current="page"] svg { color: var(--gold); }
/* Affiliate is money coming in: its mark is green wherever the link appears. */
.nav .nav-affiliate svg, .nav .nav-affiliate:hover svg, .nav .nav-affiliate[aria-current="page"] svg { color: var(--ok); }
.nav .nav-globe svg, .nav .nav-globe:hover svg, .nav .nav-globe[aria-current="page"] svg { color: var(--sky); }
.nav a.nav-globe { color: var(--text-1); }
/* Something broken: the same number in the full red. */
.nav .count.bad { color: var(--bad); font-weight: 700; }
/* All communities carries a disclosure arrow on its own row: the link opens the picker page, the arrow lists the
   viewer’s communities beneath it as an indented branch. */
.nav-tree { position: relative; min-width: 0; }
.nav-tree > a { padding-right: 40px; }
.nav-sub > summary { list-style: none; position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-control); color: var(--text-3); cursor: pointer; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.nav-sub > summary::-webkit-details-marker { display: none; }
.nav-sub > summary:hover { color: var(--text-1); background: var(--hover); }
.nav .nav-sub > summary svg { width: 14px; height: 14px; color: inherit; transform: rotate(-90deg); transition: transform var(--d2) var(--ease); }
.nav .nav-sub[open] > summary svg { transform: none; }
.nav-sub-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; max-height: 300px; margin: 2px 0 var(--s1) 17px; padding-left: var(--s2); border-left: 1px solid var(--border); overflow-y: auto; scrollbar-width: thin; }
.nav .nav-sub-list a { gap: 9px; padding: 4px 8px; font-weight: 400; }
.nav-sub-list a > span:not(.avatar) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub-list a:focus-visible { outline-offset: -2px; }
.nav-sub-list a[aria-current="true"] { color: var(--text-1); background: var(--surface-2); }
.nav-sub-list .avatar.sm { width: 20px; height: 20px; font-size: 10px; }
.sidebar-foot { margin-top: auto; display: grid; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 var(--s1); }
.who-account { display: flex; align-items: center; flex: 1; gap: 9px; min-width: 0; min-height: 44px; padding: var(--s1); border-radius: var(--r-control); text-decoration: none; }
.who-account:hover, .who-account:focus-visible { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.who-account[aria-current="page"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.who-meta { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.who-meta strong { overflow: hidden; font-size: var(--fs-sm); font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.who-meta span { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.import-spinner { display:inline-block; width:16px; height:16px; margin-right:8px; vertical-align:-2px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:import-spin 1s linear infinite; }
@keyframes import-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .import-spinner { animation:none; } }
/* Community switcher: native disclosure; the script adds search, keyboard movement, and outside-click close. */
.switcher { position: relative; }
/* The community switcher sits sunken into the sidebar: a darker well with the faintest border, firmer on hover. */
.switcher > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: var(--s3) var(--s3) var(--s3) var(--s3); border: 1px solid var(--border-subtle); border-radius: var(--r-panel); background: var(--bg-sunken); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.switcher > summary::-webkit-details-marker { display: none; }
.switcher > summary:hover { border-color: var(--border); }
.switcher[open] > summary { border-color: var(--border); }
.switcher-text { display: grid; flex: 1; gap: 3px; min-width: 0; line-height: 1.3; }
.switcher > summary > .avatar { width: 28px; height: 28px; border-radius: var(--r-panel); font-size: 14px; }
.switcher-text strong { display: -webkit-box; overflow: hidden; font-size: var(--fs-sm); font-weight: 470; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* No community chosen yet: the prompt and the count, split by a rule. */
/* Same height with or without a community open, so the navigation below never shifts when switching. */
.switcher-text span { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.switcher .chevron { flex: none; width: 14px; height: 14px; color: var(--text-3); transition: transform var(--d2) var(--ease); }
.switcher[open] .chevron { transform: rotate(180deg); }
.menu { position: absolute; z-index: var(--z-menu); left: 0; right: 0; top: calc(100% + 6px); display: grid; gap: 2px; padding: 6px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-3); box-shadow: var(--shadow-2); transform-origin: top center; animation: menu-in var(--d2) var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
.menu-search { margin-bottom: 4px; }
.menu-search input { min-height: var(--control-sm); }
.menu-list { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.menu a { display: flex; align-items: center; gap: 10px; min-height: var(--control); padding: 6px 8px; border-radius: var(--r-control); color: var(--text-2); text-decoration: none; transition: background var(--d1) var(--ease); }
.menu a:hover, .menu a:focus-visible { color: var(--text-1); background: var(--hover); }
.menu a[aria-current="true"] { color: var(--text-1); background: var(--pressed); box-shadow: inset 2px 0 0 var(--accent); }
.menu a[aria-current="true"] > .icon { color: var(--accent-text); }
.menu .item-text { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.menu .item-text strong { overflow: hidden; font-size: var(--fs-sm); font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.menu .item-text span { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--fs-xs); }
.menu-foot { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--border); }
.menu-foot a { min-height: 36px; color: var(--accent-text); font-size: var(--fs-sm); }
.menu-foot a.menu-all { color: var(--text-1); }
.menu-foot a.menu-all svg { color: var(--accent-text); }
.menu-empty { padding: 10px 8px; color: var(--text-3); font-size: var(--fs-sm); }

.avatar { position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-control); color: var(--avatar-fg, var(--accent-text)); background: var(--avatar-bg, color-mix(in srgb, #703efc 16%, #121218)); font-size: 13px; font-weight: 470; overflow: hidden; }
/* The initial stays underneath, so a stale or blocked image still leaves a readable avatar. */
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Nobody’s name is known: a person mark instead of the first letter of a placeholder. */
.avatar > svg { width: 58%; height: 58%; }
.avatar.round { border-radius: 50%; }

.avatar.sm { width: 26px; height: 26px; border-radius: var(--r-tag); font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; border-radius: var(--r-panel); font-size: 15px; }
.avatar.xl { width: 52px; height: 52px; border-radius: var(--r-dialog); font-size: 20px; }
.avatar.round.lg, .avatar.round.sm, .avatar.round.xl { border-radius: 50%; }
.hue-0 { --avatar-bg: color-mix(in srgb, #703efc 16%, #121218); --avatar-fg: #cbbcff; }
.hue-1 { --avatar-bg: color-mix(in srgb, #58a6ff 16%, #121218); --avatar-fg: #a9d2ff; }
.hue-2 { --avatar-bg: color-mix(in srgb, #43c98d 16%, #121218); --avatar-fg: #93e6c0; }
.hue-3 { --avatar-bg: color-mix(in srgb, #e7b24f 16%, #121218); --avatar-fg: #f3d496; }
.hue-4 { --avatar-bg: color-mix(in srgb, #ec6ead 16%, #121218); --avatar-fg: #f6b3d4; }
.hue-5 { --avatar-bg: color-mix(in srgb, #5ed3d3 16%, #121218); --avatar-fg: #a3ebeb; }
.state-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.state-dot.ok { background: var(--ok); } .state-dot.warn { background: var(--warn); } .state-dot.bad { background: var(--bad); } .state-dot.info { background: var(--info); } .state-dot.accent { background: var(--accent); }

/* Status dot: a plain solid dot in the state’s colour, beside the word that says the state. No halo or glow. */
.orb { position: relative; flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.orb.sm { width: 7px; height: 7px; }
.orb.lg { width: 10px; height: 10px; }
.orb.ok { background: var(--ok); }
.orb.warn { background: var(--warn); }
.orb.bad { background: var(--bad); }
.orb.info { background: var(--info); }
.orb.accent { background: var(--accent); }

/* App bar: the sticky strip over every page. Breadcrumb context on the left, search and mode on the right. */
/* Home, the first page everyone sees: a deep violet glow behind the logo with a Lance blue and a brighter violet light
   drifting inside it, across the sidebar too. It sits behind everything (cards stay opaque; the sidebar is see-through
   on this page only). The glow is centred on the content column: each glow box is twice the content column’s width and
   centred on it (overhanging the right edge, which is clipped), so the gradients can use plain percentages. Browsers
   reject calc() inside a gradient’s size. */
.app[data-section="communities"] { --glow-offset: 0px; position: relative; isolation: isolate; grid-template-columns: minmax(0, 1fr); overflow: clip; }
.app[data-section="communities"]::before, .app[data-section="communities"]::after { content: ""; position: absolute; left: calc(var(--glow-offset) * 1.5 - 50%); top: 0; z-index: -1; width: calc(200% - var(--glow-offset) * 2); pointer-events: none; transform-origin: 50% 220px; }
.app[data-section="communities"]::before { height: 1260px; background: radial-gradient(66% 1040px at 50% 220px, #1c0d46 0%, #140a31 24%, #0e081f 48%, #090712 72%, rgba(7, 7, 11, 0) 100%); animation: glow-breathe 14s ease-in-out infinite alternate; }
/* The same quiet violet and blue lights as before, now wandering slowly around the logo instead of sitting still. */
.app[data-section="communities"]::after { height: 1000px; background: radial-gradient(closest-side, rgba(61, 218, 233, .15), rgba(61, 218, 233, .05) 46%, rgba(61, 218, 233, 0)) 0 0 / 26% 80% no-repeat, radial-gradient(closest-side, rgba(112, 62, 252, .26), rgba(84, 40, 200, .09) 44%, rgba(84, 40, 200, 0)) 0 0 / 32% 92% no-repeat; background-position: 62% 8%, 38% 0%; animation: home-aura 20s ease-in-out infinite alternate; }
@keyframes glow-breathe { from { opacity: .7; transform: scale(1); } to { opacity: 1; transform: scale(1.1); } }
@keyframes home-aura {
  0% { background-position: 62% 8%, 38% 0%; }
  33% { background-position: 44% 26%, 58% 10%; }
  66% { background-position: 34% 4%, 66% 30%; }
  100% { background-position: 56% 34%, 42% 14%; }
}

/* The main column fills the viewport height so the legal footer sits at the bottom of short pages too. */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--s3); min-height: var(--appbar); padding: 8px var(--s7); border-bottom: 1px solid var(--border); background: var(--bg); }
.topbar .brand { display: none; }
.topbar .brand img { display: block; width: 78px; height: auto; }
.topbar .where { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; color: var(--text-3); font-size: var(--fs-sm); }
.topbar .where .avatar { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.topbar .where a { overflow: hidden; color: var(--text-2); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.topbar .where a:hover { color: var(--text-1); }
.topbar .where .sep { opacity: .45; }
.topbar .where strong { overflow: hidden; color: var(--text-1); font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.lede-line { font-size: var(--fs-sm); }
@media (min-width: 901px) { .lede-line { white-space: nowrap; } }
.topbar .where .crumb-trail { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .where .crumb-section { flex: none; }
/* Desktop: the page you are on keeps its name; a long community name gives way first. */
@media (min-width: 1101px) { .topbar .where > strong { flex: none; } }
.topbar .jump { width: 280px; flex: none; }
.topbar .tools { display: flex; align-items: center; gap: var(--s2); }
.main-inner { display: flex; flex: 1 0 auto; flex-direction: column; width: min(100%, var(--w-page)); margin: 0 auto; padding: var(--s7) var(--s7) var(--s7); }
.page-body { flex: 1 0 auto; min-width: 0; }
.page-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s9); padding-top: var(--s4); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-xs); }
.page-foot a { text-decoration: none; } .page-foot a:hover { color: var(--text-2); }
.page-foot .made { margin-left: auto; }
.made { display: inline-flex; align-items: center; gap: 8px; }
.made .mark { display: block; width: 14px; height: auto; opacity: .85; }
.made-by { white-space: nowrap; }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); margin-bottom: var(--s6); }
.page-head > .page-actions { min-width: 0; max-width: 100%; }
/* A rule under the title, the way the Dashboard header has one. */
.page-head.ruled { padding-bottom: var(--s4); border-bottom: 1px solid var(--border); }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control); padding: 0 10px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-1); font-size: var(--fs-sm); text-decoration: none; }
.filter-chip:hover { border-color: var(--border-focus); }
.filter-chip > svg { width: 14px; height: 14px; color: var(--text-3); }
.page-title { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: var(--s2); color: var(--text-3); font-size: var(--fs-sm); }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text-2); }
.crumbs .sep { opacity: .5; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--s2); color: var(--accent-text); font-size: 12px; font-weight: 470; }
.page-head h1 { font-size: var(--fs-xl); font-weight: 470; line-height: var(--lh-tight); letter-spacing: -.03em; overflow-wrap: anywhere; text-wrap: balance; }
.page-head .lede { max-width: 640px; margin-top: 8px; color: var(--text-2); }
.page-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; }
/* On a phone the primary action leads, full width; the secondary ones follow underneath. */
@media (max-width: 560px) { .page-actions > .btn-primary { order: -1; flex-basis: 100%; justify-content: center; } }
.head-identity { display: flex; align-items: center; gap: var(--s4); min-width: 0; }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--control); padding: 5px 12px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-2); color: var(--text-1); font-size: var(--fs-sm); font-weight: 470; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--d1) var(--ease), border-color var(--d1) var(--ease), color var(--d1) var(--ease), transform var(--d1) var(--ease), box-shadow var(--d2) var(--ease); }
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent-fill); border-color: transparent; box-shadow: none; color: #fff; overflow: hidden; }
.btn-primary:hover { background: var(--accent-hover); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); border-color: transparent; color: var(--text-1); }
.btn-danger { background: transparent; border-color: var(--bad-line); box-shadow: none; color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad-line); }
.btn-sm { min-height: var(--control-sm); padding: 3px 9px; font-size: var(--fs-xs); }
.btn-icon { width: var(--control-sm); min-height: var(--control-sm); padding: 0; }
.btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"] svg { opacity: 0; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@keyframes spin { to { transform: rotate(360deg); } }
form.inline { display: inline-flex; margin: 0; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.discord-btn { background: #5865f2; border-color: transparent; box-shadow: none; color: #fff; }
.discord-btn:hover { background-color: #4752c4; }

/* ---------- Status badges: one semantic system ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 1px 8px; border: 1px solid transparent; border-radius: var(--r-tag); color: var(--text-2); background: var(--neutral-soft); font-size: var(--fs-xs); font-weight: 470; white-space: nowrap; }
.badge::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
/* A status is a dot and a word, with no box and no tint around it. The dot carries the colour; the word turns amber or
   red only when someone needs to act or something failed, so a calm page reads calm and a problem stands out. */
.badge.ok, .badge.warn, .badge.bad, .badge.info { min-height: 0; padding: 0; border: 0; background: none; }
/* In a table a status is a dot and a word whatever its tone, so a neutral one lines up with its toned neighbours. */
table.data td .badge:not(.plain):not(.accent) { min-height: 0; padding: 0; border: 0; background: none; }
table.data td .badge:not(.plain):not(.accent):not(.ok):not(.warn):not(.bad):not(.info)::before { background: var(--text-3); }
.badge.ok, .badge.info { color: var(--text-1); }
.badge.ok::before { background: var(--ok); }
.badge.info::before { background: var(--info); }
.badge.warn { color: var(--warn); }
.badge.bad { color: var(--bad); }
/* The same rule for every state drawn as a dot and a word. */
:is(.acct-tile-state, .conn-state, .creator-review-state, .review-item-state, .review-state, .fd-state, .home-card-state):has(.state-dot.warn, .orb.warn) { color: var(--warn); }
:is(.acct-tile-state, .conn-state, .creator-review-state, .review-item-state, .review-state, .fd-state, .home-card-state):has(.state-dot.bad, .orb.bad) { color: var(--bad); }
.badge.accent { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-line); }
.badge.pending::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- Panels (cards) ---------- */
.panel { position: relative; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
.page-body > .panel + .panel { margin-top: var(--s4); }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s3); padding: var(--s4) var(--s5) var(--s3); }
.panel-heading { flex: 1 1 200px; min-width: 0; }
/* Beside its icon a heading may get narrow before it moves to its own line, so the icon never sits alone above it. */
.panel-icon + .panel-heading { flex-basis: 120px; }
.panel-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 470; line-height: 1.3; letter-spacing: -.012em; }
.panel-head p { margin-top: 3px; color: var(--text-3); font-size: var(--fs-sm); }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
/* A panel titled without a line under it keeps its title and actions on one centre line; a ghost action at the end lines its text up with the panel edge. */
.panel-head:not(:has(.panel-heading > p)) { align-items: center; }
/* Every one-line panel title sits on the same height whether or not the panel has a button or picker beside it, so titles in a row of panels line up. */
.panel-head:not(:has(.panel-heading > p)) .panel-heading { display: flex; align-items: center; min-height: var(--control); }
.row-item > .btn-ghost:last-child { margin-right: -10px; }
.panel-actions > .btn-ghost:last-child { margin-right: -10px; }
.panel-icon { display: grid; place-items: center; flex: none; width: 16px; height: 16px; color: var(--text-3); }
.panel-icon svg { width: 16px; height: 16px; }
.panel-icon.warn { color: var(--warn); } .panel-icon.bad { color: var(--bad); }
.panel-body { padding: 0 var(--s5) var(--s5); }
.panel > .panel-body:first-child { padding-top: var(--s5); }
.panel-body.flush, .panel > .panel-body.flush:first-child { padding: 0; }
.panel-foot { padding: var(--s3) var(--s5); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-xs); }
/* The panel a task is currently on: a violet rule, no glow. */
.panel.current { border-color: var(--accent-line); }
.section-label { display: flex; align-items: center; gap: var(--s2); margin: var(--s7) 0 var(--s3); color: var(--text-2); font-size: var(--fs-sm); font-weight: 470; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.grid-halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.grid-thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.grid-gap { margin-top: var(--s4); }

/* ---------- KPI cards ---------- */
/* A heading that separates one band of a page from the next without wrapping it in a card. */
.section-head { margin: var(--s6) 0 var(--s3); }
.section-head h2 { font-size: var(--fs-md); font-weight: 470; letter-spacing: -.01em; }
/* Paid Access Plans: the heading, a rule, then the create action on its own line. */
.plans-head h2 { padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.plans-foot { display: flex; margin-top: var(--s3); }
.overview-after { margin-top: var(--s4); }
.section-head.period-head { margin-top: var(--s8); }
table.data th.end, table.data td.end { text-align: right; }
/* Sortable headers: the label is a button; the mark shows the resting, ascending or descending state. */
.th-sort { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.th-sort:hover, th[data-sort-dir] .th-sort { color: var(--text-1); }
/* The mark: an arrow for the direction, then the key’s priority once more than one column is sorting. */
.sort-mark { display: inline-flex; align-items: center; gap: 1px; min-width: 8px; color: var(--accent-text); font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1; }
th[data-sort]:not([data-sort-dir]) .sort-mark::before { content: "↕"; color: var(--text-3); opacity: .45; }
th[data-sort-dir="ascending"] .sort-mark::before { content: "↑"; }
th[data-sort-dir="descending"] .sort-mark::before { content: "↓"; }
table.data th.num .th-sort { flex-direction: row-reverse; }
/* Dashboard, under the Sales chart: three blocks that read alike. Each has the same heading (a mark and its name), the
   same large number under it, and its detail below, all lined up on the heading's left edge, with no box around them.
   Memberships sold takes the left, for each membership's picture and a bar for its share; the monthly total and the
   members stack on the right. On a narrower screen it takes the whole width and the other two sit side by side under
   it; on a phone all three stack. */
.analytics-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s7) var(--s9); align-items: start; padding-block: 0; }
/* Memberships sold runs down the left; the monthly total and the members stack on the right beside it, so neither side
   leaves an empty column under a single number. */
.analytics-row > #sold { grid-row: span 2; }
.analytics-row > * { min-width: 0; }
.analytics-row .panel { height: auto; margin: 0; border: 0; background: none; box-shadow: none; }
.analytics-row .panel-head { align-items: center; min-height: 30px; padding: 0; }
.analytics-row .panel-head h2 { font-size: var(--fs-lg); font-weight: 550; letter-spacing: -.015em; }
.analytics-row .panel-icon { color: var(--text-3); }
.analytics-row .panel-body, .analytics-row .mrr-panel .panel-body { display: block; min-height: 0; padding: var(--s4) 0 0; text-align: left; }
.stack > #trend > .chart-panel { margin-bottom: 0; }
/* The three numbers share one size, weight and line, so they sit level across the row. */
.analytics-row .sold-total strong, .analytics-row .mrr-value, .analytics-row .paid-value { font-size: 32px; font-weight: 470; letter-spacing: -.04em; line-height: 1.05; }
.analytics-row .sold-total span, .analytics-row .mrr-value .unit { font-size: var(--fs-md); }
.analytics-row .sold-list { gap: var(--s4); margin-top: var(--s5); max-height: 300px; overflow-y: auto; }
.analytics-row .sold-item { grid-template-columns: 40px minmax(0, 1fr); gap: var(--s4); }
.analytics-row .sold-item .m-photo { width: 40px; height: 40px; font-size: 14px; }
.analytics-row .sold-range select { min-width: 0; }
.analytics-row .sold-list:empty { display: none; }
.paid-value { display: block; width: fit-content; color: var(--text-1); font-size: 30px; font-weight: 470; letter-spacing: -.04em; line-height: 1.05; text-decoration: none; }
.paid-value:hover { color: var(--ok); }
/* The count and the newest paid members' faces on one line; the faces open the paid list too. */
.paid-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.paid-faces { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-2); text-decoration: none; }
.paid-faces .avatar-stack .avatar { width: 30px; height: 30px; border-color: var(--bg); font-size: 12px; transition: transform var(--d2) var(--ease); }
.paid-faces .avatar-stack .avatar + .avatar { margin-left: -9px; }
.paid-faces:hover .avatar-stack .avatar { transform: translateY(-2px); }
.paid-more { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-sm); font-weight: 470; }
.paid-faces:hover .paid-more { border-color: var(--ok); color: var(--text-1); }
.paid-faces:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; border-radius: var(--r-pill); }
@media (max-width: 900px) { .analytics-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .analytics-row > #sold { grid-column: 1 / -1; grid-row: auto; } }
@media (max-width: 560px) { .analytics-row { grid-template-columns: minmax(0, 1fr); } }
.sold-range { display: flex; align-items: center; gap: var(--s2); }
.sold-range select { field-sizing: content; width: auto; min-width: 0; min-height: var(--control-sm); padding: 5px 22px 5px 10px; border-color: transparent; background-color: transparent; background-position: right 6px center; font-size: 12px; }
.sold-range select:hover:not(:focus-visible) { border-color: transparent; color: var(--text-1); }
.sold-total { display: flex; align-items: baseline; gap: var(--s2); }
.sold-total strong { font-size: 23px; font-weight: 470; letter-spacing: -.03em; }
.sold-total span { color: var(--text-3); font-size: var(--fs-sm); }
.sold-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.sold-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); font-size: var(--fs-sm); }
.sold-name { overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.sold-bar { display: block; height: 6px; margin-top: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.sold-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent-bright); }
.sold-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s4); align-items: center; }
.sold-item .m-photo { width: 48px; height: 48px; font-size: 15px; }
.mrr-panel .panel-body { display: grid; align-content: center; min-height: 160px; }
.mrr-value { font-size: 26px; font-weight: 470; letter-spacing: -.035em; line-height: 1.1; }
.mrr-value .unit { margin-left: 4px; color: var(--text-3); font-size: 14px; letter-spacing: 0; }
.mrr-note { margin-top: var(--s2); color: var(--text-3); font-size: var(--fs-sm); }
.mrr-note strong { color: var(--text-1); font-weight: 470; }
.stack-tight { display: grid; gap: 2px; min-width: 0; }
/* A badge in a stacked cell keeps its own width instead of stretching across the column. */
.stack-tight > .badge { justify-self: start; }
/* A summary of key numbers, separated by rules rather than boxed into cards (playbook section 3 and 9). */
.figures { display: flex; flex-wrap: wrap; margin-bottom: 32px; padding-top: 14px; border-top: 1px solid var(--border); }
.figure { flex: 1 1 190px; min-width: 0; padding: 4px 24px 18px 0; }
.figure + .figure { padding-left: 24px; border-left: 1px solid var(--border-subtle); }
.figure a { display: block; text-decoration: none; }
.figure dt { color: var(--text-3); font-size: 12px; font-weight: 470; }
.figure dd { margin: 0; }
.figure-value { margin-top: 6px; color: var(--text-1); font-size: 16px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.figure-value .unit { margin-left: 3px; color: var(--text-3); font-size: var(--fs-sm); font-weight: 470; letter-spacing: 0; }
.figure-value.warn { color: var(--warn); } .figure-value.bad { color: var(--bad); }
.figure-note { margin-top: 3px; color: var(--text-3); font-size: var(--fs-xs); }
.figure a:hover .figure-value { color: var(--accent-text); }

/* ---------- Context header: the community (or member) summary strip at the top of a page ----------
   Dense, flat and informational, not a hero card: identity, state and the next actions on one line. The state
   tints only the top hairline and the status text, so the page reads calm when healthy and flags trouble plainly. */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: center; margin-bottom: var(--s5); padding-bottom: var(--s4); border-bottom: 1px solid var(--border); }
.hero-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); }
.hero-facts { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero::before { content: none; }
.hero > * { position: relative; }
.hero.warn { border-bottom-color: var(--warn-line); }
.hero.bad { border-bottom-color: var(--bad-line); }
.hero-id { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.hero-id .avatar { width: 36px; height: 36px; border-radius: var(--r-control); font-size: 14px; }
.hero h1 { font-size: var(--fs-lg); font-weight: 470; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
#dashboard-health h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.03em; }
.hero .hero-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; color: var(--text-2); font-size: var(--fs-sm); }
.hero .hero-status strong { color: var(--text-1); font-weight: 470; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; }
.overview-body { margin-top: var(--s2); }
.overview-body > .chart-panel { margin-bottom: 0; }
.panel.glance .figures { margin-bottom: 0; }
.glance .figure-value { font-size: 19px; }
/* Members by state: a short list of dots, words and counts, each a link to the filtered member list. */
.member-states { display: grid; }
.member-states a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 var(--s5); border-top: 1px solid var(--border-subtle); color: var(--text-2); font-size: 13px; text-decoration: none; }
.member-states li:first-child a { border-top: 0; }
.member-states a:hover { background: var(--surface-2); color: var(--text-1); }
.member-states .member-state { flex: 1; }
.member-states strong { color: var(--text-1); font-weight: 470; }
.member-states .orb { width: 7px; height: 7px; box-shadow: none; }
.member-hero { margin-top: var(--s2); }
.member-hero .hero-id .avatar.xl { width: 48px; height: 48px; border-radius: 50%; font-size: 19px; }
.member-hero .hero-id .avatar.xl + .presence { right: -1px; bottom: -1px; width: 18px; height: 18px; }
.member-hero .hero-id .avatar.xl + .presence.mobile { width: 14px; height: 19px; }
.member-line { margin-top: 6px; color: var(--text-2); font-size: var(--fs-sm); }
.member-line .inline-copy { flex-wrap: wrap; row-gap: 2px; }
.member-hero .hero-status { margin-top: var(--s3); }
.member-hero h1 { font-size: var(--fs-2xl); font-weight: 540; letter-spacing: -.03em; }
/* The name and its line sit level with the picture. Admin follows the name in Lance blue, the dates are white, and
   Copy Discord ID sits at the end of the line, level with it. */
.member-hero h1 { display: flex; align-items: baseline; gap: var(--s3); }
.member-admin { color: var(--chart-line); font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; }
.member-hero .member-line { display: flex; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.member-date { margin-left: .25em; color: var(--text-1); }
.member-hero .member-line .member-id { display: inline-flex; margin: 0 0 0 var(--s4); }
.member-hero .member-line > .member-id:first-child { margin-left: -8px; }
.member-hero .hero-id > .hero-status { align-self: center; margin: 0; }
/* A member’s membership as a pass in its role’s colour: role, plan and price, and how much of the paid period is left. */
.member-passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s4); margin-bottom: var(--s5); }
.member-pass { display: grid; gap: var(--s4); padding: var(--s5) var(--s6); border: 1px solid color-mix(in srgb, var(--m-accent) 60%, #26262b); border-radius: var(--r-panel); background: color-mix(in srgb, var(--m-accent) 62%, #121217); color: var(--text-1); box-shadow: inset 0 3px 0 var(--m-accent), var(--shadow-1); }
.member-pass header { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.member-pass-role { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-md); font-weight: 540; }
.member-pass-role .role-dot { flex: 0 0 12px; width: 12px; height: 12px; border: 1px solid color-mix(in srgb, var(--m-accent) 55%, #000000); }
.member-pass .badge { border-color: transparent; background: color-mix(in srgb, var(--m-accent) 30%, #0b0b10); color: var(--text-1); }
.member-pass .member-pass-state { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--m-accent) 22%, #0b0b10); color: #ffffff; opacity: 1; }
.member-pass-state i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #a1a1aa; }
.member-pass-state.ok i { background: var(--ok); } .member-pass-state.info i { background: var(--info); } .member-pass-state.warn i { background: var(--warn); } .member-pass-state.bad i { background: var(--bad); }
.member-pass-state.warn { color: var(--warn); } .member-pass-state.bad { color: var(--bad); }
/* A membership role held with no payment or free access: the role's colour as a top rule on a plain surface, so it never reads as paid. */
.member-pass.unconfirmed { border: 1px dashed var(--border-strong); background: var(--surface-2); box-shadow: inset 0 3px 0 var(--m-accent); }
.member-pass.unconfirmed .member-pass-state { background: var(--surface-3); color: var(--text-2); }
.member-pass.unconfirmed .member-pass-price strong { display: inline-flex; align-items: center; gap: 8px; color: var(--text-1); font-size: 18px; letter-spacing: -.02em; }
.role-flag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.role-flag { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); font-size: var(--fs-xs); }
.role-flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.member-pass.unconfirmed .member-pass-price span, .member-pass.unconfirmed .member-pass-time { color: var(--text-3); opacity: 1; }
.member-pass-price { display: flex; align-items: baseline; gap: 10px; }
.member-pass-price strong { font-size: 26px; font-weight: 540; letter-spacing: -.04em; line-height: 1; }
.member-pass-price span { font-size: var(--fs-md); opacity: .82; }
.member-pass-time { display: grid; gap: 8px; font-size: var(--fs-sm); opacity: .9; }
.member-pass-bar { height: 6px; overflow: hidden; border-radius: var(--r-pill); background: color-mix(in srgb, var(--m-accent) 30%, #0b0b10); }
.member-pass-bar i { display: block; height: 100%; border-radius: inherit; background: var(--text-1); }
.member-pass.ink-dark, .member-pass.ink-dark .badge { color: #0b0b10; }
.member-pass.ink-dark .member-pass-state:not(.warn):not(.bad) { color: #ffffff; }
.member-pass.ink-dark .member-pass-bar i { background: #0b0b10; }
.member-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); margin-top: var(--s5); font-size: var(--fs-sm); }
.member-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); text-decoration: none; }
.member-links a:hover { color: var(--text-1); }
.member-links svg { width: 14px; height: 14px; }
.member-links-end { margin-left: auto; }
.member-links-end .btn { color: var(--text-3); }

/* ---------- Health strip ---------- */
.health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); overflow: hidden; }
.health-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px var(--s4); color: inherit; text-decoration: none; transition: background var(--d1) var(--ease); }
.health-item + .health-item { border-left: 1px solid var(--border); }
.health.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.health-logo { flex: none; width: 18px; height: 18px; border-radius: var(--r-tag); object-fit: contain; }
a.health-item:hover { background: var(--hover); }
.health-item > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.health-item strong { display: block; font-size: var(--fs-sm); font-weight: 470; }
.health-item span { display: block; overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Rows, timeline ---------- */
.rows { display: grid; }
.row-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 11px var(--s5); border-top: 1px solid var(--border); transition: background var(--d1) var(--ease); }
.rows > .row-item:first-child { border-top: 0; }
.row-main { min-width: 0; }
.row-item .title { font-size: var(--fs-sm); font-weight: 470; line-height: 1.4; overflow-wrap: anywhere; }
.row-item .title a { text-decoration: none; } .row-item .title a:hover { color: var(--accent-text); }
.row-item .sub { margin-top: 1px; color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
/* A line about someone leads with their Discord picture; what happened is a small mark on its corner. */
.feed-face { position: relative; display: inline-flex; flex: none; }
.feed-face .avatar { width: 32px; height: 32px; }
.feed-mark { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid var(--surface-1); border-radius: 50%; background: var(--surface-3); color: var(--text-2); }
.feed-mark svg { width: 10px; height: 10px; }
.feed-mark.ok { background: var(--ok-surface); color: var(--ok); }
.feed-mark.bad { background: var(--bad-surface); color: var(--bad); }
.feed-mark.warn { background: var(--warn-surface); color: var(--warn); }
.feed-mark.info { background: var(--info-surface); color: var(--sky); }
.feed-mark.accent { background: var(--accent-surface); color: var(--accent-text); }
.feed-handle { color: var(--text-3); }
.row-item .sub.muted { color: var(--text-3); }
/* Needs attention: who it is (picture, name, @username), then the membership it is about. Both open their pages. */
.hero-status-link { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.hero-status-link:hover { color: var(--text-1); text-decoration-color: currentColor; }
#needs-attention { scroll-margin-top: 80px; }
/* On the Dashboard these two are sections like the row above them, not boxes: the same heading (a mark and its name),
   rows lined up with the heading, a hairline only between rows, and space between the sections. */
.stack #needs-attention > .panel-head, #community-activity > .panel-head { padding: 0 0 var(--s2); border: 0; }
.stack #needs-attention .panel-head h2, #community-activity .panel-head h2 { font-size: var(--fs-lg); font-weight: 550; letter-spacing: -.015em; }
#community-activity .feed-day { padding: var(--s4) 0 var(--s1); }
/* Going from one page to the next fades between them instead of blanking in between. */
@view-transition { navigation: none; }
::view-transition-group(root) { animation-duration: var(--d1); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.attention-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); }
.attention-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.attention-who .muted { font-weight: 400; }
.row-item .title a.attention-membership { display: inline-flex; border-radius: var(--r-tag); }
.row-item .title a.attention-membership:hover .membership-name { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.row-item .sub a { color: var(--text-2); text-decoration: none; } .row-item .sub a:hover { color: var(--accent-text); }
.row-item time, .row-item .aside-text { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-icon { display: grid; place-items: center; flex: none; width: 16px; height: 16px; color: var(--text-3); }
.row-icon svg { width: 16px; height: 16px; }
.row-icon.sm { width: 14px; height: 14px; }
.row-icon.sm svg { width: 14px; height: 14px; }
.row-icon.ok { color: var(--ok); } .row-icon.warn { color: var(--warn); }
.row-icon.bad { color: var(--bad); } .row-icon.info { color: var(--info); } .row-icon.accent { color: var(--accent-text); }
a.row-item { color: inherit; text-decoration: none; }
a.row-item:hover { background: var(--hover); }
a.row-item:hover .title { color: var(--text-1); }
.row-item > .orb { margin-right: 6px; }
.row-item.no-mark { grid-template-columns: minmax(0, 1fr) auto; }
.feed-day { padding: var(--s3) var(--s5) var(--s1); color: var(--text-3); font-size: 12px; font-weight: 470; }
.feed-day + .rows > .row-item:first-child { border-top: 0; }
/* Each event’s mark sits in the same 26px round space on the line, and the line runs from one mark’s centre to the
   next as its own piece, so every gap is drawn the same however long an event’s text is. */
.timeline { position: relative; display: grid; padding: var(--s1) var(--s5) var(--s4); }
.tl-item { --tl-node: 26px; position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: var(--s2) 0; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 15.5px; top: calc(var(--s2) + var(--tl-node) / 2); bottom: calc((var(--s2) + var(--tl-node) / 2) * -1); width: 1px; background: var(--border); }
.tl-item .row-icon { position: relative; z-index: 1; justify-self: center; width: var(--tl-node); height: var(--tl-node); border-radius: 50%; background: var(--surface-1); }
.tl-item .title { font-size: var(--fs-sm); font-weight: 470; padding-top: 4px; }
.tl-item .sub { color: var(--text-2); font-size: var(--fs-sm); }
.tl-item time { padding-top: 5px; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }

/* ---------- Setup ---------- */
.steps { display: grid; }
.step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); border-top: 1px solid var(--border); }
.steps > .step:first-child { border-top: 0; }
.step-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text-3); font-size: var(--fs-xs); font-weight: 470; background: var(--surface-2); }
.step-mark svg { width: 15px; height: 15px; }
.step.done .step-mark { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.step.current { background: var(--surface-2); }
.step.current .step-mark { color: #fff; border-color: transparent; background: var(--accent-fill); }
.step h3 { font-size: var(--fs-base); font-weight: 470; }
.step.done h3 { color: var(--text-2); }
.step p { margin-top: 3px; color: var(--text-3); font-size: var(--fs-sm); }
.setup-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: center; }
.setup-hero h2 { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.02em; }
.setup-hero p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-sm); }
.progress { height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--neutral-soft); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--d4) var(--ease); }
.progress > span.warn { background: var(--warn); box-shadow: none; }
.meter { display: grid; gap: 8px; }
.explainer { display: grid; gap: var(--s4); }
.explainer li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: start; }
.explainer .row-icon { width: 34px; height: 34px; }
.explainer strong { display: block; font-size: var(--fs-sm); font-weight: 470; }
.explainer li > div > span { display: block; color: var(--text-3); font-size: var(--fs-sm); }

/* ---------- Key facts ---------- */
.kv { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 11px var(--s4); }
.kv dt { color: var(--text-3); font-size: var(--fs-sm); }
.kv dd { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary > div { padding: var(--s4) var(--s5); border-top: 1px solid var(--border); }
.summary > div:nth-child(-n+3) { border-top: 0; }
.summary > div:not(:nth-child(3n+1)) { border-left: 1px solid var(--border); }
.summary dt { color: var(--text-3); font-size: var(--fs-xs); }
.summary dd { margin-top: 4px; font-size: var(--fs-sm); font-weight: 470; }
/* A record’s key facts: label over value, divided by rules, no raised surfaces (playbook section 3). */
.facts { display: flex; flex-wrap: wrap; margin-bottom: var(--s5); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hero + .facts { border-top: 0; }
.facts > div { flex: 1 1 170px; min-width: 0; padding: var(--s3) var(--s5) var(--s3) 0; }
.facts > div + div { padding-left: var(--s5); border-left: 1px solid var(--border); }
.facts dt { color: var(--text-3); font-size: var(--fs-sm); }
.facts dd { margin: 4px 0 0; font-size: var(--fs-md); font-weight: 450; overflow-wrap: anywhere; }
.fact-sub { color: var(--text-3); font-size: var(--fs-xs); font-weight: 400; }

/* ---------- Tabs (segmented filter) ---------- */
.tabs { display: flex; gap: var(--s4); margin-bottom: var(--s4); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a:focus-visible { outline-offset: -2px; }
.tabs a { position: relative; display: inline-flex; flex: none; align-items: center; gap: 7px; min-height: var(--control); padding: 0 2px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-3); font-size: var(--fs-sm); font-weight: 400; text-decoration: none; white-space: nowrap; transition: color var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.tabs a:hover { color: var(--text-1); border-bottom-color: var(--border-strong); }
.tabs a[aria-current="page"] { color: var(--text-1); font-weight: 470; border-bottom-color: var(--accent); }
/* The chosen tab’s heavier label never nudges the tabs after it: every label keeps room for its bold width. */
.tabs .tab-label { display: inline-grid; }
.tabs .tab-label::after { content: attr(data-label); content: attr(data-label) / ""; height: 0; overflow: hidden; visibility: hidden; font-weight: 470; }
.tabs .n { min-width: 18px; padding: 0 5px; border-radius: var(--r-tag); color: var(--text-3); background: var(--surface-2); font-size: 12px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.tabs .n.warn { color: var(--warn); background: var(--warn-soft); } .tabs .n.bad { color: var(--bad); background: var(--bad-soft); }
.app[data-section="members"] .tabs .n { padding: 0; background: none; }
.app[data-section="members"] .tabs a { gap: 2px; }

/* ---------- Forms ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); flex: 1 1 380px; min-width: 0; }
.search { position: relative; display: flex; align-items: center; gap: var(--s2); flex: 1 1 280px; max-width: 440px; min-width: min(100%, 240px); }
.search > svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; color: var(--text-3); transform: translateY(-50%); pointer-events: none; }
.search > .btn ~ svg, .search:has(> .btn:not([hidden])) > svg { top: 50%; }
.search input { padding-left: 34px; }
.field { display: grid; gap: 6px; }
.field > label, .label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 470; }
.help { color: var(--text-3); font-size: var(--fs-xs); }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="number"], select { width: 100%; min-height: var(--control); padding: 8px 11px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); box-shadow: none; color: var(--text-1); font-size: var(--fs-sm); transition: border-color var(--d1) var(--ease), box-shadow var(--d1) var(--ease); }
input::placeholder { color: var(--text-3); }
input:hover, select:hover { border-color: var(--text-3); }
input:focus-visible, select:focus-visible { border-color: var(--border-focus); }
/* After the generic input rule, so the search icon always keeps its room. */
.search input[type="search"] { padding-left: 34px; }
.currency-input { position: relative; }
.currency-input > span { position: absolute; inset: 0 auto 0 12px; display: flex; align-items: center; color: var(--text-2); pointer-events: none; }
.currency-input input[type="number"] { padding-left: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
/* Membership filter: a menu of links whose list always opens below its box (a native select opens over it on macOS). */
.select-menu { position: relative; flex: none; }
.select-menu > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-width: 190px; min-height: var(--control); padding: 8px 11px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-1); font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--d1) var(--ease); }
.select-menu > summary::-webkit-details-marker { display: none; }
.select-menu > summary:hover { border-color: var(--text-3); }
.select-menu > summary:focus-visible { border-color: var(--border-focus); }
.select-menu .chevron { flex: none; width: 14px; height: 14px; color: var(--text-3); transition: transform var(--d2) var(--ease); }
.select-menu[open] .chevron { transform: rotate(180deg); }
.select-menu-list { position: absolute; z-index: var(--z-menu); left: 0; top: calc(100% + 4px); display: grid; gap: 2px; min-width: 100%; max-height: 320px; overflow-y: auto; padding: 6px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-3); box-shadow: var(--shadow-2); animation: menu-in var(--d2) var(--ease); }
.select-menu-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--control-sm); padding: 6px 8px; border-radius: var(--r-control); color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; transition: background var(--d1) var(--ease); }
.select-menu-list a:hover, .select-menu-list a:focus-visible { color: var(--text-1); background: var(--hover); }
.select-menu-list a[aria-current="true"] { color: var(--text-1); }
.select-menu-list a svg { flex: none; width: 14px; height: 14px; color: var(--accent-text); }
/* A form field's dropdown: the same box and list, each option a radio row with a tick on the chosen one. */
.field-menu > summary { width: 100%; min-width: 0; }
.field-menu > .select-menu-list { overflow-x: hidden; }
.select-menu-option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--control-sm); padding: 6px 8px; border-radius: var(--r-control); color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; transition: background var(--d1) var(--ease); }
.select-menu-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.select-menu-option:hover, .select-menu-option:has(input:focus-visible) { color: var(--text-1); background: var(--hover); }
.select-menu-option:has(input:checked) { color: var(--text-1); }
.select-menu-option svg { flex: none; width: 14px; height: 14px; color: var(--accent-text); visibility: hidden; }
.select-menu-option:has(input:checked) svg { visibility: visible; }
.select-drop { position: relative; }
.select-drop-button { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: 100%; min-height: var(--control); padding: 8px 11px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-1); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; transition: border-color var(--d1) var(--ease); }
.select-drop-button:hover { border-color: var(--text-3); }
.select-drop-button:focus-visible, .select-drop-button[aria-expanded="true"] { border-color: var(--border-focus); }
.select-drop-button:disabled { cursor: not-allowed; opacity: .5; }
.select-drop-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-drop-value.is-placeholder { color: var(--text-3); }
.select-drop-button .chevron { flex: none; width: 14px; height: 14px; color: var(--text-3); transition: transform var(--d2) var(--ease); }
.select-drop-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.select-drop-list { right: 0; }
.select-drop-list [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; min-height: var(--control-sm); padding: 6px 8px; border: 0; border-radius: var(--r-control); background: none; color: var(--text-2); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; transition: background var(--d1) var(--ease); }
.select-drop-list [role="option"]:hover, .select-drop-list [role="option"]:focus-visible { outline: none; color: var(--text-1); background: var(--hover); }
.select-drop-list [role="option"][aria-selected="true"] { color: var(--text-1); }
.select-drop-list [role="option"] svg { flex: none; width: 14px; height: 14px; color: var(--accent-text); }
/* A control that does not apply to the open tab stays where it is, dimmed and inert, so nothing below it moves. */
/* The membership filter: a box per membership and Submit at the bottom right. The list opens from the button’s left
   edge; on a phone the button sits at the right of the row, so it opens from its right edge instead. */
.tier-menu > summary { min-width: 0; }
#member-tier-menu { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.tier-chip { min-height: var(--control-sm); padding: 0 8px 0 10px; gap: 6px; }
.tier-menu.filtered > summary, .tier-menu.filtered > summary:hover { border-color: var(--accent); }
.tier-clear { color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; }
.tier-clear:hover { color: var(--text-1); text-decoration: underline; }
/* The membership filter is the dashboard's dropdown (the same list as the range menus), each row a checkbox, with
   Submit set apart under a rule. */
.tier-form { gap: 2px; padding: 6px; }
.tier-opt { display: flex; align-items: center; gap: var(--s3); min-height: var(--control-sm); padding: 6px 8px; border-radius: var(--r-control); color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; transition: background var(--d1) var(--ease); }
.tier-opt:hover, .tier-opt:has(input:focus-visible) { color: var(--text-1); background: var(--hover); }
.tier-opt input { flex: none; width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.tier-opt:has(input:checked) { color: var(--text-1); }
.tier-foot { display: flex; justify-content: flex-end; margin: 4px -6px 0; padding: 6px 6px 0; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .tier-menu .select-menu-list { left: auto; right: 0; } }
#member-tier-menu:empty { display: none; }
.toolbar [inert] { opacity: .45; transition: opacity var(--d2) var(--ease); }
.choices { display: grid; gap: var(--s2); }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 13px var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease), box-shadow var(--d2) var(--ease); }
.choice:hover { border-color: var(--border-strong); background: var(--surface-2); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
.choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.choice strong { display: block; font-size: var(--fs-sm); font-weight: 470; }
.choice span { color: var(--text-3); font-size: var(--fs-xs); }
.choice.disabled { cursor: not-allowed; opacity: .55; }
fieldset.choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.copy { display: flex; align-items: center; gap: var(--s2); min-width: 0; padding: 4px 4px 4px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-control); background: rgba(6,6,9,.7); }
.copy code { flex: 1; min-width: 0; overflow: hidden; color: var(--text-2); font-family: var(--mono); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.inline-copy { display: inline-flex; align-items: center; gap: 4px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
/* Every menu draws its own arrow, set in from the edge, instead of the browser’s (which sits on the border). The arrow is a file
   because the page’s content policy does not load inline images. */
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("/assets/select-arrow.svg"); background-repeat: no-repeat; background-position: right 11px center; background-size: 12px 12px; }
.inline-form select { width: auto; min-width: 150px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.data th { height: 34px; padding: 0 var(--s4); border-bottom: 1px solid var(--border); background: var(--surface-1); color: var(--text-3); font-size: 12px; font-weight: 470; text-align: left; white-space: nowrap; }
table.data td { padding: 6px var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data td .row-actions { display: inline-flex; justify-content: flex-end; gap: 2px; }
table.data td .row-actions .btn-icon { color: var(--text-3); }
table.data tr:hover td .row-actions .btn-icon { color: var(--text-1); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background var(--d1) var(--ease); }
table.data tbody tr:hover { background: var(--hover); }
/* A row’s own heading cell (the plan name in the estimate) takes the row’s background, so hover runs the full width. */
table.data tbody th { background: transparent; }
table.data .num { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
table.data td .cell { min-width: 0; }
/* A column with a set width never lets its content run into the next one: a long plan name, date or badge is cut
   short with an ellipsis (the full text is its tooltip), and the amount beside a plan name always stays whole. */
table.data.fixed td .cell > .nowrap, table.data.fixed td .cell > span:not([class]) { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data.fixed td .cell > .badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; line-height: 18px; }
table.data.fixed td .cell > .badge::before { display: inline-block; margin-right: 6px; vertical-align: middle; }
.plan-cell { display: flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 100%; }
.plan-cell .plan-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-cell .tabular { flex: none; }
table.data tr.linked { position: relative; cursor: pointer; }
table.data tr.linked a.row-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
table.data tr.linked a.row-link:focus-visible { outline: none; }
table.data tr.linked a.row-link:focus-visible::after { outline: 2px solid var(--accent-text); outline-offset: -2px; }
table.data tr.linked .above { position: relative; z-index: 2; }
table.data th .cell-sub { display: block; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: normal; }
/* Discord’s status marks on a member’s picture: a green dot (online), a yellow moon (idle), a red disc with a bar (do not
   disturb), a green phone (online on mobile). The ring is the surface behind the picture, the way Discord cuts it out. */
.presence-wrap { --ring: var(--surface-1); position: relative; display: inline-flex; flex: none; }
.presence { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border: 3px solid var(--ring); border-radius: 50%; background: var(--presence-online); box-sizing: border-box; }
.presence.idle { background: var(--presence-idle); }
.presence.idle::after { content: ""; position: absolute; top: -2px; left: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--ring); }
.presence.dnd { background: var(--presence-dnd); }
.presence.dnd::after { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 2px; border-radius: 1px; background: var(--ring); transform: translate(-50%, -50%); }
.presence.mobile { right: -2px; width: 11px; height: 15px; border-width: 2px; border-radius: 3px; }
.presence.mobile::after { content: ""; position: absolute; top: 1px; left: 1px; right: 1px; bottom: 3px; border-radius: 1px; background: var(--ring); }
.hero .presence-wrap { --ring: var(--bg); }
.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.identity-text { display: grid; min-width: 0; line-height: 1.3; }
.identity-text strong, .identity-text a { overflow: hidden; font-weight: 470; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.identity-text span { overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.identity-text .state-line { display: flex; align-items: center; gap: 6px; }
table.data td.primary-cell { min-width: 190px; }
table.data td.wide { min-width: 170px; }
table.data th:first-child, table.data td:first-child { padding-left: var(--s5); }
table.data th:last-child, table.data td:last-child { padding-right: var(--s5); }
@media (min-width: 901px) and (max-width: 1360px) { table.data .opt { display: none; } }
/* Set column widths (see dataTable) hold whatever rows show; a screen too narrow for them scrolls the table instead. */
@media (min-width: 901px) { table.data.fixed { table-layout: fixed; min-width: var(--table-min); } }
@media (min-width: 901px) and (max-width: 1360px) {
  table.data.fixed { min-width: var(--table-min-mid); }
  table.data th.compact { width: 64px !important; }
  table.data td.compact .btn { gap: 0; width: var(--control-sm); padding: 0; font-size: 0; justify-content: center; }
  table.data td.compact .btn svg { width: 16px; height: 16px; }
}
.cell-sub { color: var(--text-3); font-size: var(--fs-xs); }
.cell-also { display: block; margin-top: 2px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s5); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-xs); }
.page-links { display: flex; align-items: center; gap: 2px; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: var(--control-sm); height: var(--control-sm); padding: 0 6px; border: 1px solid transparent; border-radius: var(--r-control); color: var(--text-2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; text-decoration: none; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
a.page-link:hover { background: var(--hover); color: var(--text-1); }
a.page-link:focus-visible { outline: none; border-color: var(--border-focus); }
.page-link.current { border-color: var(--border); background: var(--surface-3); color: var(--text-1); font-weight: 560; }
.page-link[aria-disabled="true"] { color: var(--border-strong); }
.page-link svg { width: 14px; height: 14px; }
.page-gap { min-width: 16px; color: var(--text-3); text-align: center; }
table.data.compare th[scope="row"] { color: var(--text-3); font-size: var(--fs-xs); font-weight: 470; letter-spacing: 0; text-align: left; text-transform: none; white-space: nowrap; }
table.data.compare td, table.data.compare thead th { text-align: left; }
table.data.compare .current-plan { background: var(--accent-soft); }
table.data.compare thead th.current-plan { box-shadow: inset 0 2px 0 var(--accent); }

/* ---------- Callouts, toasts, empty states ---------- */
.callout { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 12px var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
/* A notice drawn without an icon (the import scripts): its words, then its button. */
.callout:not(:has(> .callout-icon)) { grid-template-columns: minmax(0, 1fr) auto; }
.callout-icon { display: grid; place-items: center; align-self: start; width: 16px; height: 16px; margin-top: 1px; color: var(--info); }
.callout-icon svg { width: 16px; height: 16px; }
.callout h3 { font-size: var(--fs-sm); font-weight: 470; }
.callout p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-sm); }
.callout.ok { border-color: var(--ok-line); background: var(--surface-1); } .callout.ok .callout-icon { color: var(--ok); }
.callout.warn { border-color: var(--warn-line); background: var(--surface-1); } .callout.warn .callout-icon { color: var(--warn); }
.callout.bad { border-color: var(--bad-line); background: var(--surface-1); } .callout.bad .callout-icon { color: var(--bad); }
.callout.info, .callout.accent, .callout.neutral { border-color: var(--border-strong); background: var(--surface-1); }
.toasts { position: fixed; z-index: var(--z-toast); right: var(--s5); bottom: var(--s5); display: grid; gap: var(--s2); width: min(390px, calc(100vw - 32px)); }
.toast { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: 12px var(--s4); border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-3); box-shadow: var(--shadow-2); overflow: hidden; animation: toast-in var(--d3) var(--ease-out); }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--ok); transform-origin: left; animation: toast-timer 5.2s linear forwards; }
.toast .icon { width: 17px; height: 17px; margin-top: 1px; color: var(--ok); }
.toast.info > .icon { color: var(--info); }
.toast.info::after { background: var(--info); }
/* The close button is neutral; only the status mark carries the tone. */
.toast > button .icon, .toast > .btn .icon { color: var(--text-3); }
.toast > button:hover .icon, .toast > .btn:hover .icon { color: var(--text-1); }
.toast strong { display: block; font-size: var(--fs-sm); font-weight: 470; }
.toast span { display: block; color: var(--text-2); font-size: var(--fs-sm); }
.toast.leaving { animation: toast-out var(--d2) var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
html:not(.js) .toasts { position: static; width: auto; margin-bottom: var(--s5); }
html:not(.js) .toast::after { display: none; }
.empty { display: grid; justify-items: center; gap: 8px; padding: var(--s7) var(--s5); text-align: center; }
.empty-glyph { display: grid; place-items: center; width: 20px; height: 20px; margin-bottom: 2px; color: var(--text-3); }
.empty-glyph svg { width: 20px; height: 20px; }
.empty h3 { font-size: var(--fs-md); font-weight: 470; }
.empty p { max-width: 440px; color: var(--text-3); font-size: var(--fs-sm); }
.empty .button-row { margin-top: var(--s3); justify-content: center; }
.quiet { display: flex; align-items: center; gap: 10px; padding: var(--s4) var(--s5); color: var(--text-3); font-size: var(--fs-sm); }
.quiet strong { color: var(--text-2); font-weight: 470; }
.all-clear { padding: 0 var(--s5) var(--s5); }
.all-clear strong { display: block; font-size: var(--fs-sm); font-weight: 470; }
.all-clear span { display: block; margin-top: 2px; color: var(--text-3); font-size: var(--fs-sm); }
.row-icon.stripe { color: var(--stripe); }
.row-icon.discord { color: var(--discord); }

.universe { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 470; }
.universe::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.universe.community { color: var(--text-2); }
.universe.lance { color: var(--accent-text); }

details.tech > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: var(--s3) 0 0; color: var(--text-3); font-size: var(--fs-sm); cursor: pointer; }
details.tech > summary::-webkit-details-marker { display: none; }
details.tech > summary:hover { color: var(--text-2); }
details.tech > summary svg { width: 14px; height: 14px; transition: transform var(--d2) var(--ease); }
details.tech[open] > summary svg { transform: rotate(180deg); }
details.tech > div { padding: var(--s3) 0 0; }

/* ---------- Dialogs and the command palette ---------- */
dialog { padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-dialog); background: var(--surface-3); color: var(--text-1); box-shadow: var(--shadow-2); }
/* Interaction steps are relative to the surface you are on. On the page that is --hover/--pressed above
   --bg; on a raised overlay those same values sit at or below the overlay’s own ground, so a hover would
   darken instead of lift. Raised surfaces restate the two steps; the component rules never change. */
.menu, .select-menu-list, dialog, .toast { --hover: #1e1e27; --pressed: #22222b; }
/* Light mode, a test (Settings → General → Appearance): the same tokens, light. Only colours change; everything else
   (spacing, type, borders as structure) is shared, so a page reads the same in both. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e9e9ee; --bg-sunken: #e1e1e8; --surface-1: #f4f4f7; --surface-2: #ececf1; --surface-3: #f8f8fa; --sidebar-bg: #e4e4ea;
  --hover: #e2e2e9; --pressed: #d9d9e1;
  --border-subtle: #dedee5; --border: #d2d2db; --border-strong: #c0c0cc; --border-focus: #703efc; --border-control: #8b8a97;
  --text-1: #121219; --text-2: #4b495b; --text-3: #6d6a7f;
  --accent-text: #5a2fd5; --accent-bright: #703efc; --accent-surface: #f1ecff; --accent-soft: rgba(112,62,252,.1);
  --ok: #1d9a61; --ok-soft: rgba(29,154,97,.1); --warn: #b5761a; --gold: #b5761a; --warn-soft: rgba(181,118,26,.12); --bad: #d43f3f; --bad-soft: rgba(212,63,63,.1);
  --info: #2a7cd0; --info-soft: rgba(42,124,208,.1); --sky: #0e9fb2;
  --sale-text: #d1306a; --sale-surface: #fff0f5; --sale-line: #f4bcd0;
  --neutral-soft: rgba(18,18,25,.05);
  --chart-1: #9d7dff; --chart-line: #0e9fb2; --chart-fill: #def5f8;
  --ok-surface: #eaf7f1; --warn-surface: #fdf5e6; --bad-surface: #fdeeee; --info-surface: #eaf3fd;
  --shadow-1: 0 1px 2px rgb(16 16 24 / .06); --shadow-2: 0 8px 24px rgb(16 16 24 / .12);
}
:root[data-theme="light"] :is(.menu, .select-menu-list, dialog, .toast) { --hover: #ececf1; --pressed: #e3e3ea; }
:root[data-theme="light"] dialog::backdrop { background: rgb(16 16 24 / .32); }
/* The Lance logo is white; on light it is drawn in the text colour (the violet chip stays violet). */
:root[data-theme="light"] :is(.home-stripe, .home-word) { fill: var(--text-1); }
:root[data-theme="light"] .app img:is([src*="lance-lockup"], [src*="lance-mark"]) { filter: brightness(0); }
/* Settings → Appearance: Dark and Light side by side. */
.theme-choice { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); }
.theme-choice button { min-height: var(--control-sm); padding: 0 12px; border: 0; border-radius: 4px; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.theme-choice button[aria-pressed="true"] { background: var(--surface-1); color: var(--text-1); box-shadow: var(--shadow-1); }
.test-tag { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--text-3); font-size: 10px; font-weight: 500; letter-spacing: .02em; vertical-align: 1px; }

/* A flat scrim, not a blurred one: the foreground/background relationship is immediate. */
dialog::backdrop { background: rgb(0 0 0 / .62); }
dialog[open] { animation: dialog-in var(--d2) var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.confirm { width: min(460px, calc(100vw - 32px)); }
.confirm-body { padding: var(--s6) var(--s6) var(--s5); }
.confirm-body h2 { font-size: var(--fs-md); font-weight: 470; }
.confirm-body p { margin-top: 8px; color: var(--text-2); font-size: var(--fs-sm); }
.confirm-actions { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s5); border-top: 1px solid var(--border); background: var(--surface-2); }
.palette { width: min(600px, calc(100vw - 24px)); margin: 12vh auto auto; }
.palette-input { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.palette-input svg { width: 17px; height: 17px; color: var(--text-3); }
.palette-input input { min-height: var(--control); padding: 0; border: 0; background: transparent; box-shadow: none; font-size: var(--fs-md); }
.palette-input input:hover { border: 0; }
.palette-input input:focus-visible { box-shadow: none; outline: none; }
.palette-list { max-height: 380px; padding: 6px; overflow-y: auto; }
.palette-group { padding: 10px 10px 4px; color: var(--text-3); font-size: 12px; font-weight: 470; }
.palette-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: var(--r-control); color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; cursor: pointer; }
.palette-item[aria-selected="true"] { color: var(--text-1); background: var(--pressed); box-shadow: inset 2px 0 0 var(--accent); }
.palette-item .hint { margin-left: auto; color: var(--text-3); font-size: var(--fs-xs); }
.palette-foot { display: flex; flex-wrap: wrap; gap: var(--s4); padding: var(--s2) var(--s4); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-xs); }

/* ---------- Charts ---------- */
/* ---------- The collected chart ----------
   One bounded surface: panel border, whitespace, data. The plot never gets a second box, the bars are
   never dimmed to look refined, and everything that is not data recedes. Geometry is HTML and CSS so a
   14px bar is 14px at every container width. */
.stack > .chart-panel { margin-bottom: 0; }
.chart-panel { min-height: 286px; margin-bottom: 32px; padding: 20px 20px 16px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.chart-head { margin-bottom: 24px; }
.chart-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 32px; }
.chart-head :is(h2, h3) { color: var(--text-2); font-size: 13px; font-weight: 470; }
.chart-amount { margin: 6px 0 0; color: var(--text-1); font-size: 20px; line-height: 30px; font-weight: 470; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart-source { margin: 4px 0 0; color: var(--text-3); font-size: 12px; }
/* The change line: "+$12.46 (+3.79%) Past week". The change is a brighter green than the status green when revenue is
   up and red when down; the period name reads in white. */
.chart-change { margin: 4px 0 0; color: var(--text-3); font-size: 13px; }
.chart-change .delta { font-weight: 540; font-variant-numeric: tabular-nums; }
.chart-change .delta.up { color: var(--ok); }
.chart-change .delta.down { color: var(--bad); }
.chart-change .delta.flat { color: var(--text-2); }
.chart-change .delta-label { color: var(--text-1); font-weight: 470; }

/* A range or jump-to control beside the title is secondary; violet fill belongs to real actions. */
.chart-control .btn { height: 32px; min-height: 32px; padding: 0 10px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: transparent; box-shadow: none; color: var(--text-2); font-size: 12px; font-weight: 470; }
.chart-control .btn:hover { background: var(--surface-2); border-color: var(--border-control); color: var(--text-1); }
.chart-control .btn svg { width: 14px; height: 14px; }
/* Chart range: a segmented control of links, shortest range on the left. */
.range-tabs { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-1); }
.range-tabs a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 26px; padding: 0 8px; border-radius: var(--r-tag); color: var(--text-3); font-size: 12px; font-weight: 470; text-decoration: none; font-variant-numeric: tabular-nums; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.range-tabs a:hover { color: var(--text-1); background: var(--hover); }
.range-tabs a[aria-current="true"] { color: var(--text-1); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
/* With the script, one highlight slides from the old range to the new one instead of jumping between them. */
.range-tabs { position: relative; }
#trend .range-tabs { border: 0; background: none; }
.range-tabs a { position: relative; z-index: 1; }
.range-pill { position: absolute; top: 2px; left: 0; height: 26px; width: 0; border-radius: var(--r-tag); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); opacity: 0; transition: transform var(--d3) var(--ease), width var(--d3) var(--ease); }
.range-tabs.sliding .range-pill { opacity: 1; }
.range-tabs.sliding a[aria-current="true"] { background: transparent; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .range-pill { transition: none; } }
.chart-panel > .chart-head { margin-bottom: 0; }
.trend-pane > .trend-chart { margin-top: 24px; }
.trend-pane[hidden] { display: none; }
[data-swap-region][aria-busy="true"] { opacity: .6; transition: opacity var(--d2) var(--ease); }

.chart-grid { position: relative; padding-left: 48px; padding-right: 10px; }
.chart .plot { position: relative; height: var(--plot-h, 184px); }
.plot-field { position: absolute; left: 0; right: 0; top: 0; bottom: calc(var(--down-share, 0) * 1%); }
.chart .guide { position: absolute; left: 0; right: 0; height: 1px; background: var(--border-subtle); }
.chart .guide.base { background: var(--border); }
.chart .guide em { position: absolute; right: 100%; top: 50%; margin-right: 8px; color: var(--text-3); font-size: 11px; font-weight: 450; font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateY(-50%); }
.chart .cols { position: absolute; inset: 0; display: flex; align-items: stretch; }
.chart .col { position: relative; flex: 1 1 0; min-width: 0; }
.col-up { position: absolute; left: 0; right: 0; top: 0; bottom: calc(var(--down-share, 0) * 1%); display: flex; align-items: flex-end; justify-content: center; }
.col-down { position: absolute; left: 0; right: 0; top: calc(100% - var(--down-share, 0) * 1%); bottom: 0; display: flex; align-items: flex-start; justify-content: center; }
.chart .col-up > i, .chart .col-down > i { display: block; width: 14px; max-width: 76%; min-width: 8px; }
.chart .col-up > .up { background: var(--chart-2); border-radius: 2px 2px 0 0; }
.chart .col-up > .up.nil { height: 2px; background: var(--surface-3); border-radius: 1px; }
.chart .col-down > .down { background: var(--chart-down); border-radius: 0 0 2px 2px; }

/* Hover is precision, not motion: the geometry does not move, the active bar just gains an edge. */
.chart .col-up > .up, .chart .col-down > .down { outline: 1px solid transparent; outline-offset: 0; transition: outline-color var(--d1) var(--ease); }
.chart .col:hover .col-up > .up { outline-color: var(--accent-text); }
.chart .col:hover .col-down > .down { outline-color: var(--text-1); }

.chart-ticks { position: relative; height: 16px; margin-top: 8px; }
.chart .tick { position: absolute; top: 0; color: var(--text-3); font-size: 11px; font-weight: 450; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); }
.chart .tick.at-start { transform: none; left: 0 !important; }
.chart .tick.at-end { transform: translateX(-100%); left: 100% !important; }

.chart .tip { position: absolute; margin-bottom: 8px; left: 50%; z-index: 2; display: grid; gap: 6px; min-width: 156px; max-width: 220px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-3); opacity: 0; transform: translateX(-50%); pointer-events: none; transition: opacity var(--d1) var(--ease); }
.chart .tip.tip-start { left: 0; transform: none; }
.chart .tip.tip-end { left: auto; right: 0; transform: none; }
.chart .tip b { color: var(--text-3); font-size: 11px; font-weight: 470; }
.tip-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); color: var(--text-2); font-size: 13px; }
.tip-row em { color: var(--text-1); font-style: normal; font-variant-numeric: tabular-nums; }
.tip-row.out em { color: var(--bad); }
.chart .col:hover .tip { opacity: 1; }


.chart-note { margin-top: var(--s3); color: var(--text-3); font-size: var(--fs-xs); }
/* Running-total line: a stretched SVG path under HTML dots, guides and tooltips. */
.line-chart .plot { --plot-h: 208px; }
/* The Dashboard’s revenue chart is the page’s centrepiece: a tall plot that grows with the window, a bigger headline. */
.stack > #trend > .chart-panel, .m-detail-chart #trend > .chart-panel { padding: var(--s6) var(--s6) var(--s5); }
/* On the dashboard the chart is the page, not a card on it. */
.app[data-section="overview"] .stack > #trend > .chart-panel, .app[data-section="overview"] .stack > .chart-panel { padding: 0; margin-bottom: var(--s8); border: 0; background: none; }
.stack > #trend .line-chart .plot, .m-detail-chart #trend .line-chart .plot { --plot-h: clamp(220px, 34vh, 380px); }
.app[data-section="overview"] .stack > #trend .line-chart .plot { --plot-h: clamp(280px, 46vh, 520px); }
.stack > #trend .chart-amount, .m-detail-chart #trend .chart-amount { margin-top: var(--s2); font-size: 28px; line-height: 1.05; letter-spacing: -.035em; }
.stack > #trend .chart-head :is(h2, h3), .m-detail-chart #trend .chart-head :is(h2, h3) { font-size: var(--fs-md); }
.stack > #trend .chart-change, .m-detail-chart #trend .chart-change { margin-top: 6px; font-size: var(--fs-base); }
/* The line a touch heavier on the big chart, and its last point pulses gently: this is where the total is now. */
.stack > #trend .line-path, .m-detail-chart #trend .line-path { stroke-width: 2.5; }
.stack > #trend .line-end, .m-detail-chart #trend .line-end { width: 11px; height: 11px; margin: 0 0 -5.5px -5.5px; }
@media (prefers-reduced-motion: no-preference) {
  /* Live charts remain fully drawn during range changes and region refreshes. */

  html.js .stack > #trend .line-end, html.js .m-detail-chart #trend .line-end { animation: line-end-pulse 2.4s var(--ease) 1s infinite; }
}
@keyframes line-draw { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% 0 -10% 0); } }
@keyframes line-end-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes line-end-pulse { 0% { box-shadow: 0 0 0 0 var(--chart-fill); } 60% { box-shadow: 0 0 0 9px var(--chart-fill); } 100% { box-shadow: 0 0 0 9px transparent; } }
@media (max-width: 640px) { .stack > #trend > .chart-panel, .m-detail-chart #trend > .chart-panel { padding: var(--s4); } .stack > #trend .line-chart .plot, .m-detail-chart #trend .line-chart .plot, .app[data-section="overview"] .stack > #trend .line-chart .plot { --plot-h: 220px; } .stack > #trend .chart-amount, .m-detail-chart #trend .chart-amount { font-size: 23px; } }
.line-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.line-area { fill: var(--chart-fill); }
.line-path { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.line-end { position: absolute; width: 9px; height: 9px; margin: 0 0 -4.5px -4.5px; border: 2px solid var(--surface-1); border-radius: 50%; background: var(--chart-line); }
.line-chart .hits { position: absolute; inset: 0; }
.line-chart .hit { position: absolute; top: 0; bottom: 0; }
.line-chart .hit-line { position: absolute; top: 0; bottom: 0; left: var(--at, 50%); width: 1px; background: var(--border-strong); opacity: 0; transition: opacity var(--d1) var(--ease); }
.line-chart .hit-dot { position: absolute; left: var(--at, 50%); width: 11px; height: 11px; margin: 0 0 -5.5px -5.5px; border: 2px solid var(--surface-1); border-radius: 50%; background: var(--text-1); opacity: 0; transition: opacity var(--d1) var(--ease); }
.line-chart .hit:hover .hit-line, .line-chart .hit:hover .hit-dot, .line-chart .hit:hover .tip { opacity: 1; }
/* minmax(0, 1fr): a long membership name must ellipsize, never widen the page. */
a.bar-row:hover .bar-label { color: var(--accent-text); }
/* One violet: memberships are told apart by their labels, and later bars step down in weight rather than hue. */
.hue-bar-1 { background: #8a63fd; } .hue-bar-2 { background: #9c7cfe; } .hue-bar-3 { background: #ad94fe; } .hue-bar-4 { background: #b9a5ff; } .hue-bar-5 { background: #c4b5ff; }

/* ---------- Memberships: product cards ---------- */
.role-chip { display: inline-flex; align-items: center; gap: 5px; justify-self: start; max-width: 100%; padding: 2px 9px 2px 7px; border-radius: var(--r-pill); color: var(--discord); background: var(--discord-soft); font-size: var(--fs-xs); font-weight: 470; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-chip svg { width: 12px; height: 12px; }
.role-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--s3); }
.role-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; }
.role-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 100%; }
.membership-tag { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; line-height: 1.35; }
.membership-tag .membership-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-inline { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; color: var(--text-3); font-size: 12px; }
.role-inline > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-list .role-inline + .role-inline { margin-left: 6px; }
.role-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* In a table the column sizes to the chip, so a name shows whole up to 18 characters and only longer ones shorten. */
table.data .role-chip { max-width: none; }
table.data .role-chip > span { min-width: auto; max-width: 18ch; }
/* The price carries the beam at rest: a 1px violet line under it, fading out. */

/* ---------- Integrations: connection cards ---------- */
.conn { position: relative; display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); overflow: hidden; }
.integrations-grid { align-items: stretch; }
.integrations-grid .conn { align-content: start; }
.conn::before { content: none; }
/* The card's actions (Connect Stripe and its note) sit at its foot, however tall the card beside it makes it. */
.conn { align-content: start; grid-template-rows: auto; }
.conn:has(> .conn-foot) { display: flex; flex-direction: column; }
.conn-foot { display: grid; gap: var(--s3); margin-top: auto; }
.conn > * { position: relative; }
.conn-head { display: flex; align-items: center; gap: var(--s4); }
.conn-mark { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--border-strong); }
.conn-mark svg { width: 18px; height: 18px; }
.conn.stripe .conn-mark { color: #ffffff; background: #635bff; }
.conn.discord .conn-mark { color: #ffffff; background: var(--discord); }
.conn-mark.logo img { width: 24px; height: 24px; }
.conn.stripe .conn-mark.logo { background: none; box-shadow: none; }
.conn.stripe .conn-mark.logo img { width: 34px; height: 34px; border-radius: var(--r-panel); }
.conn-title { flex: 1; min-width: 0; }
.conn-title h2 { font-size: var(--fs-md); font-weight: 470; letter-spacing: -.015em; }
.conn-title p { margin-top: 2px; color: var(--text-3); font-size: var(--fs-sm); }
.conn-state { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-1); font-size: var(--fs-sm); font-weight: 470; white-space: nowrap; }
.conn-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--s2); }
.conn-facts div { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); }
.conn-facts dt { color: var(--text-3); font-size: 11.5px; font-weight: 450; }
.conn-facts dd { margin-top: 2px; font-size: var(--fs-sm); font-weight: 450; overflow-wrap: anywhere; }
.conn-facts dd.cell-sub { margin-top: 2px; font-weight: 400; }
/* A shortened id with its Copy button beside it, the full id in the hover. */
.conn-facts dd.conn-id { display: flex; align-items: center; gap: 4px; }
.conn-facts dd.conn-id .btn-icon { width: 24px; height: 24px; min-height: 24px; }
.conn-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conn-account .avatar { width: 20px; height: 20px; font-size: 10px; }
.conn-account strong { overflow: hidden; font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.conn-account .muted { overflow: hidden; font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.role-compare div:first-child { border-color: var(--accent-line); }
.role-outcome { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: var(--s3); font-size: var(--fs-sm); }
.checklist { display: grid; gap: var(--s2); }
.checklist li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: var(--fs-sm); }
.checklist .tick { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; color: var(--ok); background: var(--ok-soft); }
.checklist .tick svg { width: 12px; height: 12px; }

/* ---------- Access: the pipeline ---------- */
a.stage:hover { border-color: var(--border-strong); }

/* ---------- Integrations: bringing an existing paid community ---------- */
/* One panel under the two connections: what it is, the four steps as a path marked from real progress, and the
   promises the import keeps. The steps reuse the setup checklist’s marks: green with a tick when done, the accent
   fill on the step that is next. */
.import-panel { display: grid; gap: var(--s6); padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
.import-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.import-head h2 { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.015em; }
.import-head p { margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); }
.import-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.import-step { position: relative; display: grid; align-content: start; gap: 4px; min-width: 0; }
.import-step .step-mark { margin-bottom: 10px; }
.import-step:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: 42px; right: calc(8px - var(--s4)); height: 1px; background: var(--border-strong); }
.import-step.done:not(:last-child)::after { background: var(--ok-line); }
.import-step h3 { font-size: var(--fs-base); font-weight: 470; }
.import-step p { color: var(--text-3); font-size: var(--fs-sm); }
.import-step.done .step-mark { color: #05150b; border-color: #43ef98; background: #43ef98; }
.import-step.done h3 { color: var(--text-2); }
.import-step.current .step-mark { color: #fff; border-color: transparent; background: var(--accent-fill); }
.import-panel.import-row { padding: var(--s5) var(--s6); }

/* Integrations: bring in paying members. The three logos being joined, then two step cards side by side: the paid
   roles as chips, and the Discord message drawn as Discord shows it. The current step’s button is the one primary. */
.bring-in { display: grid; gap: var(--s5); padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); scroll-margin-top: calc(var(--appbar) + var(--s5)); }
/* On its own page the steps sit straight on the page, under the page header, with no box around them. */
.bring-in.bring-in-page { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
/* Integrations' call to action: the whole card opens the bring-in page; the button says what happens next. */
.bring-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s5) var(--s7); padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
.bring-cta-text { display: grid; gap: 6px; min-width: 0; }
.bring-cta-text > strong { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.015em; }
.bring-cta-text > span { max-width: 640px; color: var(--text-3); font-size: var(--fs-base); line-height: 1.5; }
.bring-cta-state { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: var(--s2) 0 0; padding: 0; list-style: none; }
.bring-cta-state li { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
.bring-cta-go { min-height: var(--control-lg); padding: 0 18px; font-size: var(--fs-base); }
.bring-cta-go svg { transition: transform var(--d2) var(--ease); }
/* Integrate, one page per step: a single card, and Back and Next along its foot (Next at the bottom right). */
.flow-card { display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.flow-lede { color: var(--text-2); font-size: var(--fs-base); }
.flow-card .bring-roles { max-height: none; }
.flow-foot { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--border); }
.flow-foot .btn-primary { min-height: var(--control-lg); padding: 0 18px; }
.flow-post { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: var(--s5) var(--s7); align-items: start; }
.flow-post-pick { display: grid; gap: var(--s4); }
.role-setup[data-flow] .setup-footer { margin-top: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--border); }
.role-setup[data-flow] .setup-footer .btn-primary { min-height: var(--control-lg); padding: 0 18px; }
@media (max-width: 760px) { .flow-post { grid-template-columns: minmax(0, 1fr); } }
.bring-cta-go:hover svg { transform: translateX(3px); }
@media (max-width: 640px) { .bring-cta { grid-template-columns: minmax(0, 1fr); padding: var(--s5); } .bring-cta-go { justify-self: start; } }
.bring-head { display: grid; gap: 4px; }
.bring-head h2 { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.015em; }
.bring-head p { color: var(--text-3); font-size: var(--fs-sm); }
/* Two steps down a rail: each number sits on the rail beside its card, and the rail runs from one to the next. Each card
   is a header column (the same width in both, so the titles line up) beside what the step is about. */
.bring-steps { display: grid; gap: var(--s4); }
.bring-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.bring-step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: calc(var(--s5) + 36px); bottom: calc((var(--s4) + var(--s5)) * -1 + 6px); width: 2px; border-radius: var(--r-pill); background: var(--border-strong); }
.bring-step-no { display: grid; place-items: center; width: 28px; height: 28px; margin-top: var(--s5); border-radius: var(--r-pill); background: var(--sky); color: #07070b; font-size: 13px; font-weight: 540; font-variant-numeric: tabular-nums; }
.bring-card { display: grid; grid-template-columns: clamp(220px, 30%, 340px) minmax(0, 1fr); gap: var(--s4) var(--s7); align-items: start; padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); transition: border-color var(--d2) var(--ease); }
.bring-step.current .bring-card { border-color: var(--accent-line); }
.bring-card header { display: grid; gap: 6px; }
.bring-card h3 { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.015em; }
.bring-card header p { color: var(--text-3); font-size: var(--fs-base); line-height: 1.5; }
.bring-card-body { display: grid; gap: var(--s3); min-width: 0; }
/* Step 1: the roles flow across, Save at their end. */
.bring-selection-note { grid-column: 1 / -1; margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.bring-pick { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
/* Step 2: where to post under the header; the message itself takes the wide column. */
.bring-send { grid-column: 1; align-content: start; }
.bring-card:has(> .dc-message) { grid-template-rows: auto 1fr; }
@media (max-width: 640px) { .bring-step { grid-template-columns: 22px minmax(0, 1fr); gap: 10px; } .bring-step-no { width: 22px; height: 22px; font-size: 12px; } .bring-step:not(:last-child)::before { left: 10px; top: calc(var(--s5) + 28px); } .bring-card { padding: var(--s4); } }
.bring-card > .dc-message { grid-column: 2; grid-row: 1 / span 2; }
.bring-roles { display: flex; flex-wrap: wrap; gap: 8px; max-height: 248px; padding: 2px; overflow-y: auto; }
.bring-role { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: var(--control); padding: 0 14px 0 11px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-1); font-size: var(--fs-base); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.bring-role:hover { border-color: var(--border-strong); }
.bring-role:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.bring-role:has(input:disabled) { cursor: default; }
.bring-role:has(input:disabled:not(:checked)) { border-style: dashed; border-color: var(--border-subtle); color: var(--text-3); }
.page-notices > :not([hidden]) { margin-bottom: var(--s5); }
.page-notices [data-member-status-notice] .callout { padding: 0; border: 0; background: none; box-shadow: none; }
.bring-role:has(input:disabled:not(:checked)):hover { border-color: var(--border-subtle); }
.bring-selection-note:empty { display: none; }
.bring-role:focus-within { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.bring-role input[type="checkbox"] { flex: none; width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.bring-role-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bring-role-count { display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); font-size: 12px; }
.bring-role-count svg { width: 12px; height: 12px; }
.bring-post { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.bring-field-label { grid-column: 1 / -1; color: var(--text-3); font-size: var(--fs-sm); font-weight: 470; }
.bring-post select { width: 100%; min-width: 0; min-height: var(--control-lg); padding: 8px 12px; font-size: var(--fs-base); }
.bring-post .btn, .bring-pick > .btn { min-height: var(--control-lg); padding: 0 18px; font-size: var(--fs-base); }
.bring-post .btn { width: 100%; }
/* The Discord message in Discord’s own dark theme, built from the message Lance really posts: the bot and its APP tag,
   the role mentions, the embed with its colour bar, and the link button. */
.dc-message { --dc-bg: #313338; --dc-embed: #2b2d31; --dc-text: #dbdee1; --dc-head: #f2f3f5; --dc-muted: #949ba4; --dc-blurple: #5865f2; --dc-button: #4e5058; --dc-button-hover: #6d6f78;
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; margin: 0; padding: var(--s4) var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--dc-bg); color: var(--dc-text); font-size: 14px; line-height: 1.375; }
.dc-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); background: #11111a; }
.dc-body { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.dc-author { display: flex; align-items: center; gap: 6px; }
.dc-author strong { color: var(--dc-head); font-size: 14px; font-weight: 500; }
.dc-bot { display: inline-flex; align-items: center; height: 15px; padding: 0 4px; border-radius: var(--r-tag); background: var(--dc-blurple); color: #ffffff; font-size: 10px; font-weight: 600; line-height: 15px; }
.dc-content { display: flex; flex-wrap: wrap; gap: 4px; }
.dc-mention { padding: 0 2px; border-radius: var(--r-tag); background: color-mix(in srgb, var(--role) 22%, var(--dc-bg)); color: color-mix(in srgb, var(--role) 78%, #ffffff); font-weight: 500; }
.dc-mention.placeholder { --role: #5865f2; }
.dc-embed { display: grid; gap: 8px; width: 100%; max-width: 600px; margin-top: 6px; padding: 10px 16px 16px 12px; border-left: 4px solid #875bff; border-radius: var(--r-tag); background: var(--dc-embed); }
.dc-embed-title { color: var(--dc-head); font-size: 14px; font-weight: 600; }
.dc-embed-text { display: grid; color: var(--dc-text); font-size: 14px; }
.dc-embed-text strong { color: var(--dc-head); font-weight: 700; }
.dc-line { display: block; min-height: 1.375em; }
.dc-embed-text .dc-mention { font-weight: 500; }
/* Discord lays a message’s buttons out side by side in one row. */
.dc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-button { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 16px; border: 0; border-radius: var(--r-tag); background: var(--dc-button); color: #ffffff; font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; transition: background var(--d1) var(--ease); }
.dc-button:hover { background: var(--dc-button-hover); }
.dc-button:disabled { cursor: default; opacity: 1; }
.dc-button:disabled:hover { background: var(--dc-button); }
.dc-button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.dc-button svg { width: 14px; height: 14px; }
@media (max-width: 1100px) { .bring-card, .bring-card:has(> .dc-message) { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; } .bring-send, .bring-card > .dc-message { grid-column: 1; grid-row: auto; } }
@media (max-width: 640px) { .bring-pick { grid-template-columns: minmax(0, 1fr); } .bring-pick .btn { justify-self: start; } .dc-message { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: var(--s3); } .dc-avatar { width: 32px; height: 32px; } }
@media (max-width: 640px) {
  .bring-in { padding: var(--s5); }
}
.import-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--border); }
.import-foot .trait-pills li { background: var(--bg-sunken); }
/* The same path at the top of every step of the import itself, on its own strip. */
.import-track { margin-bottom: var(--s6); padding: var(--s5) var(--s6); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
.import-notes { display: grid; gap: var(--s2); padding-left: 18px; list-style: disc; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.import-notes li::marker { color: var(--text-3); }
.check-line { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.check-line input { flex: none; margin-top: 3px; }
.figure-value.ok { color: var(--text-1); }
.link-progress { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 10px 8px; }
.link-progress strong { font-size: var(--fs-lg); font-weight: 470; }
.link-progress > span { color: var(--text-3); font-size: var(--fs-sm); }
.link-progress .progress { grid-column: 1 / -1; }
@media (max-width: 900px) { .import-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s5); } .import-step:nth-child(2)::after { display: none; } }
/* On a phone the path turns downward: each mark beside its words, joined by a vertical line. */
@media (max-width: 560px) {
  .import-panel { padding: var(--s5); }
  .import-track { padding: var(--s4); }
  .import-steps { grid-template-columns: minmax(0, 1fr); row-gap: var(--s5); }
  .import-step { grid-template-columns: 30px minmax(0, 1fr); column-gap: var(--s3); row-gap: 2px; }
  .import-step .step-mark { grid-row: span 2; margin-bottom: 0; }
  .import-step h3 { align-self: end; }
  .import-step:not(:last-child)::after, .import-step:nth-child(2)::after { display: block; top: 34px; bottom: calc(4px - var(--s5)); left: 15px; right: auto; width: 1px; height: auto; }
}

/* The role-first import (assets/app/import.js): five steps, the people with the role, saved imports to resume, prices. */
.import-steps.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* Bringing in existing members, the calm version: two plain choices to start, then a one-line four-step track. */
.import-track.slim { margin-bottom: var(--s5); padding: 12px var(--s5); }
.import-steps.compact { display: flex; align-items: center; gap: 10px; }
.import-steps.compact .import-step { display: flex; flex: 1 1 0; align-items: center; gap: 8px; min-width: 0; }
.import-steps.compact .import-step:last-child { flex: 0 0 auto; }
.import-steps.compact .import-step.current:not(:last-child) { flex: 2 1 auto; }
.import-steps.compact .import-step .step-mark { flex: none; width: 24px; height: 24px; margin: 0; }
.import-steps.compact .import-step h3 { font-size: var(--fs-sm); white-space: nowrap; }
.import-steps.compact .import-step:not(:last-child)::after { content: ""; position: static; display: block; flex: 1 1 auto; width: auto; min-width: 12px; height: 1px; background: var(--border-strong); }
.import-steps.compact .import-step.done:not(:last-child)::after { background: var(--ok-line); }
@media (max-width: 560px) {
  .import-track.slim { padding: 10px 14px; }
  .import-steps.compact .import-step:not(.current) h3 { display: none; }
  .import-steps.compact { gap: 6px; }
  .import-steps.compact .import-step { gap: 6px; }
  .import-steps.compact .import-step h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .import-steps.compact .import-step:not(:last-child)::after { min-width: 6px; }
}
.import-start { display: grid; gap: var(--s5); padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); box-shadow: var(--shadow-1); }
.import-start h2 { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.01em; }
.import-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.import-path { display: flex; align-items: center; gap: var(--s3); min-height: 92px; padding: var(--s5); border: 1px solid var(--border-strong); border-radius: var(--r-dialog); background: var(--surface-2); color: var(--text-1); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease); }
.import-path:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-surface); }
.import-path:disabled { border-color: var(--border); background: var(--surface-1); color: var(--text-3); cursor: not-allowed; }
.import-path-text { display: grid; flex: 1; gap: 4px; min-width: 0; }
.import-path-text strong { font-size: var(--fs-md); font-weight: 470; }
.import-path-text span { color: var(--text-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.import-path-go { flex: none; color: var(--accent-text); font-size: 16px; line-height: 1; transition: transform var(--d1) var(--ease); }
.import-path:hover:not(:disabled) .import-path-go { transform: translateX(3px); }
.import-path:disabled .import-path-go { color: var(--text-3); }
@media (max-width: 640px) { .import-start { padding: var(--s5); } .import-paths { grid-template-columns: minmax(0, 1fr); } .import-path { min-height: 76px; } }
.import-reassure { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: var(--fs-sm); }
.import-reassure svg { flex: none; width: 14px; height: 14px; color: var(--ok); }
.import-destination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.import-destination strong { font-size: var(--fs-sm); font-weight: 470; }
.import-destination .btn { margin-left: auto; }
.import-people summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--s3); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); font-size: var(--fs-sm); list-style: none; cursor: pointer; }
.import-people summary::-webkit-details-marker { display: none; }
.import-people[open] summary { border-radius: var(--r-control) var(--r-control) 0 0; }
.import-people .people-list { max-height: 280px; border-top: 0; border-radius: 0 0 var(--r-control) var(--r-control); }
.import-fine summary { color: var(--text-3); cursor: pointer; }
.import-account { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.import-linked { display: grid; gap: var(--s2); }
.import-linked h3 { color: var(--text-2); font-size: var(--fs-sm); font-weight: 470; }
.import-linked ul { display: grid; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.import-linked li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; padding: 8px 12px 8px 14px; }
.import-linked li + li { border-top: 1px solid var(--border-subtle); }
.import-linked-text { display: grid; gap: 1px; min-width: 0; }
.import-linked-text strong { font-size: var(--fs-sm); font-weight: 470; }
.import-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 640px) { .import-choices { grid-template-columns: minmax(0, 1fr); } }
a.import-path { text-decoration: none; }
.import-share { margin: 0; }
.import-share code { overflow-wrap: anywhere; white-space: normal; }
.import-turn-on { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); }
.import-rows > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px var(--s3); padding: var(--s4) var(--s5); font-size: var(--fs-md); font-weight: 470; list-style: none; cursor: pointer; }
.import-rows > summary::-webkit-details-marker { display: none; }
.import-rows[open] > summary { border-bottom: 1px solid var(--border); }
@media (min-width: 561px) and (max-width: 900px) { .import-steps.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } .import-steps.five .import-step:nth-child(4)::after { display: none; } }
.people-list { display: grid; max-height: 440px; margin: 0; padding: 0; overflow-y: auto; list-style: none; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.person { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 6px var(--s4); border-top: 1px solid var(--border-subtle); }
.person:first-child { border-top: 0; }
.person .min0 { display: grid; min-width: 0; }
.person strong { overflow: hidden; font-size: 13px; font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.person span:not(.avatar) { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.people-none { padding: var(--s3) var(--s4); }
.import-filter { max-width: 320px; margin-bottom: var(--s3); }
.import-loading, .import-progress { display: flex; align-items: center; margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.import-progress { margin-bottom: var(--s2); color: var(--text-1); font-size: var(--fs-base); }
.role-setup { max-width: 1120px; }
.setup-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.setup-step { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); color: var(--text-2); text-align: left; font: inherit; cursor: pointer; }
.setup-step.current { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text-1); }
.setup-step:disabled { opacity: .55; cursor: default; }
.setup-step-number { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid var(--border-strong); border-radius: 50%; font-size: var(--fs-sm); }
.setup-step.current .setup-step-number { background: var(--accent); color: white; border-color: var(--accent); }
/* Roles to connect: compact boxes in a wrapping grid, each just wide enough for a role name. */
.setup-role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); max-height: 420px; overflow-y: auto; align-content: start; padding: 2px; }
.setup-role-option { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 2px var(--s2); min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-1); font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.setup-role-option:hover { border-color: var(--border-strong); }
.setup-role-option:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.setup-role-option input { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.setup-role-option .role-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: var(--fs-xs); }
.setup-role-option .role-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-role-option > .muted { flex-basis: 100%; padding-left: 24px; font-size: 11px; }
/* Matching prices: one card per role, its name large; the Stripe prices under it are small tiles in Stripe’s colour. */
.setup-match-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--s4); align-items: start; }
.setup-match { display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.setup-match-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-width: 0; }
.setup-role-big { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-1); font-size: var(--fs-lg); font-weight: 540; letter-spacing: -.01em; }
.setup-role-big span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-role-big .role-dot { flex: 0 0 14px; width: 14px; height: 14px; }
.setup-match-count { flex: none; color: var(--text-3); font-size: var(--fs-xs); font-weight: 470; }
.setup-match-count.ok { color: var(--ok); }
.setup-match-body { display: grid; gap: var(--s3); min-width: 0; }
.setup-price-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--s2); max-height: 280px; overflow-y: auto; padding: 2px; }
.setup-price-option { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); font-size: var(--fs-xs); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
/* A notice inside a role’s card is narrow: its Try again button sits under the text at its own width. */
.setup-match .callout { grid-template-columns: minmax(0, 1fr); justify-items: start; }
.role-setup .callout > .btn { white-space: nowrap; }
.setup-link-row { display: flex; gap: var(--s2); max-width: 460px; }
.setup-link-row input { flex: 1; min-width: 0; }
.setup-price-option:hover { border-color: var(--border-strong); }
.setup-price-option:has(input:checked) { border-color: var(--stripe); background: var(--stripe-soft); }
.setup-price-option:has(input:disabled) { opacity: .55; cursor: default; }
.setup-price-option input { width: 14px; height: 14px; margin: 1px 0 0; accent-color: var(--stripe); }
.setup-price-mark { border-radius: 3px; margin-top: 1px; }
.setup-price-option > div { display: grid; gap: 1px; min-width: 0; }
.setup-price-option strong { overflow: hidden; color: var(--text-1); font-size: var(--fs-xs); font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.setup-price-option span { color: var(--text-3); font-size: 11px; }
.setup-footer, .setup-progress, .setup-share { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.setup-share-link { flex: 1; min-width: 180px; }
.setup-intro p { margin-top: var(--s2); }
.setup-members { max-height: 460px; overflow-y: auto; }
.setup-member { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--border); }
.setup-member:last-child { border-bottom: 0; }
.setup-member .person { padding: 0; border: 0; min-width: 0; }
.setup-member .person > div { min-width: 0; overflow-wrap: anywhere; }
.setup-member-status { display: grid; justify-items: end; gap: var(--s2); flex-shrink: 0; }
.role-setup progress { width: 100%; height: 6px; accent-color: var(--accent); border: 0; border-radius: 4px; }
.setup-announcement { border-top: 1px solid var(--border); padding-top: var(--s4); }
.setup-announcement summary { cursor: pointer; color: var(--accent-text); }
.setup-announcement textarea { margin: var(--s4) 0; width: 100%; resize: vertical; }
.claim-progress { list-style: none; display: grid; gap: var(--s4); padding: 0; margin: 0; }
.claim-progress li { display: flex; align-items: center; gap: var(--s3); }
@media (max-width: 600px) {
  .setup-steps { gap: var(--s2); }
  .setup-step { flex-direction: column; align-items: flex-start; padding: var(--s3); gap: var(--s2); font-size: var(--fs-sm); }
  .setup-role-option, .setup-price-option { padding: var(--s4); gap: var(--s3); }
  .setup-role-option > .muted { display: none; }
  .setup-member { align-items: flex-start; }
  .setup-member-status { max-width: 130px; text-align: right; }
  .setup-footer > .btn { flex: 1 1 auto; }
}
.resume-list { margin: 0; padding: 0; list-style: none; }
.resume-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); min-height: 56px; padding: 8px var(--s5); border-top: 1px solid var(--border-subtle); }
.resume-row:first-child { border-top: 0; }
.resume-row > div:first-child { display: grid; min-width: 0; }
.resume-row strong { font-size: 13px; font-weight: 470; }
.resume-aside { display: flex; align-items: center; gap: var(--s2); }
.price-group legend { margin-bottom: var(--s2); color: var(--text-2); font-size: var(--fs-sm); font-weight: 470; }
.match-row td { padding: var(--s4) var(--s5); background: var(--surface-2); }
.match-form { max-width: 720px; }
.table-more { padding: var(--s3) var(--s5); border-top: 1px solid var(--border-subtle); }
@media (max-width: 560px) {
  .import-steps.five { grid-template-columns: minmax(0, 1fr); row-gap: var(--s4); }
  /* Five steps on a phone: the titles alone, so the path does not push each step below the fold. */
  .import-steps.five .import-step p { display: none; }
  .import-steps.five .import-step .step-mark { grid-row: auto; }
  .import-steps.five .import-step h3 { align-self: center; }
  .import-steps.five .import-step:not(:last-child)::after { top: 32px; bottom: calc(2px - var(--s4)); }
}

/* ---------- Settings sections ---------- */
/* Settings: category navigation with a focused, readable panel. */
.settings-workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 520px; border: 1px solid var(--border); border-radius: var(--r-dialog); overflow: hidden; background: var(--surface-1); }
.settings-nav { padding: var(--s5) var(--s3); background: var(--sidebar-bg); border-right: 1px solid var(--border); }
.settings-nav > p { margin: 0 var(--s3) var(--s3); color: var(--text-3); font-size: var(--fs-xs); }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 4px; border-radius: var(--r-control); text-decoration: none; color: var(--text-2); }
.settings-nav a:hover { background: var(--hover); color: var(--text-1); }
.settings-nav a[aria-current] { background: var(--accent-surface); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--accent-line); }
.settings-nav a[aria-current] > .icon:first-child { color: var(--accent-text); }
.settings-nav .settings-chevron { margin-left: auto; width: 14px; opacity: 0; }
.settings-nav a[aria-current] .settings-chevron { opacity: 1; }
.settings-content { min-width: 0; padding: var(--s7); }
.settings-heading { padding-bottom: var(--s6); margin-bottom: var(--s6); border-bottom: 1px solid var(--border); }
.settings-heading h2 { font-size: var(--fs-xl); font-weight: 470; letter-spacing: -.025em; }
.settings-heading p, .settings-help { margin-top: var(--s2); color: var(--text-2); font-size: var(--fs-sm); }
.settings-help { margin: 0 0 var(--s3); }
.settings-workspace .setting-block { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.settings-workspace .panel { box-shadow: none; }
.settings-workspace .share-strip { flex-wrap: wrap; }
.settings-workspace .share-strip code { overflow-wrap: anywhere; white-space: normal; }
.settings-workspace .setting-row select { max-width: 180px; }
.settings-help a { color: var(--accent-text); }
@media (max-width: 900px) {
  .settings-workspace { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .settings-nav { display: flex; gap: var(--s2); overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: var(--s3); }
  .settings-nav > p, .settings-nav .settings-chevron { display: none; }
  .settings-nav a { flex: none; margin: 0; white-space: nowrap; }
  .settings-content { padding: var(--s5); }
}
@media (max-width: 560px) {
  .settings-workspace .setting-row { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .settings-workspace .setting-row > :last-child { justify-self: start; }
  .settings-workspace .setting-row > .btn-ghost:last-child { margin-left: -10px; }
  .settings-content { padding: var(--s4); }
  .settings-workspace .share-strip { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: var(--s3); }
  .settings-workspace .share-strip code { grid-column: 2 / -1; }
  .settings-workspace .share-strip > button { grid-column: 2; justify-self: start; }
  .settings-workspace .share-strip > a { grid-column: 3; }
}
.settings { display: grid; gap: var(--s5); }
.setting-block { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: var(--s6); padding-bottom: var(--s5); border-bottom: 1px solid var(--border); }
.setting-block:last-child { border-bottom: 0; }
.setting-block > header h2 { font-size: var(--fs-md); font-weight: 470; }
.setting-block > header p { margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: center; }
/* A ghost button at the end of a row lines its text up with the solid buttons and badges above and below it. */
.setting-row > .btn-ghost:last-child { margin-right: -10px; }
.setting-row + .setting-row { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); }
/* Settings options straight on the page (General's Community): a rule between each, no box around them. */
.setting-list { display: grid; }
/* Top bar, left of search: online status can't be read right now (Members, Memberships). */
.presence-off { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-xs); white-space: nowrap; cursor: default; }
.presence-off[hidden] { display: none; }
.presence-off svg { width: 15px; height: 15px; color: var(--info); }
@media (max-width: 900px) { .presence-off > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* Memberships: the join page's welcome as members see it, its description edited right in place. */
.join-welcome-edit { display: flex; align-items: flex-start; gap: var(--s5); margin-bottom: var(--s6); padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--join-sky), var(--bg); }
.jw-link { display: flex; align-items: center; gap: 2px; align-self: flex-start; margin: -6px -8px 0 0; }
.jw-link .btn { cursor: pointer; }
.join-welcome-edit > .avatar { flex: none; width: 56px; height: 56px; margin-top: 16px; border-radius: 14px; font-size: 22px; }
.join-welcome-edit > .min0 { flex: 1; }
.jw-tag { color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.jw-kicker { margin-top: var(--s2); color: var(--text-2); font-size: var(--fs-sm); }
.jw-name { margin-top: 2px; font-size: 26px; font-weight: 550; letter-spacing: -.03em; line-height: 1.15; }
.jw-said { margin-top: 6px; max-width: 70ch; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.jw-form { display: grid; gap: var(--s2); margin-top: 4px; max-width: 760px; }
.jw-field { display: flex; align-items: flex-start; gap: 0; max-width: 100%; }
.jw-pen { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r-control); background: none; color: var(--text-3); cursor: pointer; transition: color var(--d1) var(--ease), background var(--d1) var(--ease); }
.jw-pen svg { width: 14px; height: 14px; }
.join-welcome-edit:hover .jw-pen, .jw-pen:focus-visible { color: var(--text-1); }
.jw-pen:hover { background: var(--hover); }
.jw-form.editing .jw-pen { display: none; }
.jw-say { display: block; width: 100%; max-width: 100%; min-height: 0; margin-left: -8px; padding: 4px 2px 4px 8px; border: 1px solid transparent; border-radius: var(--r-control); background: transparent; color: var(--text-2); font: inherit; font-size: var(--fs-sm); line-height: 1.55; resize: none; overflow: hidden; field-sizing: content; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
/* Not editing, the words are plain text: no box on hover or click, nothing to select; only the pen starts editing. */
.jw-form:not(.editing) .jw-say[readonly], .jw-form:not(.editing) .jw-say[readonly]:hover, .jw-form:not(.editing) .jw-say[readonly]:focus { border-color: transparent; background: transparent; box-shadow: none; outline: none; pointer-events: none; user-select: none; -webkit-user-select: none; }
/* Editing, it is an ordinary text box (border, sunken field, drag the corner to resize), its words still in place. */
.jw-form.editing .jw-say { flex: 0 0 auto; field-sizing: fixed; width: calc(100% + 12px); max-width: none; min-height: 96px; margin-left: -12px; padding: 9px 11px; border-color: var(--border-control); background: var(--bg-sunken); color: var(--text-1); line-height: var(--lh); resize: vertical; overflow: auto; }
.jw-form.editing .jw-say:hover { border-color: var(--text-3); }
.jw-form.editing .jw-say:focus { outline: none; border-color: var(--border-focus); }
.jw-say::placeholder { color: var(--text-3); }
.jw-actions { display: flex; justify-content: flex-end; gap: var(--s2); }
@supports (field-sizing: content) { .jw-form:not(.editing) .jw-say { width: auto; min-width: 12ch; } }
html.js .jw-actions[hidden] { display: none; }
@media (max-width: 640px) { .join-welcome-edit { flex-wrap: wrap; padding: var(--s5); } }
.setting-row strong { font-size: var(--fs-sm); font-weight: 470; }
.setting-row p { margin-top: 2px; }
/* Disconnect: Lance’s own violet frame says "you can come back"; red is kept for the two buttons that remove something. */
.exit-panel { display: grid; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); overflow: hidden; }
.exit-head { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s5); }
.exit-head h2 { font-size: var(--fs-md); font-weight: 470; }
.exit-head p { margin-top: 3px; color: var(--text-2); font-size: var(--fs-sm); }
.exit-rows { display: grid; border-top: 1px solid var(--border); background: var(--surface-1); }
.exit-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); }
.exit-row + .exit-row { border-top: 1px solid var(--border); }
.exit-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-3); }
/* Stripe's mark is a square of its own, so it fills the box edge to edge. */
.exit-mark:has(> img.fill) { overflow: hidden; border-color: transparent; }
.exit-mark > img.fill { display: block; width: 100%; height: 100%; object-fit: cover; }
.exit-row strong { font-size: var(--fs-sm); font-weight: 470; }
.exit-row .btn-ghost:last-child { margin-right: -10px; }
.exit-row p { margin-top: 2px; color: var(--text-3); font-size: var(--fs-sm); }
.btn.btn-exit { border-color: var(--border-strong); background: var(--surface-2); color: var(--bad); }
.btn.btn-exit:hover { border-color: var(--bad); background: var(--bad-surface); color: var(--bad); }
.exit-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.exit-locked svg { width: 14px; height: 14px; }
@media (max-width: 560px) {
  .exit-row { grid-template-columns: 36px minmax(0, 1fr); }
  .exit-action { grid-column: 2; justify-self: start; }
}
.rules { display: grid; gap: 2px; }
.rule { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: start; padding: 11px 0; border-top: 1px solid var(--border); }
.rule:first-child { border-top: 0; padding-top: 0; }
.rule .row-icon { width: 28px; height: 28px; }
.rule strong { display: block; font-size: var(--fs-sm); font-weight: 470; }
.rule > div > span { display: block; margin-top: 2px; color: var(--text-3); font-size: var(--fs-sm); }
.rule .badge { margin-right: 6px; vertical-align: 1px; }

.help.error { color: var(--bad); }
input[aria-invalid="true"] { border-color: var(--bad); }
textarea { display: block; width: 100%; min-height: 144px; padding: 9px 11px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-1); font-size: var(--fs-sm); line-height: var(--lh); resize: vertical; transition: border-color var(--d1) var(--ease); }
textarea:hover { border-color: var(--text-3); }
textarea:focus-visible { border-color: var(--border-focus); }
textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }

/* ---------- Home: a greeting, the communities with the latest beside their heading, this month’s revenue ---------- */
/* The page runs edge to edge: no sidebar, and a bar across the bottom of the screen that the last row must clear. */
.app[data-section="communities"] .main-inner { width: 100%; padding: 72px 40px 112px; }
.home { position: relative; display: grid; justify-items: stretch; }
/* The date and the time of day are the viewer’s own; the page script writes them in. The date’s line keeps its height
   while it is empty so the greeting does not jump, and sits a touch right of the greeting’s edge. */
.home-hello { position: relative; z-index: 1; display: grid; gap: 8px; margin-bottom: 56px; }
.home-date { min-height: 21px; margin-left: 8px; color: var(--text-3); font-size: var(--fs-base); font-weight: 500; line-height: 1.5; }
.home-hello h1 { font-size: clamp(34px, 3.2vw, 52px); font-weight: 600; letter-spacing: -.045em; line-height: 1; overflow-wrap: anywhere; }
/* Latest: one thing at a time, on the heading’s own row. It takes the cell over this month’s revenue, as wide as the
   rail under it, and the word Latest stands still just left of it while each item rises in and the last one rises
   out. What happened is cut with an ellipsis when it is long; where, when and the money never are. Without the page
   script the first item stays. */
.home-latest { grid-area: latest; position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s3); min-width: 0; margin-bottom: var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.home-latest-label { position: absolute; top: 0; right: 100%; display: flex; align-items: center; height: 30px; margin-right: var(--s6); color: var(--text-3); font-size: var(--fs-sm); font-weight: 500; line-height: 1; white-space: nowrap; }
.home-latest-list { position: relative; flex: 1; min-width: 0; height: 30px; overflow: hidden; }
.home-latest-list li { position: absolute; inset: 0; display: flex; visibility: hidden; opacity: 0; transform: translateY(100%); transition: transform var(--d4) var(--ease-out), opacity var(--d4) var(--ease-out); }
.home-latest-list li.on { visibility: visible; opacity: 1; transform: none; }
.home-latest-list li.off { visibility: visible; transform: translateY(-100%); }
.home-latest-list li > a, .home-latest-list li > span { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; height: 30px; color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; }
.home-latest-list li > a:focus-visible { outline-offset: -3px; }
.home-latest-list .avatar { flex: none; width: 24px; height: 24px; font-size: 10px; }
.home-latest-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.home-latest-text b { color: var(--text-1); font-weight: 500; }
.home-latest-list li > a:hover .home-latest-text { color: var(--text-1); }
.home-latest-where { display: flex; flex: none; gap: .35em; color: var(--text-3); font-size: var(--fs-xs); }
.home-latest-where > span:first-child { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; }
.home-latest-list li > .home-latest-note { color: var(--text-1); font-weight: 470; }
.home-latest-note img { display: block; flex: none; width: 22px; height: 18px; }
.home-latest-note > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.home-latest-amount { flex: none; }
/* A signed amount reads like the charts: money in is green, money back out is red. Plain totals stay in ink. */
.home-latest-amount.gain { color: var(--ok); }
.home-latest-amount.loss { color: var(--chart-down); }
/* Communities on the left under their own heading and a quiet rule; this month’s revenue on the right, level with the
   first row of cards, with the button that adds another server directly under it. With no revenue to show, the
   button closes the communities instead, at their bottom right. */
.home-cols { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "head latest" "cards side"; align-items: start; column-gap: 40px; }
.home-cols.alone { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "latest" "cards" "end"; }
/* In one column the line sits under the heading, with the word Latest in the row beside its item. */
.home-cols.alone .home-latest { padding-bottom: 0; border-bottom: 0; }
.home-cols.alone .home-latest-label { position: static; height: auto; margin-right: 0; }
.home-side { grid-area: side; display: grid; gap: var(--s3); min-width: 0; }
.home-heading { grid-area: head; margin-bottom: var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 600; letter-spacing: -.02em; line-height: 1.5; }
.home-cards { grid-area: cards; display: grid; gap: var(--s3); min-width: 0; }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); min-width: 0; }
.home-end { display: flex; justify-content: flex-end; }
.home-cols.alone .home-end { grid-area: end; padding-top: var(--s5); }
.home-side .home-add { width: 100%; }
.home-add { min-height: 42px; padding: 0 18px; border-radius: var(--r-panel); font-size: var(--fs-base); }
/* No server with Lance yet: the date, the greeting and the button stacked in the middle of the page. */
.home.home-new { justify-items: center; align-content: center; min-height: calc(100vh - 260px); text-align: center; }
.home.home-new .home-hello { justify-items: center; margin-bottom: 64px; }
.home.home-new .home-date { margin-left: 0; }
.home.home-new .home-start { justify-items: center; }
.home-start { position: relative; z-index: 1; display: grid; justify-items: start; gap: var(--s4); }
.home-start-btn { gap: 12px; min-height: 60px; padding: 0 30px; border-radius: var(--r-dialog); font-size: 15px; font-weight: 540; box-shadow: 0 0 0 1px var(--accent-line), 0 10px 30px -12px #703efc; transition: transform var(--d2) var(--ease), background var(--d2) var(--ease); }
.home-start-btn:hover { transform: translateY(-2px); }
.home-start-btn svg { width: 20px; height: 20px; }
.home-start p { color: var(--text-3); font-size: var(--fs-md); }
.home-add svg { width: 16px; height: 16px; }
/* A community: its picture, name and state, how its sales have run over the last 30 days, and its three numbers. The
   whole card opens the community (its name’s link is stretched over it); the mark in the top corner opens the server
   in Discord instead. Hovering lifts the card. */
.home-card { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: var(--s3); min-width: 0; padding: 14px var(--s4); border: 1px solid var(--border-subtle); border-radius: var(--r-dialog); background: var(--surface-1); color: inherit; text-decoration: none; transition: transform var(--d3) var(--ease), border-color var(--d3) var(--ease), background var(--d3) var(--ease); }
.home-card.link:hover, .home-card.link:focus-within, a.home-card:hover, a.home-card:focus-visible { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-3px); }
.home-card.link:has(.home-card-open:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.home-card-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.home-card-top > .avatar { width: 34px; height: 34px; border-radius: var(--r-panel); font-size: 14px; }
.home-card-name { display: grid; flex: 1; gap: 2px; min-width: 0; }
.home-card-name strong { display: block; overflow: hidden; font-size: var(--fs-md); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.home-card-name span { color: var(--text-2); font-size: var(--fs-sm); }
.home-card-state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.home-card-open { min-width: 0; color: inherit; text-decoration: none; }
.home-card-open:focus-visible { outline: none; }
.home-card-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.home-card-out { position: relative; z-index: 2; display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: var(--r-control); color: var(--text-3); transition: background var(--d2) var(--ease), color var(--d2) var(--ease); }
.home-card-out svg { width: 15px; height: 15px; }
.home-card-out:hover, .home-card-out:focus-visible { background: var(--surface-3); color: var(--text-1); }
.home-card-chart { height: 50px; }
.home-spark { display: block; width: 100%; height: 100%; overflow: visible; }
.home-spark .area { fill: var(--chart-fill); }
.home-spark .line { fill: none; stroke: var(--chart-line); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* What a community still needs, in the chart’s place. */
.home-card-setup { display: grid; align-content: center; gap: 2px; min-height: 50px; padding: 6px var(--s3); border: 1px dashed var(--warn-line); border-radius: var(--r-panel); background: var(--warn-surface); color: var(--text-2); font-size: var(--fs-xs); }
.home-card-setup strong { color: var(--warn); font-weight: 500; }
.home-card-note { margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.home-card-foot { display: grid; grid-template-columns: auto auto auto; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--border-subtle); }
.home-card-foot dt { color: var(--text-3); font-size: var(--fs-xs); }
.home-card-foot dd { display: flex; align-items: center; gap: var(--s2); min-height: 28px; font-size: var(--fs-md); font-weight: 500; white-space: nowrap; }
.home-card-foot dd small { color: var(--text-3); font-size: var(--fs-xs); font-weight: 400; }
.home-card-foot .avatar-stack .avatar { border-color: var(--surface-1); transition: border-color var(--d3) var(--ease); }
.home-card.link:hover .avatar-stack .avatar, .home-card.link:focus-within .avatar-stack .avatar { border-color: var(--surface-2); }
/* One dot per membership, in its Discord role’s colour. */
/* One dot per membership, in its Discord role’s colour. */
.home-dots { display: inline-flex; gap: 4px; }
.home-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Arranging Home (owner.js, Home arrangement): which communities show, in what order, and in which style. The tools sit
   on the heading’s line; each card’s corner holds its reorder handle, Hide and Discord, quiet until the card is
   hovered or focused. Everything here is a preference of this browser. */
.home-tools { position: relative; z-index: var(--z-menu); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.home-settings { position: relative; margin-left: auto; }
.home-hidden-toggle:not([hidden]) { margin-left: auto; }
.home-hidden-toggle:not([hidden]) + .home-settings { margin-left: 0; }
.home-settings > summary { list-style: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-control); color: var(--text-2); cursor: pointer; transition: color var(--d1) var(--ease), background var(--d1) var(--ease); }
.home-settings > summary::-webkit-details-marker { display: none; }
.home-settings > summary:hover, .home-settings[open] > summary { color: var(--text-1); background: var(--hover); }
.home-settings > summary:focus-visible, .home-settings-group button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.home-settings > summary svg { width: 16px; height: 16px; }
.home-settings-panel { position: absolute; z-index: var(--z-menu); top: calc(100% + 6px); right: 0; display: grid; gap: 6px; width: 200px; padding: 6px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-3); box-shadow: var(--shadow-2); transform-origin: top right; animation: menu-in var(--d2) var(--ease); }
.home-settings-group { display: grid; gap: 2px; }
.home-settings-group + .home-settings-group { padding-top: 6px; border-top: 1px solid var(--border); }
.home-settings-group p { padding: 4px 8px; color: var(--text-3); font-size: var(--fs-xs); }
.home-settings-group button { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--control); padding: 0 8px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--text-2); font: inherit; font-size: 12px; text-align: left; cursor: pointer; transition: color var(--d1) var(--ease), background var(--d1) var(--ease); }
.home-settings-group button:hover { color: var(--text-1); background: var(--hover); }
.home-settings-group button[aria-pressed="true"] { color: var(--text-1); }
.home-settings-group button svg { width: 14px; height: 14px; color: var(--accent-text); opacity: 0; }
.home-settings-group button[aria-pressed="true"] svg { opacity: 1; }
.home-seg { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--border-subtle); border-radius: var(--r-panel); background: var(--bg-sunken); }
.home-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 26px; padding: 0 9px; border: 0; border-radius: var(--r-tag); background: transparent; color: var(--text-3); font: inherit; font-size: 12px; font-weight: 470; cursor: pointer; transition: color var(--d1) var(--ease), background var(--d1) var(--ease); }
.home-seg button:hover { color: var(--text-1); background: var(--hover); }
.home-seg button[aria-pressed="true"] { color: var(--text-1); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.home-seg button:focus-visible, .home-hidden-toggle:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.home-seg-count { color: var(--text-3); font-size: 11px; }
.home-seg button[aria-pressed="true"] .home-seg-count { color: var(--text-2); }
/* "1 hidden" is a plain text button beside the settings gear: no box, it lightens on hover and stays light while shown. */
.home-hidden-toggle { height: 32px; padding: 0 6px; border: 0; border-radius: var(--r-control); background: none; color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; transition: color var(--d1) var(--ease); }
.home-hidden-toggle:hover { color: var(--text-1); }
.home-hidden-toggle[aria-pressed="true"] { color: var(--text-1); }
.home-hidden-toggle[hidden] { display: none; }
.home-card-tools { position: relative; z-index: 2; display: flex; flex: none; align-items: center; gap: 2px; margin-left: auto; }
.home-card-tool { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--r-control); background: transparent; color: var(--text-3); font: inherit; cursor: pointer; opacity: 0; transition: opacity var(--d2) var(--ease), background var(--d2) var(--ease), color var(--d2) var(--ease); }
.home-card:hover .home-card-tool, .home-card:focus-within .home-card-tool, .home-card.is-hidden [data-home-hide] { opacity: 1; }
.home-card-tool:hover, .home-card-tool:focus-visible { background: var(--surface-3); color: var(--text-1); }
.home-card-tool:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.home-card-tool svg { width: 15px; height: 15px; }
.home-reorder { cursor: grab; touch-action: none; font-size: 16px; line-height: 1; }
.m-dragging .home-reorder { cursor: grabbing; }
.home-grid[data-order-locked] .home-reorder { display: none; }
[data-home-hide] svg + svg, .home-card.is-hidden [data-home-hide] svg:first-child { display: none; }
.home-card.is-hidden [data-home-hide] svg + svg { display: block; }
/* Touch screens have no hover, so the corner tools stay in view there. */
@media (hover: none) { .home-card-tool { opacity: 1; } }
/* A hidden community, shown on request: dashed and dimmed, with Show in its corner. */
.home-card.is-hidden { border-style: dashed; background: var(--surface-1); }
.home-card.is-hidden > :not(.home-card-top), .home-card.is-hidden .home-card-top > :not(.home-card-tools) { opacity: .45; }
.home-grid-empty { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s5); color: var(--text-2); font-size: var(--fs-sm); }
.home-grid-empty[hidden] { display: none; }
.home-month-list li.is-hidden > span::after { content: " · hidden"; color: var(--text-3); }

/* Large tiles: no chart and no numbers, the same size as a card. The server’s picture and name, big, its state, and
   where pressing it goes; hovering lifts the tile, grows the picture a little and moves the arrow along. */
.home-card-go { display: none; }
.home-grid.tiles .home-card { gap: 0; min-height: var(--home-card-h, 196px); padding: 18px var(--s4) 14px; }
.home-grid.tiles :is(.home-card-chart, .home-card-setup, .home-card-foot, .home-card-note) { display: none; }
.home-grid.tiles .home-card-top { flex-wrap: wrap; align-items: flex-start; row-gap: 16px; }
.home-grid.tiles .home-card-top > .avatar { width: 60px; height: 60px; border-radius: 16px; font-size: 22px; box-shadow: 0 0 0 1px var(--border); transition: transform var(--d3) var(--ease); }
.home-grid.tiles .home-card-tools { order: 1; }
.home-grid.tiles .home-card-name { order: 2; flex-basis: 100%; gap: 6px; }
.home-grid.tiles .home-card-name strong { display: -webkit-box; overflow: hidden; font-size: 20px; letter-spacing: -.025em; line-height: 1.2; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-grid.tiles .home-card-end { margin-top: auto; }
.home-grid.tiles .home-card-go { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-subtle); color: var(--text-3); font-size: var(--fs-sm); transition: color var(--d2) var(--ease); }
.home-card-go svg { width: 15px; height: 15px; transition: transform var(--d3) var(--ease); }
.home-grid.tiles .home-card.link:hover, .home-grid.tiles .home-card.link:focus-within { border-color: var(--accent-line); }
.home-grid.tiles .home-card.link:hover .home-card-go, .home-grid.tiles .home-card.link:focus-within .home-card-go { color: var(--accent-text); }
@media (prefers-reduced-motion: no-preference) {
  .home-grid.tiles .home-card.link:hover .home-card-go svg { transform: translateX(3px); }
  .home-grid.tiles .home-card.link:hover .home-card-top > .avatar { transform: scale(1.05); }
}
/* A connection the viewer can no longer open: not a link, so it does not react like one. */
.home-card-end { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--border-subtle); }
.home-card-members { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; color: var(--text-2); font-size: var(--fs-xs); }
.home-card-members strong { color: var(--text-1); font-size: var(--fs-md); font-weight: 500; }
/* With no communities yet, the one card adds the first server. */
.home-card.add { align-items: center; justify-content: center; gap: var(--s2); min-height: 150px; border-style: dashed; border-color: var(--border-strong); background: var(--bg); color: var(--text-2); text-align: center; }
.home-card.add strong { font-size: var(--fs-sm); font-weight: 470; }
.home-add-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--sky); border-radius: 50%; color: var(--sky); transition: transform var(--d3) var(--ease), background var(--d3) var(--ease), color var(--d3) var(--ease); }
.home-add-mark svg { width: 16px; height: 16px; }
a.home-card.add:hover, a.home-card.add:focus-visible { border-style: solid; color: var(--text-1); }
a.home-card.add:hover .home-add-mark, a.home-card.add:focus-visible .home-add-mark { background: var(--sky); color: #07070b; transform: rotate(90deg); }
/* This month: successful payments since the first, how they added up day by day, and what each community brought in. */
.home-rail { display: grid; gap: var(--s2); padding: var(--s5) 22px var(--s2); border: 1px solid var(--border-subtle); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; }
.home-rail > * { min-width: 0; }
.home-kicker { color: var(--text-3); font-size: var(--fs-sm); font-weight: 500; }
.home-month-value { font-size: 28px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.home-month-sub { color: var(--text-3); font-size: var(--fs-sm); }
.home-month-chart { height: 70px; margin: var(--s2) -22px 0; }
.home-month-list li { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 40px; border-top: 1px solid var(--border-subtle); color: var(--text-2); font-size: var(--fs-sm); }
.home-month-list li:first-child { border-top: 0; }
.home-month-list li > span:not(.avatar) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-month-list li strong { margin-left: auto; color: var(--text-1); font-weight: 500; }
.home-month-list .avatar { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
/* The bar across the bottom of the screen, black from edge to edge: the Lance Dashboard logo at its left, and at its
   right the account links directly beside the viewer and sign out. It takes the sidebar’s place on this page. */
.home-bar { position: fixed; z-index: var(--z-sticky); inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); height: 52px; padding: 0 24px; border-top: 1px solid var(--border); background: #000000; }
.home-bar-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.home-bar-end { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-logo { display: block; flex: none; width: 108px; height: auto; overflow: visible; }
.home-stripe, .home-word { fill: #ffffff; }
.home-chip { fill: var(--accent); transform-box: fill-box; transform-origin: center; }
.home-letters text { fill: var(--sky); font-family: var(--font); font-size: 82px; font-weight: 600; }
.dock-links { display: flex; align-items: center; gap: 2px; }
.dock-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border-radius: var(--r-panel); color: var(--text-2); font-size: var(--fs-sm); font-weight: 470; text-decoration: none; white-space: nowrap; transition: background var(--d2) var(--ease), color var(--d2) var(--ease), transform var(--d2) var(--ease); }
.dock-links a svg { width: 16px; height: 16px; color: var(--text-3); transition: color var(--d2) var(--ease), transform var(--d2) var(--ease); }
.dock-links a:hover, .dock-links a:focus-visible { background: var(--surface-2); color: var(--text-1); transform: translateY(-2px); }
.dock-links a:hover svg, .dock-links a:focus-visible svg { color: var(--sky); transform: scale(1.12); }
.dock-links a.dock-plan svg, .dock-links a.dock-plan:hover svg { color: var(--gold); }
.dock-links a.nav-affiliate svg, .dock-links a.nav-affiliate:hover svg { color: var(--ok); }
.dock-rule { flex: none; width: 1px; height: 24px; background: var(--border-strong); }
.home-bar .who { gap: 2px; padding: 0; }
.home-bar .who-account { flex: 0 1 auto; min-height: 34px; padding: 2px 8px 2px 4px; border-radius: var(--r-panel); }
.home-bar .who-meta strong { max-width: 160px; }
.home-bar .who-meta span { max-width: 160px; }
@media (min-width: 2300px) { .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1500px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .home-cols { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "latest" "cards" "side"; }
  .home-latest { padding-bottom: 0; border-bottom: 0; }
  .home-latest-label { position: static; height: auto; margin-right: 0; }
  .home-side { margin-top: var(--s7); }
}
@media (max-width: 720px) {
  .app[data-section="communities"] .main-inner { padding: var(--s5) var(--s4) 104px; }
  .home-hello { margin-bottom: var(--s8); }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-bar { gap: var(--s2); padding: 0 var(--s3); }
  .home-bar-end { gap: 4px; }
  .home-logo { width: 104px; }
  .home-bar-brand .env { display: none; }
  .dock-links a { padding: 0 11px; }
  .dock-links a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .home-bar .who-meta { display: none; }
  .home-bar .who-account { flex: none; padding: 2px 6px; }
}
/* The smallest phones: the icons sit a little closer so the account picture and sign out both keep their room. */
@media (max-width: 360px) { .dock-links a { padding: 0 7px; } .home-bar-end { gap: 2px; } }
/* Arrival, only when motion is welcome: the page’s parts rise in order, each card’s line draws itself, and the logo’s
   stripes slide in along their lean with the chip popping after them. Afterwards only the Latest line’s items and the
   aura behind the page keep moving. The rise lets go once it ends, so hovering a card can still lift it. */
@media (prefers-reduced-motion: no-preference) {
  .home-stripe.lean { animation: home-lean 700ms var(--ease-out) both; animation-delay: calc(var(--n) * 90ms + 80ms); }
  .home-stripe.bar { animation: home-bar 600ms var(--ease-out) both; animation-delay: calc(var(--n) * 90ms + 110ms); }
  .home-chip { animation: home-chip-in 520ms 760ms cubic-bezier(.3, 1.6, .5, 1) both; }
  .home-word { animation: home-word 800ms 420ms var(--ease-out) both; }
  /* The rest of the page follows the greeting on the same long, settling curve, once its first words are up. */
  .home-latest, .home-heading, .home-rail, .home-end { animation: home-rise 900ms var(--ease-cine) backwards; }
  .home-heading { animation-delay: 420ms; }
  .home-tools { animation: home-rise 900ms 460ms var(--ease-cine) backwards; }
  .home-latest { animation-delay: 480ms; }
  .home-rail { animation-delay: 540ms; }
  .home-end { animation-delay: 620ms; }
  .home-start { animation: home-rise 900ms 480ms var(--ease-cine) backwards; }
  .home-card { animation: home-rise 900ms var(--ease-cine) backwards; animation-delay: calc(var(--i, 0) * 70ms + 500ms); }
  .home-grid.is-live .home-card { animation-duration: 420ms; animation-delay: calc(var(--i, 0) * 40ms); }
  .home-spark { animation: home-draw 1300ms 820ms var(--ease-cine) backwards; }

  /* "Good evening, Bruce." The date draws its letters together first; each word of the greeting rises out from under
     its own edge, one after another; then, a beat later, the name rises and its light comes up from dim to white.
     The heading is held back for a moment at load so the script can set the words before anything shows; without
     the script it simply appears. */
  .home-hello h1 { animation: hello-hold 1ms 450ms backwards; }
  .home-hello.is-staged h1 { animation: none; }
  .home-hello.is-staged .home-date { animation: hello-date 1200ms var(--ease-cine) backwards; }
  .home-hello.is-staged .hello-w > span { animation: hello-rise 1000ms var(--ease-cine) backwards; animation-delay: calc(120ms + var(--w, 0) * 110ms); }
  .home-hello.is-staged .hello-name > span { animation: hello-rise 1100ms var(--ease-cine) 520ms backwards, hello-light 1500ms ease-out 520ms backwards; }
}
.home { --ease-cine: cubic-bezier(.16, 1, .3, 1); }
/* Each word of the greeting, and the name, is its own clipped line (room is kept for the tails of g and y). */
.hello-w, .hello-name { display: inline-block; overflow: clip; padding-bottom: .14em; margin-bottom: -.14em; vertical-align: bottom; }
.hello-w > span, .hello-name > span { display: inline-block; }
@keyframes hello-hold { from { opacity: 0; } to { opacity: 0; } }
@keyframes hello-date { from { opacity: 0; letter-spacing: .3em; } to { opacity: 1; letter-spacing: 0; } }
@keyframes hello-rise { from { transform: translateY(115%); } to { transform: none; } }
@keyframes hello-light { from { color: var(--text-3); } 35% { color: var(--text-3); } to { color: var(--text-1); } }
@keyframes home-lean { from { opacity: 0; transform: translate(52px, -100px); } to { opacity: 1; transform: none; } }
@keyframes home-bar { from { opacity: 0; transform: translateX(-90px); } to { opacity: 1; transform: none; } }
@keyframes home-chip-in { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes home-word { from { opacity: 0; transform: translateX(44px); } to { opacity: 1; transform: none; } }
@keyframes home-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes home-draw { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% 0 -10% 0); } }

/* ---------- Link lists ---------- */
.link-rows { display: grid; }
.link-rows a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 13px var(--s5); border-top: 1px solid var(--border); text-decoration: none; transition: background var(--d1) var(--ease); }
.link-rows a:first-child { border-top: 0; }
.link-rows a:hover { background: var(--hover); }
.link-rows a > svg { width: 15px; height: 15px; color: var(--text-3); }
.link-rows a > span { display: grid; }
.link-rows strong { font-size: var(--fs-sm); font-weight: 470; }
.link-rows a > span > span { color: var(--text-3); font-size: var(--fs-xs); }

/* ---------- Membership creation ---------- */
.wizard { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s5); padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.wizard li { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); font-size: var(--fs-sm); font-weight: 470; }
.wizard li .step-mark { width: 26px; height: 26px; }
.wizard li.current { color: var(--text-1); }
.wizard li.current .step-mark { color: #fff; border-color: transparent; background: var(--accent-fill); }
.wizard li.done .step-mark { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.wizard li + li::before { content: ""; width: 34px; height: 1px; margin-right: var(--s2); background: var(--border); }
.wizard-foot { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s5); }
.wizard-foot.flush { margin-top: 0; }
.join-preview { padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--bg-sunken); }

/* ---------- Public pages: one card for everything outside the dashboard ---------- */
/* Sign-in, the way a login looks: what Lance does on the left, large, and a plain card on the right with one Discord
   button. On a phone the line sits above the card. */
.signin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s9); align-items: center; width: min(100%, 1040px); margin: 0 auto; }
.public:has(.signin) .public-main { display: grid; align-content: center; width: min(100% - 48px, 1040px); padding: var(--s6) 0 var(--s9); }
.signin-pitch .signin-title { font-size: clamp(32px, 3.6vw, 52px); font-weight: 470; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.signin-pitch .signin-title em { font-style: normal; color: var(--accent-text); }
.signin-pitch > p:not(.signin-title) { max-width: 460px; margin-top: var(--s5); color: var(--text-2); font-size: 16px; }
.signin-card { width: min(100%, 420px); justify-self: end; }
.signin-body { padding: var(--s7); }
.signin-body h1 { font-size: 22px; font-weight: 540; line-height: var(--lh-tight); letter-spacing: -.02em; }
.signin-lede { margin-top: 6px; color: var(--text-2); }
/* Nobody is signed in yet: a plain person mark where their Discord picture will be. */
.signin-who { display: flex; align-items: center; gap: var(--s4); }
.signin-who .avatar { --avatar-bg: var(--surface-3); --avatar-fg: var(--text-3); box-shadow: inset 0 0 0 1px var(--border); }
.signin-card .discord-btn { width: 100%; justify-content: center; gap: 10px; min-height: 46px; margin-top: var(--s6); border-radius: var(--r-panel); font-size: var(--fs-md); }
.signin-card .discord-btn img { width: 20px; height: 20px; }
.signin-body .fine { display: flex; align-items: center; gap: 6px; margin-top: var(--s4); color: var(--text-3); font-size: var(--fs-xs); }
.signin-body .fine svg { width: 13px; height: 13px; flex: none; }
@media (prefers-reduced-motion: no-preference) { html.js .public-main > .signin { animation: none; } html.js .signin > * { animation: rise calc(var(--d4) + 200ms) var(--ease-out) backwards; } html.js .signin > .signin-card { animation-delay: 90ms; } }
@media (max-width: 860px) {
  .signin { grid-template-columns: minmax(0, 1fr); gap: var(--s7); justify-items: center; text-align: center; }
  .signin-pitch > p:not(.signin-title) { margin-inline: auto; }
  .signin-card { justify-self: stretch; width: 100%; max-width: 440px; margin: 0 auto; text-align: left; }
}
@media (max-width: 560px) { .public:has(.signin) .public-main { width: min(100% - 32px, 1040px); } .signin-body { padding: var(--s6); } }
.notice-card .fine { display: flex; align-items: center; gap: 6px; margin-top: var(--s3); color: var(--text-3); font-size: var(--fs-xs); }
.notice-card .fine svg { width: 13px; height: 13px; flex: none; }

.public { position: relative; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
/* The member storefront gets a violet atmosphere while the card stays opaque and readable. */
/* Every external page shares the join page’s look: the same background, the same card. */
/* The galaxy fills the whole window, at every size: four soft violet glows (one in each part of the screen, so no corner
   falls to plain black), pinned behind the page so a long page never scrolls past its end into black. The window gets
   the same sky, so the overscroll matches. */
/* The storefront's violet glows, shared with the join page section on Memberships so the two look alike. */
:root { --join-sky: radial-gradient(ellipse at 12% 12%, rgba(112,62,252,.26), transparent 52%), radial-gradient(ellipse at 90% 70%, rgba(85,34,165,.22), transparent 48%), radial-gradient(ellipse at 18% 96%, rgba(84,40,200,.15), transparent 46%), radial-gradient(ellipse at 88% 4%, rgba(70,36,170,.13), transparent 42%); }
html:has(body > .public) { --public-sky: var(--join-sky); background: var(--public-sky), var(--bg); background-attachment: fixed; }
html:has(body > .public) body, .public { background: transparent; }
.public { isolation: isolate; }
.public::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--public-sky, none), var(--bg); }
/* Above the page: pulling past the top (a phone's or a Mac trackpad's rubber-band) shows the same sky, mirrored so it
   meets the fixed sky at the top edge with no line, instead of plain black. */
.public::after { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 100vh; z-index: -1; pointer-events: none; background: var(--public-sky, none), var(--bg); transform: scaleY(-1); }
.public .public-card { border-color: #44325f; box-shadow: 0 12px 56px rgba(53,22,105,.22); }
.public .public-head { background: #140e22; }
.public > * { position: relative; }
.public-top { display: flex; align-items: center; justify-content: space-between; padding: var(--s5) clamp(32px, 7vw, 136px); }
.public-top img { display: block; width: 112px; height: auto; }
/* Top right of a join page: test mode, then the Discord account this browser is signed in as and a way to switch it. */
.public-top-end { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
/* The account menu on public pages: the signed-in Discord account as a button, opening what a member can do here. */
.account-menu { position: relative; }
.account-menu > summary { display: flex; align-items: center; gap: var(--s2); min-width: 0; max-width: 260px; min-height: var(--control-lg); padding: 6px 12px 6px 7px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); color: var(--text-2); cursor: pointer; list-style: none; transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease); }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover { border-color: var(--border-strong); background: var(--surface-2); }
/* Open, the button and its menu are one piece: the button keeps the menu's surface and border, loses its bottom edge, and
   the menu continues straight down from it, its top right corner square where the two meet. */
.account-menu[open] > summary { position: relative; z-index: 31; border-color: var(--border); border-bottom-color: var(--surface-1); border-radius: var(--r-panel) var(--r-panel) 0 0; background: var(--surface-1); }
.account-menu > summary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.account-menu > summary .avatar { flex: none; }
.account-menu > summary > .icon { flex: none; width: 14px; height: 14px; color: var(--text-3); transition: transform var(--d2) var(--ease); }
.account-menu[open] > summary > .icon { transform: rotate(180deg); }
.account-menu-panel { position: absolute; top: calc(100% - 1px); right: 0; z-index: 30; display: grid; width: min(320px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--border); border-radius: var(--r-panel) 0 var(--r-panel) var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-2); }
.account-menu-head { display: flex; align-items: center; gap: var(--s3); padding: 10px 10px 12px; border-bottom: 1px solid var(--border-subtle); }
.account-menu-head > div > strong { display: block; overflow: hidden; color: var(--text-1); font-size: var(--fs-md); font-weight: 520; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-head > div > span { display: block; overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.account-menu-list { display: grid; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.account-menu-item { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-control); background: none; color: var(--text-2); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.account-menu-item:hover, .account-menu-item:focus-visible { background: var(--surface-2); color: var(--text-1); outline: none; }
.account-menu-item > .icon { flex: none; width: 16px; height: 16px; color: var(--text-3); }
.account-menu-item strong { color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; }
.account-menu-switch { margin-top: 6px; }
.account-menu-switch:hover > .icon { color: var(--bad); }
@media (max-width: 640px) { .account-menu > summary { padding-right: 8px; } }
.join-account-mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; color: var(--text-3); }
.join-account-mark .icon { width: 16px; height: 16px; }
.join-account-name { display: grid; min-width: 0; line-height: 1.25; }
.join-account-name strong { overflow: hidden; color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.join-account-name span { overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .join-account-name { display: none; } }
/* Under Join: which account it charges, and the same switch. */
.join-as { margin-top: var(--s2); color: var(--text-3); font-size: var(--fs-sm); text-align: center; }
.join-as strong { color: var(--text-2); font-weight: 500; }
.join-as-switch { padding: 0; border: 0; background: none; color: var(--accent-text, var(--accent)); font: inherit; cursor: pointer; }
.join-as-switch:hover { text-decoration: underline; }
@media (max-width: 560px) { .public-top { padding: var(--s4); } }
.public-main { width: min(100% - 32px, 580px); margin: 0 auto; padding: var(--s5) 0 var(--s8); }
.public-card { border: 1px solid var(--border-strong); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; }
.public-card > * + * { border-top: 1px solid var(--border); }
/* The same card inside the dashboard, for a page an admin's permissions leave out: kept to a readable width. */
.public-head { position: relative; display: flex; align-items: center; gap: var(--s5); padding: var(--s6) var(--s6) var(--s5); }
/* With a few lines of text the icon stays beside the title, not halfway down the paragraph. */
.notice-card:not(.in-app-notice) .public-head { align-items: flex-start; }
.notice-card:not(.in-app-notice) .public-head > .row-icon { margin-top: 2px; }
.public-head .avatar { box-shadow: inset 0 0 0 1px var(--border-strong); }
.public-head h1 { font-size: var(--fs-xl); font-weight: 470; line-height: var(--lh-tight); letter-spacing: -.03em; overflow-wrap: anywhere; text-wrap: balance; }
.public-head p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-sm); }
.public-section { padding: var(--s5) var(--s6); }
.claim-lead { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.public-section > h2 { margin-bottom: var(--s3); color: var(--text-3); font-size: 12px; font-weight: 470; }
/* Phones: a public page’s buttons stack, and a ghost button lines its text up with the button above it. */
@media (max-width: 560px) { .public-section .button-row { flex-direction: column; align-items: flex-start; } .public-section .button-row > .btn-ghost, .public-section .button-row > form > .btn-ghost { margin-left: -14px; } }
.offer { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s4) var(--s4) var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); transition: border-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease), transform var(--d2) var(--ease); }
.offer:hover { border-color: var(--accent-line); }
.offer:target { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); scroll-margin-top: var(--s6); }
.offer + .offer { margin-top: var(--s3); }
/* A membership with several prices: its billing-period menu and Join button share the row’s end. */
.offer:has(.offer-anchor:target) { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); scroll-margin-top: var(--s6); }
.offer-anchor { position: absolute; top: 0; }
.offer:has(> .offer-photo) { grid-template-columns: auto minmax(0, 1fr) auto; }
.offer-photo { width: 44px; height: 44px; border-radius: var(--r-control); object-fit: cover; box-shadow: inset 0 0 0 1px var(--border-strong); }
.offer .offer-about, .public-head .offer-about { max-width: 60ch; margin-top: 4px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.offer-choice { grid-template-columns: minmax(0, 1fr); }
.offer-choice:has(> .offer-photo) { grid-template-columns: auto minmax(0, 1fr); }
.offer-choice > .offer-pick, .offer-choice > .badge { grid-column: 1 / -1; }
.offer-pick { display: flex; align-items: center; gap: var(--s4); }
.offer-choice .offer-pick select { flex: 1; }
.offer-pick[hidden] { display: none; }
.offer-pick select { width: auto; min-width: 168px; min-height: var(--control); }
.offer-more { margin-top: var(--s4); font-size: var(--fs-sm); }
.offer-more a { color: var(--text-2); }
.offer-more a:hover { color: var(--text-1); }
.public-membership .offer-photo { width: 56px; height: 56px; }
.public-membership .offer-role { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--text-3); font-size: var(--fs-xs); }
.offer h3 { font-size: var(--fs-md); font-weight: 470; overflow-wrap: anywhere; }
.offer .price { margin-top: 3px; color: var(--text-2); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.offer .price strong { color: var(--text-1); font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.offer .offer-role { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--text-3); font-size: var(--fs-xs); }
/* The rating members gave on the Discord post: one gold star, the average, the count. */
.offer .offer-rating { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; color: var(--text-3); font-size: var(--fs-xs); }
.offer .offer-rating strong { color: var(--text-1); font-size: var(--fs-sm); font-weight: 540; font-variant-numeric: tabular-nums; }
.offer-rating-star { color: var(--gold); }
.offer .offer-role svg { width: 12px; height: 12px; color: var(--discord); }
/* Purchased is a badge, not a bar: on a phone the offer stacks and the badge keeps its own width. */
.offer > .badge { justify-self: start; }
.offer > a.btn-primary { align-self: end; }
/* A public page one level down: the way back sits to the left of its card, like the dashboard’s. */
/* A membership’s own page: the whole page, not a card. Who it is for on the left, and a checkout on the right. */
.public-main:has(.join-page) { width: 100%; margin: 0; padding: var(--s7) clamp(32px, 7vw, 136px); }
.public:has(.join-page) { --public-sky: radial-gradient(ellipse at 12% 12%, rgba(112,62,252,.075), transparent 52%), radial-gradient(ellipse at 90% 70%, rgba(85,34,165,.06), transparent 48%); }
.public:has(.join-page) .public-top, .public:has(.review-page) .public-top { padding-inline: clamp(32px, 7vw, 136px); }
.public:has(.join-page) .public-foot { justify-content: space-between; padding-inline: clamp(32px, 7vw, 136px); }
.join-page { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: clamp(48px, 6vw, 112px); align-items: start; }
.join-hero { min-width: 0; }
.join-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--s5); color: var(--text-3); font-size: var(--fs-sm); text-decoration: none; transition: color var(--d1) var(--ease); }
.join-back:hover { color: var(--text-1); }
.join-back svg { width: 15px; height: 15px; }
.join-id { display: flex; align-items: center; gap: var(--s3); }
.join-photo { flex: none; width: 48px; height: 48px; border-radius: var(--r-panel); object-fit: cover; box-shadow: inset 0 0 0 1px var(--border-strong); }
.join-photo[hidden] { display: none; }
.join-name { color: var(--text-1); font-size: 22px; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
.join-server { margin-top: 2px; color: var(--text-3); font-size: var(--fs-sm); }
.join-big { color: var(--text-1); font-size: clamp(36px, 3.2vw, 54px); font-weight: 440; line-height: 1.1; letter-spacing: -.035em; overflow-wrap: anywhere; text-wrap: balance; }
.join-words { max-width: 15.5em; margin-top: var(--s6); }
.join-words.long { font-size: clamp(28px, 2.4vw, 40px); line-height: 1.16; letter-spacing: -.03em; }
.join-hero .rating-link { display: inline-flex; margin-top: var(--s5); color: var(--text-3); font-size: var(--fs-sm); text-decoration: none; }
.join-title { margin-top: var(--s5); }
.join-owner { max-width: 30em; margin-top: var(--s4); color: var(--text-2); font-size: clamp(18px, 1.25vw, 22px); line-height: 1.4; letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: pretty; }
.join-tiers { display: grid; gap: var(--s3); }
.join-tiers .join-member { margin-top: var(--s1, 4px); padding: 0 4px; border-top: 0; }
.join-tier { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 16px; gap: var(--s4); align-items: center; min-height: 112px; padding: var(--s3) var(--s4) var(--s3) var(--s3); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); color: var(--text-1); text-decoration: none; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.join-tier:hover { border-color: var(--accent); background: var(--surface-3); }
.join-tier:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.join-tier > .icon, .join-tier > svg { width: 16px; height: 16px; color: var(--text-3); }
.join-tier strong { display: block; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.join-tier .rating { display: flex; margin-top: 4px; color: var(--text-3); font-size: var(--fs-xs); }
.join-tier .rating strong { display: inline; color: var(--text-1); font-size: var(--fs-sm); font-weight: 540; }
.join-tier-photo { display: block; width: 72px; height: 72px; border-radius: var(--r-panel); object-fit: cover; box-shadow: inset 0 0 0 1px var(--border-strong); }
.join-tier-letter { display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 24px; font-weight: 500; }
.join-tier-about { display: block; margin-top: 6px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.join-box { padding: var(--s5); border: 1px solid #44325f; border-radius: var(--r-dialog); background: var(--surface-1); box-shadow: var(--shadow-2); }
.join-label { color: var(--text-3); font-size: var(--fs-sm); }
.join-total { margin-top: var(--s2); color: var(--text-2); font-size: 15px; }
.join-total b { color: var(--text-1); font-size: 38px; font-weight: 470; letter-spacing: -.04em; }
.join-about { margin-top: var(--s2); color: var(--text-2); font-size: var(--fs-base); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.join-about[hidden] { display: none; }
.join-price-list { margin-top: var(--s4); }
/* The prices are rows split by lines, not boxes; the picked one is marked by its filled dot and a quiet ground. */
.join-prices { display: grid; gap: 0; min-width: 0; margin: 0; padding: 0; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.join-price { position: relative; display: grid; grid-template-columns: 16px minmax(min-content, 1fr) auto; gap: var(--s3); align-items: center; min-height: 48px; padding: var(--s2) var(--s3); border: 0; border-radius: 0; background: none; cursor: pointer; transition: background var(--d1) var(--ease); }
.join-price + .join-price { border-top: 1px solid var(--border); }
.join-price:hover { background: var(--surface-2); }
.join-price:has(input:checked) { background: var(--surface-2); }
.join-price:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.join-price input { position: absolute; opacity: 0; }
.join-dot { width: 16px; height: 16px; border: 1.5px solid var(--border-strong); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--surface-2); }
.join-price input:checked + .join-dot { border-color: var(--accent); background: var(--accent); }
.join-plan { min-width: 0; font-size: var(--fs-base); font-weight: 500; overflow-wrap: break-word; }
.join-amount { color: var(--text-2); font-size: var(--fs-base); text-align: right; }
.join-amount b { color: var(--text-1); font-size: 17px; font-weight: 470; letter-spacing: -.02em; }
/* A price's own deal, under its name and price, so every sale is visible without picking it. */
.join-deal { grid-column: 2 / -1; margin-top: -4px; color: var(--sale-text); font-size: var(--fs-xs); line-height: 1.35; }
.join-deal .sale-left { color: inherit; }
/* The button sits where the Stripe note used to be: its old 10px gap plus the note's 26px. */
.join-submit { width: 100%; min-height: 44px; margin-top: calc(var(--s8) + var(--s1)); font-size: 14px; }
.join-member { display: flex; gap: var(--s4); margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-sm); }
.join-member span { margin-right: auto; }
.join-member a { color: var(--text-2); text-decoration: none; transition: color var(--d1) var(--ease); }
.join-member a:hover { color: var(--text-1); }
@media (max-width: 980px) {
  .public-main:has(.join-page) { width: min(100% - 32px, 560px); margin: 0 auto; padding: var(--s4) 0 var(--s7); }
  .public:has(.join-page) .public-top, .public:has(.review-page) .public-top { padding-inline: var(--s4); }
  .public:has(.join-page) .public-foot { justify-content: center; padding-inline: var(--s4); }
  .join-tier { grid-template-columns: 56px minmax(0, 1fr) auto 16px; gap: var(--s3); }
  .join-tier-photo { width: 56px; height: 56px; }
  .join-page { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .join-big, .join-words.long { font-size: 30px; }
}
.public-back-wrap { position: relative; }
.public-back-wrap > .public-back { position: absolute; left: -72px; margin: 0; }
@media (max-width: 1100px) { .public-back-wrap > .public-back { position: static; margin: 0 0 var(--s4); } }
.manage-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
/* Manage memberships with more than one billing account: what they hold (name, then when it renews or ends), then one
   button that opens their billing accounts as the dashboard's dropdown. */
.billing-held { display: grid; gap: var(--s2); }
.billing-held > h2 { color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; }
.held-list { display: grid; }
.held-list li { display: flex; align-items: center; gap: var(--s3); min-height: 40px; font-size: var(--fs-sm); }
.held-list li + li { border-top: 1px solid var(--border-subtle); }
.held-list strong { flex: 1; min-width: 0; overflow: hidden; color: var(--text-1); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.held-list li > span:last-child { flex: none; color: var(--text-3); font-size: var(--fs-xs); }
.held-dot { flex: none; width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--ok); }
.held-dot.warn { background: var(--warn); }
.billing-choose { border-top: 1px solid var(--border); }
.billing-pick { width: 100%; }
/* The card lets the account list hang below it; its head keeps the card's rounded top. */
.public-card:has(.billing-pick) { overflow: visible; }
.public-card:has(.billing-pick) > .public-head { border-radius: var(--r-dialog) var(--r-dialog) 0 0; }
.select-menu.billing-pick > summary { justify-content: center; width: 100%; min-height: var(--control-lg); border-color: transparent; background: var(--accent-fill); color: #fff; font-weight: 500; }
.select-menu.billing-pick > summary:hover { border-color: transparent; background: var(--accent-hover); }
.select-menu.billing-pick > summary .icon, .select-menu.billing-pick > summary .chevron { width: 15px; height: 15px; color: #fff; }
.billing-pick .select-menu-list { right: 0; }
.billing-pick .select-menu-list a svg { color: var(--text-3); }
.manage-foot > :last-child { margin-left: auto; }
.trust { display: grid; gap: 10px; }
.trust li { display: flex; gap: 10px; color: var(--text-2); font-size: var(--fs-sm); }
.trust svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent-text); }
/* Public pages: the legal links on the left, Payments by Stripe and the copyright on the right. */
.public-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s6); padding: var(--s4) clamp(32px, 7vw, 136px) var(--s6); color: var(--text-3); font-size: var(--fs-xs); }
@media (max-width: 980px) { .public-top, .public-foot { padding-inline: var(--s4); } }
.public-foot-legal, .public-foot-made { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
@media (max-width: 640px) { .public-foot { justify-content: center; } .public-foot-legal, .public-foot-made { justify-content: center; } }
.public-foot a { text-decoration: none; } .public-foot a:hover { color: var(--text-2); }
/* Two-beat headline: the second beat drops to Mist 3 (the brand’s signature typographic move). */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.how li { display: grid; gap: 8px; align-content: start; padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-1); }
.how .step-mark { width: 26px; height: 26px; color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.how strong { font-size: var(--fs-sm); font-weight: 470; }
.how li div span { display: block; color: var(--text-3); font-size: var(--fs-xs); }
.public-section .link-rows { margin: 0 calc(var(--s6) * -1); }
.public-section .link-rows a { padding-left: var(--s6); padding-right: var(--s6); }
.public-note { margin-bottom: var(--s4); }
/* After paying: the result sits in the card under the server name, its buttons side by side, the browser link quiet. */
.public-result { border-top: 1px solid var(--border); }
.public-result .button-row { margin-top: var(--s3); }
.public-result .fine { margin: var(--s2) 0 0; }
.member-status .status-label { margin-bottom: var(--s2); color: var(--text-3); font-size: 12px; font-weight: 470; }
.status-spinner { display: inline-block; width: 16px; height: 16px; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }
@keyframes member-status-spin { to { transform: rotate(360deg); } }
/* ---------- Page redesign: fewer words, one visual idea per page ----------
   Every surface below is opaque; tone comes from the named --*-surface tokens and 1px borders. */

/* Shared: small pills that state a trait, and a one-line share strip for the join link. */
.trait-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.trait-pills li { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-size: 12px; }
.trait-pills svg { width: 14px; height: 14px; color: var(--accent-text); }
.trait-pills.big li { min-height: 34px; padding: 0 14px; font-size: 13px; }
.share-strip { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: var(--s5); padding: 6px 8px 6px 14px; border: 1px solid var(--accent-line); border-radius: var(--r-panel); background: var(--accent-surface); }
.share-strip > svg { width: 16px; height: 16px; color: var(--accent-text); }
.share-strip .share-label { color: var(--text-1); font-size: 13px; font-weight: 470; }
.share-strip code { flex: 1; min-width: 0; overflow: hidden; color: var(--text-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.settings .share-strip { margin-bottom: 0; }
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.grow { flex: 1; }

/* Memberships: one card per membership, in the Lance Plan card language. */
/* Every card the same width, wide enough for a usual membership name on one line; a longer name takes two. */
.m-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: var(--s4); align-items: start; }
/* With the script, each card spans rows of 4px to its own height (assets/app/owner.js), so a tall card never leaves a
   gap under the short cards beside it. */
.m-cards.m-masonry { grid-auto-rows: 4px; grid-auto-flow: row dense; row-gap: 0; }
/* The owner’s colour for each membership: one hue per card, mixed into opaque surfaces (never a see-through tint). */
[data-accent="violet"] { --m-accent: #6d3fe0; }
[data-accent="cobalt"] { --m-accent: #2f5bd6; }
[data-accent="ocean"] { --m-accent: #0e6f8a; }
[data-accent="plum"] { --m-accent: #7a2e8c; }
[data-accent="rose"] { --m-accent: #b93a6e; }
[data-accent="ember"] { --m-accent: #b4481f; }
[data-accent="bronze"] { --m-accent: #9a5a12; }
[data-accent="slate"] { --m-accent: #4b5568; }
:where(.m-card) { --m-accent: #6d3fe0; }
.m-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); align-content: start; padding: var(--s5); border: 1px solid color-mix(in srgb, var(--m-accent) 55%, #26262b); border-radius: var(--r-panel); background: radial-gradient(ellipse 90% 80% at 50% 50%, color-mix(in srgb, var(--m-accent) 70%, #16161b), color-mix(in srgb, var(--m-accent) 54%, #16161b)); color: var(--text-1); box-shadow: inset 0 3px 0 var(--m-accent); transition: border-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease); }
.m-card.live { border-color: var(--m-accent); background: radial-gradient(ellipse 90% 80% at 50% 50%, color-mix(in srgb, var(--m-accent) 90%, #121217), color-mix(in srgb, var(--m-accent) 72%, #121217)); }
/* Every palette colour is deep enough to carry white text, so the whole card reads in white; only "On sale" keeps its
   green. */
.m-card h2, .m-card .m-price strong, .m-card .muted, .m-card .m-price span, .m-card .btn-ghost { color: var(--text-1); }
/* An aura across the card, beneath the text: lighter and deeper patches of its own colour drifting on one rhythm while
   their hue shifts a little on another. It holds still when the viewer prefers reduced motion, and its lightest patch
   stays dark enough for the white text.
   Each card is its own layer; the one whose colour menu is open rises, so the menu opens over the cards below. */
.m-card { position: relative; isolation: isolate; --m-glow: color-mix(in srgb, var(--m-accent) 92%, #ffffff); --m-shade: color-mix(in srgb, var(--m-accent) 55%, #0b0b10); }
.m-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; }
.m-card::before {
  background: radial-gradient(closest-side, var(--m-glow), transparent) 0 0 / 70% 90% no-repeat, radial-gradient(closest-side, var(--m-shade), transparent) 0 0 / 80% 100% no-repeat, radial-gradient(closest-side, var(--m-glow), transparent) 0 0 / 55% 70% no-repeat, radial-gradient(closest-side, var(--m-shade), transparent) 0 0 / 45% 60% no-repeat, radial-gradient(closest-side, var(--m-glow), transparent) 0 0 / 35% 45% no-repeat;
  animation: m-aura 16s ease-in-out infinite alternate, m-iridesce 11s ease-in-out infinite alternate; }
.m-card.blocked::before { display: none; }
@keyframes m-aura {
  0% { background-position: 5% 0%, 110% 110%, 100% 10%, 0% 100%, 60% 40%; }
  33% { background-position: 35% 40%, 80% 95%, 70% 0%, 20% 60%, 100% 90%; }
  66% { background-position: 70% 20%, 30% 100%, 30% 30%, 60% 100%, 0% 10%; }
  100% { background-position: 95% 10%, 0% 85%, 10% 70%, 100% 50%, 40% 0%; }
}
@keyframes m-iridesce { from { filter: hue-rotate(-14deg) saturate(1.05); } to { filter: hue-rotate(16deg) saturate(1.15); } }
@media (prefers-reduced-motion: reduce) { .m-card::before { animation: none; } }
/* On the card the status, the colour menu button and the members line sit on the colour itself, with no plate. */
.m-card .badge { padding-left: 0; padding-right: 0; border-color: transparent; background: none; color: var(--text-1); }
.m-card .badge.bad { color: var(--bad); }
.m-card .m-members { padding: 2px 0; border: 0; background: none; color: var(--text-1); }
.m-card .m-members strong, .m-card .m-members svg, .m-card .m-members:hover svg { color: var(--text-1); }
.m-card.blocked { border-color: var(--bad-line); background: var(--bad-surface); box-shadow: inset 0 3px 0 var(--bad); }
.m-card header { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.m-id { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.m-head-end { display: flex; flex: none; align-items: center; gap: 6px; }
.m-card h2 { display: -webkit-box; overflow: hidden; font-size: var(--fs-md); font-weight: 470; line-height: 1.3; overflow-wrap: break-word; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.m-card .role-chip, .m-card .role-chip svg { color: var(--text-1); }
.m-card .role-chip { background: color-mix(in srgb, var(--m-accent) 45%, #0b0b10); }
.m-photo { --m-accent-own: var(--m-accent, #6d3fe0); display: grid; flex: none; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: var(--r-control); background: color-mix(in srgb, var(--m-accent-own) 22%, #0b0b10); color: #ffffff; font-size: 14px; font-weight: 540; transition: filter var(--d1) var(--ease); }
.m-photo.lg { width: 56px; height: 56px; font-size: 16px; }
.m-photo-edit { position: relative; flex: none; }
.m-photo-change { position: relative; display: block; border-radius: var(--r-control); cursor: pointer; }
.m-photo-hover { position: absolute; inset: 0; display: grid; place-items: center; color: #ffffff; opacity: 0; pointer-events: none; transition: opacity var(--d1) var(--ease); }
.m-photo-hover svg { width: 22px; height: 22px; }
.m-photo-change:hover .m-photo-hover, .m-photo-change:focus-within .m-photo-hover { opacity: 1; }
.m-photo-change:hover .m-photo, .m-photo-change:focus-within .m-photo { filter: brightness(.55); }
.m-photo-change:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.m-photo-remove { position: absolute; top: -7px; right: -7px; opacity: 0; transition: opacity var(--d1) var(--ease); }
.m-photo-edit:hover .m-photo-remove, .m-photo-remove:focus-within { opacity: 1; }
.m-photo-remove button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); cursor: pointer; }
.m-photo-remove button:hover { border-color: var(--bad-line); color: var(--bad); }
.m-photo-remove svg { width: 11px; height: 11px; }
@media (hover: none) { .m-photo-remove { opacity: 1; } }
/* Touch screens: every small link and icon button gets a finger-sized hit area (24px or more) without moving
   anything: the extra padding is taken back by a negative margin, and on inline links it never affects the line. */
@media (pointer: coarse) {
  :is(.page-foot a, .public-foot a, .topbar .brand, .crumb-community, .crumb-section, .m-rating, .m-open, .rv-head a, .review-back, .fd-brand, .fd-link, .join-member a, .member-links a, .figure > a) { padding-block: 6px; margin-block: -6px; }
  /* These two keep their own top margin, so their hit area grows with an overlay instead. */
  :is(.offer-rating, .offer-details) { position: relative; }
  :is(.offer-rating, .offer-details)::after { content: ""; position: absolute; inset: -6px -4px; }
  .tabs a { min-width: 44px; justify-content: center; }
  .m-photo-remove button { position: relative; }
  .m-photo-remove button::after { content: ""; position: absolute; inset: -8px; border-radius: var(--r-pill); }
}
html:not(.js) .m-photo-change { pointer-events: none; }
.m-photo img, .m-photo canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Create: an optional picture, like the one a Discord post carries. */
.photo-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r-panel); background: var(--bg-sunken); }
.photo-pick-text { display: grid; gap: 2px; }
.photo-pick-text strong { font-size: var(--fs-sm); font-weight: 470; }
.photo-pick .btn { cursor: pointer; }
.photo-pick .btn:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
@media (max-width: 560px) {
  .photo-pick { grid-template-columns: auto minmax(0, 1fr); }
  .photo-pick .button-row { grid-column: 1 / -1; }
}
/* A membership’s pricing options on its card: the period on the left, the amount on the right, one line each. */
.m-prices { display: grid; gap: 2px; }
.m-prices li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--m-accent) 40%, #0b0b10); font-size: var(--fs-sm); }
.m-prices li:first-child { border-top: 0; }
.m-prices li > span { display: inline-flex; align-items: center; gap: 8px; color: var(--text-1); opacity: .86; }
.m-prices li strong { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.02em; }
.m-prices .sale-off { height: 17px; padding: 0 5px; font-size: 11px; }
.m-card.ink-dark .m-prices .sale-was { color: inherit; opacity: .62; }
.m-prices-empty { color: var(--text-1); opacity: .82; font-size: var(--fs-sm); }
.m-open { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: inherit; text-decoration: none; }
.m-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-open .role-dot, .m-hero-sub .role-dot { flex: 0 0 12px; width: 12px; height: 12px; border: 1px solid color-mix(in srgb, var(--m-accent) 55%, #000000); }
/* The name’s link covers the whole card; the picture, copy and preview controls sit above it and keep their own clicks. */
.m-link .m-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.m-link .m-photo-edit, .m-link footer .btn, .m-link footer .js-only { position: relative; z-index: 2; }
.m-link { cursor: pointer; transition: border-color var(--d2) var(--ease), transform var(--d3) var(--ease-out); }
@media (prefers-reduced-motion: no-preference) { .m-link:hover { transform: translateY(-2px); } }
.m-link:hover { border-color: color-mix(in srgb, var(--m-accent) 60%, #ffffff); }
.m-link:hover .m-members svg { color: var(--text-1); transform: translateX(3px); }
.m-link:has(.m-open:focus-visible) { outline: 2px solid var(--text-1); outline-offset: 2px; }
.m-reorder { margin-left: auto; cursor: grab; touch-action: none; font-size: 19px; min-width: 40px; min-height: 40px; }
.m-dragging .m-reorder { cursor: grabbing; }
.m-cards .m-link, .m-cards .m-open { cursor: grab; }
/* A dragged card is lifted: above the others, a deeper shadow, following the pointer with no lag (no transition). */
.m-dragging { z-index: 5; box-shadow: var(--shadow-2); pointer-events: none; transition: none; user-select: none; will-change: transform; cursor: grabbing; }
.m-settling { z-index: 5; }
.m-members { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-2); font-size: 13px; text-decoration: none; }
.m-members strong { color: var(--text-1); font-size: var(--fs-lg); font-weight: 470; }
.m-members .avatar-stack { align-self: center; margin-right: 4px; }
.m-members .avatar-stack .avatar { border-color: color-mix(in srgb, var(--m-accent) 55%, #0b0b10); }
.m-members .avatar-stack .avatar + .avatar { margin-left: -8px; }
.m-members svg { width: 14px; height: 14px; margin-left: auto; align-self: center; color: var(--text-3); transition: transform var(--d1) var(--ease); }
.m-members:hover svg { color: var(--text-1); transform: translateX(3px); }
.m-card footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: var(--s3); border-top: 1px solid var(--border); }
.m-card footer .m-end { margin-left: auto; }
/* A very light role colour (white, pale yellow) stays that colour, and everything on it turns dark so it stays readable.
   "On sale" keeps a green dark enough for a light card. */
.m-card.ink-dark:not(.blocked) { --m-glow: #ffffff; --m-shade: color-mix(in srgb, var(--m-accent) 82%, #5c5c68); border-color: color-mix(in srgb, var(--m-accent) 70%, #5c5c68); background: radial-gradient(ellipse 90% 80% at 50% 50%, var(--m-accent), color-mix(in srgb, var(--m-accent) 88%, #5c5c68)); color: #0b0b10; }
.m-card.ink-dark h2, .m-card.ink-dark .muted, .m-card.ink-dark .btn, .m-card.ink-dark .btn-ghost, .m-card.ink-dark .badge, .m-card.ink-dark .m-members,
.m-card.ink-dark .m-members strong, .m-card.ink-dark .m-members svg, .m-card.ink-dark .m-members:hover svg, .m-card.ink-dark .m-prices li > span, .m-card.ink-dark .m-prices-empty,
.m-card.ink-dark .m-hero-sub, .m-card.ink-dark .m-option-price span, .m-card.ink-dark .m-option-members, .m-card.ink-dark .m-options-empty, .m-card.ink-dark .role-chip { color: #0b0b10; }
.m-card.ink-dark .badge.ok::before { background: #0b6b40; }
.m-card.ink-dark .btn-ghost:hover { background: color-mix(in srgb, var(--m-accent) 82%, #5c5c68); }
.m-card.ink-dark footer, .m-card.ink-dark .m-prices li { border-top-color: color-mix(in srgb, var(--m-accent) 72%, #5c5c68); }
.m-card.ink-dark .m-open .role-dot { border-color: #5c5c68; }
.m-card.ink-dark .m-photo { background: color-mix(in srgb, var(--m-accent) 70%, #5c5c68); color: #0b0b10; }

/* One membership’s own page: the membership card across the top, then members beside channels and role holders. */
.m-hero { gap: var(--s4); padding: var(--s6); margin-bottom: var(--s6); }
.m-hero h1 { font-size: var(--fs-2xl); font-weight: 540; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.m-hero-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--text-1); opacity: .82; font-size: var(--fs-sm); }
.m-hero-sub > span + span::before { content: "·"; margin-right: 8px; }
.m-options { display: grid; border: 1px solid color-mix(in srgb, var(--m-accent) 45%, #0b0b10); border-radius: var(--r-panel); background: color-mix(in srgb, var(--m-accent) 30%, #0b0b10); }
.m-options li { display: grid; grid-template-columns: minmax(96px, 1fr) minmax(120px, 1fr) minmax(96px, auto) auto; align-items: center; gap: var(--s3); min-height: 52px; padding: 6px var(--s4); }
.m-options li + li { border-top: 1px solid color-mix(in srgb, var(--m-accent) 40%, #0b0b10); }
.m-options li.off { opacity: .62; }
.m-option-name { font-weight: 470; }
.m-option-price { display: flex; align-items: baseline; gap: 6px; }
.m-option-price strong { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.02em; }
.m-option-price span, .m-option-members { color: var(--text-1); opacity: .82; font-size: var(--fs-sm); }
.m-option-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
/* Pricing tiles in the membership’s role colour: the period on top, a big amount, who pays it as faces. Copy and stop
   selling wait in the top corner and come forward when the tile is pointed at (always shown on touch screens). */
/* The prices share the row edge to edge, like the chart above them; a lone price keeps a card's width. */
.m-price-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 264px), 1fr)); gap: var(--s3); }
.m-price-tiles:not(:has(> li + li)) { grid-template-columns: minmax(0, 400px); }
/* While a price's Sale or Edit panel is open, the prices beside it keep their own height instead of stretching to match. */
.m-price-tiles:has(.m-price-editor[open]) { align-items: start; }
.m-price-tile { position: relative; display: flex; flex-direction: column; gap: var(--s3); min-height: 176px; padding: var(--s5); border: 1px solid color-mix(in srgb, var(--tile) 45%, var(--border)); border-radius: var(--r-panel); background: color-mix(in srgb, var(--tile) 16%, var(--surface-1)); box-shadow: inset 0 3px 0 var(--tile); transition: border-color var(--d2) var(--ease), background var(--d2) var(--ease), transform var(--d2) var(--ease); }
.m-price-tile:hover, .m-price-tile:focus-within { border-color: color-mix(in srgb, var(--tile) 75%, var(--border)); background: color-mix(in srgb, var(--tile) 22%, var(--surface-1)); }
.m-price-tile.off { box-shadow: none; background: var(--surface-1); border-color: var(--border); opacity: .7; }
.m-price-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--control-sm); }
.m-price-period { display: inline-flex; align-items: center; color: var(--text-1); font-size: var(--fs-md); font-weight: 470; }
.m-price-live { display: inline-flex; align-items: center; gap: 6px; color: var(--text-1); font-size: var(--fs-xs); font-weight: 540; letter-spacing: .02em; transition: opacity var(--d1) var(--ease); }
.m-price-live i { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--ok); }
.m-price-live.off { color: var(--text-3); }
.m-price-amount { color: var(--text-1); font-size: 30px; font-weight: 540; letter-spacing: -.04em; line-height: 1.05; }
.m-price-who { display: flex; align-items: center; gap: 10px; margin-top: auto; color: var(--text-2); font-size: var(--fs-sm); }
.m-price-who strong { color: var(--text-1); font-weight: 540; }
.m-price-who .avatar-stack .avatar { border-color: color-mix(in srgb, var(--tile) 16%, var(--surface-1)); }
/* Edit price, Copy link and Stop selling (or Sell again): one row of plain actions under a hairline, always shown, never
   only on hover. Each is its own ghost button; the row’s negative margin lines their icons up with the tile’s text. */
.m-price-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: 0 -6px -6px; padding-top: var(--s2); border-top: 1px solid color-mix(in srgb, var(--tile) 30%, var(--border-subtle)); }
.m-price-tools .btn { min-height: var(--control-sm); padding-inline: 6px; gap: 6px; }
/* Add sale, Edit, Post to Discord and the ⋮ menu read in full white above the quieter price details; a
   live sale keeps its own pink (.m-sale-editor[data-sale-live]). */
.m-price-tools .btn-ghost, .m-price-tools summary.btn { color: var(--text-1); }
/* Stopping a price is the one with consequences, so it sits apart at the row’s end. */
.m-price-tools .m-tile-stop { margin-left: auto; }
/* Copy link closes the first row, at its right edge; Stop selling then takes its own line, right-aligned too. */
.m-price-tools > [data-copy] { margin-left: auto; }
/* Copy link and Stop selling sit together at the right end, not spread across the row. */
.m-price-tools > [data-copy] ~ .m-tile-stop { margin-left: 0; }
.m-price-tools .m-tile-archive { margin-left: auto; }
/* A live price's ⋯ menu at the row's right end: Copy link and Stop selling. */
.m-price-menu { position: relative; margin-left: auto; }
.m-price-menu > summary { list-style: none; }
.m-price-menu > summary::-webkit-details-marker { display: none; }
.m-price-menu[open] > summary { background: var(--pressed); color: var(--text-1); }
.m-price-menu > summary .icon { transform: rotate(90deg); }
.m-price-menu-list { left: auto; right: 0; top: 100%; width: max-content; min-width: 176px; }
.m-price-menu-list > .btn, .m-price-menu-list > form > .btn { justify-content: flex-start; width: 100%; min-height: var(--control); padding: 5px 8px; color: var(--text-1); }
.m-price-menu-list > form { display: block; }
.m-price-menu-list .m-tile-stop { margin: 0; }
.m-price-menu-list .m-tile-stop .btn, .m-price-menu-list .m-tile-stop .btn:hover { color: var(--bad); }
/* Archived prices: folded under the price tiles, one quiet row each with Sell again at the end. */
.m-archived { margin-top: var(--s4); border-top: 1px solid var(--border-subtle); }
.m-archived > summary { display: flex; align-items: center; gap: 6px; padding: var(--s3) 0 0; color: var(--text-2); font-size: var(--fs-sm); list-style: none; cursor: pointer; }
.m-archived > summary::-webkit-details-marker { display: none; }
.m-archived > summary .chevron { width: 14px; height: 14px; color: var(--text-3); transform: rotate(-90deg); transition: transform var(--d1) var(--ease); }
.m-archived[open] > summary .chevron { transform: none; }
.m-archived ul { display: grid; margin: var(--s2) 0 0; padding: 0; list-style: none; }
.m-archived li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: var(--s4); min-height: 40px; border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-sm); }
.m-archived li:last-child { border-bottom: 0; }
.m-archived-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-1); }
.m-archived-end { display: flex; justify-content: flex-end; min-width: 96px; }
/* The tile’s heading (the Stripe mark and the price’s name) opens that price in Stripe. */
a.m-price-period { margin: -4px -6px; padding: 4px 6px; border-radius: var(--r-control); text-decoration: none; transition: background var(--d1) var(--ease); }
a.m-price-period:hover { background: var(--tile-press); text-decoration: underline; text-underline-offset: 3px; }
/* The box behind the heading, Edit and Copy link on hover is the tile’s own colour, darker: never a black patch on a
   coloured card. Stop selling keeps the ordinary hover, apart from the rest. */
.m-price-tile { --tile-press: color-mix(in srgb, var(--tile) 14%, #000); }
.setting-about { align-items: flex-end; }
.setting-about .field { display: grid; flex: 1; gap: 4px; }
.setting-about textarea { min-height: 64px; margin-top: 4px; resize: vertical; }
.m-about textarea { min-height: 64px; resize: vertical; }
/* The character limit sits right under the box it describes. */
.m-about-end { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: calc(4px - var(--s4)); }
.m-price-tools > .btn-ghost:hover, .m-price-tools > .btn-ghost:focus-visible, .m-price-editor > summary.btn:hover, .m-price-editor[open] > summary.btn { background: var(--tile-press); }
a.m-price-period:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
@media (hover: none) { .m-price-tools .btn { min-height: var(--control); } }
/* The narrowest phones (under 340px) keep the three words on one line by dropping the two small icons. */
@media (max-width: 339px) { .m-price-tools .btn svg { display: none; } }
.m-tile-stop .btn { color: var(--text-2); }
.m-tile-stop .btn:hover { color: var(--bad); }
/* Edit price opens in place: the row’s first button, then a full-width form under the row. */
.m-price-editor { display: contents; }
.m-price-editor > summary { list-style: none; }
.m-price-editor::details-content { order: 9; flex: 1 0 100%; }
.m-price-editor > summary::-webkit-details-marker { display: none; }
.m-price-editor[open] > summary { color: var(--text-1); background: var(--hover); }
.m-price-editor form { margin: var(--s1) 6px 6px; padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-1); }
.m-price-editor .help { margin: 0; }
.m-price-editor-end { display: flex; justify-content: flex-end; gap: var(--s1); }
/* Inside a price's edit panel, the note under Save price and Cancel read in full white, like the row's own buttons. */
.m-price-edit .help, .m-price-editor-end .btn-ghost { color: var(--text-1); }
/* Editing in the card: the amount and words swap for their fields in the same place; the member count and tools stay. */
.m-price-view { display: grid; gap: var(--s3); }
.m-price-edit { display: none; gap: var(--s4); }
.m-price-tile:has(.m-price-edit-toggle[open]) .m-price-view { display: none; }
.m-price-tile:has(.m-price-edit-toggle[open]) .m-price-edit { display: grid; }
.m-price-edit-amount { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); }
.m-price-edit-amount .currency-input input { min-height: var(--control-lg); font-size: 20px; font-weight: 540; }
.m-price-edit-amount .help { grid-column: 1 / -1; margin: 0; }
/* Save price keeps its small size and sits on the price box's bottom edge, so the two share one baseline. */
.m-price-edit-amount > .btn { align-self: end; }
.m-price-edit-amount .help span { display: block; }
.m-price-edit-words { display: grid; gap: var(--s2); }

/* A sale, everywhere a price shows. The big number is the sale price; the regular price sits beside it, struck through in
   the sale colour, and a solid mark says how much is off. Solid fills only: the sale reads the same on any surface. */
.sale-amount { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: .32em; row-gap: 2px; }
.sale-amount .sale-now { order: -1; color: inherit; font-weight: inherit; }
.sale-amount .sale-was { color: var(--text-3); font-size: max(var(--fs-sm), .5em); font-weight: 460; letter-spacing: -.01em; text-decoration: line-through; text-decoration-color: var(--sale); text-decoration-thickness: 1.5px; }
.sale-amount .sale-cadence { order: -1; color: var(--text-3); font-size: max(var(--fs-sm), .45em); font-weight: 450; letter-spacing: 0; }
.sale-off { align-self: center; display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: var(--r-tag); background: var(--sale); color: var(--sale-ink); font-size: var(--fs-xs); font-weight: 680; letter-spacing: .02em; line-height: 1; font-variant-numeric: tabular-nums; animation: sale-in var(--d4) var(--ease) both; }
.sale-off[hidden] { display: none; }
/* The join box's price: the regular price small on its own line above, the sale price below it, and an outlined
   "20% off" pill beside the sale price. */
/* The regular price, crossed out, sits on the amount's line (after the cadence, before the % off), so a price without a
   sale never keeps an empty line above its amount. */
.join-total .sale-amount .sale-was { order: 0; font-size: var(--fs-sm); }
.join-total .sale-amount .sale-off { order: 1; }
.join-total [data-join-was-cadence] { display: none; }
.join-total .sale-off { height: 22px; padding: 0 9px; border: 1px solid var(--sale-line); border-radius: var(--r-pill); background: var(--sale-surface); color: var(--sale-text); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; }
@keyframes sale-in { from { opacity: 0; transform: translateY(2px) scale(.94); } }
.sale-meter { display: grid; gap: 6px; }
.sale-bar { display: flex; height: 4px; overflow: hidden; border-radius: var(--r-pill); background: var(--surface-3); }
.sale-bar[hidden] { display: none; }
.sale-bar i { height: 100%; transition: width var(--d4) var(--ease); }
.sale-bar .paid { background: var(--sale); }
.sale-bar .held { background: var(--sale-line); }
.sale-bar.full .paid { background: var(--text-3); }
.sale-meter .sale-bar { height: 6px; }
.sale-meter-words { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--s3); color: var(--text-2); font-size: var(--fs-xs); }
.sale-meter-words strong { color: var(--text-1); font-weight: 600; }
.sale-meter.low .sale-meter-words strong { color: var(--sale-text); }

/* The owner's price tile: the sale's state as a dot and a word, its renewal terms, and the limit. */
.m-sale { display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid var(--sale-line); border-radius: var(--r-control); background: var(--sale-surface); }
.m-sale.neutral { border-color: var(--border); background: var(--surface-2); }
.m-sale.warn { border-color: var(--warn-line); background: var(--warn-surface); }
.m-sale-state { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4; }
.m-sale-state i { flex: none; width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--sale); }
.m-sale-state strong { color: var(--sale-text); font-weight: 620; }
.m-sale-headline { margin: 0; color: var(--text-1); font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; }
.m-sale-follow { margin: -4px 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4; }
.m-sale.neutral .m-sale-state i { background: var(--text-3); }
.m-sale.neutral .m-sale-state strong { color: var(--text-1); }
.m-sale.warn .m-sale-state i { background: var(--warn); }
.m-sale.warn .m-sale-state strong { color: var(--warn); }
.m-price-tile:has(.m-sale.sale) { border-color: color-mix(in srgb, var(--sale) 40%, var(--border)); }

/* The sale editor opens under the tile's tools like Edit does, with a live view of what members will see. */
.m-sale-editor[data-sale-live] > summary { color: var(--sale-text); }
.m-sale-panel { display: grid; gap: var(--s2); margin: var(--s1) 6px 6px; }
.m-sale-editor .m-sale-form { display: grid; gap: var(--s3); margin: 0; }
.m-sale-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--s3); font-size: var(--fs-sm); }
.m-sale-head strong { color: var(--text-1); font-weight: 600; }
.m-sale-choice { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); min-width: 0; margin: 0; padding: 0; border: 0; }
.m-sale-choice legend { margin-bottom: var(--s1); padding: 0; }
.m-sale-choice label { display: flex; align-items: flex-start; gap: var(--s2); min-width: 0; padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-2); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.m-sale-choice label:hover { border-color: var(--border-strong); }
.m-sale-choice label:has(input:checked) { border-color: var(--sale); background: var(--sale-surface); }
.m-sale-choice label:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.m-sale-choice input { flex: none; margin: 2px 0 0; accent-color: var(--sale); }
.m-sale-choice label > span { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--s2); flex: 1; min-width: 0; color: var(--text-1); font-size: var(--fs-sm); }
.m-sale-choice label > span span { color: var(--text-3); font-size: var(--fs-xs); }
.m-sale-limit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) 6px; color: var(--text-2); font-size: var(--fs-sm); }
.m-sale-limit label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.m-sale-limit input[type=checkbox] { margin: 0; accent-color: var(--sale); }
.m-sale-limit input[type=number] { width: 64px; height: var(--control-sm); padding: 0 var(--s2); border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-2); color: var(--text-1); font: inherit; font-variant-numeric: tabular-nums; }
.m-sale-limit input[type=number]:disabled { opacity: .45; }
.m-sale-preview { display: grid; gap: 3px; padding: var(--s3); border: 1px dashed var(--sale-line); border-radius: var(--r-control); background: var(--bg-sunken); }
.m-sale-preview-label { color: var(--text-3); font-size: var(--fs-xs); font-weight: 560; letter-spacing: .06em; text-transform: uppercase; }
.m-sale-preview .sale-box { margin-top: 6px; }
.m-sale-preview .sale-amount { color: var(--text-1); font-size: 22px; font-weight: 540; letter-spacing: -.03em; line-height: 1.15; }
.m-sale-error { margin: 0; color: var(--bad); font-size: var(--fs-sm); }
.m-sale-error[hidden] { display: none; }
.m-sale-end { display: flex; justify-content: flex-end; }
.m-sale-stop-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s3); border: 1px solid var(--border-subtle); border-radius: var(--r-control); background: var(--surface-1); }
.m-sale-editor .m-sale-stop-row form { margin: 0; padding: 0; border: 0; background: none; }
.m-sale-submit { gap: 6px; border-color: var(--sale); background: var(--sale); color: var(--sale-ink); font-weight: 620; }
.m-sale-submit:hover:not(:disabled) { border-color: var(--sale-text); background: var(--sale-text); }
.m-sale-submit:disabled { border-color: var(--border); background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) { .sale-off { animation: none; } .sale-bar i { transition: none; } }

/* A sale on the join page: the line under a price, the corner mark on a store card, and the checkout box. */
.offer .price .sale-amount { color: var(--text-1); font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.03em; }
.join-amount .sale-amount { justify-content: flex-end; color: var(--text-1); font-size: 17px; font-weight: 470; letter-spacing: -.02em; }
.join-card-price .sale-amount { color: var(--text-1); font-size: 22px; font-weight: 550; letter-spacing: -.03em; }
.join-card-body .sale-note { margin-top: 2px; font-size: var(--fs-xs); }
.sale-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--sale-text); font-size: var(--fs-xs); font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.sale-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 5px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4; }
.sale-note .sale-head { color: var(--text-1); font-weight: 560; }
.sale-note .sale-follow::before, .sale-note .sale-left::before { content: "·"; margin-right: 8px; color: var(--text-3); font-weight: 400; }
.sale-tag i { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--sale); }
.sale-left { color: var(--sale-text); font-weight: 520; white-space: nowrap; }
.sale-left b { font-weight: 680; }
.sale-left.low { color: var(--sale); }
.sale-left[hidden] { display: none; }
/* The checkout box: a headline with spots left beside it, the bar, and one quiet line of what follows. */
.sale-box { display: grid; gap: 7px; margin-top: var(--s3); padding: 12px 14px 11px; border: 1px solid var(--sale-line); border-radius: var(--r-panel); background: var(--sale-surface); }
.sale-box[hidden] { display: none; }
.sale-box-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.sale-box .sale-head { color: var(--text-1); font-size: 16px; font-weight: 620; letter-spacing: -.015em; line-height: 1.25; }
.sale-box .sale-bar { margin-top: 3px; }
.sale-box .sale-left { flex: none; font-size: var(--fs-sm); }
.sale-box-follow { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4; }
.sale-box-follow span { color: var(--text-3); }
.join-amount .sale-off { height: 17px; padding: 0 5px; font-size: 11px; }
.join-total .sale-off { height: 28px; padding: 0 10px; font-size: 16px; letter-spacing: 0; }
.join-total .sale-amount { color: var(--text-1); font-size: 38px; font-weight: 470; letter-spacing: -.04em; line-height: 1.1; }
.join-total .sale-amount .sale-cadence { font-size: 15px; }
.join-total .sale-amount .sale-was { font-size: 17px; }
.join-card-sale { position: absolute; top: var(--s4); left: var(--s4); display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-tag); background: var(--sale); color: var(--sale-ink); font-size: var(--fs-sm); font-weight: 720; letter-spacing: .01em; box-shadow: var(--shadow-1); font-variant-numeric: tabular-nums; }
.join-card:hover .join-card-sale { animation: sale-nudge var(--d4) var(--ease); }
@keyframes sale-nudge { 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .join-card:hover .join-card-sale { animation: none; } }
.m-hero-links { display: inline-flex; align-items: center; gap: 2px; }
.m-price-description { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: var(--lh); white-space: pre-line; overflow-wrap: anywhere; }
.m-detail-end { display: flex; justify-content: flex-end; margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--border); }
/* Channels the role opens, as chips in the role’s colour. */
/* A quiet way back, top left. */
.page-body { position: relative; }
@media (min-width: 1101px) { .main-inner:has(> .page-body > .page-back) { --back-gutter: 104px; padding-left: var(--back-gutter); } }
.page-back { position: absolute; top: 0; left: calc(var(--back-gutter, var(--s7)) / -2 - 28px); z-index: 2; display: grid; place-items: center; width: 56px; height: 36px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); color: var(--text-3); text-decoration: none; transition: color var(--d1) var(--ease), background var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.page-back > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-back:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text-1); }
.page-back svg { width: 18px; height: 18px; transition: transform var(--d1) var(--ease); }
.page-back:hover svg { transform: translateX(-3px); }
.page-back:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
@media (max-width: 1100px) { .page-back { position: static; margin: 0 0 var(--s4); } }
.m-options-empty { padding: var(--s4); border: 1px dashed color-mix(in srgb, var(--m-accent) 50%, #0b0b10); border-radius: var(--r-panel); color: var(--text-1); opacity: .86; font-size: var(--fs-sm); }
.m-detail-side { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: var(--s4); align-items: stretch; margin-bottom: var(--s6); }
@media (max-width: 900px) { .m-detail-side { grid-template-columns: minmax(0, 1fr); } }
.m-channel-list { display: grid; gap: 1px; }
.m-channel-list a { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; margin: 0 -8px; border-radius: var(--r-control); color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; }
.m-channel-list a:hover { background: var(--hover); color: var(--text-1); }
.m-channel-list a svg { flex: none; width: 15px; height: 15px; color: var(--text-3); }
.m-channel-list a span:not(.visually-hidden) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The sales chart gets room to breathe: clear space under the header and before Pricing. */
.m-detail-chart { margin: var(--s9) 0 calc(var(--s9) + var(--s4)); }
.m-detail-chart .chart-panel { margin-bottom: 0; }
/* A membership’s prices, one tile each on the page’s own surface: the period, the amount large, who pays it, actions. */
.m-detail-members { display: grid; gap: var(--s3); min-width: 0; }
.m-detail-members .section-head h2 { font-size: var(--fs-md); font-weight: 540; }
/* Reviews members wrote from the Discord post: the average beside the heading, then one row per review. */
.m-detail-reviews { display: grid; gap: var(--s3); min-width: 0; margin-top: var(--s6); }
.m-detail-reviews .section-head { margin: 0; }
.rv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3); }
.rv-head h2 { font-size: var(--fs-md); font-weight: 540; }
.rv-score { display: inline-flex; align-items: baseline; gap: 8px; color: var(--text-3); font-size: var(--fs-sm); }
.rv-score strong { color: var(--text-1); font-size: var(--fs-md); font-weight: 540; }
/* A rating: five stars, grey underneath, gold laid over them up to the score in quarter steps. */
.stars { display: inline-flex; gap: 1px; color: var(--border-strong); font-size: 13px; line-height: 1; white-space: nowrap; vertical-align: -1px; }
.stars.md { font-size: 14px; }
.stars i { position: relative; font-style: normal; }
.stars b { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--gold); font-weight: inherit; }
.rating { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; }
.rating strong { color: var(--text-1); font-weight: 540; }
a.rating { text-decoration: none; } a.rating:hover > span:last-child { color: var(--text-1); }
/* The member review page: a rating and a note with room between them, and one quiet line when a review is saved. */
.review-write { display: grid; gap: var(--s4); }
.review-write textarea { min-height: 112px; }
.review-write-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.review-write-foot .fine { margin: 0; }
.review-saved { display: inline-flex; align-items: center; gap: 5px; margin-left: var(--s3); color: var(--ok); font-size: var(--fs-xs); font-weight: 470; letter-spacing: 0; text-transform: none; }
.review-saved svg { width: 13px; height: 13px; }
/* The member review page, no box: the membership on the left (picture or video, name, rating, description), held in
   view while its reviews scroll on the right. On a narrow screen the two stack. */
.public-main:has(> .review-page) { width: min(100% - 48px, 1180px); align-content: start; padding-top: var(--s7); }
.review-page > .review-back { margin-bottom: var(--s6); }
.rp-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 80px; align-items: start; }
.rp-about { position: sticky; top: var(--s6); display: grid; gap: var(--s5); }
.rp-media { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-2); }
.rp-media img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; }
.rp-about h1 { margin: 0; color: var(--text-1); font-size: 30px; font-weight: 560; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.rp-server { margin: 4px 0 0; color: var(--text-3); font-size: var(--fs-sm); }
.rp-score { margin: var(--s3) 0 0; }
.rp-description { color: var(--text-2); font-size: var(--fs-base); line-height: 1.6; overflow-wrap: anywhere; }
.rp-reviews > .rp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.rp-head h2 { margin: 0; color: var(--text-1); font-size: 18px; font-weight: 560; }
/* Write a review sits beside the heading; once open, its form takes the full width under it. */
.rp-head .review-compose { display: contents; }
.rp-head .review-compose::details-content { order: 9; flex: 1 0 100%; }
.rp-head .review-compose[open] .review-write { margin-top: var(--s2); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.rp-note { margin: var(--s3) 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.rp-summary { display: grid; grid-template-columns: auto minmax(0, 320px); justify-content: start; gap: var(--s8); align-items: center; margin-top: var(--s5); padding-bottom: var(--s6); border-bottom: 1px solid var(--border); }
.rp-average { display: grid; justify-items: start; gap: 6px; }
.rp-average strong { color: var(--text-1); font-size: 44px; font-weight: 520; letter-spacing: -.04em; line-height: 1; }
.rp-average > span:last-child { color: var(--text-3); font-size: var(--fs-sm); }
.rp-bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rp-bars li { display: grid; grid-template-columns: 40px 1fr 28px; align-items: center; gap: 10px; color: var(--text-3); font-size: var(--fs-xs); }
.rp-bar { height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--surface-3); }
.rp-bar i { display: block; height: 100%; background: var(--gold); }
.rp-mine { padding: var(--s5) 0; border-bottom: 1px solid var(--border); }
.review-mine-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.review-mine-head h3, .rp-others { margin: 0; color: var(--text-3); font-size: 12px; font-weight: 470; }
.rp-others { margin-top: var(--s5); }
.rp-mine .review-compose[open] { margin-top: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--border-subtle); }
.review-page .rv-item { padding: var(--s5) 0; }
.review-page .rv-item + .rv-item { border-top-color: var(--border-subtle); }
.review-page .rv-list .avatar { width: 36px; height: 36px; }
.rp-empty { margin: var(--s5) 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.review-compose > summary { list-style: none; width: max-content; }
.review-compose > summary::-webkit-details-marker { display: none; }
.review-compose[open] > summary { display: none; }
@media (max-width: 900px) {
  .rp-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
  .rp-about { position: static; }
  .rp-summary { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
}
/* Five stars to tap: the one picked and every star before it turn gold; hovering previews the same. The inputs come in
   reverse order so "this star and the ones before it" is a following-sibling selector. */
.review-stars { margin: 0; padding: 0; border: 0; min-width: 0; }
.review-stars legend { padding: 0; margin-bottom: 6px; }
.star-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-pick label { padding: 0 2px; color: var(--border-strong); font-size: 23px; line-height: 1; cursor: pointer; transition: color var(--d1) var(--ease); }
.star-pick input:checked ~ label { color: var(--gold); }
.star-pick:hover input ~ label { color: var(--border-strong); }
.star-pick input + label:hover, .star-pick input + label:hover ~ label { color: var(--gold); }
.star-pick input:focus-visible + label { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: var(--r-tag); }
.half-star-pick { gap: 0; }
.half-star-pick label { position: relative; width: 16px; height: 32px; padding: 0; overflow: hidden; font-size: 32px; }
.half-star-pick label > span[aria-hidden] { display: block; width: 32px; text-align: center; }
.half-star-pick label.whole > span[aria-hidden] { transform: translateX(-16px); }
.rp-reviews .review-write-foot { justify-content: flex-end; }
.review-page .rv-list + .button-row { margin-top: var(--s3); }
.review-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; }
.review-back:hover { color: var(--text-1); }
.review-back svg { width: 14px; height: 14px; }
/* A membership’s rating on its coloured card or header: no chip, drawn in the card’s own ink. Light ink keeps gold stars
   with unlit stars and the count mixed from the card colour; dark ink (pale cards) draws the stars in ink, since gold
   would vanish into a gold or yellow card. */
.m-rating { display: flex; align-items: center; text-decoration: none; }
.m-rating .rating { gap: 5px; font-size: var(--fs-xs); color: color-mix(in srgb, var(--m-accent) 30%, #ffffff); }
.m-rating .rating strong { color: #ffffff; }
.m-rating .stars { color: color-mix(in srgb, var(--m-accent) 55%, #ffffff); }
.m-card.ink-dark .m-rating .rating { color: color-mix(in srgb, var(--m-accent) 25%, #0b0b10); }
.m-card.ink-dark .m-rating .rating strong { color: #0b0b10; }
.m-card.ink-dark .m-rating .stars { color: color-mix(in srgb, var(--m-accent) 62%, #5c5c68); }
.m-card.ink-dark .m-rating .stars b { color: #0b0b10; }
.m-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); }
.m-card-rating { position: relative; z-index: 2; margin: 3px 0 0; }
.offer a.rating-link { display: inline-flex; margin-top: 4px; text-decoration: none; }
.offer a.rating-link .rating { font-size: var(--fs-xs); }
.rv-stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.rv-list { display: grid; margin: 0; padding: 0; list-style: none; }
.rv-item { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s4) var(--s5); }
.rv-item + .rv-item { border-top: 1px solid var(--border-subtle); }
.rv-text { display: grid; flex: 1; gap: 4px; min-width: 0; }
.rv-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.rv-who strong { color: var(--text-1); font-size: var(--fs-md); font-weight: 500; }
.rv-stars .rv-off { color: var(--border-strong); }
.rv-rated { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.rv-rated .rv-stars { font-size: var(--fs-sm); }
.rv-body { margin: 2px 0 0; max-width: 72ch; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.rv-more { margin: 0; padding: var(--s3) var(--s5); border-top: 1px solid var(--border-subtle); color: var(--text-3); font-size: var(--fs-sm); }
.m-gap-list { display: grid; gap: var(--s2); margin-top: var(--s2); }
.m-gap-sum { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); color: var(--text-2); font-size: var(--fs-sm); }
.m-gap-names summary { width: fit-content; color: var(--text-3); cursor: pointer; }
.m-panel-count { margin-left: 6px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 540; vertical-align: 1px; }
.m-panel-count.warn { background: var(--warn-surface); color: var(--warn); }
.stripe-mark { display: inline-flex; flex: none; align-items: center; margin-right: 8px; vertical-align: -2px; }
.m-prices .stripe-mark { margin-right: 0; }
.stripe-mark img { width: 14px; height: 14px; border-radius: 3px; }
.m-options-empty .stripe-mark { margin: 0 8px 0 0; }
.m-gap-list li { display: flex; align-items: center; gap: var(--s2); }
.m-gap-list li > span { display: grid; }
.m-gap-list strong { font-size: var(--fs-sm); font-weight: 470; }
.m-gap-ok { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
.m-gap-ok svg { width: 16px; height: 16px; color: var(--ok); }
@media (max-width: 640px) {
  .m-hero { padding: var(--s5); }
  .m-hero header { flex-wrap: wrap; }
  .m-options li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; padding: 10px var(--s4); }
  .m-option-members { grid-column: 1; }
  .m-option-actions { grid-column: 2; grid-row: 1 / span 2; }
}

/* Create a membership: the form beside the card members will see. */
.create-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: var(--s5); align-items: start; }
.create-form { display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.create-form .wizard-foot { margin-top: 0; }
/* A form alone (no preview beside it) takes the page’s width, as every other page does. */
.create-layout.single { grid-template-columns: minmax(0, 1fr); }
/* Billing period, as Stripe asks for it: the named periods, and for Custom a row reading "every [2] [months]". */
.period-custom { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: var(--s2); margin-top: 2px; color: var(--text-2); font-size: var(--fs-sm); }
.period-custom[hidden] { display: none; }
.create-form .form-grid { align-items: start; }
.create-form textarea { min-height: 84px; }
/* Create a membership across the page: two sections under one hairline each, every option in view. */
.create-wide { gap: 0; padding: 0; }
.create-section { display: grid; gap: var(--s4); padding: var(--s5) var(--s6) var(--s6); border-bottom: 1px solid var(--border-subtle); }
.create-section h2 { font-size: 13px; font-weight: 470; line-height: 1.3; }
.create-row { display: grid; gap: var(--s4); align-items: start; }
.create-row-3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.create-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Checkout: the free trial, the sale to its right with its fields stacked (open, optional), then what checkout asks
   for as plain ticks in two columns beside the sale. */
.create-checkout { display: grid; grid-template-columns: auto auto; gap: var(--s8); align-items: start; justify-content: start; }
.create-offer { display: grid; grid-template-columns: 220px minmax(0, 280px); gap: var(--s8); align-items: start; justify-content: start; }
.create-offer .trial-field { width: 220px; max-width: none; }
.create-sale { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); min-width: 0; margin: 0; padding: 0; border: 0; }
.create-sale .field { gap: 6px; }
.create-sale [data-create-sale-duration][hidden] { display: none; }
.create-sale .help:empty, .trial-field .help:empty { display: none; }
/* Two columns beside the sale: three ticks down the first, two down the second. */
.create-checkout .create-options { grid-template-columns: repeat(2, max-content); grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: var(--s3) var(--s8); margin-top: var(--s7); }
.create-checkout .check-card { min-height: 0; padding: 0; border: 0; background: none; }
.create-checkout .check-card:has(input:checked), .create-checkout .check-card:has(input:disabled) { border: 0; background: none; }
@media (max-width: 860px) { .create-checkout, .create-offer { grid-template-columns: minmax(0, 1fr); } .create-checkout .create-options { margin-top: 0; } }
/* On a phone the checkout options stack in one column instead of running past the card. */
@media (max-width: 560px) { .create-checkout .create-options { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; } }
.create-row-2 .photo-pick { align-self: stretch; margin-top: 22px; }
.create-wide > .callout { margin: var(--s4) var(--s6) 0; }
.create-wide > .wizard-foot { padding: var(--s4) var(--s6); }
/* Checkout: the free trial first, then what Stripe asks for, as a row of tick cards. */
.create-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--s2); }
.check-card { display: flex; align-items: flex-start; gap: 10px; min-height: 52px; padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-2); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.check-card:hover { border-color: var(--border-strong); }
.check-card:has(input:checked) { border-color: var(--accent-line); background: var(--accent-surface); }
.check-card:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.check-card input { flex: none; width: 14px; height: 14px; margin: 2px 0 0; accent-color: var(--accent); }
.check-card > span { display: grid; gap: 2px; min-width: 0; }
.check-card strong { color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; }
.check-card > span > span { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.4; }
/* Switched off (a one-time payment has no promotion codes): read as unavailable, and no hover. */
.check-card:has(input:disabled) { cursor: not-allowed; border-color: var(--border-subtle); background: var(--surface-1); }
.check-card:has(input:disabled) strong { color: var(--text-3); }
.trial-field { max-width: 220px; }
/* The way in for someone already selling on Stripe, above the form where it is seen first. */
.import-bar { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--accent-line); border-radius: var(--r-panel); background: var(--accent-surface); }
.import-bar > svg { flex: none; width: 16px; height: 16px; color: var(--accent-text); }
.import-bar .min0 { display: grid; flex: 1; gap: 2px; }
.import-bar strong { color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; }
.import-bar span { color: var(--text-2); font-size: var(--fs-sm); }
.import-bar .btn { flex: none; }
@media (max-width: 900px) {
  .create-row-3, .create-row-2 { grid-template-columns: minmax(0, 1fr); }
  .create-row-2 .photo-pick { margin-top: 0; }
}
@media (max-width: 640px) {
  .create-section { padding: var(--s4); }
  .create-wide > .callout { margin: var(--s4) var(--s4) 0; }
  .create-wide > .wizard-foot { padding: var(--s4); }
  .import-bar { flex-wrap: wrap; }
  .import-bar .btn { flex-basis: 100%; }
}
.unit-input { position: relative; }
.unit-input > span { position: absolute; inset: 0 12px 0 auto; display: flex; align-items: center; color: var(--text-3); font-size: var(--fs-sm); pointer-events: none; }
.unit-input input[type="number"] { padding-right: 48px; }
.locked-field { display: flex; align-items: center; gap: 8px; min-height: var(--control); padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-sm); cursor: not-allowed; }
.locked-field svg { width: 14px; height: 14px; color: var(--text-3); }
.create-title { font-size: var(--fs-md); font-weight: 470; }
.join-preview-aside { position: sticky; top: calc(var(--appbar) + var(--s5)); display: grid; gap: var(--s3); padding: var(--s4); border: 1px dashed var(--accent-line); border-radius: var(--r-panel); background: var(--accent-surface); }
.aside-label { display: flex; align-items: center; gap: 7px; color: var(--accent-text); font-size: 12px; font-weight: 470; }
.aside-label svg { width: 14px; height: 14px; }
.join-preview .offer-role { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--text-3); font-size: var(--fs-xs); }
.join-preview .offer-role svg { width: 12px; height: 12px; color: var(--discord); }

/* Action Items: role delivery as a flow of three stops. */
.flow-strip { display: flex; align-items: stretch; gap: 0; margin-bottom: var(--s5); }
.flow-node { flex: 1; display: grid; gap: 2px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); color: var(--text-2); text-decoration: none; }
a.flow-node:hover { border-color: var(--border-strong); }
.flow-node.ok { border-color: var(--ok-line); background: var(--ok-surface); }
.flow-node.info { border-color: var(--info-line, var(--border-strong)); background: var(--info-surface); }
.flow-node.bad { border-color: var(--bad-line); background: var(--bad-surface); }
.flow-count { color: var(--text-1); font-size: 20px; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }
.flow-node.ok .flow-count { color: var(--ok); } .flow-node.bad .flow-count { color: var(--bad); } .flow-node.info .flow-count { color: var(--info); }
.flow-label { font-size: 12px; font-weight: 470; }
.flow-arrow { position: relative; flex: 0 0 44px; align-self: center; height: 2px; margin: 0 6px; background: var(--border-strong); }
.flow-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong); transform: rotate(45deg); }
.flow-or { flex: 0 0 44px; align-self: center; color: var(--text-3); font-size: 11px; text-align: center; }

/* Analytics: the counts in one box under the chart, separated by rules. */
.stat-tiles .figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); overflow: hidden; }
.stat-tiles .figures > .figure, .stat-tiles .figures > .figure + .figure { display: block; padding: 14px 16px; border: 0; }
.stat-tiles .figures > .figure:nth-child(1) { border-left: 3px solid var(--ok); }
.stat-tiles .figures > .figure:nth-child(2) { border-left: 3px solid var(--warn); }
.stat-tiles .figures > .figure:nth-child(3) { border-left: 3px solid var(--bad); }
.stat-tiles .figures > .figure .figure-value { text-align: left; }
/* On the Dashboard they are a small line under the member count, not a row of their own. */
.paid-panel .stat-tiles { margin-top: var(--s4); }
.paid-panel .stat-tiles .figures { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); border: 0; border-radius: 0; background: none; overflow: visible; }
.paid-panel .stat-tiles .figures > .figure, .paid-panel .stat-tiles .figures > .figure + .figure { flex: none; padding: 0; border: 0; }
.paid-panel .stat-tiles .figures > .figure:last-child:nth-child(odd) { border-top: 0; }
.paid-panel .stat-tiles .figure a { display: inline-flex; align-items: baseline; gap: 6px; color: var(--text-2); text-decoration: none; }
.paid-panel .stat-tiles .figure a:hover dt { color: var(--text-1); }
.paid-panel .stat-tiles .figure dt { order: 2; color: var(--text-3); font-size: var(--fs-sm); }
.paid-panel .stat-tiles .figure > a::before { content: ""; order: 0; flex: none; align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.paid-panel .stat-tiles .figure:nth-child(1) > a::before { background: var(--ok); }
.paid-panel .stat-tiles .figure:nth-child(2) > a::before { background: var(--warn); }
.paid-panel .stat-tiles .figure:nth-child(3) > a::before { background: var(--bad); }
.paid-panel .stat-tiles .figures .figure .figure-value { order: 1; margin: 0; text-align: left; color: var(--text-1); font-size: var(--fs-base); font-weight: 500; }
.paid-panel .stat-tiles .figures .figure .figure-value.warn { color: var(--warn); }

/* Settings: each rule reads event, arrow, outcome. */
.help-contact { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s4); padding: var(--s2) 0 var(--s5); border-bottom: 1px solid var(--border); }
.help-contact > svg { width: 20px; height: 20px; color: var(--accent-text); }
.help-contact h2 { font-size: var(--fs-md); font-weight: 540; }
.help-contact p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.help-contact-actions { display: flex; align-items: center; gap: var(--s2); }
/* ---------- Free access ----------
   A membership given without a payment: a small tag says why, the profile lists each one with Remove, and one dialog
   gives it. */
.free-tag { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border: 1px solid var(--border); border-radius: var(--r-tag); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 470; white-space: nowrap; }
.free-list { display: grid; margin: 0; padding: 0; list-style: none; }
.free-row { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--border-subtle); }
.free-row:first-child { padding-top: 0; border-top: 0; }
.free-row:last-child { padding-bottom: 0; }
.free-row > .min0 { display: grid; flex: 1; gap: 3px; }
.free-row-what { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-sm); }
.free-row-when { color: var(--text-3); font-size: var(--fs-xs); }
.free-note { color: var(--text-2); overflow-wrap: anywhere; }
.member-free { margin-bottom: var(--s5); }
.member-free > .panel { margin: 0; }
.member-roles { margin-bottom: var(--s5); }
.member-roles > .panel { margin: 0; }
/* A member's Free access, Discord roles and Timeline sit on the page, with no box around each. */
.member-free > .panel, .member-roles > .panel, #member-activity { border: 0; border-radius: 0; background: none; box-shadow: none; }
.member-free > .panel > :is(.panel-head, .panel-body), .member-roles > .panel > :is(.panel-head, .panel-body), #member-activity > :is(.panel-head, .panel-body) { padding-left: 0; padding-right: 0; }
/* Free access on the left (3/5) and Discord roles on the right (2/5), a thin line between; titles a size up. */
.member-pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: stretch; margin: var(--s6) 0 var(--s8); }
.member-pair.solo { grid-template-columns: minmax(0, 1fr); }
.member-pair > .member-free, .member-pair > .member-roles { margin: 0; }
.member-pair > .member-free { padding-right: var(--s8); }
.member-pair > .member-free + .member-roles { padding-left: var(--s8); border-left: 1px solid var(--border); }
.member-pair .panel-head h2, #member-activity .panel-head h2 { font-size: var(--fs-xl); font-weight: 550; letter-spacing: -.015em; }
@media (max-width: 900px) {
  .member-pair { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .member-pair > .member-free { padding-right: 0; }
  .member-pair > .member-free + .member-roles { padding-left: 0; border-left: 0; }
}
dialog.free-dialog { width: min(440px, calc(100vw - 32px)); }
/* Post to Discord: the channel list scrolls inside the dialog; each channel shows its category on the right. */
dialog.post-dialog { overflow: visible; }
.post-dialog .select-menu-list { max-height: 240px; overflow-y: auto; }
.post-dialog .select-menu-option .muted { margin-left: auto; padding-left: var(--s3); }
/* Posted: a green check pops in beside the heading and draws itself. It replays each time the done state appears, since
   [hidden] takes it out of the page in between. */
.post-done:not([hidden]) { display: flex; align-items: flex-start; gap: var(--s3); }
.post-done-mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--ok-line); border-radius: var(--r-pill); background: var(--ok-surface); color: var(--ok); animation: post-done-pop var(--d4) var(--ease) both; }
.post-done-mark svg { width: 18px; height: 18px; }
.post-done-mark path { stroke-dasharray: 22; stroke-dashoffset: 22; animation: post-done-draw 320ms var(--ease) 140ms forwards; }
@keyframes post-done-pop { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
@keyframes post-done-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .post-done-mark { animation: none; } .post-done-mark path { animation: none; stroke-dashoffset: 0; } }
/* A button that waits with three dots in place of its word (Post in this dialog), instead of the usual spinner. It keeps
   its size and full colour while busy, so it reads as working rather than switched off. */
.btn-dots-mark { display: none; }
.btn.btn-dots[aria-busy="true"] { opacity: 1; cursor: progress; }
.btn.btn-dots[aria-busy="true"]::after { content: none; }
.btn.btn-dots[aria-busy="true"] .btn-dots-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
.btn-dots-mark i { width: 5px; height: 5px; border-radius: var(--r-pill); background: #fff; animation: btn-dot 900ms var(--ease) infinite; }
.btn-dots-mark i:nth-child(2) { animation-delay: 150ms; }
.btn-dots-mark i:nth-child(3) { animation-delay: 300ms; }
@keyframes btn-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .btn-dots-mark i { animation: none; opacity: .8; } }
.free-body { display: grid; gap: var(--s4); padding: var(--s6) var(--s6) var(--s5); }
.free-head h2 { font-size: var(--fs-md); font-weight: 500; }
.free-head p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-sm); }
.free-reasons { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.free-reasons legend { padding: 0; }
.free-reasons .aff-kind { width: fit-content; }
.free-body .field input, .free-body .field select { width: 100%; }
.free-fine { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.45; }
.free-error { color: var(--bad); font-size: var(--fs-sm); }
.free-error[hidden] { display: none; }
/* How long: six lengths as a 3 by 2 choice, Custom opening a number and a unit beneath it. */
.free-lengths { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.free-lengths legend { padding: 0; }
.free-lengths .aff-kind { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.free-lengths .aff-kind span { justify-content: center; padding: 0 6px; white-space: nowrap; }
.free-custom { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s2); margin-top: 2px; }
.free-custom[hidden] { display: none; }
.free-custom input, .free-custom select { width: 100%; min-height: var(--control); }
.free-row-actions { display: inline-flex; flex: none; align-items: center; gap: 2px; }
.free-ends { color: var(--text-2); }
td .btn[data-free-open] svg, .panel-actions .btn[data-free-open] svg { width: 14px; height: 14px; }

/* Book a help call: one button, centred under the policies. */
.help-call { display: flex; justify-content: center; padding-top: var(--s3); }
.help-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-links a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); min-height: 52px; padding: 12px var(--s4); border-top: 1px solid var(--border-subtle); color: var(--text-1); text-decoration: none; transition: background var(--d1) var(--ease); }
.help-links a:nth-child(-n+2) { border-top: 0; }
/* Unboxed: the rows sit on the page, a rule between them and one closing the list. */
.help-policies .help-links { border-bottom: 1px solid var(--border-subtle); }
.help-links a:nth-child(odd) { padding-left: 0; }
.help-links a:nth-child(2n) { border-left: 1px solid var(--border-subtle); }
.help-links a:hover { background: var(--hover); }
.help-links a:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.help-links a > svg:first-child { width: 16px; height: 16px; color: var(--text-2); }
.help-links a > span { display: grid; gap: 1px; min-width: 0; }
.help-links strong { font-size: var(--fs-sm); font-weight: 470; }
.help-links a > span > span:not(.visually-hidden) { color: var(--text-3); font-size: var(--fs-xs); }
.help-links .help-go { width: 14px; height: 14px; color: var(--text-3); transition: transform var(--d2) var(--ease), color var(--d2) var(--ease); }
.help-links a:hover .help-go { color: var(--text-1); transform: translate(1px, -1px); }
@media (max-width: 640px) {
  .help-contact { grid-template-columns: auto minmax(0, 1fr); }
  .help-contact-actions { grid-column: 1 / -1; }
  .help-contact-actions .btn:last-child { flex: 1; }
  .help-links { grid-template-columns: minmax(0, 1fr); }
  .help-links a:nth-child(2n) { border-left: 0; }
  .help-links a:nth-child(2) { border-top: 1px solid var(--border-subtle); }
}

/* Members: a roster line of faces and a count. */
.roster { display: inline-flex; align-items: center; gap: 10px; min-height: 26px; color: var(--text-2); font-size: 13px; }
.roster strong { color: var(--text-1); font-weight: 470; }
.roster-active { color: var(--ok); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid var(--bg); border-radius: 50%; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

/* Member detail: expected and delivered as two cards with an arrow between. */
.role-compare { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.role-compare .compare-arrow { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-2); color: var(--text-3); }
.role-compare .compare-arrow svg { width: 14px; height: 14px; }
.role-compare div.expected { border-color: var(--accent-line); background: var(--accent-surface); }
.role-compare div.delivered.match { border-color: var(--ok-line); background: var(--ok-surface); }

/* Account: a profile card. */
/* Account: one surface, three parts divided by rules: who you are, your Lance plan, your Stripe accounts. */
/* Account: a pass for who you are, one card for the plan with a ladder of every plan’s fee, and the Stripe accounts as tiles. */
.acct { display: grid; gap: var(--s5); }
.acct-pass { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s6); padding: var(--s6) var(--s7, 40px); overflow: hidden; border: 1px solid var(--accent-line); border-radius: var(--r-dialog); background: var(--accent-surface); box-shadow: inset 0 3px 0 var(--accent), var(--shadow-1); isolation: isolate; }
.acct-watermark { position: absolute; right: -24px; bottom: -40px; z-index: -1; width: 220px; height: auto; opacity: .07; pointer-events: none; }
.acct-me { display: flex; align-items: center; gap: var(--s5); min-width: 0; }
.acct-me .avatar.xl { width: 58px; height: 58px; font-size: 24px; box-shadow: 0 0 0 3px var(--accent-surface), 0 0 0 5px var(--accent); }
.acct-me h2 { overflow: hidden; color: var(--text-1); font-size: var(--fs-2xl); font-weight: 540; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.acct-handle { color: var(--text-2); font-size: var(--fs-md); }
.acct-id, .member-id { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--text-3); font-size: var(--fs-xs); }
.acct-id .btn, .member-id .btn { margin-left: -8px; color: var(--text-3); }
.acct-stats { display: grid; grid-template-columns: repeat(2, minmax(136px, auto)); align-self: center; margin: 0; }
.acct-stats > div { display: grid; justify-items: center; align-content: center; gap: var(--s2); padding: var(--s2) var(--s6); text-align: center; }
.acct-stats > div + div { border-left: 1px solid var(--accent-line); }
.acct-stats dt { color: var(--text-3); font-size: var(--fs-sm); font-weight: 470; white-space: nowrap; }
.acct-stats dd { margin: 0; color: var(--text-1); font-size: 26px; font-weight: 540; letter-spacing: -.04em; line-height: 1.05; }
/* Large figures (revenue, members, monthly totals, account numbers, plan prices) in a light weight. */
.chart-amount, .paid-value, .mrr-value, .acct-stats dd { font-weight: 440; }
.acct-stats { justify-self: end; }
/* The foot of the Account page: who is signed in, and Sign out. */
.acct-signout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s5); border-top: 1px solid var(--border); }
.acct-signout p { color: var(--text-3); font-size: var(--fs-sm); }
.acct-signout strong { color: var(--text-1); font-weight: 470; }
/* Review Lance on the Account page: one line of state and the way to write, edit or approve. */
/* Lance fee: the owner’s rate per sale as the one figure; a paid subscription from before Lance went free sits under it. */
.acct-fee { display: grid; gap: var(--s4); padding: var(--s5) var(--s6); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); box-shadow: var(--shadow-1); }
.acct-fee-main { display: grid; gap: var(--s2); }
.acct-fee-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; color: var(--text-3); font-size: var(--fs-sm); }
.acct-fee-rate strong { color: var(--text-1); font-size: 28px; font-weight: 540; letter-spacing: -.04em; line-height: 1.05; }
.acct-fee-legacy { display: grid; justify-items: start; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--border-subtle); }
.acct-fee-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text-2); font-size: var(--fs-sm); }
.acct-fee-sub strong { color: var(--text-1); font-weight: 540; }
.acct-fee-legacy .muted { font-size: var(--fs-sm); }
/* The fee a creator or founding link gives: the discounted rate big, the regular one struck through beside it. */
.creator-fee { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0; color: var(--text-3); font-size: var(--fs-md); }
.creator-fee strong { color: var(--text-1); font-size: 44px; font-weight: 560; letter-spacing: -.045em; line-height: 1; }
.creator-fee s { color: var(--text-3); font-size: var(--fs-xl); }
.creator-fee span { flex-basis: 100%; }
.acct-review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); padding: var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.acct-review h2 { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: 500; }
.acct-review h2 svg { width: 16px; height: 16px; color: var(--gold); }
.acct-review p { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); }
/* Review Lance: the author preview, a 1 to 5 segmented rating, and the Reviews page that approves them. */
.review-layout { max-width: var(--w-read); }
/* Review Lance on its own page: the status sits at the right of the title; Delete sits apart, under the form. */
.review-card .public-head { flex-wrap: wrap; }
.review-card .public-head > .review-state { margin-left: auto; }
.review-card-foot { display: flex; }
.review-form { display: grid; gap: var(--s5); }
.review-author { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); }
.review-author strong { display: block; font-size: var(--fs-md); font-weight: 500; overflow-wrap: anywhere; }
.review-author .min0 > span { color: var(--text-3); font-size: var(--fs-sm); }
fieldset.rating { margin: 0; padding: 0; border: 0; min-width: 0; }
.rating legend { padding: 0; margin-bottom: 6px; }
/* Rating: five stars left to right. Picking one fills it and every star before it; hovering previews the same. */
.star-input { display: flex; gap: 6px; }
.star-input label { display: inline-flex; padding: 2px; border-radius: var(--r-tag); color: var(--border-strong); cursor: pointer; transition: color var(--d1) var(--ease); }
.star-input svg { width: 30px; height: 30px; fill: currentColor; stroke: none; transition: transform var(--d1) var(--ease); }
.star-input:has(:checked) label { color: var(--gold); }
.star-input label:has(:checked) ~ label { color: var(--border-strong); }
@media (hover: hover) {
  .star-input:hover label, .star-input:hover label:has(:checked) ~ label { color: var(--gold); }
  .star-input:hover label:hover ~ label { color: var(--border-strong); }
}
.star-input label:active svg { transform: scale(.88); }
.star-input label:has(:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .star-input label, .star-input svg { transition: none; } }
.review-state { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s2); color: var(--text-3); font-size: var(--fs-sm); }
.review-state strong { color: var(--text-1); font-weight: 500; }
.review-quote { margin: 0; padding: var(--s3) var(--s4); border-left: 1px solid var(--border-strong); color: var(--text-1); font-size: var(--fs-sm); line-height: var(--lh); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-queue { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.review-item { display: grid; gap: var(--s3); padding: var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.review-item-head { display: flex; align-items: center; gap: var(--s3); }
.review-item-head strong { display: block; font-size: var(--fs-md); font-weight: 500; overflow-wrap: anywhere; }
.review-item-head .min0 > span { color: var(--text-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.review-item-state { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; }
.review-item-meta { display: flex; align-items: center; gap: var(--s3); color: var(--text-3); font-size: var(--fs-xs); }
.review-stars { display: inline-flex; gap: 2px; }
.review-stars svg { width: 14px; height: 14px; color: var(--border-strong); }
.review-stars .on svg { color: var(--gold); fill: var(--gold); }
.review-none { margin: 0; font-size: var(--fs-sm); }
/* A review email’s confirmation page: the review as it would appear, then the one button. */
.review-email { display: grid; gap: var(--s4); width: min(100%, 520px); }
.review-email form, .review-email .fine { margin: 0; }
.review-email .public-section { display: grid; gap: var(--s3); }
.review-email__who { display: grid; gap: var(--s2); }
.review-email__who p { margin: 0; overflow-wrap: anywhere; }
.review-email__who span { color: var(--text-3); }
.review-email .review-stars svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .review-author { flex-wrap: wrap; } .review-item { padding: var(--s4); } }
.acct-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: var(--fs-xs); font-weight: 540; }
.acct-kicker svg { width: 14px; height: 14px; fill: currentColor; }
.acct-stripe .account-part-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.acct-stripe .account-part-head h2 img { border-radius: 4px; }
.acct-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s3); }
.acct-tile { --t: transparent; position: relative; display: grid; align-content: start; gap: 4px; min-height: 132px; padding: var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: inset 3px 0 0 var(--t); transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.acct-tile.warn { --t: var(--warn); }
.acct-tile.bad { --t: var(--bad); }
.acct-tile.neutral { --t: var(--border-strong); }
.acct-tile:has(.acct-tile-link):hover { border-color: var(--border-strong); background: var(--surface-2); }
.acct-tile-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.acct-tile-link:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.acct-tile-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.acct-tile-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-xs); font-weight: 470; }
.acct-tile-name { overflow: hidden; color: var(--text-1); font-size: var(--fs-md); font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.acct-tile-sub { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: var(--fs-xs); }
.acct-tile-sub svg { width: 12px; height: 12px; }
.acct-tile:hover .acct-tile-sub { color: var(--text-1); }
@media (prefers-reduced-motion: no-preference) { .acct-tile { transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease), transform var(--d3) var(--ease-out); } .acct-tile:has(.acct-tile-link):hover { transform: translateY(-2px); } }
.acct-tile-help { color: var(--text-3); font-size: var(--fs-xs); }
.acct-tile form, .acct-tile .btn { position: relative; z-index: 2; justify-self: start; margin-top: var(--s2); }
@media (max-width: 560px) { .acct-tile { min-height: 0; padding: var(--s4); } .acct-tile-top { margin-bottom: 4px; } .acct-tile-top .avatar { width: 32px; height: 32px; font-size: 13px; } }
@media (max-width: 900px) {
  .acct-pass { grid-template-columns: minmax(0, 1fr) auto; }
  .acct-stats { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
}
@media (max-width: 640px) {
  .acct-pass { padding: var(--s5); }
  .acct-me .avatar.xl { width: 64px; height: 64px; font-size: 20px; }
  .acct-me h2 { font-size: var(--fs-xl); }
  .acct-stats dd { font-size: 26px; }
}
.account-sheet { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); }
.account-part { padding: var(--s6); }
.account-part + .account-part { border-top: 1px solid var(--border); }
.account-part:last-child .rows { margin: 0 calc(var(--s6) * -1) calc(var(--s6) * -1); border-top: 1px solid var(--border-subtle); }
.account-part-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.account-part-head h2 { font-size: var(--fs-md); font-weight: 540; }
.account-who { display: flex; align-items: center; gap: var(--s5); }
.account-who h2 { font-size: var(--fs-lg); font-weight: 470; letter-spacing: -.02em; overflow-wrap: anywhere; }
.account-who p { color: var(--text-3); font-size: var(--fs-sm); }
/* The plan in four colours, one per fact: each tile on its own deep shade of its colour, with a bright edge on top. */
.account-plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.account-plan > div { --tone: var(--accent-bright); --tone-deep: #1a1036; position: relative; display: grid; gap: var(--s2); min-width: 0; padding: var(--s4); border: 1px solid color-mix(in srgb, var(--tone) 38%, #16161b); border-radius: var(--r-panel); background: var(--tone-deep); box-shadow: inset 0 3px 0 var(--tone); }
.account-plan .tone-violet { --tone: #a98bff; --tone-deep: #1b1238; }
.account-plan .tone-sky { --tone: #3ddae9; --tone-deep: #0b1f26; }
.account-plan .tone-mint { --tone: #43d39a; --tone-deep: #0c2119; }
.account-plan .tone-amber { --tone: #f2b84b; --tone-deep: #25190a; }
.account-plan dt { display: flex; align-items: center; gap: 6px; color: color-mix(in srgb, var(--tone) 70%, #ffffff); font-size: 12px; font-weight: 470; }
.account-plan dt svg { width: 15px; height: 15px; color: var(--tone); }
.account-plan .tone-violet dt svg { fill: var(--tone); }
.account-plan dd { margin: 0; overflow: hidden; color: #ffffff; font-size: 17px; font-weight: 540; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .account-plan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.profile-id { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px !important; }
.profile-id-label { color: var(--text-3); }
.profile-side { display: grid; justify-items: end; gap: var(--s3); margin-left: auto; }
.profile-count { display: grid; justify-items: end; color: var(--text-3); font-size: 12px; }
.profile-count strong { color: var(--text-1); font-size: 19px; font-weight: 500; letter-spacing: -.02em; }

/* Admins: an invite bar and one team list. */
.invite-bar { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s5); padding: 6px 6px 6px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-1); }
.invite-bar > svg { width: 16px; height: 16px; color: var(--accent-text); }
.invite-bar input { flex: 1; min-width: 0; height: var(--control); border: 0; background: transparent; box-shadow: none; }
.invite-bar input:focus { outline: none; }
.invite-bar:focus-within { border-color: var(--border-focus); }
.invite-sent svg { animation: invite-check var(--d4) var(--ease); }
@keyframes invite-check { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .invite-sent svg { animation: none; } }
#admin-notice:not(:empty) { margin-bottom: var(--s5); }
/* An admin’s card says so beside the server’s name, on its line. */
.home-card-open:has(.home-admin) { display: flex; align-items: baseline; gap: var(--s2); }
.home-card-open:has(.home-admin) strong { flex: 0 1 auto; min-width: 0; }
.home-card-name .home-admin { flex: none; color: var(--text-3); font-size: var(--fs-xs); font-weight: 470; }
.team { display: grid; }
.team-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 var(--s5); border-top: 1px solid var(--border-subtle); }
.team-row .min0 { display: grid; flex: 1; min-width: 0; }
/* An admin's picture and name open their member page. */
.team-who { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 12px; min-width: 0; margin: -6px auto -6px -8px; padding: 6px 8px; border-radius: var(--r-control); color: inherit; text-decoration: none; transition: background var(--d1) var(--ease); }
.team-who:hover { background: var(--hover); }
.team-who .min0 { flex: 0 1 auto; }
.team-who:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 4px; border-radius: var(--r-control); }
.team-row strong { font-size: 13px; font-weight: 470; }
/* An invite tag lists its permissions, so it wraps rather than running off a phone screen. */
.team-row .badge.plain { flex: 0 1 auto; min-width: 0; max-width: 100%; white-space: normal; line-height: 1.4; }
.team-row span:not(.badge):not(.avatar) { color: var(--text-3); font-size: 12px; }

/* Solo pages (sign-in, errors, invitations): one marked card. */
.code-box { display: flex; align-items: center; gap: 10px; margin-top: var(--s5); padding: 10px 10px 10px 14px; border: 1px solid var(--accent-line); border-radius: var(--r-panel); background: var(--accent-surface); }
.code-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }

/* Join page: three steps in one row. */
.stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: none; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--text-2); font-size: 12px; text-align: center; }
.stepper li + li::before { content: ""; position: absolute; top: 13px; right: calc(50% + 18px); width: calc(100% - 36px); height: 2px; background: var(--border-strong); }
.stepper .step-mark { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--accent-line); border-radius: 50%; background: var(--accent-surface); color: var(--accent-text); font-size: 12px; font-weight: 470; }

/* Integrations: brand tiles with the brand colour along the top edge. */
.conn.stripe { border-top: 3px solid #635bff; }
.conn.discord { border-top: 3px solid var(--discord); }
/* A connection the viewer may not open: a plain card, a lock for its mark, no brand colour. */
.conn-locked { align-content: start; }
.conn-locked .conn-mark { color: var(--text-3); background: var(--surface-2); }
.conn .trait-pills li { background: var(--bg-sunken); }

@media (max-width: 900px) {
  .create-layout { grid-template-columns: minmax(0, 1fr); }
  .join-preview-aside { position: static; }
  .stat-tiles .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tiles .figures > .figure:last-child:nth-child(odd) { grid-column: 1 / -1; border-top: 1px solid var(--border); }
  .flow-strip { flex-wrap: wrap; gap: 8px; }
  .flow-arrow, .flow-or { display: none; }
  .flow-node { flex-basis: 30%; }
  .account-who { flex-wrap: wrap; }
  .profile-side { margin-left: 0; justify-items: start; grid-auto-flow: column; align-items: center; }
  .role-compare { grid-template-columns: minmax(0, 1fr); }
  .role-compare .compare-arrow { justify-self: center; transform: rotate(90deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .member-status[data-polling] [data-state]:not([hidden]) .status-spinner { animation: member-status-spin 800ms linear infinite; }
}
.fine { margin-top: var(--s3); color: var(--text-3); font-size: var(--fs-xs); }
/* A lone ghost button under a fine-print line lines its text up with the line, not its own padding. */
.fine + .button-row > form:only-child > .btn-ghost, .fine + .button-row > .btn-ghost:only-child { margin-left: -14px; }
.fine-list { margin-top: var(--s5); }
.fine-list li { font-size: var(--fs-xs); }
.public-head > .row-icon { width: 46px; height: 46px; flex: none; }
.public-head > .row-icon svg { width: 21px; height: 21px; }

/* Helpers used by pages */
.min0 { min-width: 0; }
.warn-text { color: var(--warn); } .bad-text { color: var(--bad); } .ok-text { color: var(--ok); }
.section-gap { margin-top: var(--s4); } .section-gap-bottom { margin-bottom: var(--s4); }
.stack.section-gap { margin-top: 0; margin-bottom: var(--s5); }
.callout + .claim-step { margin-top: var(--s4); }
.stack.tight { gap: var(--s1); justify-items: start; }
.stack.tight .btn { max-width: 100%; height: auto; white-space: normal; text-align: left; }
.aside-text { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.integration-title { display: inline-flex; align-items: center; gap: var(--s2); }
.integration-title svg { width: 16px; height: 16px; color: var(--text-2); }
.panel-head h2 .badge { vertical-align: 2px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: center; }

/* Avoid cross-document snapshots competing with page arrival and live region updates. */
@view-transition { navigation: none; }
.sidebar { view-transition-name: lance-sidebar; }
.topbar { view-transition-name: lance-topbar; }
::view-transition-old(lance-sidebar), ::view-transition-old(lance-topbar) { display: none; }
::view-transition-new(lance-sidebar), ::view-transition-new(lance-topbar), ::view-transition-group(lance-sidebar), ::view-transition-group(lance-topbar) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--d2); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* Only All Communities has an entrance. Community/account pages and tab swaps paint in their final state. */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  html.js .public-top, html.js .public-main > * { animation: rise calc(var(--d4) + 120ms) var(--ease-out) backwards; }
  html.js .public-main > * { animation-delay: 40ms; }
  html.js .public-main > :nth-child(2) { animation-delay: 80ms; }
  html.js .public-foot { animation: rise calc(var(--d4) + 120ms) 160ms var(--ease-out) backwards; }
}
.app:not([data-section="communities"]) .swap-in { animation: none; }

/* Disclosure panels (technical details, the fix-it DM, archived memberships) slide open instead of snapping, where the
   browser can animate to auto height. */
@supports (interpolate-size: allow-keywords) {
  details.tech, details.fix-dm, details.m-archived { interpolate-size: allow-keywords; }
  @media (prefers-reduced-motion: no-preference) {
    details.tech::details-content, details.fix-dm::details-content, details.m-archived::details-content { height: 0; overflow: clip; opacity: 0; transition: height var(--d4) var(--ease-out), opacity var(--d3) var(--ease), content-visibility var(--d4) allow-discrete; }
    details.tech[open]::details-content, details.fix-dm[open]::details-content, details.m-archived[open]::details-content { height: auto; opacity: 1; }
  }
}

/* Anything you can point at eases into its hover colour instead of snapping. Zero specificity, so a component that
   sets its own transition keeps it. */
:where(a, button, summary, [role="tab"]) { transition: color var(--d2) var(--ease), background-color var(--d2) var(--ease), border-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease), text-decoration-color var(--d2) var(--ease); }

/* Navigation feedback: a thin light runs along the top while the next page loads (the script adds the class). */
/* The beam: transparent -> Beam -> white head, the one place the UI shows the light in motion. */
.nav-progress { position: fixed; z-index: var(--z-toast); left: 0; top: 0; height: 2px; width: 0; background: var(--accent); opacity: 0; }
html.navigating .nav-progress { opacity: 1; animation: nav-run 8s var(--ease-out) forwards; }
@keyframes nav-run { 0% { width: 0; } 10% { width: 45%; } 40% { width: 72%; } 100% { width: 92%; } }

@media (prefers-reduced-motion: reduce) {
  .app[data-section="communities"]::before, .app[data-section="communities"]::after { animation: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
@media (max-width: 1100px) {
  .main-inner { padding: var(--s6) var(--s5) var(--s9); }
  .grid-main, .grid-thirds { grid-template-columns: minmax(0, 1fr); }
  .health:not(.two) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .health-item:nth-child(4) { border-left: 0; }
  .health-item:nth-child(n+4) { border-top: 1px solid var(--border); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  /* No backdrop filter here: it would make the bar the containing block of the fixed menu sheet and trap it inside. */
  .topbar { gap: var(--s3); padding: 8px var(--s4); background: var(--bg); }
  .topbar .brand { display: block; }
  .topbar .brand img { width: 72px; }
  .topbar .where { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.25; }
  .topbar .where .avatar, .topbar .where .sep, .topbar .env { display: none; }
  .topbar .where .crumb-community { max-width: 42vw; font-size: 11px; }
  .topbar .where strong { font-size: var(--fs-sm); }
  .topbar .where .crumb-trail { gap: 6px; max-width: 100%; min-width: 0; font-size: var(--fs-sm); }
  .topbar .where .crumb-trail strong { flex: 0 1 auto; min-width: 0; }
  .topbar .where .crumb-trail .sep { display: inline; }
  .topbar .where .crumb-trail .crumb-parent { display: none; }
  .topbar .jump { width: auto; min-height: 40px; }
  .topbar .jump span, .topbar .jump kbd { display: none; }
  .mobile-menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--r-control); background: var(--surface-1); cursor: pointer; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu > summary svg { width: 18px; height: 18px; }
  .mobile-menu[open] > summary { border-color: var(--accent-line); }
  .mobile-menu:not([open]) > .mobile-panel { display: none; }
  .mobile-menu[open] > .mobile-panel { position: fixed; inset: var(--appbar) 0 0 0; z-index: var(--z-overlay); display: grid; align-content: start; gap: var(--s4); padding: var(--s4) var(--s4) var(--s8); overflow-y: auto; background: var(--sidebar-bg); animation: menu-in var(--d2) var(--ease); }
  .mobile-panel .nav a { min-height: 46px; font-size: var(--fs-md); }
  .mobile-panel .nav-tree > a { padding-right: 54px; }
  .mobile-panel .nav-sub > summary { width: 46px; height: 46px; }
  .mobile-panel .nav-sub-list { max-height: none; }
  .mobile-panel .nav a[aria-current="page"]::before { left: -13px; }
  .mobile-panel .env { justify-self: start; }
  .mobile-panel .menu { position: static; margin-top: 6px; box-shadow: none; animation: none; }
}
@media (min-width: 1101px) { .mobile-menu { display: none; } }
@media (max-width: 900px) {
  /* Frequent actions get a comfortable touch target on phones and tablets (playbook section 20). */
  .btn, .btn-sm { min-height: 40px; }
  .btn-icon { width: 40px; }
  .main-inner { padding: var(--s5) var(--s4) var(--s8); }
  .page-head { flex-direction: column; align-items: stretch; margin-bottom: var(--s5); }
  .page-actions { justify-content: flex-start; }
  .grid-halves, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 0 0 var(--s4); }
  .hero-actions { justify-content: flex-start; }
  .hero-facts { white-space: normal; }
  .hero h1 { font-size: var(--fs-lg); }
  .health { grid-template-columns: minmax(0, 1fr); }
  .health-item + .health-item { border-left: 0; border-top: 1px solid var(--border); }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary > div { border-left: 0 !important; border-top: 1px solid var(--border) !important; }
  .summary > div:nth-child(-n+2) { border-top: 0 !important; }
  .summary > div:nth-child(even) { border-left: 1px solid var(--border) !important; }
  .facts > div { flex-basis: 30%; }
  .setting-block { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  /* Phones: each row becomes a structured card. The primary cell heads it; every other cell is a labelled line. */
  table.data.stack-mobile thead { display: none; }
  table.data.stack-mobile, table.data.stack-mobile tbody, table.data.stack-mobile tr, table.data.stack-mobile td { display: block; width: auto; }
  /* A cell that is only a button comes last in its card, after the facts it acts on. */
  table.data.stack-mobile tr { display: flex; flex-direction: column; }
  table.data.stack-mobile td:has(> .cell > :is(form, .btn, button, .button-row, .row-actions, .rf-row-actions):only-child), table.data.stack-mobile td:has(> :is(form, .btn, button, .button-row, .row-actions, .rf-row-actions):only-child) { order: 1; }
  table.data.stack-mobile tbody { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); }
  .panel:has(> .table-wrap > table.data.stack-mobile), .rf-frame:has(> .table-wrap > table.data.stack-mobile), .panel:has(> .panel-body > .table-wrap > table.data.stack-mobile) { border-color: transparent; background: none; box-shadow: none; }
  .panel:has(> .table-wrap > table.data.stack-mobile) table.data.stack-mobile tbody, .rf-frame:has(> .table-wrap > table.data.stack-mobile) table.data.stack-mobile tbody, .panel:has(> .panel-body > .table-wrap > table.data.stack-mobile) table.data.stack-mobile tbody { padding: 0; }
  table.data.stack-mobile tr { padding: 10px 12px 8px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-2); }
  table.data.stack-mobile td { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: 3px 0; border: 0; }
  table.data.stack-mobile td::before { content: attr(data-label); flex: none; color: var(--text-3); font-size: 12px; line-height: 22px; }
  table.data.stack-mobile td.primary-cell::before, table.data.stack-mobile td.bare::before { display: none; }
  /* A cell that only holds a button needs no label beside it: the button names itself. */
  table.data.stack-mobile td:has(> .cell > :is(form, .btn, button, .button-row, .row-actions, .rf-row-actions):only-child)::before, table.data.stack-mobile td:has(> :is(form, .btn, button, .button-row, .row-actions, .rf-row-actions):only-child)::before { display: none; }
  table.data.stack-mobile td:has(> .cell > :is(form, .btn, button, .button-row, .row-actions, .rf-row-actions):only-child), table.data.stack-mobile td:has(> :is(form, .btn, button, .button-row, .row-actions, .rf-row-actions):only-child) { justify-content: flex-end; }
  table.data.stack-mobile td .cell { text-align: right; }
  table.data.stack-mobile td.primary-cell .cell, table.data.stack-mobile td.bare .cell { text-align: left; }
  table.data.stack-mobile td.primary-cell { margin-bottom: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
  table.data.stack-mobile td.bare { justify-content: flex-end; }
  table.data.stack-mobile td .row-actions { display: none; }
  table.data.stack-mobile td .membership-actions { display: flex; flex-wrap: wrap; }
  /* The import’s own row actions (match, remove a match) stay on the card too. */
  table.data.stack-mobile td .import-actions { display: flex; }
  table.data.stack-mobile tr.linked { padding-right: 32px; }
  table.data.stack-mobile tr.linked::after { content: "›"; position: absolute; top: 12px; right: 14px; color: var(--text-3); font-size: 15px; line-height: 1; }
  .page-actions > .btn-ghost:first-child:not(.btn-icon), .hero-actions > .btn-ghost:first-child:not(.btn-icon) { margin-left: -14px; }
  table.data.stack-mobile td:has(> .cell:empty) { display: none; }
  table.data.stack-mobile td:first-child, table.data.stack-mobile td:last-child { padding-left: 0; padding-right: 0; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .callout { grid-template-columns: auto minmax(0, 1fr); }
  .callout > :nth-child(3) { grid-column: 2; }
  .callout:not(:has(> .callout-icon)) { grid-template-columns: minmax(0, 1fr); }
  .callout:not(:has(> .callout-icon)) > :nth-child(2) { justify-self: start; }
  .row-item { grid-template-columns: auto minmax(0, 1fr); }
  .row-item > :nth-child(3) { grid-column: 2; justify-self: start; }
  .step { grid-template-columns: 36px minmax(0, 1fr); }
  .step > :nth-child(3) { grid-column: 2; justify-self: start; }
  .toasts { left: var(--s4); right: var(--s4); bottom: var(--s4); width: auto; }
  .setting-row { grid-template-columns: minmax(0, 1fr); }
  .setting-row > :last-child { justify-self: start; }
  .toolbar-group { flex-basis: 100%; }
  .toolbar-group .search, .toolbar-group .select-menu { flex: 1 1 auto; min-width: 0; max-width: none; }
  .select-menu > summary { min-width: 0; }
  .conn { padding: var(--s5); }
  /* The status stays where it is on a wide screen, at the right of the title; the line under the title runs the full
     width beneath both, so a long one is not squeezed into a column beside the status. */
  .conn-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; column-gap: var(--s4); row-gap: 2px; align-items: center; }
  .conn-mark { grid-row: 1 / span 2; align-self: start; }
  .conn-title { display: contents; }
  .conn-title h2 { grid-column: 2; grid-row: 1; }
  .conn-title p { grid-column: 2 / -1; grid-row: 2; margin-top: 0; }
  .conn-state { grid-column: 3; grid-row: 1; }
  .conn > .button-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .conn-facts dd.mono { font-size: 11.5px; overflow-wrap: normal; white-space: nowrap; }
  .conn-facts > div { padding: 10px; }
  .conn > .button-row .btn, .conn > .button-row form { width: 100%; }
  .conn > .button-row .btn { justify-content: flex-start; }
  .split { grid-template-columns: minmax(0, 1fr); }
}
/* Only on the narrowest phones does the status take its own row, lined up with the card’s left edge. */
@media (max-width: 380px) {
  .conn-state { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin-top: var(--s2); }
}
@media (max-width: 640px) {
  .range-tabs a { min-width: 0; padding: 0 6px; }
  /* The headline figure gets its own row; the rest pair up. */
  .figure { flex-basis: 45%; padding-right: var(--s4); }
  .figure:nth-child(odd) { border-left: 0; padding-left: 0; }
  .figure:first-child { flex-basis: 100%; padding-bottom: 14px; }
  .figure-value { font-size: 17px; }
  .figure:first-child .figure-value { font-size: 20px; }

  .chart-panel { min-height: 0; margin-bottom: 24px; padding: 16px; }
  .chart-head { margin-bottom: 20px; }
  .chart-amount { font-size: 17px; line-height: 26px; }
  .chart-grid { padding-left: 42px; padding-right: 8px; }
  .chart .plot { --plot-h: 112px; }
  /* Four dates orient the reader; the bars already carry daily granularity. */
  .chart .tick:nth-last-child(even) { display: none; }
  /* A tooltip on a phone is centred on the plot so it can never leave the viewport. */
  .chart .tip { left: 50% !important; right: auto !important; bottom: 40% !important; min-width: 0; width: max-content; transform: translateX(-50%) !important; }
  .chart .col:nth-child(-n+8) .tip { left: 0 !important; transform: none !important; }
  .chart .col:nth-last-child(-n+8) .tip { left: auto !important; right: 0 !important; transform: none !important; }
  .chart .tip.tip-start { left: 0 !important; right: auto !important; transform: none !important; }
  .chart .tip.tip-end { left: auto !important; right: 0 !important; transform: none !important; }
  /* A line chart’s tooltip sits on its point’s hover area; on a phone it is centred on the whole plot instead, so a
     hidden tooltip never reaches past the screen and makes the page scroll sideways. */
  .line-chart .hit .tip, .line-chart .hit .tip.tip-start, .line-chart .hit .tip.tip-end { left: var(--mid, 50%) !important; right: auto !important; transform: translateX(-50%) !important; }
  .facts > div { flex-basis: 45%; padding-right: var(--s4); }
  .facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts dd { font-size: var(--fs-base); }
}
@media (max-width: 520px) {
  /* A team row wraps its badge and button under the name, which on a phone is a full-length Discord ID. */
  .team-row { flex-wrap: wrap; row-gap: 8px; padding-block: 10px; }
  .team-row .min0 { flex-basis: calc(100% - 44px); }
  .team-row strong { overflow-wrap: anywhere; }
  .team-row .min0 + * { margin-left: 44px; }
  /* An invite tag fills its line, so its Remove starts under the name like every other row. */
  .team-row.invite > .badge.plain ~ * { margin-left: 44px; }
  /* Narrow phones: figures after the headline become dense rows (label left, value right) so a long
     amount never clips. The headline figure keeps its stacked shape - it is the one number worth size. */
  .figure:first-child { display: block; }
  .figure:first-child .figure-value { margin-top: 6px; text-align: left; }
  .figure { flex-basis: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s3); padding: var(--s3) 0; border-left: 0; }
  .figure + .figure { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
  .figure-value { margin-top: 0; font-size: 16px; text-align: right; }
  .figure-note { grid-column: 1 / -1; margin-top: 0; }
  .page-head h1 { font-size: var(--fs-lg); }
  .hero-id { gap: var(--s4); }
  .hero-id .avatar.xl { width: 52px; height: 52px; font-size: 16px; border-radius: var(--r-dialog); }
  .hero-id .avatar.xl + .presence { width: 17px; height: 17px; }
  .hero-id .avatar.xl + .presence.mobile { width: 13px; height: 18px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: var(--control-sm); }
  .public-head, .public-section { padding-left: var(--s5); padding-right: var(--s5); }
  .offer, .offer:has(> .offer-photo) { grid-template-columns: minmax(0, 1fr); }
  .offer-pick { flex-wrap: wrap; } .offer-pick select { flex: 1 1 100%; } .offer-pick .btn { flex: 1 1 100%; }
  .summary { grid-template-columns: minmax(0, 1fr); }
  .summary > div:nth-child(even) { border-left: 0 !important; }
  .summary > div:nth-child(2) { border-top: 1px solid var(--border) !important; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how li { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--s3); }
  .public-section .link-rows { margin: 0 calc(var(--s5) * -1); }
  .public-section .link-rows a { padding-left: var(--s5); padding-right: var(--s5); }
  .wizard li + li::before { width: 12px; }
  .wizard li span:last-child { display: none; }
  .wizard li.current span:last-child { display: inline; }
  .wizard-foot { justify-content: stretch; }
  .wizard-foot { flex-wrap: wrap; }
  /* Each button keeps its whole label and they share the spare width; when both don’t fit, each takes a row. */
  .wizard-foot > * { flex: 1 0 auto; }
  .wizard-foot > .grow { display: none; }
  .wizard-foot > .btn-sm:first-child:not(:only-child) { flex-basis: 100%; order: 1; }
}
/* ---------- Messages: private chats between members and the server team, laid out like a Discord DM ---------- */
.msg-app { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); height: max(560px, calc(100dvh - var(--appbar) - 96px)); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; }
.msg-inbox { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--bg-sunken); }
.msg-inbox > .visually-hidden + .msg-tabs { margin-top: var(--s4); }
.msg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 var(--s4) var(--s3); }
.msg-tabs a { display: grid; place-items: center; height: 28px; border-radius: var(--r-tag); color: var(--text-3); font-size: var(--fs-sm); text-decoration: none; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.msg-tabs a:hover { color: var(--text-1); }
.msg-tabs a[aria-current="page"] { background: var(--surface-3); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
[data-support-list] { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
/* Under the Resolved list: how long resolved chats are kept. */
.msg-inbox-note { display: flex; flex: none; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: var(--s3) var(--s4); border-top: 1px solid var(--border-subtle); color: var(--text-3); font-size: var(--fs-xs); text-align: center; }
.msg-inbox-note svg { flex: none; width: 13px; height: 13px; }
/* Contact Lance support: Lance's own help desk, pinned under the inbox; it opens the contact popup. */
.msg-lance { display: grid; flex: none; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); margin: var(--s2) var(--s3) var(--s3); padding: 10px var(--s3); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); color: var(--text-2); font: inherit; text-align: left; cursor: pointer; transition: background var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.msg-lance:hover { border-color: var(--border-strong); background: var(--surface-2); }
.msg-lance:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.msg-lance > svg { width: 16px; height: 16px; color: var(--text-3); }
.msg-lance-mark { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-3); }
.msg-lance-mark img { width: 18px; height: auto; }
.msg-lance-text { display: grid; gap: 1px; min-width: 0; }
.msg-lance-text strong { color: var(--text-1); font-size: var(--fs-base); font-weight: 470; }
.msg-lance-text span { overflow: hidden; color: var(--text-3); font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
dialog.lc-dialog { width: min(100% - 32px, 560px); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface-2); }
dialog.lc-dialog.closing { animation: lc-out var(--d2) var(--ease) forwards; pointer-events: none; }
@keyframes lc-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.lc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--s4); padding: var(--s6) var(--s6) var(--s4); }
.lc-head h2 { font-size: var(--fs-xl); font-weight: 470; letter-spacing: -.02em; }
.lc-head p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-sm); }
.lc-close { display: grid; place-items: center; width: var(--control); height: var(--control); margin: -4px -8px 0 0; border: 0; border-radius: var(--r-control); background: none; color: var(--text-3); cursor: pointer; }
.lc-close:hover { background: var(--surface-3); color: var(--text-1); }
.lc-close svg { width: 16px; height: 16px; }
.lc-body { display: grid; gap: var(--s4); padding: 0 var(--s6) var(--s5); }
.lc-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.lc-cell { display: grid; gap: 6px; min-width: 0; }
.lc-form input:not([type="hidden"]), .lc-form textarea { background: var(--surface-1); }
.lc-form input[aria-invalid="true"] { border-color: var(--bad); }
.lc-form textarea { min-height: 132px; }
.lc-error { color: var(--bad); font-size: var(--fs-xs); }
.lc-sent { display: grid; justify-items: center; gap: 6px; padding: var(--s7) var(--s6) var(--s8); text-align: center; }
.lc-sent svg { width: 24px; height: 24px; color: var(--ok); }
.lc-sent strong { color: var(--text-1); font-size: var(--fs-md); font-weight: 470; }
.lc-sent span { color: var(--text-2); font-size: var(--fs-sm); }
.lc-foot { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s6); border-top: 1px solid var(--border); background: var(--surface-1); }
.lc-foot .btn { min-width: 112px; }
.lc-note { margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.lc-note.bad { color: var(--text-2); }
.lc-note a { color: var(--accent-text); }
@media (max-width: 560px) { .lc-row { grid-template-columns: 1fr; } .lc-head { padding: var(--s5) var(--s5) var(--s4); } .lc-body { padding: 0 var(--s5) var(--s5); } .lc-foot { padding: var(--s4) var(--s5); } }
.msg-threads { display: grid; gap: 2px; margin: 0; padding: 0 var(--s2) var(--s3); list-style: none; }
.msg-thread { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r-panel); color: var(--text-2); text-decoration: none; transition: background var(--d1) var(--ease); }
.msg-thread:hover { background: var(--surface-2); }
.msg-thread.on { background: var(--surface-3); }
.msg-thread .avatar { width: 40px; height: 40px; }
.msg-thread-text { display: grid; gap: 2px; min-width: 0; }
.msg-thread-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.msg-thread-top strong { overflow: hidden; color: var(--text-1); font-size: var(--fs-md); font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.msg-thread-top time { flex: none; color: var(--text-3); font-size: var(--fs-xs); }
.msg-thread-preview { overflow: hidden; color: var(--text-3); font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.msg-thread.unread strong { font-weight: 600; }
.msg-thread.unread .msg-thread-preview { color: var(--text-1); }
.msg-thread.unread .msg-thread-top time { color: var(--accent-text); }
.msg-you { color: var(--text-3); }
.msg-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.msg-more { display: block; padding: var(--s3); color: var(--text-3); font-size: var(--fs-sm); text-align: center; text-decoration: none; }
.msg-inbox-empty { display: grid; justify-items: center; gap: 6px; padding: var(--s9) var(--s5); color: var(--text-3); text-align: center; }
.msg-inbox-empty svg { width: 22px; height: 22px; }
.msg-inbox-empty p { margin: 0; color: var(--text-1); font-weight: 470; }
.msg-inbox-empty span { font-size: var(--fs-sm); }
/* The open chat: who it is with, the messages, the box. */
.msg-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* Keep the conversation readable during a request; slower loads get a quiet cue inside this pane. */
.msg-pane, .msg-public { position: relative; }
.msg-pane.is-loading, .msg-public.is-loading { pointer-events: none; }
.msg-pane.is-loading::after, .msg-public.is-loading::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); animation: msg-wait 1.2s ease-in-out infinite; }
.msg-pane[data-msg-enter] { animation: none; }
@keyframes msg-enter { from { opacity: .88; } to { opacity: 1; } }
@keyframes msg-wait { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }
.msg-pane-head { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--border); }
.msg-pane-head .avatar { width: 36px; height: 36px; }
.msg-pane-head .min0 { display: grid; flex: 1; min-width: 0; }
.msg-pane-head strong { overflow: hidden; color: var(--text-1); font-size: var(--fs-md); font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.msg-pane-head .min0 > span { color: var(--text-3); font-size: var(--fs-sm); }
.msg-pane-actions { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
/* Their picture, name and @username are one button to their profile. */
.msg-person { display: flex; align-items: center; gap: var(--s3); min-width: 0; margin: -6px -8px; padding: 6px 10px 6px 8px; border-radius: var(--r-panel); color: inherit; text-decoration: none; transition: background var(--d1) var(--ease); }
.msg-person:hover { background: var(--surface-2); }
.msg-person:hover strong { color: var(--accent-text); }
.msg-person .min0 { display: grid; min-width: 0; }
.msg-pane-actions [data-support-resolution] { display: flex; align-items: center; gap: var(--s1); }
.msg-back { display: none; place-items: center; width: var(--control-sm); height: var(--control-sm); margin-left: -6px; border-radius: var(--r-control); color: var(--text-2); }
.msg-back svg { width: 16px; height: 16px; }
.msg-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--ok-surface); color: var(--ok); font-size: var(--fs-xs); font-weight: 540; }
.msg-chip svg { width: 12px; height: 12px; }
.msg-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s5) var(--s6) var(--s4); scrollbar-width: thin; }
.msg-log { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.msg { display: flex; align-items: flex-end; gap: var(--s2); margin-top: var(--s3); }
.msg.grouped { margin-top: 2px; }
.msg.mine { justify-content: flex-end; }
.msg-face { flex: none; width: 28px; }
.msg-face .avatar { width: 28px; height: 28px; border-radius: 50%; font-size: 11px; }
.msg-stack { display: grid; justify-items: start; gap: 3px; max-width: min(72%, 560px); min-width: 0; }
.msg.mine .msg-stack { justify-items: end; }
.msg-who { padding: 0 var(--s2); color: var(--text-3); font-size: var(--fs-xs); }
.msg-bubble { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 2px var(--s3); padding: 9px 12px 8px 14px; border: 1px solid var(--border); border-radius: 18px 18px 18px 6px; background: var(--surface-2); color: var(--text-1); }
.msg.grouped:not(.mine) .msg-bubble { border-top-left-radius: 6px; }
.msg.mine .msg-bubble { border-color: var(--accent); border-radius: 18px 18px 6px 18px; background: var(--accent); color: #fff; }
.msg.mine.grouped .msg-bubble { border-top-right-radius: 6px; }
/* ---- Links, attachments and the sender’s own controls ---- */
.msg-bubble a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.msg-meta { display: inline-flex; flex: none; align-items: baseline; gap: 6px; margin-left: auto; }
/* Under a message: how its Discord alert went, and Edited in Lance blue when its words were changed. */
.msg-under { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 0 var(--s1); }
.msg-under .msg-delivery { padding: 0; }
.msg-edited { color: var(--chart-line); font-size: var(--fs-xs); }
/* A picture or video fills the bubble’s width with the bubble’s own curve; a file is one row: name, size, download. */
.msg-files { display: grid; flex: 1 1 100%; gap: 6px; min-width: 0; }
.msg-bubble.has-files { padding: 6px 6px 6px; }
.msg-bubble.has-files > p { padding: 4px 8px 2px; }
.msg-bubble.has-files > .msg-meta { padding: 0 6px 1px; }
/* Pictures and videos sit above the bubble with no frame of their own: one keeps its shape, several are squares side
   by side. */
.msg-album { display: grid; gap: 4px; width: 376px; max-width: 100%; }
.msg-album.sent { width: 340px; }
.msg-media-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 4px; min-width: 0; }
.msg-media-get { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-3); transition: color var(--d1) var(--ease), background var(--d1) var(--ease); }
.msg-media-get svg { width: 20px; height: 20px; }
.msg-media-get:hover, .msg-media-get:focus-visible { color: var(--text-1); background: var(--surface-2); }
.msg-media-get:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.msg-album.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.msg-album.many .msg-media img, .msg-album.many .msg-media video { aspect-ratio: 1; height: 100%; max-height: none; }
.msg-media { display: block; overflow: hidden; border-radius: 16px; background: var(--bg-sunken); }
.msg-media img, video.msg-media { display: block; width: 100%; max-height: 320px; object-fit: cover; }
video.msg-media { object-fit: contain; }
.msg-doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-width: min(240px, 60vw); padding: 9px 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-1); color: var(--text-1); font-size: var(--fs-sm); }
.msg-bubble a.msg-doc-name { justify-self: start; max-width: 100%; text-decoration: none; }
.msg-bubble a.msg-doc-name:hover, .msg-bubble a.msg-doc-name:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.msg-bubble a.msg-doc-get { text-decoration: none; }
.msg-doc-get { display: grid; place-items: center; width: 28px; height: 28px; margin: -4px -6px -4px -4px; border-radius: 50%; transition: background var(--d1) var(--ease); }
.msg-doc-get:hover, .msg-doc-get:focus-visible { background: var(--surface-3); }
.msg.mine .msg-doc-get:hover, .msg.mine .msg-doc-get:focus-visible { background: color-mix(in srgb, var(--accent) 46%, #000); }
.msg-doc svg { width: 16px; height: 16px; color: var(--text-3); }
.msg-doc-name { overflow: hidden; font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.msg-doc-size { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
/* On the sender’s own violet bubble the file row is a darker violet, so it still reads as part of the message. */
.msg.mine .msg-doc { border-color: color-mix(in srgb, var(--accent) 62%, #000); background: color-mix(in srgb, var(--accent) 72%, #000); color: #fff; }
.msg.mine .msg-doc svg, .msg.mine .msg-doc-size { color: #e4dcff; }
/* The bubble and, for the sender, three quiet dots beside it. */
.msg-row { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.msg.mine .msg-row { justify-content: flex-end; }
/* Room is kept for the More button, so a long message never pushes it onto a line of its own. */
.msg-row > .msg-bubble { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.msg-row > .msg-tools ~ .msg-bubble, .msg-row > .msg-tools ~ .msg-album { max-width: calc(100% - 30px); }
.msg-row > .msg-album { flex: 0 1 340px; min-width: 0; }
/* A message that is only pictures has no bubble: just its time, quietly, under them. */
.msg-bubble.bare, .msg.mine .msg-bubble.bare { padding: 0 4px; border: 0; background: none; }
.msg.mine .msg-bubble.bare .msg-clock { color: var(--text-3); }
/* The three dots open a small menu beside them: Edit text and Delete. It floats over the chat, so opening it moves
   nothing. */
.msg-tools { position: relative; flex: none; }
.msg-tools-btn { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; color: var(--text-3); list-style: none; cursor: pointer; opacity: 0; transition: opacity var(--d1) var(--ease), background var(--d1) var(--ease), color var(--d1) var(--ease); }
.msg-tools-btn::-webkit-details-marker { display: none; }
.msg-tools-btn svg { width: 16px; height: 16px; fill: currentColor; }
.msg:hover .msg-tools-btn, .msg-tools-btn:focus-visible, .msg-tools[open] > .msg-tools-btn { opacity: 1; }
.msg-tools-btn:hover, .msg-tools[open] > .msg-tools-btn { background: var(--surface-3); color: var(--text-1); }
@media (hover: none) { .msg-tools-btn { opacity: 1; } }
.msg-tools-panel { --hover: #1e1e27; position: absolute; z-index: 5; top: calc(100% + 4px); right: 0; display: grid; gap: 2px; min-width: 148px; padding: 4px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-3); box-shadow: var(--shadow-2); }
.msg:not(.mine) .msg-tools-panel { right: auto; left: 0; }
.msg-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--control-sm); padding: 0 10px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--text-1); font: inherit; font-size: var(--fs-sm); text-align: left; white-space: nowrap; cursor: pointer; }
.msg-menu-item:hover, .msg-menu-item:focus-visible { background: var(--hover); }
.msg-menu-item svg { width: 14px; height: 14px; color: var(--text-3); }
.msg-menu-item.danger, .msg-menu-item.danger svg { color: var(--bad); }
/* Editing happens in the bubble itself: its words become the field, in the same type and colour, and a quiet ring
   says it is being edited. An X (cancel) and a check (save) sit where the time was. */
.msg-edit { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: flex-end; gap: 2px 12px; min-width: 0; }
.msg-edit[hidden] { display: none; }
.msg-edit textarea { display: block; flex: 1 1 auto; width: auto; min-width: 6ch; min-height: 0; max-height: 220px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: var(--fs-md); line-height: 1.45; resize: none; box-shadow: none; field-sizing: content; }
.msg-edit textarea:focus { outline: none; box-shadow: none; }
.msg[data-msg-editing] .msg-bubble { outline: 2px solid var(--border-focus); outline-offset: 2px; }
/* The X and the check take the place of the time, on the same line as a short message, so the bubble keeps its height. */
.msg-edit-actions { display: flex; flex: none; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
.msg-edit-actions button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; opacity: .8; cursor: pointer; transition: opacity var(--d1) var(--ease), background var(--d1) var(--ease); }
.msg-edit-actions button svg { width: 14px; height: 14px; }
.msg-edit-actions button[type="submit"] { opacity: 1; }
.msg-edit-actions button:hover, .msg-edit-actions button:focus-visible { background: color-mix(in srgb, var(--accent) 72%, #000); opacity: 1; }
.msg-delete.btn { color: var(--bad); }
.msg-delete.btn:hover { color: var(--bad); }
.msg-delete svg { width: 14px; height: 14px; }
/* Attaching: a paperclip inside the message box, then one chip per chosen file above the privacy line. */
.msg-attach { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-left: -8px; border-radius: 50%; color: var(--text-3); cursor: pointer; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.msg-attach:hover, .msg-attach:focus-within { background: var(--surface-3); color: var(--text-1); }
.msg-attach svg { width: 18px; height: 18px; }
/* What is about to be sent sits inside the message box, above the text: a square preview per picture or video with a
   small round remove button on its corner, and a tile of the same height for any other file. */
.msg-upload-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 6px 4px 0; }
.msg-upload-list:empty { display: none; }
.msg-upload-item { position: relative; display: block; flex: none; width: 84px; height: 84px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-sunken); overflow: hidden; }
.msg-upload-item img, .msg-upload-item video { display: block; width: 100%; height: 100%; object-fit: cover; }
.msg-upload-item.doc { display: grid; align-content: center; justify-items: start; gap: 2px; width: 148px; padding: 0 12px; }
.msg-upload-item.doc > svg { width: 18px; height: 18px; margin-bottom: 4px; color: var(--text-3); }
.msg-upload-item.doc > span { max-width: 100%; overflow: hidden; color: var(--text-1); font-size: var(--fs-xs); font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.msg-upload-item small { color: var(--text-3); font-size: 11px; }
.msg-upload-item button { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: var(--bg); color: var(--text-1); font-size: 14px; line-height: 1; cursor: pointer; }
.msg-upload-item button:hover { background: var(--surface-3); }
/* A video, in a message or about to be sent, carries a round play mark. */
.msg-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.msg-play::before { content: ""; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); }
.msg-play::after { content: ""; position: absolute; margin-left: 4px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.msg-upload-item .msg-play::before { width: 30px; height: 30px; }
.msg-upload-item .msg-play::after { margin-left: 3px; border-width: 6px 0 6px 10px; }
.msg-video { position: relative; }
.msg-video video { display: block; width: 100%; max-height: 320px; object-fit: cover; pointer-events: none; }
.msg-media:focus { outline: none; }
.msg-media:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
/* The viewer: the picture or video large in the middle of the page over a dimmed page; a click anywhere off it closes. */
dialog.msg-viewer { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
dialog.msg-viewer[open] { display: grid; place-items: center; }
/* Sized against the window itself, so the whole picture is always on screen with room around it to click off. */
.msg-viewer img, .msg-viewer video { display: block; width: auto; height: auto; max-width: min(88vw, 1400px); max-height: 86vh; max-height: 86dvh; border-radius: var(--r-dialog); box-shadow: var(--shadow-2); object-fit: contain; }
.msg-viewer video { background: #000; }
.msg-error { margin: 0; padding: 0 var(--s2); color: var(--bad); font-size: var(--fs-xs); }
.msg-bubble p { flex: 1 1 auto; margin: 0; font-size: var(--fs-md); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-clock { flex: none; margin-bottom: -1px; color: var(--text-3); font-size: 11px; line-height: 1.6; }
.msg.mine .msg-clock { color: #e4dcff; }
.msg-delivery { display: inline-flex; align-items: center; gap: 4px; padding: 0 var(--s1); color: var(--text-3); font-size: var(--fs-xs); }
.msg-delivery svg { width: 12px; height: 12px; }
.msg-delivery.check svg { color: var(--ok); }
.msg-delivery.alert { color: var(--warn); }
.msg-day { display: flex; justify-content: center; margin: var(--s5) 0 var(--s2); }
.msg-day:first-child { margin-top: 0; }
.msg-day span { padding: 3px 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-1); color: var(--text-3); font-size: var(--fs-xs); }
.msg-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: var(--s3); color: var(--text-3); font-size: var(--fs-xs); }
.msg-note svg { width: 12px; height: 12px; }
.msg-older { display: flex; justify-content: center; margin-bottom: var(--s3); }
.msg-older a { color: var(--accent-text); font-size: var(--fs-sm); text-decoration: none; }
.msg-empty { display: grid; place-items: center; min-height: 260px; }
.msg-hello { display: grid; justify-items: center; gap: var(--s2); max-width: 340px; padding: var(--s6); text-align: center; }
.msg-hello > svg { width: 28px; height: 28px; margin-bottom: var(--s1); color: var(--accent-text); }
.msg-hello .avatar.xl { border-radius: 50%; }
.msg-hello strong { color: var(--text-1); font-size: var(--fs-lg); font-weight: 540; }
.msg-hello span { color: var(--text-3); font-size: var(--fs-sm); line-height: 1.5; }
.msg-hello .btn { margin-top: var(--s2); }
.msg-pane-empty { display: grid; place-items: center; }
.msg-resolved { display: flex; align-items: center; justify-content: center; gap: 6px; margin: var(--s4) 0 0; color: var(--text-3); font-size: var(--fs-sm); }
.msg-resolved svg { width: 14px; height: 14px; color: var(--ok); }
/* The box: one rounded field with the send button inside it, and one quiet line on who can read the chat. */
.msg-compose { display: grid; gap: 6px; padding: var(--s3) var(--s5) var(--s4); border-top: 1px solid var(--border-subtle); }
.msg-compose-row { display: flex; align-items: flex-end; gap: var(--s2); }
.msg-compose-box { display: grid; gap: 6px; padding: 6px 6px 6px var(--s4); border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface-2); transition: border-color var(--d1) var(--ease); }
.msg-compose-box:focus-within { border-color: var(--border-focus); }
.msg-compose textarea { flex: 1; min-height: 0; max-height: 180px; padding: 7px 0; border: 0; background: transparent; box-shadow: none; color: var(--text-1); font-size: var(--fs-md); line-height: 1.45; resize: none; }
.msg-compose textarea:focus { outline: none; box-shadow: none; }
.msg-send.btn { flex: none; width: 34px; min-height: 34px; height: 34px; padding: 0; border-radius: 50%; }
.msg-send svg { width: 16px; height: 16px; margin: 1px 1px 0 0; }
.msg-privacy { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 var(--s2); color: var(--text-3); font-size: var(--fs-xs); }
.msg-privacy svg { width: 12px; height: 12px; flex: none; }
/* The member’s side, on Lance’s own page. */
.msg-public { width: min(100%, 680px); margin: 0 auto; border: 1px solid var(--border-strong); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; }
.msg-public-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.msg-public-head .min0 { flex: 1; min-width: 0; }
.msg-public-head h1 { overflow: hidden; font-size: var(--fs-lg); font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.msg-public-head p { margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.msg-verified { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--accent-line); border-radius: var(--r-pill); background: var(--accent-surface); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 540; }
.msg-verified svg { width: 13px; height: 13px; }
/* The chat keeps one height however many messages it holds, and scrolls inside it, newest at the bottom. */
.msg-public-scroll { height: clamp(300px, calc(100dvh - 330px), 560px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.msg-public [data-support-updates] { padding: var(--s5) var(--s5) var(--s3); }
.msg-public .msg-compose { padding: var(--s3) var(--s4) var(--s4); }
.msg-signin { display: grid; justify-items: center; gap: var(--s2); padding: var(--s9) var(--s6); text-align: center; }
.msg-signin > svg { width: 28px; height: 28px; color: var(--accent-text); }
.msg-signin h2 { font-size: var(--fs-lg); font-weight: 540; }
.msg-signin p { margin: 0 0 var(--s2); color: var(--text-3); }
@media (max-width: 900px) {
  .msg-app { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--appbar) - 32px); min-height: 480px; }
  .msg-app.has-thread .msg-inbox, .msg-app:not(.has-thread) .msg-pane { display: none; }
  .msg-back { display: grid; }
  .msg-pane-head { padding: var(--s2) var(--s3); gap: var(--s2); }
  .msg-pane-actions .btn { width: var(--control-sm); padding: 0; justify-content: center; gap: 0; font-size: 0; }
  .msg-pane-actions .btn svg { width: 16px; height: 16px; }
  .msg-chip { font-size: 0; gap: 0; padding: 0 8px; }
  .msg-scroll { padding: var(--s4) var(--s3); }
  .msg-compose { padding: var(--s2) var(--s3) var(--s3); }
  .msg-stack { max-width: 84%; }
}
@media (max-width: 560px) {
  .msg-public { border-radius: var(--r-panel); }
  .msg-public-head { flex-wrap: wrap; }
  .msg-public [data-support-updates] { padding: var(--s4) var(--s3) var(--s2); }
}
/* New message: a search field and everyone in the server, in the chat’s place. */
.msg-pick-search { position: relative; display: flex; align-items: center; margin: var(--s3) var(--s5) 0; }
.msg-pick-search > svg { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.msg-pick-search input { width: 100%; min-height: var(--control-lg); padding-left: 40px; border-radius: var(--r-control); background: var(--surface-2); }
.msg-picker .msg-scroll { padding: var(--s3) var(--s3) var(--s4); }
.msg-pick-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.msg-pick-list .msg-thread > svg { width: 16px; height: 16px; color: var(--text-3); opacity: 0; transition: opacity var(--d1) var(--ease); }
.msg-pick-list .msg-thread:hover > svg, .msg-pick-list .msg-thread:focus-visible > svg { opacity: 1; }
.msg-pick-none { margin: var(--s4) 0 0; color: var(--text-3); font-size: var(--fs-sm); text-align: center; }
.msg-picker .msg-pane-head .btn { margin-left: auto; }
.msg-pane-mark { display: inline-grid; place-items: center; flex: none; width: 20px; color: var(--accent-text); }
.msg-pane-mark svg { width: 18px; height: 18px; }
/* A row that opens someone ends in a quiet chevron; the whole row is the link. */
.row-open { display: inline-grid; place-items: center; width: var(--control-sm); height: var(--control-sm); margin-left: auto; color: var(--text-3); }
.row-open svg { width: 16px; height: 16px; }
tr:hover .row-open { color: var(--text-1); }
/* A server member’s short profile. */
.role-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.role-list { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; padding: 0; list-style: none; }
.role-list li { display: inline-flex; align-items: center; gap: var(--s2); }
.member-invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.member-invite p { margin: 0; }
/* ---------- Import from Stripe: one role, one checkout, done ---------- */
[data-role-setup] { display: grid; gap: var(--s4); }
.imp-steps { display: flex; align-items: center; gap: var(--s2); margin: 0; padding: 0; list-style: none; color: var(--text-3); font-size: var(--fs-sm); }
.imp-steps li { display: inline-flex; align-items: center; gap: 8px; }
.imp-steps li + li::before { content: ""; width: 28px; height: 1px; margin-right: var(--s1); background: var(--border-strong); }
.imp-step-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--border-strong); border-radius: 50%; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.imp-steps li.current { color: var(--text-1); }
.imp-steps li.current .imp-step-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.imp-steps li.past .imp-step-dot { border-color: var(--ok); background: var(--ok-surface); }
.imp-steps li.past .imp-step-dot::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
/* Set roles up: a plain section on the page, no box around it; the role cards inside are the objects. */
.imp-card { display: grid; gap: var(--s4); padding: 0; border: 0; border-radius: 0; background: none; }
.imp-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.imp-card h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-lg); font-weight: 540; letter-spacing: -.01em; }
.imp-search { width: min(100%, 260px); }
/* A role as Discord shows it: its colour dot and @name. */
.imp-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-1); font-weight: 500; }
.imp-chip i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--role); }
.imp-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-card h2 .imp-chip { padding: 2px 10px 2px 8px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-md); }
.imp-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--s2); }
.imp-role { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 52px; padding: 0 40px 0 var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.imp-role::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-top: 1.5px solid var(--text-3); border-right: 1.5px solid var(--text-3); transform: translateY(-50%) rotate(45deg); }
.imp-role:hover, .imp-role:focus-visible { border-color: var(--accent-line); background: var(--surface-3); }
.imp-role:hover::after { border-color: var(--text-1); }
.imp-role-note { flex: none; color: var(--text-3); font-size: var(--fs-xs); }
/* Checkouts: the ones in their Stripe first, then a Payment Link for any other. */
.imp-label { color: var(--text-3); font-size: var(--fs-sm); font-weight: 540; }
.imp-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s2); }
.imp-prices:empty { display: none; }
.imp-price { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.imp-price:hover:not(:disabled), .imp-price:focus-visible { border-color: var(--accent-line); background: var(--surface-3); }
.imp-price:disabled { cursor: default; opacity: .6; }
.imp-price.pending { opacity: 1; border-color: var(--accent); }
.imp-price-mark { flex: none; border-radius: 4px; }
.imp-price-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.imp-price-text strong { overflow: hidden; color: var(--text-1); font-size: var(--fs-md); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.imp-price-text span { color: var(--text-3); font-size: var(--fs-sm); }
.imp-price-go { flex: none; color: var(--accent-text); font-size: var(--fs-sm); font-weight: 540; opacity: 0; transition: opacity var(--d1) var(--ease); }
.imp-price:hover .imp-price-go, .imp-price:focus-visible .imp-price-go, .imp-price.pending .imp-price-go { opacity: 1; }
.imp-more { justify-self: start; }
.imp-or { display: flex; align-items: center; gap: var(--s3); color: var(--text-3); font-size: var(--fs-xs); }
.imp-or::before, .imp-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.imp-link { display: flex; gap: var(--s2); }
.imp-link input { flex: 1; min-width: 0; }
.imp-quiet { margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
/* Done: a tick, what is connected, the next step in Discord, three ways on. */
.imp-done { justify-items: center; padding: var(--s8) var(--s6); text-align: center; }
.imp-done-mark { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--ok); border-radius: 50%; background: var(--ok-surface); }
.imp-done-mark::after { content: ""; width: 18px; height: 9px; margin-top: -4px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.imp-done h2 { justify-content: center; font-size: var(--fs-xl); }
.imp-next { max-width: 52ch; margin: 0; color: var(--text-2); }
.imp-next code { padding: 2px 8px; border: 1px solid var(--accent-line); border-radius: var(--r-tag); background: var(--accent-surface); color: var(--accent-text); font-family: var(--font-mono, monospace); font-size: .92em; }
.imp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin-top: var(--s2); }
@media (max-width: 640px) {
  .imp-card { padding: 0; }
  .imp-link { flex-direction: column; }
  .imp-actions { flex-direction: column; align-self: stretch; }
  .imp-price-go { opacity: 1; }
}
/* A member reconnected: one tick, one line, the way back to Discord. */
.claim-done { display: grid; justify-items: center; gap: var(--s2); padding-top: var(--s6); padding-bottom: var(--s6); text-align: center; }
.claim-done-mark { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--ok); border-radius: 50%; background: var(--ok-surface); color: var(--ok); }
.claim-done-mark svg { width: 24px; height: 24px; }
.claim-done h2 { color: var(--text-1); font-size: var(--fs-xl); font-weight: 540; }
.claim-done p { max-width: 44ch; margin: 0 0 var(--s2); color: var(--text-2); }
.claim-done .button-row { justify-content: center; }
/* A membership already theirs: one green bar across the card’s foot with the way to manage it; the Purchased badge
   then has nothing left to say. */
.offer-owned { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s3); padding: 10px 10px 10px var(--s3); border: 1px solid var(--ok-line, var(--border)); border-radius: var(--r-panel); background: var(--ok-surface); }
.offer-owned[hidden] { display: none; }
.offer-owned-mark { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: var(--bg); }
.offer-owned-mark svg { width: 14px; height: 14px; }
.offer-owned-text { display: grid; flex: 1; gap: 1px; min-width: 0; }
.offer-owned-text strong { color: var(--text-1); font-size: var(--fs-sm); font-weight: 540; }
.offer-owned-text span { color: var(--text-2); font-size: var(--fs-xs); }
.offer-owned-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
@media (max-width: 560px) { .offer-owned { flex-wrap: wrap; } .offer-owned-text { flex-basis: calc(100% - 44px); } .offer-owned-actions { margin-left: 38px; } }
.offer-owned .btn { flex: none; gap: 6px; }
.offer-owned .btn svg { width: 13px; height: 13px; }
.offer:has(.offer-owned:not([hidden])) .badge[data-purchased] { display: none; }
.offer-details { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--s2); color: var(--text-3); font-size: var(--fs-xs); text-decoration: none; }
.offer-details svg { width: 12px; height: 12px; transition: transform var(--d1) var(--ease); }
.offer-details:hover { color: var(--text-1); }
.offer-details:hover svg { transform: translateX(2px); }
/* ---------- Members: one plain fact per column, problems explained once ---------- */
/* A status as a dot and a word. Healthy reads in body ink; only something to look at takes colour. */
.st { display: inline-flex; align-items: flex-start; gap: 7px; color: var(--text-1); font-size: 13px; line-height: 18px; }
.st i { flex: none; width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--text-3); }
/* The specific fact under a status: the date, what Lance is doing, or what blocks it. */
.st-text { display: grid; gap: 1px; min-width: 0; }
.st-text small { color: var(--text-3); font-size: 12px; line-height: 16px; white-space: nowrap; }
.st.ok i { background: var(--ok); }
.st.info i { background: var(--info); }
.st.warn { color: var(--warn); } .st.warn i { background: var(--warn); }
.st.bad { color: var(--bad); } .st.bad i { background: var(--bad); }
.st.neutral { color: var(--text-3); }
.st.pending i { animation: st-pulse 1.6s var(--ease) infinite; }
@keyframes st-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .st.pending i { animation: none; } }
.m-cell { display: grid; gap: 2px; min-width: 0; }
.m-cell-plan { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.members-setup { margin-bottom: var(--s4); }
/* On a phone the whole member card opens, and its corner already shows the arrow; the arrow cell would be an empty row. */
/* In a card, the arrow up top opens the row, and a line with nothing to say isn't worth a row. */
@media (max-width: 900px) { table.data.stack-mobile td.bare:has(> .cell > .row-open:only-child), table.data.stack-mobile td:has(> .cell > .cell-empty:only-child) { display: none; } }

/* Profile: what needs fixing, one card per problem, above the memberships. */
/* A member's notices sit at the top as strips between rules, not boxes: the tone's mark (warning or info) beside an
   18px title, who acts and the buttons at the end of that line, and the explanation under it. */
.member-issues { display: grid; gap: 0; margin: 0 0 var(--s6); border-bottom: 1px solid var(--border); }
.issue { display: grid; gap: var(--s2); padding: var(--s5) 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; }
.issue.bad { border-top-color: var(--bad-line); }
.issue.warn { border-top-color: var(--warn-line); }
.issue header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.issue-mark { display: grid; place-items: center; flex: none; width: 18px; height: 18px; color: var(--text-3); }
.issue-mark .icon { width: 18px; height: 18px; }
.issue.bad .issue-mark { color: var(--bad); }
.issue.warn .issue-mark { color: var(--warn); }
.issue.info .issue-mark { color: var(--info); }
.issue h2 { flex: 1 1 320px; min-width: 0; font-size: var(--fs-xl); font-weight: 550; letter-spacing: -.015em; }
.issue-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-left: auto; }
.issue > p { max-width: 72ch; margin: 0 0 0 30px; color: var(--text-2); font-size: var(--fs-base); line-height: 1.55; }
.issue-who { color: var(--text-3); font-size: 12px; font-weight: 470; white-space: nowrap; }
.issue-who.member, .issue-who.you { color: var(--text-1); }
.issue-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; }

/* The fix-it DM, drawn the way Discord shows a message from Lance. */
.fix-dm > summary { list-style: none; }
.fix-dm > summary::-webkit-details-marker { display: none; }
.fix-dm[open] { flex-basis: 100%; order: 2; }
.fix-dm[open] > summary { display: none; }
.fix-dm-body { display: grid; gap: var(--s3); max-width: 560px; }
.fix-dm-label { margin: 0; color: var(--text-3); font-size: 12px; }
.dm-preview { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-panel); background: #313338; color: #dbdee1; }
.dm-avatar { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #1b1530; }
.dm-who { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.dm-who strong { color: #f2f3f5; font-weight: 540; }
.dm-who .muted { color: #949ba4; font-size: 12px; }
.dm-app { padding: 0 4px; border-radius: 3px; background: #5865f2; color: #ffffff; font-size: 10px; font-weight: 600; line-height: 15px; }
.dm-text { margin: 2px 0 8px; font-size: 13px; line-height: 1.4; }
.dm-text strong { color: #f2f3f5; }
.dm-button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 4px; background: #4e5058; color: #ffffff; font-size: 13px; font-weight: 500; }
.dm-button svg { width: 13px; height: 13px; }
.fix-dm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.fix-dm-foot .fine { margin: 0; }

/* The pass says whether Discord shows the role; the time line under it carries the payment. */
.member-pass-state { flex: none; font-size: var(--fs-sm); opacity: .9; }
.member-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--border); }
.member-foot .member-links { margin: 0; }
.danger-quiet .btn { color: var(--bad); }
/* ---------- Admin invitation: which server, what an admin can do, one button ---------- */
.invite-card { display: grid; justify-items: start; gap: var(--s3); max-width: 520px; margin: var(--s8) auto 0; padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); }
.invite-card h1 { font-size: var(--fs-xl); font-weight: 540; letter-spacing: -.02em; text-wrap: balance; }
.invite-lede { margin: 0; color: var(--text-2); }
.invite-can { display: grid; gap: 8px; margin: var(--s2) 0 0; padding: 0; list-style: none; color: var(--text-1); font-size: var(--fs-sm); }
.invite-can li { display: flex; align-items: center; gap: 10px; }
.invite-can svg { flex: none; width: 16px; height: 16px; color: var(--ok); }
.invite-can li.no { color: var(--text-3); }
.invite-can li.no svg { color: var(--text-3); }
.invite-card .fine { margin: 0; }
.invite-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.invite-actions form { display: contents; }
@media (max-width: 640px) { .invite-card { margin-top: var(--s4); padding: var(--s5); } .invite-actions, .invite-actions .btn { width: 100%; } }
/* Admin permissions (pages/admins.ts): the team and the invitation on the left, what only the owner does on the right. */
.admins-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s5); align-items: start; }
.admins-layout > .stack { gap: var(--s5); }
.owner-only { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.owner-only li { position: relative; padding-left: 14px; }
.owner-only li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.team-row .btn svg { width: 14px; height: 14px; }
.team-edit { display: grid; gap: var(--s4); margin: 0 var(--s5) var(--s4); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--bg-sunken); }
.team-edit[hidden] { display: none; }
.team-edit-note { color: var(--text-2); font-size: var(--fs-sm); }
.team-edit-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.team-edit-foot .fine { flex: 1 1 260px; margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.invite-perm { display: grid; gap: var(--s4); }
.invite-perm .invite-bar { margin: 0; }

/* The picker: presets that only tick boxes, then each permission in its group with what it allows. */
.perm-picker { display: grid; gap: var(--s4); min-width: 0; margin: 0; padding: 0; border: 0; }
.perm-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.perm-preset { position: relative; display: block; cursor: pointer; }
.perm-preset input { position: absolute; opacity: 0; pointer-events: none; }
.perm-preset > span { display: grid; gap: 2px; height: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-1); transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.perm-preset strong { font-size: var(--fs-sm); font-weight: 500; }
.perm-preset small { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.35; }
.perm-preset:hover > span { border-color: var(--border-strong); }
.perm-preset input:checked + span { border-color: var(--accent-line); background: var(--accent-surface); }
.perm-preset input:focus-visible + span { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.perm-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); }
.perm-all { grid-column: 1 / -1; }
.perm-group { display: grid; align-content: start; gap: 2px; }
.perm-group-title { margin-bottom: 4px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; }
.perm { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; }
.perm input { flex: none; width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--accent); }
.perm > span { min-width: 0; }
.perm strong { font-size: var(--fs-sm); font-weight: 470; }
@media (max-width: 1000px) { .admins-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .perm-presets, .perm-groups { grid-template-columns: minmax(0, 1fr); }
  .team-row { flex-wrap: wrap; padding-top: var(--s2); padding-bottom: var(--s2); }
  .team-edit { margin: 0 var(--s3) var(--s3); }
}.perm-detail { display: grid; gap: var(--s3); }
.perm-detail > summary { display: flex; align-items: center; gap: var(--s2); width: fit-content; color: var(--accent-text); font-size: var(--fs-sm); font-weight: 500; list-style: none; cursor: pointer; }
.perm-detail > summary::-webkit-details-marker { display: none; }
.perm-detail > summary::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--d2) var(--ease); }
.perm-detail[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.perm-detail .perm-detail-close, .perm-detail[open] .perm-detail-open { display: none; }
.perm-detail[open] .perm-detail-close { display: inline; }
/* The permissions dropdown on an admin’s row and in the invite bar: a small button whose boxes open below it. */
.perm-form { display: contents; }
.perm-menu { position: relative; flex: none; }
.perm-menu > summary { list-style: none; cursor: pointer; }
.perm-menu > summary::-webkit-details-marker { display: none; }
.perm-menu > summary::after { content: ""; width: 5px; height: 5px; margin: -3px 2px 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.perm-pop { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; display: grid; gap: 2px; width: 220px; padding: 8px 12px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-2); box-shadow: var(--shadow-2); }
.perm-pop .perm-all { border-bottom: 1px solid var(--border-subtle); }
.perm-pop .btn { justify-self: end; margin-top: 6px; }
.team-row .perm-pop span:not(.badge):not(.avatar) { color: inherit; font-size: inherit; }
.perm-count { min-width: 20px; margin: 0 -5px 0 2px; padding: 1px 6px; text-align: center; font-variant-numeric: tabular-nums; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 470; }
.perm-detail[open] > .perm-groups { margin-top: var(--s3); }
/* Affiliate (pages/affiliate.ts): the Dashboard’s layout for an affiliate. A header with the link, the earnings chart,
   three totals, one payout-setup line, then the history. Before joining: the offer beside one field. */
.aff-link { align-items: center; gap: var(--s3); }
.aff-link-url { padding: 0 12px; min-height: var(--control); display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-1); color: var(--text-1); font-size: var(--fs-sm); }
.aff-row .panel-body { padding: var(--s4) var(--s5) var(--s5); }
.aff-row .aff-total .panel-body { flex: 1; display: grid; place-content: center stretch; justify-items: start; text-align: left; }
.aff-row .mrr-value, .aff-row .paid-value { font-size: 34px; font-weight: 500; letter-spacing: -.04em; line-height: 1.05; }
.aff-row .mrr-note { margin-top: var(--s2); }
.aff-setup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.aff-setup-text { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); min-width: 0; }
.aff-setup-text strong { font-size: var(--fs-base); font-weight: 500; }
.aff-setup-text span { color: var(--text-3); font-size: var(--fs-sm); }
.aff-minus { color: var(--bad); }
.aff-empty { padding: var(--s5); }

/* Becoming an affiliate: one card (the offer, getting paid out, the link), on its page and in the popup the sidebar’s
   Affiliate link opens. */
.aff-join-card { display: grid; gap: var(--s6); max-width: 520px; padding: var(--s7); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.aff-offer { display: grid; gap: var(--s2); }
.aff-offer-rate { margin: 0; color: var(--text-1); font-size: 44px; font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.aff-offer-of { margin: 0; color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; }
.aff-terms { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s8); margin: var(--s5) 0 0; }
.aff-terms dt { width: fit-content; padding-bottom: 2px; border-bottom: 1px solid var(--border-strong); color: var(--text-3); font-size: var(--fs-xs); }
.aff-terms dd { margin: 6px 0 0; color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; }
/* The two parts under the offer are a small heading and what goes with it: no rules between them, only space. */
.aff-join-part { display: grid; gap: 6px; }
.aff-join-part h2 { color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; }
.aff-join-part > p { color: var(--text-3); font-size: var(--fs-sm); line-height: 1.45; }
.aff-join-row { display: flex; gap: var(--s2); }
.aff-join-row .aff-slug { flex: 1; min-width: 0; }
.aff-join-row .btn { flex: none; min-height: var(--control-lg); }
dialog.aff-dialog { width: min(100% - 32px, 500px); max-height: calc(100vh - 48px); overflow-y: auto; }
/* The popup leaves the way it arrives: the same move and fade, backwards, with the dimmed page fading alongside. */
dialog.aff-dialog::backdrop { animation: aff-dim-in var(--d2) var(--ease-out); }
dialog.aff-dialog.closing { animation: aff-out var(--d2) var(--ease) forwards; pointer-events: none; }
dialog.aff-dialog.closing::backdrop { animation: aff-dim-out var(--d2) var(--ease) forwards; }
@keyframes aff-dim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes aff-dim-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes aff-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog.aff-dialog .aff-join-card { max-width: none; border: 0; background: transparent; }
.aff-join { display: grid; gap: var(--s3); }
.aff-slug { display: flex; align-items: center; min-height: var(--control-lg); padding: 0 12px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-1); cursor: text; }
.aff-slug:focus-within { border-color: var(--border-focus); }
.aff-slug-base { flex: none; color: var(--text-1); font-family: var(--mono); font-size: var(--fs-sm); }
.aff-slug input::placeholder { color: var(--text-3); opacity: 1; }
.aff-slug input { flex: 1; min-width: 0; height: 100%; padding: 0 0 0 1px; border: 0; background: transparent; box-shadow: none; color: var(--text-1); font-family: var(--mono); font-size: var(--fs-sm); }
.aff-slug input:focus { outline: none; }
.aff-join .fine { margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.aff-accept { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
.aff-accept input { width: 15px; height: 15px; accent-color: var(--accent); }
.aff-accept a { color: var(--accent-text); }
.aff-join-error { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--bad); font-size: var(--fs-sm); }
.aff-join-error svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.aff-closed { display: flex; align-items: flex-start; gap: var(--s3); }
.aff-closed > svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent-text); }
.aff-closed h2 { font-size: var(--fs-md); font-weight: 500; }
.aff-closed p { margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); }
.aff-closed p .btn { margin-top: var(--s2); }


@media (max-width: 1000px) {
}
@media (max-width: 720px) {
  .aff-link { width: 100%; justify-content: stretch; }
  .aff-link-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .aff-row .mrr-value, .aff-row .paid-value { font-size: 28px; }
  .aff-offer-rate { font-size: 38px; }
  .aff-offer-of { white-space: normal; }
  .aff-join-card { padding: var(--s5); }
  .aff-join-row { flex-wrap: wrap; }
  .aff-join-row .aff-slug { flex-basis: 100%; }
  .aff-slug-base { display: none; }
  .aff-ready-col { display: none; }
}
.aff-field { display: grid; flex: 1 1 240px; gap: 4px; }
.aff-field > span, .aff-kind legend { color: var(--text-3); font-size: var(--fs-xs); }
.aff-field input { min-height: var(--control); padding: 0 10px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-1); font-size: var(--fs-sm); }
.aff-field input:focus { outline: none; border-color: var(--border-focus); }
/* Individual or Business: one joined pair, the chosen half filled violet with white text so it cannot be mistaken. */
.aff-kind { display: inline-flex; flex: none; align-items: stretch; gap: 2px; min-width: 0; margin: 0; padding: 2px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-1); }
/* Each half is a flex box, so its fill reaches the bottom edge (an inline box left a dark strip under the text line).
   The hidden radio lies exactly over its half: one hanging below made the control scroll up 3px when it took focus,
   which showed the same dark strip after every switch. clip (not hidden) means the control can never scroll. */
.aff-kind label { position: relative; display: flex; cursor: pointer; }
.aff-kind input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.aff-kind span { display: flex; flex: 1; align-items: center; min-height: calc(var(--control) - 6px); padding: 0 12px; border-radius: var(--r-tag); background: transparent; color: var(--text-3); font-size: var(--fs-sm); font-weight: 500; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.aff-kind label:hover span { color: var(--text-1); }
.aff-kind input:checked + span { background: var(--surface-3); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
.aff-kind input:focus-visible + span { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* Affiliate Payouts tab: the Stripe card across the page, its three totals as square boxes with large figures (Ready to
   pay in green, with Pay out for the people who approve payouts); who is paid on the left of the setup, the Stripe email
   and Connect Stripe on the right; payout history under it. */
.aff-payouts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; }
.aff-payouts > .aff-stripe { width: 100%; gap: var(--s5); padding: var(--s5) var(--s6) var(--s6); }
.aff-stripe .conn-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; gap: var(--s3); }
.aff-stripe .conn-facts div { display: grid; align-content: start; gap: 6px; padding: var(--s4) var(--s5); border: 1px solid var(--border); border-radius: 0; background: var(--bg-sunken); }
.aff-stripe .conn-facts dt { color: var(--text-3); font-size: 12px; font-weight: 450; }
.aff-stripe .conn-facts dd { margin: 0; font-size: 28px; font-weight: 470; letter-spacing: -.03em; line-height: 1.1; }
.aff-connect { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s3); width: 100%; }
.aff-connect-end { display: flex; flex: 0 1 auto; align-items: center; gap: var(--s2); min-width: 0; }
.aff-connect .aff-field { flex: 0 1 240px; min-width: 0; }
.aff-connect .aff-field input { width: 100%; }
/* Connect Stripe keeps its own width and room around its words; the email field gives way first. */
.aff-connect .btn { flex: none; gap: 8px; padding: 5px 18px; }
@media (max-width: 900px) { .aff-connect { justify-content: flex-start; } .aff-connect-end { flex: 1 1 100%; flex-wrap: wrap; } .aff-connect .aff-field { flex: 1 1 200px; } }
.aff-connect .btn svg { width: 14px; height: 14px; }
.aff-payouts > .panel { margin: 0; }
/* Pay out, for the people who approve payouts: one big button in the Ready to pay box, under the amount it pays. */
.aff-ready form { grid-column: 1 / -1; margin-top: var(--s3); }
.aff-ready .btn-primary { width: 100%; justify-content: center; min-height: var(--control-lg); font-size: var(--fs-base); }
/* The setup sits apart from the amounts, under a hairline, at full control height. */
.aff-stripe > .button-row { padding-top: var(--s5); border-top: 1px solid var(--border-subtle); }
.aff-connect input, .aff-kind span, .aff-connect .btn { min-height: var(--control-lg); }
/* Payout history: the date takes the room, amount and status each get a column of their own with space between. */
.aff-history th:nth-child(2), .aff-history td:nth-child(2) { width: 180px; }
.aff-history th:nth-child(3), .aff-history td:nth-child(3) { width: 180px; padding-left: var(--s8); }
@media (max-width: 720px) {
  .aff-payouts > .aff-stripe { padding: var(--s4); }
  .aff-stripe .conn-facts { grid-template-columns: minmax(0, 1fr); }
  .aff-stripe .conn-facts div { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .aff-stripe .conn-facts dd { font-size: 22px; }
  .aff-connect, .aff-connect-end { flex-direction: column; align-items: stretch; }
  .aff-connect .aff-field { flex-basis: auto; max-width: none; }
  .aff-kind { display: grid; grid-template-columns: 1fr 1fr; }
  .aff-kind label { display: grid; }
  .aff-kind span { justify-content: center; width: 100%; }
  .aff-connect .btn { justify-content: center; }
}

/* Affiliates (finance admins): who, joined, earned, paid out, and one action only when a payout waits on a person. */
.aff-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.aff-person .min0 { display: grid; gap: 1px; }
.aff-person strong { font-weight: 500; }
.aff-person small { color: var(--text-3); font-size: var(--fs-xs); }
.aff-people td { vertical-align: middle; }
@media (max-width: 720px) { .aff-payall-value { font-size: 28px; } }
/* Affiliates (admins): what Lance owes in total, and the one Pay out button. */
.aff-payall { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); padding: var(--s5) var(--s6); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.aff-payall-label { margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.aff-payall-value { margin: 4px 0 0; color: var(--ok); font-size: 34px; font-weight: 500; letter-spacing: -.04em; line-height: 1.05; }
.aff-payall-note { margin: 6px 0 0; max-width: 60ch; color: var(--text-3); font-size: var(--fs-sm); }
/* Pay out: money leaving, so green with black text rather than the violet of an ordinary action. */


/* ---------- Creator Program: the application (a page, and the same card in a popup), the Owners' review
   queue, and the public page behind a creator’s link ---------- */
.creator-card { position: relative; display: grid; gap: var(--s6); width: min(860px, 100%); margin: 0 auto; padding: var(--s8); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); }
dialog.aff-dialog:has(.creator-card) { width: min(100% - 32px, 860px); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg-sunken); }
dialog.aff-dialog:has(.cp-form-card) { width: min(100% - 32px, 720px); }
/* While the cards are dealt the popup does not scroll, so cards coming in from below never show a scrollbar. */
dialog.aff-dialog.cp-playing { overflow: hidden; }
/* Apply now hands over to the form: the second popup opens already dimmed, so the page never shows between them. */
dialog.aff-dialog.handoff::backdrop, dialog.aff-dialog.dimmed:not(.closing)::backdrop { animation: none; }
dialog.aff-dialog .creator-card { width: auto; border: 0; background: transparent; }
/* The count of spots taken, at the top right of the form: white taken, Lance blue limit. */
.creator-count { display: grid; flex: none; justify-items: end; gap: 2px; margin: 0; }
.creator-count strong { display: flex; align-items: baseline; font-size: 30px; font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.creator-count-taken { color: var(--text-1); }
.creator-count-of { color: var(--chart-line); }
.creator-count > span { color: var(--text-3); font-size: var(--fs-xs); }
/* The program: who it is for, then three cards in a fan, then the terms line and Apply now. On the page the cards lie
   face up; in the popup (.cp-play) owner.js deals them face down and turns them over one at a time. */
.creator-card { --cp-green: #5fe0a4; }
.cp-intro { display: grid; justify-items: center; text-align: center; }
.cp-head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.cp-head img { display: block; width: 92px; height: 22px; }
.cp-head span { padding-left: 12px; border-left: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-base); font-weight: 500; }
.cp-title { margin: 22px 0 0; color: var(--text-2); font-size: 38px; font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.cp-roll { display: inline-block; height: 1.15em; overflow: hidden; vertical-align: bottom; color: var(--text-1); }
.cp-roll > span { display: inline-block; }
.cp-roll > span.swap { animation: cp-roll .7s cubic-bezier(.16,1,.3,1); }
@keyframes cp-roll { from { opacity: 0; transform: translateY(100%); } }
.cp-cards { display: flex; justify-content: center; width: 100%; gap: 22px; margin: 34px 0 30px; padding: 0; list-style: none; perspective: 1400px; }
.cp-card { --r: 0deg; width: 228px; height: 310px; flex: none; transform: rotate(var(--r)); transition: transform .75s cubic-bezier(.2,1.2,.4,1), opacity var(--d2) var(--ease); }
.cp-earn { --r: -6deg; margin-top: 10px; } .cp-spots-card { --r: 6deg; margin-top: 10px; }
.cp-card:hover { transform: rotate(var(--r)) translateY(-8px); transition-duration: .25s; }
.cp-turn { position: relative; width: 100%; height: 100%; transform: rotateY(180deg); transform-style: preserve-3d; transition: transform .8s cubic-bezier(.4,1.3,.5,1); }
.cp-back, .cp-face { position: absolute; inset: 0; border-radius: var(--r-dialog); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow-2); }
.cp-back { display: grid; place-items: center; border: 1px solid var(--border); background: #000; }
.cp-back img { width: 54px; height: auto; }
.cp-face { display: flex; flex-direction: column; align-items: flex-start; padding: 22px 20px; text-align: left; transform: rotateY(180deg); }
.cp-earn .cp-face { background: var(--cp-green); color: #03150d; }
.cp-save .cp-face { background: var(--accent); color: #fff; }
.cp-spots-card .cp-face { border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text-1); }
.cp-tag { margin: 0; font-size: var(--fs-sm); font-weight: 750; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cp-num { margin: auto 0 0; font-size: 96px; font-weight: 850; line-height: .9; letter-spacing: -.06em; white-space: nowrap; }
.cp-spots-card .cp-num { margin-top: 18px; font-size: 62px; }
.cp-of50 { color: var(--chart-line); }
.cp-line { margin: 4px 0 10px; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.cp-of { margin: 0; font-size: 13px; line-height: 1.45; opacity: .85; }
/* The fifty spots: the taken ones Lance blue with a person in them, the open ones empty. */
.cp-spots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; width: 100%; margin: 16px 0 14px; }
.cp-spots i { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: var(--border-strong); }
.cp-spots i.taken { background: var(--chart-line); }
.cp-spots svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: #04252a; }
.cp-end { display: grid; justify-items: center; gap: 18px; }
.cp-end > p { margin: 0; max-width: 520px; color: var(--text-2); font-size: 15px; line-height: 1.5; text-align: center; text-wrap: balance; }
.cp-end > p a { color: var(--text-1); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.cp-end > p a:hover { text-decoration-color: currentColor; }
.cp-end .creator-sent { text-align: left; }
.cp-apply { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 34px; border-radius: var(--r-pill); background: #fff; color: #07070b; font-size: 17px; font-weight: 650; text-decoration: none; transition: transform var(--d2) var(--ease), background var(--d2) var(--ease); }
.cp-apply:hover { background: #e9e6ff; color: #07070b; transform: translateY(-1px); }
.cp-apply:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }
.cp-apply svg { width: 18px; height: 18px; transition: transform var(--d2) var(--ease); }
.cp-apply:hover svg { transform: translateX(3px); }
/* Playing: dealt from below face down, turned over in turn; the spots fill in once their card is up. */
.cp-play .cp-card { opacity: 0; transform: translateY(380px) rotate(-14deg); }
.cp-play .cp-card.dealt { opacity: 1; transform: rotate(var(--r)); }
.cp-play .cp-card:not(.flip) .cp-turn { transform: none; }
.cp-play .cp-spots i.taken { background: var(--border-strong); }
.cp-play .cp-spots i.taken svg { opacity: 0; }
.cp-play .flip .cp-spots i.taken { animation: cp-spot .35s calc(.7s + var(--n) * .06s) cubic-bezier(.34,1.56,.64,1) forwards; }
.cp-play .flip .cp-spots i.taken svg { animation: cp-spot-face .35s calc(.7s + var(--n) * .06s) forwards; }
@keyframes cp-spot { from { transform: scale(.4); } to { background: var(--chart-line); transform: none; } }
@keyframes cp-spot-face { to { opacity: 1; } }
.cp-play .cp-end { opacity: 0; transform: translateY(16px); }
.cp-play.ended .cp-end { opacity: 1; transform: none; transition: opacity .4s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.cp-skip { position: absolute; right: 22px; bottom: 16px; padding: 4px 0; border: 0; background: none; color: var(--text-3); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.cp-skip:hover { color: var(--text-1); text-decoration: underline; }
/* The application, on the page under the cards and in its own popup. */
.cp-form-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); padding-bottom: var(--s5); border-bottom: 1px solid var(--border-subtle); }
.creator-form .cp-form-head h2 { color: var(--text-1); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.cp-form-head p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-base); }
.cp-back-link { display: inline-flex; align-items: center; justify-self: start; gap: 6px; margin: -6px 0 0 -8px; padding: 6px 8px; border: 0; border-radius: var(--r-control); background: none; color: var(--text-2); font-size: var(--fs-base); font-weight: 500; cursor: pointer; }
.cp-back-link:hover { background: var(--surface-2); color: var(--text-1); }
.cp-back-link svg { width: 14px; height: 14px; }
.cp-form-card .creator-form { margin-top: 0; padding-top: 0; border-top: 0; }
.cp-sent { display: grid; justify-items: center; padding: var(--s8) var(--s5) var(--s5); text-align: center; }
.cp-sent svg { width: 76px; height: 76px; fill: none; stroke: var(--cp-green); stroke-linecap: round; stroke-linejoin: round; }
.cp-sent circle { stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: cp-draw .6s var(--ease) forwards; }
.cp-sent path { stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: cp-draw .35s .5s var(--ease) forwards; }
.cp-sent h2 { margin-top: 18px; color: var(--text-1); font-size: 24px; font-weight: 600; }
.cp-sent p { margin: 6px 0 24px; color: var(--text-2); font-size: 14px; }
@keyframes cp-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .cp-sent circle, .cp-sent path { animation: none; stroke-dashoffset: 0; } }
@media (max-width: 760px) {
  .cp-title { font-size: 30px; }
  .cp-cards { flex-direction: column; align-items: center; gap: 14px; }
  .cp-card, .cp-earn, .cp-spots-card { --r: 0deg; width: min(100%, 320px); height: 300px; margin-top: 0; }
  .cp-form-head { flex-direction: column; align-items: flex-start; }
  .creator-count { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) { .cp-roll > span.swap { animation: none; } }
/* Sent, and a rejection: one line of state with its mark, no tinted tile. */
.creator-sent, .creator-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--s3); padding: var(--s4); border: 1px solid var(--ok-line); border-radius: var(--r-panel); background: var(--surface-2); }
.creator-notice { border-color: var(--bad-line); }
.creator-sent > svg, .creator-notice > svg { width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.creator-notice > svg { color: var(--bad); }
.creator-sent h2, .creator-notice h2 { color: var(--text-1); font-size: var(--fs-base); font-weight: 540; }
.creator-sent p, .creator-notice p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-sm); }
.creator-form { display: grid; gap: var(--s4); margin-top: var(--s3); padding-top: var(--s6); border-top: 1px solid var(--border-subtle); }
.creator-form h2 { color: var(--text-1); font-size: var(--fs-md); font-weight: 540; }
.creator-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
/* Fields: a quiet rounded outline on a fill one step lighter than the card, bold white labels. The edge brightens on
   hover and turns violet on focus. */
.creator-card { --field: var(--surface-2); }
dialog.aff-dialog .creator-card { --field: #1c1c26; }
.creator-form .label { color: var(--text-1); font-size: var(--fs-sm); font-weight: 600; }
.creator-form input[type="text"], .creator-form input[type="email"], .creator-form textarea { display: block; width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--field); box-shadow: none; color: var(--text-1); font-size: var(--fs-md); transition: border-color var(--d1) var(--ease); }
.creator-form textarea { min-height: 0; padding: 11px 14px; line-height: 1.5; resize: vertical; }
.creator-form input::placeholder, .creator-form textarea::placeholder { color: var(--text-3); }
.creator-form input[type="text"]:hover, .creator-form input[type="email"]:hover, .creator-form textarea:hover { border-color: var(--border-control); }
.creator-form input[type="text"]:focus-visible, .creator-form input[type="email"]:focus-visible, .creator-form textarea:focus-visible { border-color: var(--border-focus); }
.creator-files { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.creator-attach { flex: none; cursor: pointer; }
.creator-attach:focus-within { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.creator-file-list { min-width: 0; overflow: hidden; color: var(--text-3); font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.creator-file-list.has { color: var(--text-1); }
.creator-submit { display: flex; justify-content: flex-end; }
.creator-submit .btn svg { order: 1; }
/* Owners' queue */
.creator-review { margin-bottom: var(--s6); }
.creator-review-list { margin: 0; padding: 0; list-style: none; }
.creator-review-item { display: grid; gap: var(--s3); padding: var(--s4) var(--s5); border-top: 1px solid var(--border-subtle); }
.creator-review-item:first-child { border-top: 0; }
.creator-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.creator-review-who { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.creator-review-head strong { display: block; color: var(--text-1); font-weight: 540; }
.creator-review-head .min0 span { color: var(--text-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.creator-review-state { display: inline-flex; flex: none; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); }
.creator-review-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin: 0; }
.creator-review-body dt { color: var(--text-3); font-size: var(--fs-xs); }
.creator-review-body dd { margin: 4px 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.creator-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.creator-review-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.creator-review-files, .creator-review-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.creator-review-actions { margin-left: auto; }
.creator-review-empty { margin: 0; padding: var(--s5); color: var(--text-3); font-size: var(--fs-sm); }
.creator-review-error { padding: var(--s4) var(--s5) 0; }
/* A creator’s link */
.public-main:has(.creator-landing) { width: min(100% - 48px, 1040px); }
/* A creator’s link, laid out like lanceaccess.com: opening lines, then three plain sections that pair a few words
   with one product picture, the prices as a table, and the way in. No cards; space does the separating. */
.creator-landing { display: grid; gap: 96px; padding: var(--s8) 0 var(--s9); }
/* The ground: the same nebula lanceaccess.com shows behind its pages, held still while the page scrolls and dimmed the
   way the site dims it. The opening section and the header above it stay plain black, and that black fades out into
   the nebula under the opening section instead of ending on an edge. */
.public:has(.creator-landing) { overflow-x: clip; }
.public:has(.creator-landing)::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #0a1630 url("/assets/aura.jpg") center / cover no-repeat; filter: brightness(.55); }
.public:has(.creator-landing) .public-top { background: var(--bg); }
.creator-hero { position: relative; }
.creator-hero::before, .creator-hero::after { content: ""; position: absolute; left: calc(50% - 50vw); z-index: -1; width: 100vw; pointer-events: none; }
.creator-hero::before { top: calc(var(--s8) * -1 - var(--s5)); bottom: -48px; background: var(--bg); }
.creator-hero::after { top: calc(100% + 48px); height: 140px; background: linear-gradient(var(--bg), rgba(7, 7, 11, 0)); }
.creator-landing code { color: var(--chart-line); font-family: var(--mono); font-size: .92em; font-weight: 540; }
.creator-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: var(--s9); }
.creator-hero-text { display: grid; justify-items: start; gap: var(--s4); }
/* The discount is the loudest thing on the page: one very large green figure, said again above the prices and at the
   way in. No frame; its size does the work. */
.creator-deal { display: grid; justify-items: start; gap: var(--s2); }
.creator-deal-figure { margin: 0; color: #5fe0a4; font-size: clamp(64px, 9vw, 120px); font-weight: 650; letter-spacing: -.06em; line-height: .95; white-space: nowrap; }
.creator-deal-of { margin: 0; color: var(--text-1); font-size: clamp(18px, 2vw, 24px); font-weight: 540; letter-spacing: -.02em; }
.creator-deal ul { display: grid; gap: 8px; margin: var(--s4) 0 0; padding: 0; list-style: none; }
.creator-deal li { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-md); }
.creator-deal li svg { flex: none; width: 15px; height: 15px; color: #5fe0a4; }
.creator-invited { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.creator-invited svg { width: 13px; height: 13px; color: var(--accent-text); }
.creator-invited strong { color: var(--text-1); font-weight: 540; }
.creator-hero h1 { max-width: 12em; color: var(--text-1); font-size: clamp(34px, 4.6vw, 56px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; text-wrap: balance; }
.creator-lede { max-width: 480px; margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.creator-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); margin-top: var(--s2); }
.creator-cta { min-height: 42px; padding: 0 20px; border-radius: var(--r-panel); font-size: var(--fs-md); }
.creator-site { display: inline-flex; align-items: center; gap: 6px; color: var(--text-1); font-size: var(--fs-md); font-weight: 470; text-decoration: none; }
.creator-site svg { width: 14px; height: 14px; color: var(--text-3); transition: transform var(--d1) var(--ease); }
.creator-site:hover { text-decoration: underline; text-underline-offset: 4px; }
.creator-site:hover svg { transform: translateX(2px); }
.creator-show { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: var(--s9); }
.creator-show.flip .creator-show-text { order: 1; }
.creator-show.stack { grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
.creator-show-text { display: grid; justify-items: start; gap: var(--s4); }
.creator-show h2, .creator-pricing h2, .creator-signup h2 { color: var(--text-1); font-size: clamp(24px, 2.6vw, 30px); font-weight: 600; letter-spacing: -.035em; line-height: 1.12; text-wrap: balance; }
.creator-show-text > p { max-width: 44ch; margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.creator-shot { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); }
.creator-shot.narrow { max-width: 440px; justify-self: center; border: 0; background: none; }
.creator-steps { display: grid; gap: var(--s3); margin: var(--s2) 0; padding: 0; list-style: none; }
.creator-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--s3); }
.creator-step-n { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text-2); font-size: 11px; font-weight: 540; }
.creator-steps h3 { color: var(--text-1); font-size: var(--fs-md); font-weight: 540; line-height: 22px; }
.creator-steps p { margin: 0; color: var(--text-3); font-size: var(--fs-sm); line-height: 1.5; }
.creator-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); width: 100%; margin: 0; }
.creator-facts dt { color: var(--text-1); font-size: var(--fs-md); font-weight: 540; }
.creator-facts dd { margin: 4px 0 0; color: var(--text-3); font-size: var(--fs-sm); line-height: 1.5; }
.creator-pricing { display: grid; justify-items: start; gap: var(--s5); }
.creator-pricing h2 em { color: #5fe0a4; font-style: normal; }
.creator-fineprint { display: flex; align-items: flex-start; gap: 6px; max-width: 70ch; margin: 0; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.5; }
.creator-fineprint svg { flex: none; width: 12px; height: 12px; margin-top: 2px; }
.creator-signup { display: grid; justify-items: center; gap: var(--s4); text-align: center; }
.creator-signup > p:not(.creator-fineprint) { max-width: 420px; margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.creator-signup .creator-fineprint { align-items: center; }
@media (max-width: 820px) {
  .creator-landing { gap: var(--s9); }
  .creator-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
  .creator-show { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .creator-show.flip .creator-show-text { order: 0; }
  .creator-facts { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
}
@media (max-width: 560px) {
  .creator-card { padding: var(--s5); }
  .creator-pair, .creator-review-body { grid-template-columns: minmax(0, 1fr); }
  .public-main:has(.creator-landing) { width: min(100% - 32px, 1040px); }
}

/* ---------- Optional email: the two choices (Account, and first-time onboarding) and staff campaigns ---------- */
/* Lance updates on one line: the checkbox and its words, then the tick and Save at the right; a warning wraps below. */
.email-prefs-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s4); min-width: 0; }
.email-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; cursor: pointer; }
.email-choice input { margin: 0; }
.email-choice > span { display: grid; gap: 2px; color: var(--text-3); font-size: var(--fs-sm); line-height: 1.5; }
.email-choice strong { color: var(--text-1); font-weight: 470; }
.email-choice:has(input:disabled) { cursor: default; }
.email-prefs-note { grid-column: 1 / -1; grid-row: 2; margin: 0; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.5; }
/* After a save, a tick beside Save until the choice changes again. */
.email-saved { display: inline-flex; align-items: center; color: var(--ok); }
.email-saved[hidden] { display: none; }
.email-saved svg { width: 16px; height: 16px; }
.email-prefs-note:empty { display: none; }
.email-prefs-note.ok { color: var(--ok); }
.email-prefs-note.warn { color: var(--warn); }
.email-prefs-actions { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); }
.camp { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.camp-list { display: grid; gap: var(--s3); }
.camp-list .btn { justify-self: start; }
.camp-list ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.camp-item { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--text-1); font: inherit; text-align: left; cursor: pointer; }
.camp-item:hover, .camp-item.on { background: var(--surface-2); }
.camp-item strong { overflow: hidden; font-size: var(--fs-sm); font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.camp-item span, .camp-empty, .camp-blank { color: var(--text-3); font-size: var(--fs-xs); }
.camp-blank { margin: 0; padding: var(--s5) 0; font-size: var(--fs-sm); }
.camp-main { display: grid; gap: var(--s6); min-width: 0; }
.camp-form, .camp-review { display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.camp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.camp-head h2, .camp-review h3 { overflow: hidden; color: var(--text-1); font-size: var(--fs-md); font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.camp-state { flex: none; color: var(--text-3); font-size: var(--fs-xs); font-weight: 540; }
.camp-state.queued { color: var(--ok); }
.camp-state.cancelled { color: var(--bad); }
.camp-form textarea { display: block; width: 100%; padding: 8px 11px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-1); font-size: var(--fs-sm); line-height: 1.5; resize: vertical; }
.camp-form textarea:focus-visible { border-color: var(--border-focus); }
.camp-form [readonly] { color: var(--text-2); }
.camp-note { min-height: 18px; margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.camp-note.ok { color: var(--ok); }
.camp-note.warn { color: var(--warn); }
.camp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.camp-grow { flex: 1; }
/* The email as it will arrive: a plain, light page of its own inside a frame that can run nothing. */
.camp-preview { display: block; width: 100%; height: 340px; border: 1px solid var(--border); border-radius: var(--r-control); background: #fff; }
.camp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3) var(--s5); margin: 0; }
.camp-facts dt { color: var(--text-3); font-size: var(--fs-xs); }
.camp-facts dd { margin: 2px 0 0; color: var(--text-1); font-size: var(--fs-sm); font-weight: 540; }
@media (max-width: 760px) { .camp { grid-template-columns: minmax(0, 1fr); } }


/* ---------- Founder workspace ----------
   The community dashboard’s surfaces, type and colours, laid out differently: no sidebar, a bar across the top with the
   Overview and Affiliates tabs, then a centred page. Totals sit in one strip with rules between them instead of in
   separate boxes; the chart and panels are the dashboard’s own. */
.founder-shell { display: block; }
.founder-shell .main { margin-left: 0; overflow-x: clip; }
.founder-shell .main-inner { max-width: none; padding: 0 0 var(--s7); }
.founder-shell .page-foot { width: min(100% - 64px, 1240px); margin: var(--s8) auto 0; }
.founder-entry { display: flex; justify-content: flex-end; margin-bottom: var(--s5); }
.fd-bar { position: sticky; top: 0; z-index: var(--z-sticky); border-bottom: 1px solid var(--border); background: var(--bg); }
.fd-bar-in { display: flex; align-items: center; gap: var(--s5); width: min(100% - 64px, 1240px); min-height: 56px; margin: 0 auto; }
.fd-brand { display: flex; flex: none; }
.fd-brand img { display: block; width: 92px; height: 22px; }
/* "Founders" beside the logo: past a thin rule, three of the logo’s slanted stripes in the dashboard’s colours (violet,
   Lance blue, green), then the word in spaced capitals. The stripes rise one after another when the page opens. */
.fd-tag { display: inline-flex; flex: none; align-items: center; gap: 10px; margin-left: calc(var(--s1) * -1); padding-left: var(--s4); border-left: 1px solid var(--border); color: var(--text-1); font-size: 11.5px; font-weight: 650; letter-spacing: .24em; line-height: 22px; text-transform: uppercase; }
.fd-stripes { display: inline-flex; align-items: center; gap: 3px; height: 14px; }
.fd-stripes i { width: 3px; height: 14px; border-radius: 1px; transform: skewX(var(--skew)); transform-origin: bottom; animation: fd-stripe .5s cubic-bezier(.34,1.56,.64,1) both; }
.fd-stripes i:nth-child(1) { background: var(--accent-bright); }
.fd-stripes i:nth-child(2) { background: var(--chart-line); animation-delay: 80ms; }
.fd-stripes i:nth-child(3) { background: #5fe0a4; animation-delay: 160ms; }
@keyframes fd-stripe { from { transform: skewX(var(--skew)) scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .fd-stripes i { animation: none; } }
/* The stripes rise once a visit: switching tabs, or opening another founder page, leaves them still. */
.fd-tag.seen .fd-stripes i { animation: none; }
/* The look: lanceaccess.com’s nebula behind a big header, fading into the page’s black under the totals, which float
   on it as separate cards. The bar sits on the nebula. Switching tabs swaps only the page under the bar and never dims
   it, so the nebula and the header never flash. */
.founder-shell .page-body { position: relative; }
.founder-shell .page-body::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 560px; background: url("/assets/aura.jpg") center 35% / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); pointer-events: none; }
.founder-shell .page-body > * { position: relative; }
#fd-main[aria-busy="true"] { opacity: 1; }
/* The page’s entrance fade plays when a founder page opens, not each time a tab swaps the page in: a swapped page
   appears at once, so the nebula and cards never blink to black. */
html.js .founder-shell #fd-main.swapped { animation: none; }
.app:not([data-section="communities"]) .fd-stripes i { animation: none; }
.founder-shell .fd-bar { position: relative; border-bottom: 0; background: transparent; }
.founder-shell .fd-tabs a { color: #c8c4dc; font-weight: 600; }
.founder-shell .fd-tabs a[aria-current="page"] { border-bottom-color: #fff; color: #fff; }
.founder-shell .fd-back { border: 1px solid #fff; border-radius: var(--r-panel); color: #fff; }
.founder-shell .fd-page { gap: 20px; }
.founder-shell .fd-head { padding: 48px 0 18px; }
.founder-shell .fd-head h1 { font-size: 52px; font-weight: 750; letter-spacing: -.045em; line-height: 1.02; }
.founder-shell .fd-head p { margin-top: 14px; color: #c8c4dc; font-size: var(--fs-lg); }
.fd-page .fd-figures { gap: 14px; border: 0; background: none; box-shadow: none; }
.fd-page .fd-figures .fd-figure { padding: 22px 24px; border: 1px solid #2c2846; border-radius: 16px; background: var(--bg-sunken); box-shadow: 0 30px 70px rgba(0, 0, 0, .55); }
.founder-shell .fd-value { font-size: 34px; font-weight: 650; letter-spacing: -.04em; }
.fd-page .chart-panel, .fd-page .panel { border-color: #24233a; border-radius: 16px; }
.fd-page .chart-amount { font-size: 28px; font-weight: 600; }
.fd-page .range-tabs a[aria-current="true"], .fd-page .range-tabs .range-pill { background: #fff; box-shadow: none; }
.fd-page .range-tabs a[aria-current="true"] { color: #07070b; }
@media (max-width: 640px) {
  .founder-shell .fd-head { padding-top: 28px; }
  .founder-shell .fd-head h1 { font-size: 34px; }
  .fd-page .fd-figures .fd-figure { padding: 18px; }
}
/* The tabs sit in the bar itself, each underlined from the bar’s bottom edge when it is the page shown. */
.fd-tabs { display: flex; align-self: stretch; gap: var(--s6); margin-left: var(--s6); }
.fd-tabs a { display: flex; align-items: center; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-3); font-size: var(--fs-base); font-weight: 470; text-decoration: none; transition: color var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.fd-tabs a:hover { color: var(--text-1); }
.fd-tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text-1); }
.fd-back { margin-left: auto; }
@media (max-width: 900px) { .fd-back { padding: 0 8px; font-size: 0; gap: 0; } .fd-back svg { width: 16px; height: 16px; } }
.fd-page { display: grid; gap: var(--s5); width: min(100% - 64px, 1240px); margin: 0 auto; padding-top: var(--s8); }
.fd-head h1 { color: var(--text-1); font-size: var(--fs-xl); font-weight: 540; letter-spacing: -.01em; }
.fd-head p { margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); }
/* Totals: one panel, each figure a coloured mark and label, the number, and one line on what it counts. */
.fd-figures { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
.fd-figures:has(> .fd-figure:only-child) { width: min(100%, 340px); }
.fd-figure { display: grid; align-content: start; gap: 8px; padding: var(--s5) var(--s6); }
.fd-figure + .fd-figure { border-left: 1px solid var(--border-subtle); }
.fd-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 470; }
.fd-mark { display: grid; place-items: center; width: 16px; height: 16px; color: var(--text-3); }
.fd-mark svg { width: 16px; height: 16px; }
.fd-value { color: var(--text-1); font-size: 26px; font-weight: 440; letter-spacing: -.035em; line-height: 1.1; }
.fd-note { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.45; }
/* Amounts in more than one currency stack, one per line. */
.fd-money > span { display: block; white-space: nowrap; }
.fd-series > .trend-chart { margin-top: 24px; }
.fd-page .creator-review { margin-bottom: 0; }
.fd-series + .fd-series { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border-subtle); }
.fd-currency { color: var(--text-3); font-size: var(--fs-xs); font-weight: 540; letter-spacing: .06em; }
.fd-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.fd-row .panel { margin: 0; }
.fd-row .panel-body { padding: var(--s4) var(--s5) var(--s5); }
.fd-link { display: inline-flex; align-items: center; gap: 2px; color: var(--text-3); font-size: var(--fs-sm); text-decoration: none; }
.fd-link:hover { color: var(--text-1); }
.fd-link svg { width: 14px; height: 14px; }
.fd-person { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.fd-person strong { display: block; color: var(--text-1); font-weight: 500; }
.fd-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--fs-xs); }
.fd-table td { height: 52px; }
.fd-commission { color: var(--text-1); } .fd-commission.none { color: var(--text-3); }
.fd-servers .table-wrap { margin: 0; }
.fd-sub { display: block; color: var(--text-3); font-size: var(--fs-xs); }
.fd-plan { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border: 1px solid var(--accent-line); border-radius: var(--r-pill); background: var(--accent-surface); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 540; }
.fd-plan.free { border-color: var(--border); background: var(--surface-2); color: var(--text-2); }
.fd-search { position: relative; display: flex; flex: none; align-items: center; width: min(380px, 100%); }
.fd-search > svg { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--text-3); pointer-events: none; }
.fd-search input { width: 100%; height: var(--control); padding: 0 10px 0 30px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-2); color: var(--text-1); font-size: var(--fs-sm); }
.fd-search input:focus-visible { outline: none; border-color: var(--border-focus); }
.fd-servers .panel-head { flex-wrap: wrap; }
.fd-more { display: flex; align-items: center; justify-content: center; gap: var(--s4); padding: var(--s4); border-top: 1px solid var(--border-subtle); font-size: var(--fs-sm); }
.fd-empty { padding: var(--s5); color: var(--text-3); font-size: var(--fs-sm); }
.fd-fine { max-width: 90ch; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.55; }
@media (max-width: 1000px) {
  .fd-figures { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-figure + .fd-figure { border-left: 0; }
  .fd-figure:nth-child(even) { border-left: 1px solid var(--border-subtle); }
  .fd-figure:nth-child(n + 3) { border-top: 1px solid var(--border-subtle); }
}
@media (max-width: 640px) {
  .fd-bar-in, .fd-page, .founder-shell .page-foot { width: calc(100% - 32px); }
  .fd-bar-in { flex-wrap: wrap; gap: var(--s3); padding-top: var(--s3); }
  .fd-tabs { order: 3; width: 100%; min-height: 40px; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .fd-back { padding: 0 8px; font-size: 0; gap: 0; }
  .fd-back svg { width: 16px; height: 16px; }
  .fd-figures, .fd-row { grid-template-columns: minmax(0, 1fr); }
  .fd-servers .panel-actions, .fd-search { width: 100%; }
  .fd-figure:nth-child(even) { border-left: 0; }
  .fd-figure + .fd-figure { border-top: 1px solid var(--border-subtle); }
}

/* ---------- Creator onboarding (pages/creatorSetup.ts) ----------
   The welcome an accepted creator sees once, then the setup list built from the server setup checklist’s own rows.
   The link and the dashboard never wait on payouts, so the list says so in its first line. */
.cr-onboarding { margin-bottom: var(--s5); }
.cr-welcome { display: grid; gap: var(--s5); padding: var(--s7); border: 1px solid var(--accent-line); border-radius: var(--r-dialog); background: var(--accent-surface); box-shadow: var(--shadow-1); transition: opacity var(--d3) var(--ease-exit), transform var(--d3) var(--ease-exit); }
.cr-welcome.leaving { opacity: 0; transform: translateY(-6px); }
.cr-welcome-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; }
.cr-welcome-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--accent-line); border-radius: 50%; background: var(--surface-1); color: var(--accent-text); }
.cr-welcome-mark svg { width: 18px; height: 18px; }
.cr-eyebrow { color: var(--accent-text); font-size: var(--fs-xs); font-weight: 540; letter-spacing: .02em; text-transform: uppercase; }
.cr-welcome h2 { margin-top: 4px; color: var(--text-1); font-size: var(--fs-2xl); font-weight: 560; letter-spacing: -.025em; line-height: 1.2; text-wrap: balance; }
.cr-welcome-head p:last-child { max-width: 62ch; margin-top: 6px; color: var(--text-2); font-size: var(--fs-md); line-height: 1.5; }
.cr-welcome-head strong { color: var(--text-1); font-weight: 540; }
.cr-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--border); overflow: hidden; }
.cr-terms > div { display: grid; align-content: start; gap: 2px; padding: var(--s4) var(--s5); background: var(--surface-1); }
.cr-terms dt { color: var(--text-3); font-size: var(--fs-xs); }
.cr-terms dd { margin: 0; color: var(--text-1); font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.cr-terms p { color: var(--text-3); font-size: var(--fs-sm); line-height: 1.45; }
.cr-welcome-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.cr-terms-link { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: var(--fs-sm); }
.cr-terms-link svg { width: 13px; height: 13px; }
.cr-welcome-error, .cr-row-error, .fo-error { flex-basis: 100%; margin: 0; color: var(--bad); font-size: var(--fs-sm); }
.cr-row-error { margin-top: 6px; text-align: right; }
.cr-setup .panel-actions { align-self: center; }
.cr-setup-count { color: var(--text-2); font-size: var(--fs-sm); }
.cr-progress { height: 3px; margin: 0 var(--s5) var(--s3); }
.cr-steps { border-top: 1px solid var(--border); }
.cr-step .min0 p { overflow-wrap: anywhere; }
.cr-step .mono { color: var(--text-2); font-size: var(--fs-sm); }
.cr-step.attention .step-mark { color: var(--warn); border-color: var(--warn-line); background: var(--warn-surface); }
.cr-step.upcoming h3 { color: var(--text-2); }
.cr-step-action { display: flex; justify-content: flex-end; }
.cr-step-action .button-row { flex-wrap: nowrap; }
.cr-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; margin-bottom: var(--s6); padding: var(--s6); border: 1px solid var(--border-strong); border-radius: var(--r-dialog); background: var(--surface-1); }
.cr-status.pending { border-color: var(--info-line); }
.cr-status-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.cr-status.pending .cr-status-mark { border-color: var(--info-line); background: var(--info-surface); color: var(--info); }
.cr-status.rejected .cr-status-mark { border-color: var(--bad-line); background: var(--bad-surface); color: var(--bad); }
.cr-status-mark svg { width: 17px; height: 17px; }
.cr-status .cr-eyebrow { color: var(--text-3); }
.cr-status h2 { margin-top: 3px; color: var(--text-1); font-size: var(--fs-xl); font-weight: 540; letter-spacing: -.02em; }
.cr-status p { max-width: 60ch; margin-top: 4px; color: var(--text-2); font-size: var(--fs-md); line-height: 1.5; }
.cr-track { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4); }
.cr-track li { display: inline-flex; align-items: center; gap: 7px; color: var(--text-3); font-size: var(--fs-sm); }
.cr-track li > span { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--border-strong); border-radius: 50%; }
.cr-track li > span svg { width: 10px; height: 10px; }
.cr-track li.done { color: var(--text-2); }
.cr-track li.done > span { border-color: var(--ok-line); background: var(--ok-surface); color: var(--ok); }
.cr-track li.current { color: var(--text-1); font-weight: 500; }
.cr-track li.current > span { border-color: var(--info); box-shadow: inset 0 0 0 3px var(--info-surface); background: var(--info); }
@media (max-width: 720px) {
  .cr-welcome { padding: var(--s5); }
  .cr-terms { grid-template-columns: minmax(0, 1fr); }
  .cr-step { grid-template-columns: 30px minmax(0, 1fr); }
  .cr-step > .cr-step-action, .cr-step > .badge { grid-column: 2; justify-self: start; }
  .cr-step-action .button-row { flex-wrap: wrap; }
  .cr-status { padding: var(--s5); }
}

/* Founders: everyone accepted, with their setup as a four-mark meter and the acceptance email’s own state. */
.cr-setup-table td { height: 56px; vertical-align: middle; }
.cr-meter { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: middle; }
.cr-meter i { width: 14px; height: 4px; border-radius: var(--r-pill); background: var(--border-strong); }
.cr-meter i.on { background: var(--ok); }
.cr-slug { color: var(--text-2); font-size: var(--fs-sm); }
.cr-setup-table form { display: inline-grid; justify-items: end; }
.state-dot.live { animation: cr-pulse 1.6s var(--ease) infinite; }
@keyframes cr-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .state-dot.live { animation: none; } }

/* ---------- Founding offers: the founders' tab (pages/founding.ts) ---------- */
.fo-form { display: grid; gap: var(--s5); }
.fo-percent { margin: 0; padding: 0; border: 0; min-width: 0; }
.fo-percent legend { margin-bottom: var(--s2); padding: 0; color: var(--text-2); font-size: var(--fs-sm); font-weight: 470; }
.fo-chips { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--s2); }
.fo-chips label { position: relative; display: flex; cursor: pointer; }
.fo-chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fo-chips span { display: grid; flex: 1; place-items: center; min-height: var(--control-lg); border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-2); font-size: var(--fs-md); font-weight: 540; transition: background var(--d1) var(--ease), color var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.fo-chips label:hover span { color: var(--text-1); border-color: var(--text-3); }
.fo-chips input:checked + span { border-color: var(--accent-fill); background: var(--accent-fill); color: #fff; }
.fo-chips input:focus-visible + span { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.fo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.fo-submit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.fo-result { display: grid; gap: var(--s4); margin-top: var(--s5); padding: var(--s5); border: 1px solid var(--ok-line); border-radius: var(--r-panel); background: var(--ok-surface); }
.fo-result:focus { outline: none; }
.fo-result-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: start; }
.fo-result-head > svg { width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
.fo-result-head h3 { color: var(--text-1); font-size: var(--fs-lg); font-weight: 540; }
.fo-result-head p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-sm); }
.fo-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); }
.fo-link input { min-width: 0; height: var(--control-lg); padding: 0 12px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-1); font-size: var(--fs-sm); }
.fo-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: 0; }
.fo-facts dt { color: var(--text-3); font-size: var(--fs-xs); }
.fo-facts dd { margin: 3px 0 0; color: var(--text-1); font-size: var(--fs-md); font-weight: 500; overflow-wrap: anywhere; }
.fo-result-note { color: var(--text-3); font-size: var(--fs-xs); }
.fo-table td { height: 52px; }
/* On a narrow screen both founder tables keep their columns and scroll inside their panel instead of squeezing. */
.fo-table, .cr-setup-table { min-width: 860px; }
.fo-made { display: grid; }
.fo-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fo-who svg { width: 13px; height: 13px; color: var(--text-3); }
.fo-note { max-width: 260px; color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.fo-new-row td { background: var(--ok-surface); }
@media (max-width: 820px) {
  .fo-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fo-pair, .fo-facts { grid-template-columns: minmax(0, 1fr); }
  .fo-link { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Founding offers: the public page ---------- */
.public-main:has(.fo-landing) { width: min(100% - 48px, 1040px); }
.public-main:has(.fo-closed) { width: min(100% - 32px, 560px); }
.fo-landing { display: grid; gap: 64px; padding: var(--s8) 0 var(--s9); }
.fo-hero { display: grid; }
.fo-hero-text { display: grid; justify-items: start; gap: var(--s4); }
.fo-hero h1 { max-width: 14em; color: var(--text-1); font-size: clamp(32px, 4.4vw, 52px); font-weight: 600; letter-spacing: -.04em; line-height: 1.06; text-wrap: balance; }
.fo-figure { display: block; color: #5fe0a4; font-size: 1.5em; letter-spacing: -.05em; line-height: 1; }
/* The Lance Founder Program (100% off for life): Welcome, the program's name and crown in Lance blue (--sky, as the
   dashboard's Admin label), the fee's highlight and the Covers check in Lance purple (--accent). Lance's colours only. */
.fo-landing.founders .fo-figure { color: var(--sky); }
.fo-landing.founders .creator-pricing h2 em { color: var(--accent); }
.fo-founders-mark { color: var(--sky); font-size: var(--fs-md); font-weight: 560; letter-spacing: .02em; }
.fo-founders-mark svg { width: 15px; height: 15px; color: var(--sky); }
.fo-landing.founders .fo-col.yes h3 svg { color: var(--accent); }
.fo-landing.founders .creator-lede { max-width: 36em; color: var(--text-2); font-size: var(--fs-md); line-height: 1.55; text-wrap: pretty; }
.fo-expiry { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: var(--fs-md); }
.fo-expiry svg { width: 14px; height: 14px; color: var(--text-3); }
.fo-claim { display: grid; justify-items: end; gap: var(--s4); text-align: right; }
.fo-claim-lead { color: var(--text-3); font-size: var(--fs-md); line-height: 1.4; }
.fo-claim-lead strong { font-weight: inherit; }
.fo-claim .small { display: flex; align-items: flex-start; gap: 6px; line-height: 1.5; }
.fo-claim .small svg { flex: none; width: 12px; height: 12px; margin-top: 2px; }
.fo-cta { width: auto; min-height: 44px; padding-inline: 40px; justify-content: center; font-size: var(--fs-md); }
.fo-claim-form { display: grid; justify-items: end; }
.fo-claim-pre { display: grid; gap: var(--s4); }
.fo-overlap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.fo-overlap svg { width: 14px; height: 14px; margin-top: 2px; color: var(--info); }
.fo-outcome { display: grid; gap: 6px; padding: var(--s4); border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface-2); }
.fo-outcome:focus { outline: none; }
.fo-outcome strong { color: var(--text-1); font-size: var(--fs-lg); font-weight: 560; }
.fo-outcome p { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.fo-outcome .button-row { margin-top: var(--s2); }
.fo-outcome.ok { justify-items: center; gap: var(--s3); width: min(420px, calc(100vw - 32px)); padding: var(--s6) var(--s5); border-color: var(--ok-line); background: var(--ok-surface); text-align: center; }
.fo-outcome.ok .button-row { justify-content: center; }
.fo-check svg { display: block; width: 64px; height: 64px; fill: none; stroke: var(--ok); stroke-linecap: round; stroke-linejoin: round; }
.fo-check circle { stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: cp-draw .6s var(--ease) forwards; }
.fo-check path { stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: cp-draw .35s .5s var(--ease) forwards; }
.fo-outcome.ok > :not(.fo-check) { animation: rise var(--d4) .75s var(--ease-out) backwards; }
@media (prefers-reduced-motion: reduce) { .fo-check circle, .fo-check path { animation: none; stroke-dashoffset: 0; } .fo-outcome.ok > :not(.fo-check) { animation: none; } }
.fo-outcome.warn { border-color: var(--warn-line); background: var(--warn-surface); }
.fo-outcome.bad { border-color: var(--bad-line); background: var(--bad-surface); }
.fo-covers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.fo-col h3 { display: flex; align-items: center; gap: 8px; color: var(--text-1); font-size: var(--fs-lg); font-weight: 540; }
.fo-col h3 svg { width: 16px; height: 16px; }
.fo-col.yes h3 svg { color: #5fe0a4; }
.fo-col.no h3 svg { color: var(--text-3); }
.fo-col ul { display: grid; gap: 8px; margin-top: var(--s4); }
.fo-col li { position: relative; padding-left: 16px; color: var(--text-2); font-size: var(--fs-md); line-height: 1.5; }
.fo-col li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--text-3); }
.fo-closed { display: grid; justify-items: center; gap: var(--s4); margin-top: var(--s9); padding: var(--s8) var(--s7); border: 1px solid var(--border-strong); border-radius: var(--r-dialog); background: var(--surface-1); text-align: center; }
.fo-closed-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.fo-closed-mark svg { width: 20px; height: 20px; }
.fo-closed h1 { color: var(--text-1); font-size: var(--fs-2xl); font-weight: 560; letter-spacing: -.02em; }
.fo-closed p { max-width: 42ch; color: var(--text-2); font-size: var(--fs-md); line-height: 1.55; }
.fo-closed a:not(.btn) { color: var(--text-1); }
@media (max-width: 820px) {
  .fo-landing { gap: var(--s9); padding-top: var(--s5); }
  .fo-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
  .fo-covers { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
}


/* ---------- Phones and tablets: the last pass ----------
   Found by sweeping every dashboard page at 320, 375, 430 and 768 wide. Each rule fixes one thing seen there. */
.founder-nav { display: none; }
@media (max-width: 1100px) {
  /* Back is a small labelled button above the page, not an empty box with an arrow. */
  .page-back { display: inline-flex; gap: 6px; width: auto; height: 34px; padding: 0 12px 0 8px; color: var(--text-2); font-size: var(--fs-sm); }
  .page-back > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .page-back svg { width: 16px; height: 16px; }
}
@media (max-width: 900px) {
  /* The creator program’s three cards stack before they would run past the page. */
  .cp-cards { flex-direction: column; align-items: center; gap: 14px; }
  .cp-card, .cp-earn, .cp-spots-card { --r: 0deg; width: min(100%, 320px); height: 300px; margin-top: 0; }
  /* The founders' tabs stay on one line and slide, rather than breaking a tab name in two. */
  .fd-tabs { overflow-x: auto; scrollbar-width: none; }
  .fd-tabs::-webkit-scrollbar { display: none; }
  .fd-tabs a { flex: none; white-space: nowrap; }
  /* The founder tables are cards here (stack-mobile), so their desktop minimum width no longer applies. */
  table.data.stack-mobile.fo-table, table.data.stack-mobile.cr-setup-table { min-width: 0; }
  table.data.stack-mobile.fd-table td, table.data.stack-mobile.fo-table td, table.data.stack-mobile.cr-setup-table td { height: auto; text-align: right; }
  table.data.stack-mobile.cr-setup-table td > .cr-meter { margin: 6px 8px 0 auto; }
  table.data.stack-mobile.fd-table td.primary-cell, table.data.stack-mobile.fo-table td.primary-cell, table.data.stack-mobile.cr-setup-table td.primary-cell { text-align: left; }
  table.data.stack-mobile .fo-note { max-width: none; }
  table.data.stack-mobile .fd-money { gap: 4px 10px; flex-wrap: wrap; justify-content: space-between; }
  table.data.stack-mobile td.bare form { display: grid; justify-items: end; }
}
@media (max-width: 700px) {
  /* The bar keeps the page’s name; the founders' way in moves into the menu. */
  .topbar .topbar-founder { display: none; }
  .mobile-panel .founder-nav { display: grid; }
  /* Settings: the four categories as a two-by-two grid, and no box inside a box. */
    .settings-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); overflow: visible; padding: 0 0 var(--s4); background: none; }
  .settings-nav a { justify-content: flex-start; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); white-space: normal; }
  .settings-content { padding: var(--s4) 0 0; }
  /* A membership’s header: its links and status wrap instead of running off the card. */
  .m-hero-links, .m-head-end { flex-wrap: wrap; row-gap: 4px; }
  .m-head-end { flex: 1 1 auto; min-width: 0; }
  /* Members' cards: a status and its note read from the dot, so the dot never floats away from a short first line. */
  table.data.stack-mobile td .st-text { text-align: left; }
  /* The creator setup list: its count goes under the description instead of squeezing it. */
  .cr-setup .panel-actions { flex-basis: 100%; }
  /* Manage memberships: the two ways forward stack, full width. */
  .manage-foot { display: grid; grid-template-columns: minmax(0, 1fr); }
  .manage-foot > :last-child { margin-left: 0; }
  .manage-foot .btn { justify-content: center; }
  /* Give free access: the four reasons as one row across the dialog, not a squeezed two-by-two. */
  .free-reasons .aff-kind { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .free-reasons .aff-kind label + label { border-left: 1px solid var(--border-control); border-top: 0; }
  .free-reasons .aff-kind span { justify-content: center; padding: 0 6px; }
}
@media (max-width: 900px) {
  /* The two figure cards hold a number and a line; only the spots card needs the full height. */
  .cp-earn, .cp-save { height: 236px; }
}
/* The founding offer page fits a 320px phone: one column that can shrink, and prices that wrap. */
.fo-landing { grid-template-columns: minmax(0, 1fr); }
.fo-hero-text, .fo-pricing { min-width: 0; }
.fo-expiry { flex-wrap: wrap; }
@media (max-width: 420px) {
  .creator-signup .creator-fineprint { justify-content: center; text-align: left; }
}
/* Touch: small links and icon buttons get a finger-sized target without changing how they look. */
@media (pointer: coarse) {
  .page-foot a, .public-foot a { display: inline-flex; align-items: center; min-height: 36px; }
  .range-tabs a { height: 32px; }
  .msg-back { width: 40px; height: 40px; }
  .msg-pane-actions .btn { min-width: 40px; }
  .topbar .where a { display: inline-block; padding: 9px 0; margin: -9px 0; }
  .topbar .brand, .fd-brand { padding: 12px 0; margin: -12px 0; }
  .offer-details, .rating-link, .review-back { display: inline-block; padding: 10px 0; margin: -10px 0; }
  /* Keyboard hints mean nothing on a touchscreen. */
  .palette-foot { display: none; }
}
/* Sections, not boxes. A dashboard section is its heading and its content on the page itself, like the Sales chart
   and the row under it: no border, fill or shadow around it, and space (not lines) between sections. Lists keep a
   hairline between rows, and a row lines up with its heading; its hover fill reaches a little past the text so the
   words never touch its edge. True objects keep their box: membership cards, member passes, connection cards, plan
   cards, alerts and issue cards, the Messages and Settings workspaces, forms and dialogs. */
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) { border: 0; border-radius: 0; background: none; box-shadow: none; }
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) > .panel-head { padding: 0 0 var(--s3); border: 0; }
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) > .panel-head h2 { font-size: var(--fs-lg); font-weight: 550; letter-spacing: -.015em; }
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) > .panel-body, :is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) > .panel-body:first-child { padding: 0; }
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) > .panel-foot { padding: var(--s3) 0 0; border-top: 0; }
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) .rows > .row-item { margin-inline: -12px; padding: 12px; border-radius: var(--r-control); }
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body .panel:not(.estimate-panel, .current) .rows > .row-item + .row-item { border-top-color: var(--border-subtle); }
:is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body > .stack, :is(.app[data-section="overview"], .app[data-section="memberships"]) .page-body > .stack-lg { gap: var(--s8); }
/* A membership's video, wherever it plays: 16:9, filling its column, in a frame like a photo's. An uploaded file plays
   in the browser's player on black; a link that can't be framed shows its still with where it plays. */
.video-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--r-dialog); overflow: hidden; background: #000000; color: inherit; text-decoration: none; }
.video-frame video, .video-frame iframe, .video-frame img { display: block; width: 100%; height: 100%; border: 0; }
.video-frame video { object-fit: contain; }
.video-frame img { object-fit: cover; }
.video-link-label { position: absolute; left: var(--s5); bottom: var(--s5); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--bg); color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; box-shadow: 0 0 0 1px var(--border-strong); transition: transform var(--d2) var(--ease); }
.video-link-label svg { width: 14px; height: 14px; }
.video-link:hover .video-link-label { transform: translateY(-2px); }

/* A server's join page is a storefront: a welcome with the server's picture, name and the owner's words, then every
   membership as a card with its picture (or its video's still), name, rating, what it is and its price, each opening
   its own page. It fills the page instead of leaving one narrow column on a void. */
.public-main:has(.join-store) { width: 100%; margin: 0; padding: var(--s7) clamp(32px, 7vw, 136px); }
.public:has(.join-store) .public-top { padding-inline: clamp(32px, 7vw, 136px); }
.public:has(.join-store) .public-foot { justify-content: space-between; padding-inline: clamp(32px, 7vw, 136px); }
.join-store { display: grid; gap: var(--s8); max-width: 1280px; margin: 0 auto; }
.join-welcome { display: flex; align-items: center; gap: var(--s7); }
.join-welcome > .avatar { flex: none; width: 96px; height: 96px; border-radius: 24px; font-size: 36px; box-shadow: inset 0 0 0 1px var(--border-strong); }
.join-kicker { color: var(--text-3); font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.join-welcome .join-title { margin-top: 2px; }
.join-welcome .join-owner { margin-top: var(--s3); white-space: pre-line; }
.join-steps { margin-top: var(--s3); color: var(--text-3); font-size: var(--fs-sm); }
.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: var(--s5); }
/* Two memberships share the row; one alone stays card-sized rather than stretching across the page. */
.join-grid:has(> :only-child) { max-width: 560px; }
.join-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; color: inherit; text-decoration: none; transition: border-color var(--d2) var(--ease), transform var(--d3) var(--ease); }
.join-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.join-card:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.join-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
/* The whole picture shows whenever it can: as large as the frame allows, centred on black (a square photo sits whole
   with black either side). Only a shape that would look wrong whole is trimmed to fill: a very tall or very wide photo
   (member.js marks it .fill), or a video's still, whose 4:3 frame carries its own black bands. */
.join-card-media:has(img) { background: #000; }
.join-card-media img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.join-card-media img.fill { object-fit: cover; object-position: 50% 30%; }
.join-card-media img.fill:not([data-card-fit]) { object-position: center; }
.join-card-letter { display: grid; place-items: center; height: 100%; color: var(--text-2); font-size: 52px; font-weight: 500; }
.join-card-play { position: absolute; left: var(--s4); bottom: var(--s4); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--bg); color: var(--text-1); box-shadow: 0 0 0 1px var(--border-strong); }
.join-card-play svg { width: 15px; height: 15px; margin-left: 2px; }
.join-card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: var(--s5) var(--s5) var(--s5); }
.join-card-name { font-size: 19px; font-weight: 550; letter-spacing: -.02em; overflow-wrap: anywhere; }
.join-card .rating { display: flex; color: var(--text-3); font-size: var(--fs-xs); }
.join-card-about { display: -webkit-box; overflow: hidden; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.join-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s4); }
.join-card-price { color: var(--text-3); font-size: var(--fs-sm); }
.join-card-price b { color: var(--text-1); font-size: 22px; font-weight: 550; letter-spacing: -.03em; }
.join-card-more { display: block; margin-top: 2px; color: var(--accent-text); font-size: var(--fs-xs); }
/* When one card lists more options, the others keep that line's room so every price lines up across the row. */
.join-grid:has(.join-card-more) .join-card-price:not(:has(.join-card-more))::after { content: ""; display: block; height: calc(var(--fs-xs) * 1.5 + 2px); }
.join-card-go { flex: none; gap: 6px; }
.join-card-go svg { width: 14px; height: 14px; transition: transform var(--d2) var(--ease); }
.join-card:hover .join-card-go svg { transform: translateX(2px); }
.join-store > .join-member { margin-top: 0; }
/* After checkout: a big state mark and a few words, two chips (payment, Discord role), then the pass with its buttons. */
.join-access { display: grid; gap: var(--s3); padding-bottom: var(--s6); border-bottom: 1px solid var(--border); }
.access-card { display: grid; }
.access-block { display: grid; gap: var(--s5); }
.access-block[hidden] { display: none; }
.access-state { display: flex; align-items: center; gap: var(--s4); }
.access-mark { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; }
.access-mark svg { width: 52px; height: 52px; overflow: visible; }
.access-mark > .icon { width: 22px; height: 22px; }
.access-mark.is-info, .access-mark.is-accent { color: var(--info); background: var(--info-surface); box-shadow: inset 0 0 0 2px var(--info-line); }
.access-mark.is-warn { color: var(--warn); background: var(--warn-surface); box-shadow: inset 0 0 0 2px var(--warn-line); }
.access-mark.is-bad { color: var(--bad); background: var(--bad-surface); box-shadow: inset 0 0 0 2px var(--bad-line); }
.access-mark.is-neutral { color: var(--text-3); background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--border-strong); }
.access-ring { fill: none; stroke: var(--border-strong); stroke-width: 3.5; }
.access-arc { fill: none; stroke: var(--accent-bright); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 28 100; transform-origin: 20px 20px; transform: rotate(-90deg); }
.access-disc { fill: var(--ok); }
.access-tick { fill: none; stroke: var(--surface-1); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.access-state strong { display: block; color: var(--text-1); font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.access-state p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-md); }
.access-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.access-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 12px 3px 9px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-sm); font-weight: 540; }
.access-chip .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.access-chip.ok { border-color: var(--ok-line); background: var(--ok-surface); color: var(--ok); }
.access-chip.info { border-color: var(--info-line); background: var(--info-surface); color: var(--info); }
.access-chip.warn { border-color: var(--warn-line); background: var(--warn-surface); color: var(--warn); }
.access-chip-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }
.access-chip-spin { width: 12px; height: 12px; flex: none; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.access-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); margin-top: var(--s4); }
.access-foot a { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); text-decoration: none; }
.access-foot a .icon { width: 13px; height: 13px; }
.access-foot a:hover { color: var(--text-1); }
.access-actions { margin-top: var(--s4); gap: var(--s2); }

/* A member's pass: one membership as a coloured card in its role's colour, with a big figure and its own buttons. */
.mpass { --m-ink: #ffffff; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pic name state" "figure figure figure" "actions actions actions"; align-items: center; gap: var(--s4); padding: var(--s5); border: 1px solid color-mix(in srgb, var(--m-accent) 70%, #2a2a31); border-radius: var(--r-dialog); background: color-mix(in srgb, var(--m-accent) 58%, #111116); color: var(--m-ink); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--m-accent) 55%, #ffffff), var(--shadow-1); text-decoration: none; }
.mpass.ink-dark { --m-ink: #111116; }
.mpass-pic { grid-area: pic; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--m-accent) 32%, #0b0b10); color: #ffffff; font-size: 20px; font-weight: 650; }
.mpass-pic img { width: 100%; height: 100%; object-fit: cover; }
.mpass-name { grid-area: name; display: grid; gap: 1px; }
.mpass-name strong { overflow: hidden; font-size: 17px; font-weight: 620; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.mpass-name span { font-size: var(--fs-sm); opacity: .8; }
.mpass-state { grid-area: state; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--m-accent) 24%, #0b0b10); color: #ffffff; font-size: var(--fs-sm); font-weight: 540; white-space: nowrap; }
.mpass-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.mpass-state.warn i { background: var(--warn); }
.mpass-figure { grid-area: figure; display: grid; gap: 2px; }
.mpass-figure span { font-size: var(--fs-xs); font-weight: 560; letter-spacing: .07em; text-transform: uppercase; opacity: .78; }
.mpass-figure b { font-size: 30px; font-weight: 620; letter-spacing: -.04em; line-height: 1.05; }
.mpass-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: var(--s2); }
.mpass .btn { min-height: 38px; padding: 8px 16px; border: 1px solid color-mix(in srgb, var(--m-accent) 45%, #ffffff); border-radius: 10px; background: transparent; color: var(--m-ink); font-size: var(--fs-base); font-weight: 560; }
.mpass .btn:hover { background: color-mix(in srgb, var(--m-accent) 46%, #111116); border-color: color-mix(in srgb, var(--m-accent) 30%, #ffffff); }
.mpass .btn-primary { border-color: color-mix(in srgb, var(--m-accent) 40%, #0b0b10); background: color-mix(in srgb, var(--m-accent) 22%, #0b0b10); color: #ffffff; }
.mpass .btn-primary:hover { border-color: color-mix(in srgb, var(--m-accent) 50%, #0b0b10); background: color-mix(in srgb, var(--m-accent) 32%, #0b0b10); }
.mpass .btn svg { width: 16px; height: 16px; }
.mpass .btn .discord-mark { width: 18px; height: 18px; }
.mpass.ink-dark .btn { border-color: color-mix(in srgb, var(--m-accent) 45%, #111116); }
.mpass.ink-dark .btn:hover { background: color-mix(in srgb, var(--m-accent) 80%, #ffffff); }
.mpass.ink-dark .btn-primary { border-color: #111116; background: #1b1b22; color: #ffffff; }
.mpass.ink-dark .btn-primary:hover { background: #2a2a33; }
/* The compact pass: one line, the whole pass is the link. */
.mpass.is-link { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "pic name figure go"; gap: var(--s3); padding: var(--s3) var(--s4); transition: transform var(--d2) var(--ease), box-shadow var(--d2) var(--ease); }
.mpass.is-link .mpass-pic { width: 40px; height: 40px; border-radius: 10px; font-size: 17px; }
.mpass.is-link .mpass-state { display: none; }
.mpass[hidden] { display: none; }
.mpass-new { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--m-accent) 22%, #0b0b10); color: #ffffff; font-size: 11px; font-style: normal; font-weight: 600; letter-spacing: .02em; vertical-align: 2px; }
.mpass-new[hidden] { display: none; }
.mpass.is-arriving { animation: access-rise 320ms var(--ease) both; }
.mpass.is-link .mpass-figure { justify-items: end; }
.mpass.is-link .mpass-figure b { font-size: 17px; letter-spacing: -.02em; }
.mpass-go { grid-area: go; width: 18px; height: 18px; opacity: .8; transition: transform var(--d2) var(--ease); }
.mpass.is-link:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--m-accent) 55%, #ffffff), var(--shadow-2); }
.mpass.is-link:hover .mpass-go { transform: translateX(2px); }
.mpass.is-link:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* A member coming back later: their passes and the two ways on. */
.member-home { display: grid; gap: var(--s4); }
.member-home-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.member-home-head h2 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; }
.member-home .btn, .access-actions .btn, .manage-page .btn { min-height: 36px; padding: 7px 14px; font-size: var(--fs-base); font-weight: 540; }
.member-home .btn svg, .access-actions .btn svg, .manage-page .btn svg { width: 16px; height: 16px; }
.member-home .btn .discord-mark, .access-actions .btn .discord-mark { width: 18px; height: 18px; }
.mpass-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--s3); }

/* Manage membership: the member's own page, mostly things to click. */
.manage-page { display: grid; gap: var(--s6); }
.manage-page > .public-back { justify-self: start; }
.manage-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.manage-head .join-kicker { margin: 0 0 2px; }
.manage-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.manage-who { display: flex; align-items: center; gap: var(--s2); margin-left: auto; color: var(--text-3); font-size: var(--fs-sm); }
.manage-who-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 3px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-1); color: var(--text-2); }
.manage-who-chip .avatar { width: 24px; height: 24px; font-size: 11px; }
.manage-passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s4); }
.manage-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.manage-tile { display: grid; justify-items: start; gap: 2px; padding: var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); color: var(--text-1); text-decoration: none; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease), transform var(--d2) var(--ease); }
.manage-tile:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.manage-tile:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.manage-tile-mark { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: var(--s2); border-radius: 50%; }
.manage-tile-mark .icon, .manage-tile-mark svg { width: 19px; height: 19px; }
.manage-tile.is-discord .manage-tile-mark { background: #5865f2; color: #ffffff; }
.manage-tile.is-team .manage-tile-mark { background: var(--accent-fill); color: #ffffff; }
.manage-tile.is-link .manage-tile-mark { background: var(--ok-surface); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.manage-tile strong { font-size: var(--fs-md); font-weight: 600; }
.manage-tile span:last-child { color: var(--text-3); font-size: var(--fs-sm); }
.manage-past { display: grid; gap: var(--s3); }
.manage-past h2 { color: var(--text-3); font-size: var(--fs-sm); font-weight: 540; }
.manage-past-list { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.manage-past-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); color: var(--text-1); text-decoration: none; }
.manage-past-row + .manage-past-row { border-top: 1px solid var(--border-subtle); }
a.manage-past-row:hover { background: var(--surface-2); }
.manage-past-row > .icon { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.manage-past-row .min0 { display: grid; flex: 1; }
.manage-past-row strong { font-size: var(--fs-base); font-weight: 540; }
.manage-past-row .min0 span { color: var(--text-3); font-size: var(--fs-sm); }
.manage-note, .manage-none { color: var(--text-3); font-size: var(--fs-sm); }
.manage-empty { display: grid; justify-items: center; gap: var(--s3); padding: var(--s8) var(--s6); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); text-align: center; }
.manage-empty-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent-surface); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.manage-empty-mark .icon { width: 24px; height: 24px; }
.manage-empty h2 { font-size: var(--fs-xl); font-weight: 600; }
.manage-empty p { max-width: 40ch; color: var(--text-2); font-size: var(--fs-base); }
@media (max-width: 560px) {
  .access-state strong { font-size: 21px; }
  .mpass-actions .btn { flex: 1 1 auto; }
  .manage-who { width: 100%; margin-left: 0; }
  .manage-tiles { grid-template-columns: minmax(0, 1fr); }
  .manage-tile { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s3); align-items: center; }
  .manage-tile-mark { grid-row: span 2; margin: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .member-status[data-polling] .access-block:not([hidden]) .access-arc { animation: access-turn 1.1s linear infinite; }
  .member-status[data-polling] .access-block:not([hidden]) .access-chip-spin { animation: access-turn-chip 800ms linear infinite; }
  .access-block:not([hidden]) .access-mark.is-done { animation: access-pop var(--d4) var(--ease); }
  .access-block:not([hidden]) .access-tick { stroke-dasharray: 1; stroke-dashoffset: 1; animation: access-tick 420ms var(--ease) 120ms forwards; }
  .access-block:not([hidden]) .mpass { animation: access-rise 320ms var(--ease) 60ms both; }
}
@keyframes access-turn { to { transform: rotate(270deg); } }
@keyframes access-turn-chip { to { transform: rotate(360deg); } }
@keyframes access-pop { from { transform: scale(.86); } to { transform: none; } }
@keyframes access-tick { to { stroke-dashoffset: 0; } }
@keyframes access-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* The member's own membership: the same card, marked in words, with an accent edge. */
.join-card.is-yours { border-color: var(--accent-line, var(--border-strong)); }
.join-card-yours { display: inline-flex; align-items: center; gap: 4px; }
.join-card-yours[hidden], .join-card-go[hidden] { display: none; }
.join-card-yours .icon { width: 12px; height: 12px; }
.join-store > .join-member span { margin-right: var(--s2); }

/* A membership's own page: back to the storefront, then its video (or photo) large, its name, rating and its words in
   full on the left, and the checkout card on the right, kept in view while the words scroll. */
.join-sale { display: grid; gap: var(--s5); max-width: 1280px; margin: 0 auto; }
.join-sale .join-back { margin-bottom: 0; }
.join-sale .join-page { grid-template-columns: minmax(0, 1fr) 420px; gap: clamp(32px, 4vw, 64px); }
.join-sale .join-box { position: sticky; top: var(--s6); }
/* On wide screens the join box keeps one height, a little shorter than the window, whichever price is picked. The
   price's words and its sale scroll inside it; the price, the choices and Join stay put. */
@media (min-width: 981px) {
  /* The box is as tall as what it holds, so the footer can never ride up over Join (see .join-member). Every price's
     words sit in one cell, the others invisible but still taking their room, so the cell is as tall as the longest and
     picking a price never moves the choices or Join. Words longer than the window allows scroll inside the cell. */
  .join-sale .join-box { display: flex; flex-direction: column; min-height: 440px; }
  /* A membership with one price and few words still gets the full-height box: the room left over sits under its
     words, so Join and the member links keep their place at the foot. */
  .join-sale .join-scroll { margin-bottom: auto; }
  .join-sale .join-box > .join-form { display: flex; flex-direction: column; flex: 1 0 auto; }
  .join-sale .join-box > .join-member { flex: none; }
  /* Same right edge as the price list below, so the two scroll rails line up one above the other. */
  .join-sale .join-scroll { display: grid; max-height: max(96px, calc(100dvh - 560px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; margin-right: calc(var(--s4) * -1); padding-right: var(--s4); }
  .join-sale .join-scroll > * { grid-area: 1 / 1; min-width: 0; }
  .join-sale .join-scroll > [data-join-detail][hidden] { display: block !important; visibility: hidden; }
  /* At most five prices show at once; more scroll inside the list (member.js sets the height to the first five rows).
     Each row keeps its own height, its deal line included, however short the list is made. */
  /* The rail sits in the box's padding, a clear 16px from the rows. */
  .join-sale .join-box > .join-form > .join-price-list { flex: none; max-height: var(--join-four, 320px); overflow-y: auto; overscroll-behavior: contain; margin-right: calc(var(--s4) * -1); padding-right: var(--s4); }
  .join-sale .join-prices { grid-auto-rows: max-content; }
  .join-sale .join-submit { margin-top: var(--s5); }
  /* Both scroll areas keep a visible rail on the right, so more prices or words never hide behind macOS's
     scroll-to-reveal bars. Chrome and Safari draw the styled rail only without the standard properties, so those stay
     for Firefox alone. */
  .join-sale .join-scroll, .join-sale .join-box > .join-form > .join-price-list { scrollbar-width: auto; scrollbar-color: auto; }
  .join-sale .join-scroll::-webkit-scrollbar, .join-sale .join-price-list::-webkit-scrollbar { width: 6px; }
  .join-sale .join-scroll::-webkit-scrollbar-track, .join-sale .join-price-list::-webkit-scrollbar-track { background: var(--surface-3); border-radius: var(--r-pill); }
  .join-sale .join-scroll::-webkit-scrollbar-thumb, .join-sale .join-price-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill); }
  .join-sale .join-scroll::-webkit-scrollbar-thumb:hover, .join-sale .join-price-list::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
  @supports not selector(::-webkit-scrollbar) {
    .join-sale .join-scroll, .join-sale .join-box > .join-form > .join-price-list { scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--surface-3); }
  }
}
.join-sale-main { display: grid; gap: var(--s4); align-content: start; }
/* The photo at its own shape, never cropped, and the frame hugs it. Wide photos take the column; square and slightly tall
   ones stop at 480px tall. A much taller one (marked .tall by member.js) keeps 480px of width and scrolls in the frame. */
.join-media { justify-self: start; width: fit-content; max-width: 100%; max-height: 482px; border: 1px solid var(--border); border-radius: var(--r-dialog); overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; background: var(--surface-3); }
.join-media img { display: block; width: auto; height: auto; max-width: 100%; max-height: 480px; }
.join-media img.tall { width: 480px; max-height: none; }
.join-media img[hidden] { display: none; }
.join-sale-main > .video-frame, .join-sale-main > .join-media { margin-bottom: var(--s2); }
.join-sale .join-name { font-size: clamp(26px, 2.4vw, 36px); font-weight: 550; letter-spacing: -.03em; line-height: 1.1; }
.join-sale .join-hero .rating-link { margin-top: 0; }
.join-description { max-width: 70ch; color: var(--text-2); font-size: 16px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .public-main:has(.join-store) { width: min(100% - 32px, 640px); margin: 0 auto; padding: var(--s4) 0 var(--s7); }
  .public:has(.join-store) .public-top { padding-inline: var(--s4); }
  .public:has(.join-store) .public-foot { justify-content: center; padding-inline: var(--s4); }
  .join-welcome { flex-direction: column; align-items: flex-start; gap: var(--s4); }
  .join-welcome > .avatar { width: 72px; height: 72px; border-radius: 18px; font-size: 28px; }
  .join-sale .join-page { grid-template-columns: minmax(0, 1fr); }
  .join-sale .join-box { position: static; }
}
/* A membership's Video section: the video playing, where it lives, and replacing or removing it; or, without one, a drop
   area for a file beside a field for a link, with what each does in Discord. */
.m-video .video-frame { max-width: 720px; }
.m-video-meta { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); color: var(--text-3); font-size: var(--fs-sm); }
.m-video-meta svg { width: 14px; height: 14px; }
.m-video-meta a { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--text-2); text-decoration: none; }
.m-video-meta a:hover { color: var(--text-1); }
.m-video-replace { margin-top: var(--s4); }
.m-video-replace > summary { list-style: none; width: fit-content; }
.m-video-replace > summary::-webkit-details-marker { display: none; }
.m-video-replace[open] > summary { margin-bottom: var(--s4); }
.m-video-form { display: grid; gap: var(--s4); }
.m-video-preview { max-width: 520px; border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; background: #000000; }
.m-video-preview[hidden] { display: none; }
.m-video-preview video, .m-video-preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
/* The Video section takes the full width of the membership page, so the video plays large. */
/* Boxless, pass two. The rest of the dashboard follows the overview: sections are a heading and their content on the
   page itself, separated by space and hairlines, never a filled box with a border. True objects (membership cards, a
   member's pass, plan cards, menus and dialogs) keep their surfaces. */
.m-detail-chart #trend > .chart-panel, .m-detail-chart .chart-panel { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
/* A membership's price tiles take the full width of its page, so three or four sit side by side. */
.m-detail-side > .m-pricing-panel { grid-column: 1 / -1; }
/* Add a price sits a little in from the right edge of the page. */
.m-pricing-panel > .panel-head > .panel-actions { margin-right: var(--s4); }
/* The video plays at a comfortable size rather than the full width of a wide screen. */
.m-video .video-frame, .m-video .video-link { max-width: 760px; }

/* Smooth. Hovers ease in over 160ms instead of snapping, presses give a little, and what a summary opens arrives rather
   than appears. Nothing here moves for people who ask for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .nav a, .settings-nav a { transition: background var(--d2) var(--ease), color var(--d2) var(--ease), border-color var(--d2) var(--ease); }
  table.data tbody tr { transition: background var(--d2) var(--ease), border-color var(--d2) var(--ease); }
  .btn { transition: background var(--d2) var(--ease), border-color var(--d2) var(--ease), color var(--d2) var(--ease), transform var(--d1) var(--ease), box-shadow var(--d2) var(--ease); }
  .btn:active { transform: translateY(1px) scale(.985); }
  .page-body details[open] > :not(summary) { animation: details-in var(--d3) var(--ease-out); }
}
@keyframes details-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* A new membership's picture and video, stacked beside its description. The video picker matches the picture's. */
.create-row-2 .create-media { display: grid; align-content: start; gap: var(--s3); margin-top: 22px; }
.create-row-2 .create-media .photo-pick { margin-top: 0; }
.video-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3) var(--s4); align-items: center; padding: var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r-panel); background: var(--bg-sunken); }
.video-pick-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-control); background: var(--surface-3); color: var(--accent-text); }
.video-pick-mark svg { width: 20px; height: 20px; }
.video-pick .btn { cursor: pointer; }
.video-pick .btn:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.video-pick-link, .video-pick-preview { grid-column: 1 / -1; }
.video-pick-link input { width: 100%; border-color: var(--border); }
.video-pick-link input:hover { border-color: var(--border-strong); }
.video-pick-preview { max-width: 360px; }
@media (max-width: 900px) { .create-row-2 .create-media { margin-top: 0; } }
@media (max-width: 560px) { .video-pick { grid-template-columns: auto minmax(0, 1fr); } .video-pick .button-row { grid-column: 1 / -1; } }
/* A membership's video, added or replaced from one compact row: the upload button, and a link with its own Add. */
.m-video-form, .m-video-pick { max-width: 760px; }
/* The video link: one box, the field and its Add link inside it. Add link is quiet text that lights up once the field
   holds a real link (owner.js), and submits the form. */
.m-video-link-row { display: flex; grid-column: 1 / -1; align-items: center; gap: var(--s2); padding-right: var(--s2); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); transition: border-color var(--d1) var(--ease); }
.m-video-link-row:focus-within { border-color: var(--border-focus); }
.m-video-link-row input { flex: 1; min-width: 0; border: 0; background: none; box-shadow: none; }
.m-video-link-row input:focus, .m-video-link-row input:focus-visible { outline: none; box-shadow: none; }
.m-video-link-add { flex: none; padding: 4px var(--s2); border: 0; border-radius: var(--r-tag); background: none; color: var(--text-3); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: default; transition: color var(--d1) var(--ease); }
.m-video-link-add:not(:disabled) { color: var(--accent-text); cursor: pointer; }
.m-video-link-add:not(:disabled):hover { color: var(--text-1); }
.m-video-link-add:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.m-video-form.is-uploading .video-pick { opacity: .72; pointer-events: none; }
.m-video-replace > summary { margin-top: var(--s1); }
/* The line under a membership's video: its source on the left, then Open, Replace and Remove as quiet buttons. What
   Replace opens takes a full line underneath, inside the same width as the player. */
.m-video-meta { flex-wrap: wrap; gap: var(--s1) var(--s2); max-width: 760px; margin-top: var(--s2); }
.m-video-source { margin-right: auto; }
.m-video-meta .btn:not(.danger-quiet) { color: var(--text-2); }
.m-video-meta a.btn { margin-left: 0; }
.m-video-replace { display: contents; }
.m-video-replace > summary, .m-video-replace[open] > summary { margin: 0; }
.m-video-replace::details-content { order: 9; flex: 1 0 100%; }
.m-video-replace[open] > summary { color: var(--text-1); background: var(--hover); }
.m-video-meta .m-video-form { margin-top: var(--s2); }
/* Memberships sold's range: the dashboard's menu, sized to its words, opening from its right edge under the heading's end. */
.sold-menu > summary { min-width: 0; min-height: var(--control-sm); padding: 4px 8px 4px 10px; font-size: 12px; }
.sold-menu .select-menu-list { left: auto; right: 0; min-width: 168px; }
/* Under a membership's video, its photo sits beside its name. */
.join-sale-main .join-id .join-photo { width: 64px; height: 64px; border-radius: var(--r-dialog); }
/* A membership without a picture shows its first letter on its own colour, not a grey box. */
.join-card-media:has(.join-card-letter) { background: color-mix(in srgb, var(--m-accent, #6d3fe0) 38%, var(--surface-2)); }
.join-card-letter { padding: var(--s5); color: color-mix(in srgb, var(--m-accent, #6d3fe0) 25%, #ffffff); font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
/* The Creator dashboard's totals keep their cards: the open row under the chart belongs to a community's Dashboard. */
.analytics-row.aff-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: stretch; padding-block: var(--s6); }
.analytics-row.aff-row .panel { height: 100%; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
/* Referrals runs down the right beside Ready to pay and Earned all-time, so no card sits alone in a row. */
.analytics-row.aff-row > .sold-panel { grid-row: span 2; }
.analytics-row.aff-row .panel-head { align-items: flex-start; min-height: 0; padding: var(--s4) var(--s5) var(--s3); }
.analytics-row.aff-row .panel-head h2 { font-size: 13px; font-weight: 470; letter-spacing: -.012em; }
.analytics-row.aff-row .panel-body { padding: var(--s4) var(--s5) var(--s5); }
.analytics-row.aff-row .mrr-value, .analytics-row.aff-row .paid-value { font-size: 34px; font-weight: 500; }
@media (max-width: 900px) { .analytics-row.aff-row { grid-template-columns: minmax(0, 1fr); } .analytics-row.aff-row > .sold-panel { grid-row: auto; } .analytics-row.aff-row .mrr-value, .analytics-row.aff-row .paid-value { font-size: 28px; } }
/* A membership's page, below the chart: Pricing, Media, then Description beside Channels, then Members and Reviews.
   Each section is a heading with one line saying what it is for, and the sections stand apart by space alone. */
.app[data-section="memberships"] .m-detail-side { column-gap: var(--s9); row-gap: 56px; margin: var(--s8) 0 56px; }
.app[data-section="memberships"] .m-detail-side .panel > .panel-head { padding-bottom: var(--s5); }
.app[data-section="memberships"] .m-detail-side .panel-heading h2 { font-size: 17px; font-weight: 560; letter-spacing: -.02em; }
.app[data-section="memberships"] .m-detail-side .panel-heading p { margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); }
.app[data-section="memberships"] .m-detail-members { margin-top: 0; }
.app[data-section="memberships"] .m-detail-reviews { margin-top: 56px; }
.m-detail-side > .m-media { grid-column: 1 / -1; }
/* Media: the picture in a square on the left, the video beside it; both start on the same line, labelled alike. */
.m-media-grid { display: grid; grid-template-columns: 196px minmax(0, 640px); gap: var(--s9); align-items: start; }
.m-media-grid.picture-only { grid-template-columns: 196px; }
.m-media-cell { display: grid; align-content: start; gap: var(--s3); min-width: 0; }
.m-media-label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 550; }
.m-media-help { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.45; }
.m-media-picture { display: grid; gap: var(--s3); }
.m-media-picture .m-photo { width: 196px; height: 196px; border-radius: var(--r-dialog); font-size: 64px; box-shadow: inset 0 0 0 1px var(--border); }
.m-media-picture .m-photo img, .m-media-picture .m-photo canvas { width: 100%; height: 100%; object-fit: cover; }
.m-media-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.m-media-actions .btn { cursor: pointer; }
.m-media-actions label.btn:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.m-media-picture .m-photo-remove { position: static; opacity: 1; }
.m-media-picture .m-photo-remove[hidden] { display: none; }
.m-media-picture .m-photo-remove button { display: inline-flex; width: auto; height: auto; min-height: var(--control-sm); padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-control); background: none; }
/* No video yet: a frame the height of the picture with the upload in it, and the link field under it. */
.m-video-empty { display: grid; place-content: center; justify-items: center; gap: var(--s3); height: 196px; padding: var(--s5); border: 1px dashed var(--border-strong); border-radius: var(--r-dialog); background: var(--bg-sunken); text-align: center; transition: border-color var(--d2) var(--ease), background var(--d2) var(--ease); }
.m-video-empty:hover, .m-video-empty:focus-within { border-color: var(--accent); background: var(--surface-1); }
.m-video-empty-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--accent-surface); color: var(--accent-text); }
.m-video-empty-mark svg { width: 20px; height: 20px; }
.m-video-empty .btn, .m-video-replace-row .btn { cursor: pointer; }
.m-video-empty .btn:focus-within, .m-video-replace-row .btn:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.m-media .m-video-form { display: grid; gap: var(--s3); max-width: none; }
.m-media .m-video-form.is-uploading { opacity: .72; pointer-events: none; }
.m-media .m-video-preview { max-width: 360px; }
.m-media .video-frame, .m-media .video-link { max-width: none; border-radius: var(--r-dialog); }
.m-media .m-video-meta { max-width: none; }
.m-video-replace-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
@media (max-width: 760px) {
  .m-media-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s8); }
  .m-media-picture { grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
  .m-media-picture .m-photo { width: 112px; height: 112px; font-size: 40px; }
  .m-video-empty { height: auto; min-height: 168px; }
  .app[data-section="memberships"] .m-detail-side { row-gap: var(--s9); }
}
/* The picture frame opens the picker too; empty, it is dashed like the video's, and says so. */
.m-media-picture-frame { display: block; width: fit-content; border-radius: var(--r-dialog); cursor: pointer; }
.m-media-picture-frame:hover .m-photo { filter: brightness(.86); }
.m-media-picture:focus-within .m-media-picture-frame { outline: 2px solid var(--accent-text); outline-offset: 2px; }
html:not(.js) .m-media-picture-frame { pointer-events: none; }
.m-media-picture .m-photo:has(.m-photo-empty) { border: 1px dashed var(--border-strong); background: var(--bg-sunken); box-shadow: none; transition: border-color var(--d2) var(--ease), background var(--d2) var(--ease); }
.m-media-picture-frame:hover .m-photo:has(.m-photo-empty) { filter: none; border-color: var(--accent); background: var(--surface-1); }
.m-photo-empty { display: grid; justify-items: center; gap: var(--s2); color: var(--text-3); font-size: var(--fs-sm); font-weight: 450; letter-spacing: 0; }
.m-photo-empty svg { width: 22px; height: 22px; color: var(--accent-text); }
.m-video-empty { cursor: pointer; }
/* Members and Reviews head their sections like the ones above them. */
.app[data-section="memberships"] :is(.m-detail-members, .m-detail-reviews) .section-head h2 { font-size: 17px; font-weight: 560; letter-spacing: -.02em; }
/* A video's cover: on YouTube or Vimeo it stands in until pressed, with the play mark on it. */
.video-cover { cursor: pointer; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-cover-play { position: absolute; inset: 0; display: grid; place-items: center; width: 64px; height: 64px; margin: auto; border-radius: var(--r-pill); background: #0b0b10; color: #ffffff; transition: transform var(--d2) var(--ease); }
.video-cover-play svg { width: 26px; height: 26px; }
.video-cover:hover .video-cover-play, .video-cover:focus-visible .video-cover-play { transform: scale(1.06); }
/* The cover under a membership's video: a small 16:9 preview, what it is, and its buttons. */
.m-video-cover { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; margin-top: var(--s4); }
.m-video-cover-frame { position: relative; display: grid; place-items: center; width: 112px; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--accent-text); }
/* Pinned to the frame on every side, so the whole 16:9 frame is the picture (centre kept), never a strip of it. */
.m-video-cover-frame img, .m-video-cover-frame canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.m-video-cover-frame svg { width: 18px; height: 18px; }
.m-video-cover .m-media-actions form { display: contents; }
.m-video-cover label.btn, .video-pick-cover label.btn { cursor: pointer; }
.m-video-cover label.btn:focus-within, .video-pick-cover label.btn:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
/* The same on the Create form, one line under the video link. */
.video-pick-cover { display: grid; grid-column: 1 / -1; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; }
.video-pick-cover .m-video-cover-frame { width: 72px; }
@media (max-width: 560px) { .m-video-cover { grid-template-columns: 96px minmax(0, 1fr); } .m-video-cover-frame { width: 96px; } .m-video-cover .m-media-actions { grid-column: 1 / -1; } }

/* ---------- Phones and tablets ----------
   Controls are finger-sized on any touch screen or narrow window: every control reads these three sizes, so they move
   together. Under 16px a field makes an iPhone zoom the whole page when tapped. 100vh is the screen behind the address
   bar on a phone, so pages and tall dialogs measure the part you can see. */
@media (max-width: 900px), (pointer: coarse) { :root { --control-sm: 36px; --control: 40px; --control-lg: 44px; } }
@media (max-width: 900px) and (pointer: coarse) { input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea, .select-drop-button { font-size: 16px !important; } }
@supports (height: 100dvh) { body, .app, .main, .public { min-height: 100dvh; } dialog.aff-dialog { max-height: calc(100dvh - 48px); } }
.select-menu-list, .msg-tools-panel { max-width: calc(100vw - 16px); }
@media (max-width: 520px) { .home-latest-where > span + span { display: none; } .invite-bar { flex-wrap: wrap; } .invite-bar input { flex: 1 1 calc(100% - 32px); } .invite-bar .select-menu, .invite-bar details { flex: 1 1 auto; } .toolbar-group .search { flex-basis: 100%; } }
@media (pointer: coarse) {
  .msg-tabs a, .home-seg button { min-height: var(--control-sm); }
  .conn-id .btn-icon { width: 32px; height: 32px; min-height: 32px; }
  .m-photo-remove button::after { content: ""; position: absolute; inset: -8px; }
}

/* Description editing: a document-style toolbar over the page it edits, which grows with its content, then scrolls. */
.description-editor { min-width: 0; width: 100%; container-type: inline-size; }
.description-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 2px; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--r-control) var(--r-control) 0 0; padding: 4px; background: var(--surface-2); }
.dt-group { display: inline-flex; align-items: center; gap: 2px; padding-right: 4px; margin-right: 2px; border-right: 1px solid var(--border-subtle); }
.dt-group:last-child { border-right: 0; padding-right: 0; margin-right: 0; }
.description-toolbar button, .dt-color { display: inline-grid; place-items: center; width: auto; min-width: var(--control-sm); height: var(--control-sm); min-height: 0; padding: 0 5px; font-size: 13px; line-height: 1; color: var(--text-2); background: transparent; border: 0; border-radius: var(--r-tag); cursor: pointer; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.description-toolbar button:hover, .dt-color:hover { background: var(--hover); color: var(--text-1); }
.description-toolbar button:focus-visible, .dt-color:focus-within { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.description-toolbar button[aria-pressed="true"] { background: var(--surface-3); color: var(--text-1); }
.description-toolbar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.description-toolbar svg circle, .description-toolbar svg text { fill: currentColor; stroke: none; }
.description-toolbar svg text { font-size: 6px; font-weight: 700; font-family: inherit; }
.description-toolbar select { width: auto; min-width: 0; height: var(--control-sm); min-height: 0; padding: 0 22px 0 7px; font-size: 12px; color: var(--text-1); border-color: transparent; background-color: transparent; background-position: right 6px center; background-size: 10px 10px; cursor: pointer; }
.description-toolbar select:hover { background-color: var(--hover); }
.description-toolbar select[data-description-style] { width: 112px; }
.description-toolbar select[data-description-font] { width: 86px; }
.dt-size input { width: 34px; height: 22px; min-height: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-tag); background: transparent; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; color: var(--text-1); -moz-appearance: textfield; appearance: textfield; }
.dt-size input::-webkit-inner-spin-button, .dt-size input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dt-size button { min-width: 22px; padding: 0; font-size: 15px; }
.dt-color { position: relative; grid-template-rows: 1fr 3px; gap: 1px; padding: 3px 5px 4px; }
.dt-color .dt-a { font-size: 13px; font-weight: 600; color: var(--text-1); }
.dt-color svg { width: 14px; height: 14px; }
.dt-color i { display: block; width: 14px; height: 3px; border-radius: 1px; }
.dt-color input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.description-editable { min-height: 120px; max-height: 420px; overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; border: 1px solid var(--border); border-radius: 0 0 var(--r-control) var(--r-control); background: var(--surface-1); padding: 12px 14px; font-size: 14px; line-height: 1.55; color: var(--text-1); }
.description-editable [style*="background-color"] { color: #111111; }
.description-editable b, .description-editable strong { font-weight: 700; }
.description-editable:focus { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.description-editable [data-size="small"] { font-size: 12px; }
.description-editable [data-size="normal"] { font-size: 14px; }
.description-editable [data-size="large"] { font-size: 18px; }
.description-editable [data-size="heading"] { font-size: 22px; }
.description-editable ul { list-style: disc; }
.description-editable ol { list-style: decimal; }
.description-editable li { display: list-item; }
.description-editable ul, .description-editable ol { padding-left: 22px; margin: 2px 0; }
.description-line { min-height: 1.5em; white-space: pre-wrap; overflow-wrap: anywhere; }
.description-editor [hidden] { display: none !important; }
.description-editor textarea { min-height: 120px; max-height: 420px; }
/* In a narrow box (a price tile) the toolbar keeps to two rows: style and font, then the marks. Text style still sets the size. */
@container (max-width: 380px) {
  .description-toolbar { gap: 2px 0; }
  .dt-group { gap: 0; padding-right: 0; margin-right: 0; border-right: 0; }
  .dt-size { display: none; }
  .description-toolbar button, .dt-color { min-width: 23px; padding: 0 4px; }
  .description-toolbar select[data-description-style] { width: 106px; }
  .description-toolbar select[data-description-font] { width: 84px; }
}
.trial-duration { display: flex; gap: 8px; }
.trial-duration input { min-width: 0; flex: 1; }
.trial-duration select { width: 110px; flex: 0 0 110px; }

/* Revenue sharing is drawn with the dashboard's own panels, tables, badges and connection card; these rules only lay
   out what is particular to a split: the share bar, the person cell and the editor rows. */
.rs-notice:empty { display: none; }
.rs-notice.callout { display: block; }
/* The owner view has no boxes: the current split large on the left, the proposed one quieter on the right. The bar is
   the split itself, white then purple (then blue and light purple for a third and fourth person), with no gaps. */
.rs-board { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: var(--s8); align-items: start; }
.rs-current, .rs-proposed { display: grid; gap: var(--s4); min-width: 0; }
.rs-proposed { padding-left: var(--s8); border-left: 1px solid var(--border-subtle); }
.rs-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.rs-head-text { display: grid; gap: 3px; min-width: 0; }
.rs-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); font-size: var(--fs-md); font-weight: 470; }
.rs-head h2 { font-size: var(--fs-xl); letter-spacing: -.02em; }
.rs-head-aside { padding-top: 4px; }
.rs-meter { display: flex; overflow: hidden; }
.rs-meter-lg { height: 44px; border-radius: var(--r-panel); }
.rs-meter-sm { height: 10px; border-radius: var(--r-pill); }
/* No split yet: a hairline where the bar goes, and dashes in place of the numbers. */
.rs-line { height: 2px; margin: 21px 0; border-radius: var(--r-pill); background: var(--border-strong); }
.rs-dashes { display: flex; justify-content: space-between; }
.rs-dashes .rs-end { justify-items: end; text-align: right; }
.rs-none { color: var(--text-3); }
.rs-slice { min-width: 3px; }
.rs-slice-0 { background: var(--text-1); } .rs-slice-1 { background: var(--accent); }
.rs-slice-2 { background: var(--sky); } .rs-slice-3 { background: var(--accent-text); }
.rs-legend { display: flex; }
.rs-legend-item { display: grid; flex: 1 1 0; align-content: start; gap: var(--s1); min-width: 130px; padding-right: var(--s3); }
.rs-legend-item:last-child:not(:first-child) { justify-items: end; padding-right: 0; text-align: right; }
.rs-legend-who { display: flex; align-items: center; gap: var(--s2); min-width: 0; color: var(--text-2); font-size: var(--fs-sm); }
.rs-legend-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-legend-share { font-size: 28px; font-weight: 470; letter-spacing: -.035em; line-height: 1.1; }
.rs-key { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.rs-people { display: grid; }
.rs-people li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); min-height: 40px; border-top: 1px solid var(--border-subtle); font-size: var(--fs-sm); }
.rs-people li:last-child { border-bottom: 1px solid var(--border-subtle); }
.rs-people-name { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.rs-people-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.rs-icon { display: inline-flex; }
.rs-icon svg { width: 14px; height: 14px; }
.rs-past li { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 1000px) {
  .rs-board { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .rs-proposed { padding: var(--s6) 0 0; border-left: 0; border-top: 1px solid var(--border-subtle); }
}
.rs-editor { display: grid; gap: var(--s3); }
.rs-rows { display: grid; gap: var(--s2); }
.rs-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 80px; align-items: center; gap: var(--s2); }
.rs-row-head .label { color: var(--text-3); font-size: var(--fs-xs); }
.rs-row select:disabled { color: var(--text-2); opacity: 1; }
.rs-no-admins { display: grid; justify-items: start; gap: var(--s3); }
.rs-row > .badge, .rs-row > .btn { justify-self: start; }
.rs-percent { position: relative; display: block; }
.rs-percent input { padding-right: 26px; }
.rs-percent span { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); font-size: var(--fs-sm); pointer-events: none; }
.rs-editor-total { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.rs-editor-actions { justify-content: flex-end; }
.rs-archive > .rs-people { margin-top: var(--s2); }
.rs .team-row { padding: var(--s3) var(--s5); }
.rs .empty.compact { padding: var(--s5); }
@media (max-width: 700px) {
  .rs-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .rs-row > .badge, .rs-row > .btn { grid-column: 1 / -1; }
  .rs-row-head > span:last-child { display: none; }
}

.revenue-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7); align-items: start; }
@media (max-width: 600px) { .revenue-pair { grid-template-columns: 1fr; gap: var(--s6); } }

/* ── Owner: every course ──
 * Cover-first cards for true objects (courses): the cover leads, the state sits on it as an opaque chip, then the name,
 * two lines of description and one meta line. The whole card opens the course and lifts a little on hover. A course
 * without a picture gets a cover drawn from its own name on Lance's lean, never an empty grey box. */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--s6) var(--s5); }
.cs-card { position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; border: 1px solid var(--border-subtle); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; transition: border-color var(--d2) var(--ease), transform var(--d2) var(--ease), box-shadow var(--d2) var(--ease); }
.cs-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cs-card-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); text-decoration: none; overflow: hidden; }
.cs-card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--d4) var(--ease); }
.cs-card:hover .cs-card-cover img, .cs-card:hover .cs-title-cover-text { transform: scale(1.03); }
.cs-chip { position: absolute; top: var(--s3); right: var(--s3); z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-1); color: var(--text-1); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.cs-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.cs-chip.published i { background: var(--ok); }
.cs-card-body { display: grid; align-content: start; gap: 6px; padding: var(--s4) var(--s5) var(--s4); min-width: 0; }
.cs-card-body h2 { min-width: 0; font-size: var(--fs-lg); font-weight: 560; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.cs-card-open { color: inherit; text-decoration: none; }
.cs-card-open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cs-card-text { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2); font-size: var(--fs-sm); white-space: pre-line; }
.cs-card-meta { position: relative; z-index: 2; display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border-subtle); font-size: var(--fs-xs); }
.cs-card-tiers { display: flex; flex: 1; flex-wrap: wrap; gap: 4px var(--s3); min-width: 0; }
.cs-card-facts { color: var(--text-3); white-space: nowrap; }
.cs-card-meta .btn { margin: -4px -6px -4px 0; }
.cs-tier { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
/* The cover drawn from a course's name */
.cs-title-cover { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: var(--s5); background: var(--surface-2); overflow: hidden; }
.cs-card.live .cs-title-cover, .cs-head-cover .cs-title-cover { background: var(--accent-surface); }
.cs-title-cover-lean, .cs-title-cover::after { content: ""; position: absolute; top: -20%; bottom: -20%; background: var(--surface-3); transform: skewX(var(--skew)); }
.cs-title-cover-lean { right: 16%; width: 20%; }
.cs-title-cover::after { right: calc(16% - 34px); width: 12px; }
.cs-card.live .cs-title-cover-lean, .cs-card.live .cs-title-cover::after, .cs-head-cover .cs-title-cover-lean, .cs-head-cover .cs-title-cover::after { background: #2c1d66; }
.cs-title-cover-text { position: relative; z-index: 1; display: -webkit-box; max-width: 78%; overflow: hidden; color: var(--text-1); font-size: 26px; font-weight: 650; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; -webkit-line-clamp: 3; -webkit-box-orient: vertical; transform-origin: left bottom; transition: transform var(--d4) var(--ease); }
/* The New course tile ends the grid */
.cs-card-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 280px; padding: var(--s6); border: 1px dashed var(--border-strong); background: var(--bg); color: var(--text-2); font: inherit; text-align: center; cursor: pointer; }
.cs-card-new:hover { border-color: var(--accent); background: var(--surface-1); color: var(--text-1); transform: none; box-shadow: none; }
.cs-card-new:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.cs-card-new-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--s2); border: 1px solid var(--accent-line); border-radius: 50%; color: var(--accent-text); transition: border-color var(--d2) var(--ease); }
.cs-card-new:hover .cs-card-new-mark { border-color: var(--accent); }
.cs-card-new-mark .icon { width: 18px; height: 18px; }
.cs-card-new strong { color: var(--text-1); font-size: var(--fs-md); font-weight: 560; }
.cs-card-new > span:last-child { max-width: 220px; color: var(--text-3); font-size: var(--fs-xs); }
/* No courses yet: a sample card drawn the way theirs will look, beside what a course is and the one way to start */
.cs-empty { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 560px); gap: var(--s8); align-items: center; justify-content: center; padding: var(--s8) 0; }
.cs-empty-art { position: relative; }
.cs-ghost { display: grid; border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; transform: rotate(-2deg); box-shadow: var(--shadow-2); }
.cs-ghost .cs-title-cover { position: relative; inset: auto; aspect-ratio: 16 / 9; background: var(--accent-surface); }
.cs-ghost .cs-title-cover-lean, .cs-ghost .cs-title-cover::after { background: #2c1d66; }
.cs-ghost-body { display: grid; gap: 8px; padding: var(--s4) var(--s5) var(--s5); }
.cs-ghost-body i { display: block; height: 8px; border-radius: var(--r-pill); background: var(--surface-3); }
.cs-ghost-body i:first-child { width: 62%; height: 10px; background: var(--border-strong); }
.cs-ghost-body i:last-child { width: 38%; }
.cs-empty-copy { display: grid; justify-items: start; gap: var(--s4); }
.cs-empty-copy h2 { margin: 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
.cs-empty-copy > p { margin: 0; max-width: 52ch; }
.cs-empty-points { display: grid; gap: var(--s3); width: 100%; margin: var(--s3) 0 0; padding: var(--s4) 0 0; border-top: 1px solid var(--border-subtle); list-style: none; }
.cs-empty-points li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s3); padding: 0; color: var(--text-2); font-size: var(--fs-sm); }
.cs-empty-points svg { width: 16px; height: 16px; margin-top: 1px; color: var(--accent-text); }
.cs-empty-points strong { display: block; margin-bottom: 2px; color: var(--text-1); font-weight: 520; }
@media (max-width: 860px) { .cs-empty { grid-template-columns: minmax(0, 1fr); gap: var(--s6); padding-top: var(--s5); } .cs-empty-art { max-width: 320px; } }

/* ── Dialogs: new course, confirm ── */
dialog.cs-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface-2); }
.cs-dialog-form { display: grid; gap: var(--s5); padding: var(--s6); }
.cs-dialog-head h2 { font-size: var(--fs-lg); font-weight: 540; letter-spacing: -.01em; }
.cs-dialog-head p { margin-top: 6px; color: var(--text-2); font-size: var(--fs-sm); }
.cs-dialog-foot { display: flex; justify-content: flex-end; gap: var(--s2); padding-top: var(--s1); }
.cs-form-error { font-size: var(--fs-sm); }

/* ── Picking memberships ── */
.cs-tiers { display: grid; gap: var(--s2); min-width: 0; margin: 0; padding: 0; border: 0; }
.cs-tiers .help { margin-top: -2px; }
.cs-tier-list { display: grid; gap: var(--s1); }
.cs-tier-option { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: var(--control-lg); padding: 6px var(--s3); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-1); font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--d1) var(--ease), background var(--d1) var(--ease); }
.cs-tier-option:hover { border-color: var(--border-strong); }
.cs-tier-option:has(input:checked) { border-color: var(--accent-line); background: var(--accent-surface); }
.cs-tier-option:has(input:disabled) { cursor: default; opacity: .6; }
.cs-tier-option:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.cs-tier-option input { position: absolute; opacity: 0; pointer-events: none; }
.cs-tier-box { display: grid; place-items: center; flex: none; width: 16px; height: 16px; border: 1.5px solid var(--border-control); border-radius: var(--r-tag); color: transparent; transition: background var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.cs-tier-box svg { width: 11px; height: 11px; stroke-width: 3; }
.cs-tier-option input:checked + .cs-tier-box { border-color: var(--accent); background: var(--accent); color: #fff; }
.cs-tiers.invalid .cs-tier-option { border-color: var(--bad-line); }
.cs-tier-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Owner: one course ── */
.course-studio { position: relative; }
.cs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); margin-bottom: var(--s6); padding-bottom: var(--s4); border-bottom: 1px solid var(--border); }
.cs-head-eyebrow { color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.cs-head h1 { margin-top: 2px; font-size: var(--fs-xl); font-weight: 470; line-height: var(--lh-tight); letter-spacing: -.03em; overflow-wrap: anywhere; text-wrap: balance; }
.cs-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s2); font-size: var(--fs-sm); }
.cs-head .page-actions { display: flex; align-items: center; gap: var(--s2); }
.cs-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); gap: var(--s7); align-items: start; }
@media (max-width: 1100px) { .cs-layout { grid-template-columns: minmax(0, 1fr); } }
.cs-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s3); }
.cs-block-head h2 { font-size: var(--fs-lg); font-weight: 520; }
@media (hover: none) { .cs-block-head p { display: none; } }
.cs-block-head p { margin-top: 2px; font-size: var(--fs-sm); }
.cs-sections, .cs-lessons, .cs-subsections { margin: 0; padding: 0; list-style: none; }
.cs-sections { display: grid; gap: var(--s4); }
.cs-section { border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.cs-section-bar { display: flex; align-items: center; gap: var(--s2); min-height: 46px; padding: var(--s1) var(--s2) var(--s1) var(--s3); border-bottom: 1px solid var(--border-subtle); background: var(--surface-2); border-radius: var(--r-panel) var(--r-panel) 0 0; }
.cs-section-mark { display: grid; place-items: center; flex: none; color: var(--text-3); }
.cs-section-mark svg { width: 16px; height: 16px; }
.cs-sub-bar { min-height: 40px; padding-left: var(--s6); border-top: 1px solid var(--border-subtle); background: var(--surface-1); border-radius: 0; }
.cs-subsection .cs-lessons { padding-left: var(--s4); }
input.cs-input { flex: 1; min-width: 0; min-height: var(--control); padding: 4px 8px; border-color: transparent; background: transparent; color: var(--text-1); font-size: var(--fs-base); }
input.cs-input:hover { border-color: var(--border); }
input.cs-input:focus-visible { border-color: var(--border-focus); background: var(--bg-sunken); }
input.cs-input:placeholder-shown { border-color: var(--border); }
input.cs-input[aria-invalid="true"] { border-color: var(--bad); }
input.cs-section-title { font-size: var(--fs-md); font-weight: 560; }
input.cs-sub-title { color: var(--text-2); font-weight: 520; }
.cs-lesson { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s2); min-height: 48px; padding: var(--s1) var(--s2) var(--s1) var(--s4); border-top: 1px solid var(--border-subtle); transition: background var(--d1) var(--ease); }
.cs-lessons > .cs-lesson:first-child { border-top: 0; }
.cs-lesson:hover { background: var(--surface-2); }
.cs-lesson.drop { background: var(--accent-surface); box-shadow: inset 0 0 0 1px var(--accent-line); }
.cs-lesson.moved { animation: cs-moved var(--d4) var(--ease); }
@keyframes cs-moved { from { background: var(--accent-surface); } to { background: transparent; } }
.cs-lesson-num { color: var(--text-3); font-size: var(--fs-xs); text-align: center; }
.cs-video { display: flex; align-items: center; justify-content: flex-end; gap: var(--s3); min-width: 0; }
.cs-video-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.cs-video-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cs-video-state.ok { color: var(--text-2); }
.cs-video-state.ok i { background: var(--ok); }
.cs-video-state.busy { color: var(--text-2); }
.cs-video-state.busy i { background: var(--accent-bright); animation: pulse 1.4s var(--ease) infinite; }
.cs-video-state.bad { color: var(--bad); }
.cs-video-state.warn { color: var(--warn); }
.cs-video-length { color: var(--text-2); font-size: var(--fs-xs); }
.cs-progress { position: relative; width: 112px; height: 4px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.cs-progress i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--accent-bright); transition: width var(--d3) var(--ease); }
.cs-upload { cursor: pointer; }
.cs-upload:focus-within { outline: 2px solid var(--border-focus); outline-offset: 1px; }
/* With subsections, lessons are added inside them; one Add lesson per group. */
.cs-section:has(> .cs-section-body > [data-subsections] > li) > .cs-section-body > .cs-add-row { display: none; }
.cs-add-row { display: flex; flex-wrap: wrap; gap: var(--s1); padding: var(--s1) var(--s3); border-top: 1px solid var(--border-subtle); }
.cs-add-section { margin-top: var(--s4); }
.cs-curriculum-empty { border: 1px dashed var(--border-strong); border-radius: var(--r-panel); }
.cs-menu { position: relative; }
.cs-menu > summary { list-style: none; }
.cs-menu > summary::-webkit-details-marker { display: none; }
.cs-menu-list { left: auto; right: 0; width: max-content; min-width: 176px; }
.cs-menu-list button, .cs-menu-list label { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: var(--control); padding: 5px 8px; border: 0; border-radius: var(--r-control); background: none; color: var(--text-1); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; }
.cs-menu-list button:hover, .cs-menu-list label:hover, .cs-menu-list button:focus-visible { background: var(--hover); }
.cs-menu-list button:disabled { color: var(--text-3); cursor: default; background: none; }
.cs-menu-list .danger { color: var(--bad); }
.cs-menu-preview { display: none !important; }
@media (max-width: 640px) { .cs-menu-preview { display: flex !important; } }
.cs-menu-list svg { width: 16px; height: 16px; color: var(--text-3); }
.cs-menu-list .danger svg { color: var(--bad); }
.cs-menu-list .cs-up { transform: rotate(180deg); }
.cs-head-menu .cs-menu-list { top: calc(100% + 6px); }
.cs-side { position: sticky; top: calc(var(--appbar) + var(--s5)); display: grid; gap: var(--s4); }
@media (max-width: 1100px) { .cs-side { position: static; } }
.cs-side-block { display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.cs-side-block h2 { font-size: var(--fs-base); font-weight: 560; }
.cs-side-block textarea { min-height: 112px; }
.cs-checks { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--text-2); }
.cs-checks li { display: flex; align-items: center; gap: var(--s3); }
.cs-check-mark { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border: 1.5px solid var(--border-control); border-radius: 50%; color: transparent; transition: background var(--d2) var(--ease), border-color var(--d2) var(--ease); }
.cs-check-mark svg { width: 11px; height: 11px; stroke-width: 3; }
.cs-checks li.done { color: var(--text-1); }
.cs-checks li.done .cs-check-mark { border-color: var(--ok); background: var(--ok); color: var(--ok-surface); }
.cs-share { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.cs-share-url { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--bg-sunken); color: var(--text-2); font-family: var(--mono); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-savebar { position: sticky; bottom: var(--s5); z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); width: min(560px, 100%); margin: var(--s6) auto 0; padding: var(--s2) var(--s2) var(--s2) var(--s5); border: 1px solid var(--border-strong); border-radius: var(--r-dialog); background: var(--surface-3); box-shadow: var(--shadow-2); animation: cs-bar-in var(--d3) var(--ease-out); }
.cs-savebar[hidden] { display: none; }
.cs-savebar[data-tone="bad"] { border-color: var(--bad-line); }
.cs-save-text { min-width: 0; font-size: var(--fs-sm); color: var(--text-2); }
.cs-savebar[data-tone="bad"] .cs-save-text { color: var(--text-1); }
.cs-save-actions { display: flex; flex: none; gap: var(--s1); }
@keyframes cs-bar-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.course-studio[data-state="published"] .cs-add-row { display: none; }
/* Setup steps: what a draft needs before members can watch, as one strip */
.cs-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 var(--s6); padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); overflow: hidden; }
.cs-steps li + li { border-left: 1px solid var(--border-subtle); }
.cs-step { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 60px; padding: var(--s3) var(--s5); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--d1) var(--ease); }
.cs-step:hover { background: var(--surface-2); }
.cs-step:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.cs-step-mark { position: relative; display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1.5px solid var(--border-control); border-radius: 50%; color: var(--text-3); font-size: var(--fs-xs); font-weight: 560; transition: background var(--d2) var(--ease), border-color var(--d2) var(--ease); }
.cs-step-mark svg { position: absolute; width: 12px; height: 12px; stroke-width: 3; opacity: 0; }
.cs-step-text { display: grid; min-width: 0; }
.cs-step-text strong { font-size: var(--fs-sm); font-weight: 540; }
.cs-step-text span { overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.cs-steps li.next .cs-step-mark { border-color: var(--accent-bright); color: var(--accent-text); }
.cs-steps li.next .cs-step-text span { color: var(--text-2); }
.cs-steps li.done .cs-step-mark { border-color: var(--ok); background: var(--ok); color: var(--ok-surface); }
.cs-steps li.done .cs-step-mark span { opacity: 0; }
.cs-steps li.done .cs-step-mark svg { opacity: 1; }
.cs-steps li.done .cs-step-text strong { color: var(--text-2); }
@media (max-width: 760px) { .cs-steps { grid-template-columns: minmax(0, 1fr); } .cs-steps li + li { border-left: 0; border-top: 1px solid var(--border-subtle); } .cs-step { min-height: 52px; } }

/* Sections fold to one line that says what they hold */
.cs-fold { display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-left: -4px; border: 0; border-radius: var(--r-control); background: none; color: var(--text-3); cursor: pointer; }
.cs-fold:hover { background: var(--hover); color: var(--text-1); }
.cs-fold svg { width: 15px; height: 15px; transition: transform var(--d2) var(--ease); }
.cs-fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.cs-section.folded > .cs-section-body, .cs-subsection.folded > .cs-section-body { display: none; }
.cs-section.folded > .cs-section-bar { border-bottom: 0; border-radius: var(--r-panel); }
.cs-section-meta { flex: none; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.cs-add { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-sm); padding: 3px 8px; border: 0; border-radius: var(--r-control); background: none; color: var(--text-3); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.cs-add:hover { background: var(--hover); color: var(--text-1); }
.cs-add:disabled { opacity: .5; cursor: default; background: none; }
.cs-add svg { width: 14px; height: 14px; }
.cs-add.cs-add-section { justify-content: center; width: 100%; min-height: var(--control-lg); margin-top: var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r-panel); font-size: var(--fs-sm); }
.cs-add.cs-add-section:hover { border-color: var(--text-3); background: var(--surface-1); }
.cs-quiet { margin-top: var(--s4); color: var(--text-3); font-size: var(--fs-xs); }

/* Lesson rows: ready shows its length; Preview and ⋯ come forward on hover */
.cs-lesson .cs-preview, .cs-lesson .cs-menu > summary { opacity: 0; transition: opacity var(--d1) var(--ease); }
.cs-lesson:hover .cs-preview, .cs-lesson:focus-within .cs-preview, .cs-lesson:hover .cs-menu > summary, .cs-lesson:focus-within .cs-menu > summary, .cs-lesson .cs-menu[open] > summary { opacity: 1; }
@media (hover: none) { .cs-lesson .cs-preview, .cs-lesson .cs-menu > summary { opacity: 1; } }
.cs-lesson .cs-video-length { min-width: 44px; color: var(--text-2); text-align: right; }
.cs-preview svg { width: 13px; height: 13px; }
.cs-upload { min-height: var(--control-sm); padding: 3px 9px; font-size: var(--fs-xs); }
.cs-upload svg { width: 13px; height: 13px; }

/* One settings card: each setting folded to its value */
.cs-settings { border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); overflow: hidden; }
.cs-group + .cs-group { border-top: 1px solid var(--border-subtle); }
.cs-group > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--s3); padding: var(--s4) var(--s5); list-style: none; cursor: pointer; transition: background var(--d1) var(--ease); }
.cs-group > summary::-webkit-details-marker { display: none; }
.cs-group > summary:hover { background: var(--surface-2); }
.cs-group > summary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.cs-group-label { grid-column: 1; font-size: var(--fs-sm); font-weight: 560; }
.cs-group-value { grid-column: 1; overflow: hidden; margin-top: 2px; color: var(--text-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.cs-group-value.warn { color: var(--warn); }
.cs-group-chevron { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 15px; height: 15px; color: var(--text-3); transition: transform var(--d2) var(--ease); }
.cs-group[open] .cs-group-chevron { transform: rotate(180deg); }
.cs-group[open] .cs-group-value { display: none; }
.cs-group-body { display: grid; gap: var(--s4); padding: 0 var(--s5) var(--s5); }
.cs-group-body .cs-tiers > legend { display: none; }
.cs-group-body .cs-tiers .help { margin-top: 0; }
.cs-group-body textarea { min-height: 104px; }
.cs-head h1 { margin-top: 0; }

/* Cover picture */
.cs-card-cover.has-cover::before, .cs-card-cover.has-cover::after { display: none; }
.cs-card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-card-cover.has-cover .cs-cover-count { padding: 2px 7px; border-radius: var(--r-tag); background: var(--surface-1); color: var(--text-1); }
.cs-cover-edit { display: grid; gap: var(--s3); }
.cs-cover-frame { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border: 1px dashed var(--border-strong); border-radius: var(--r-panel); background: var(--surface-2); overflow: hidden; cursor: pointer; transition: border-color var(--d1) var(--ease); }
.cs-cover-frame:hover { border-color: var(--text-3); }
.cs-cover-frame:focus-within { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.cs-cover-edit.has-cover .cs-cover-frame { border-style: solid; border-color: var(--border); }
.cs-cover-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-cover-frame img[hidden] { display: none; }
.cs-cover-empty { display: grid; justify-items: center; gap: 2px; padding: var(--s4); color: var(--text-3); font-size: var(--fs-xs); text-align: center; }
.cs-cover-empty svg { width: 20px; height: 20px; margin-bottom: 4px; color: var(--accent-text); }
.cs-cover-empty strong { color: var(--text-1); font-size: var(--fs-sm); font-weight: 540; }
.cs-cover-edit.has-cover .cs-cover-empty { display: none; }
.cs-cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.cs-group-value:has(.cs-group-thumb) { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.cs-group-thumb { width: 40px; height: 22px; border-radius: var(--r-tag); object-fit: cover; }
.cw-cover.has-poster .cw-play { box-shadow: var(--shadow-2); }
.cw-course-thumb { width: 64px; height: 36px; border: 1px solid var(--border); border-radius: var(--r-tag); object-fit: cover; }
.cw-course-rows a:has(.cw-course-thumb) { grid-template-columns: 64px minmax(0, 1fr) auto; }

.course-studio.archived .cs-curriculum, .course-studio.archived .cs-side { opacity: .7; pointer-events: none; }
.course-studio.archived .cs-add-row, .course-studio.archived .cs-menu, .course-studio.archived .cs-upload, .course-studio.archived .cs-cover-actions, .course-studio.archived .cs-cover-edit .help, .course-studio.archived .cs-preview { display: none; }
.course-studio.archived input.cs-input { border-color: transparent; }
@media (max-width: 640px) {
  .cs-lesson { row-gap: 2px; }
  .cs-lesson .cs-video .cs-preview { display: none; }
  .cs-lesson { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; padding-top: 6px; padding-bottom: var(--s2); }
  .cs-lesson .cs-lesson-num { padding-top: 8px; }
  .cs-lesson .cs-video { grid-column: 2; grid-row: 2; justify-content: flex-start; min-height: 20px; padding-left: 9px; }
  .cs-lesson .cs-video[data-state="ready"] .cs-video-length { min-width: 0; text-align: left; color: var(--text-3); }
  .cs-lesson .cs-menu { grid-column: 3; grid-row: 1; }
  .cs-section-bar { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .cs-section-bar .cs-section-meta { grid-column: 2; grid-row: 2; padding-left: 9px; }
  .cs-section-bar .cs-menu { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .cs-savebar { padding-left: var(--s4); }
}

/* ── Preview player dialog ── */
dialog.cs-player-dialog { width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--surface-1); overflow: hidden; }
.cs-player-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s5); border-bottom: 1px solid var(--border); }
.cs-player-top p { display: flex; align-items: center; gap: var(--s3); min-width: 0; font-size: var(--fs-sm); }
.cs-player-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 520; }
.cs-player-tag { flex: none; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: var(--r-tag); color: var(--text-2); font-size: var(--fs-xs); }
dialog.cs-player-dialog .cw-player { border: 0; border-radius: 0; }

/* ── The player ── */
.cw-player { position: relative; aspect-ratio: 16 / 9; width: 100%; border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--bg-sunken); overflow: hidden; isolation: isolate; }
.cw-player video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--bg-sunken); }
.cw-cover { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: var(--surface-1) center / cover no-repeat; }
.cw-player:not([data-status="idle"]) .cw-cover { display: none; }
.cw-cover-note { position: absolute; right: var(--s4); bottom: var(--s4); padding: 3px 8px; border: 1px solid var(--border-strong); border-radius: var(--r-tag); background: var(--surface-2); color: var(--text-1); font-size: var(--fs-xs); }
.cw-cover-note:empty { display: none; }
.cw-play { display: grid; place-items: center; width: 68px; height: 68px; border: 0; border-radius: 50%; background: var(--accent-fill); color: #fff; cursor: pointer; transition: transform var(--d2) var(--ease), background var(--d1) var(--ease); }
.cw-play:hover { background: var(--accent-hover); transform: scale(1.05); }
.cw-play:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }
.cw-play svg { width: 26px; height: 26px; margin-left: 3px; fill: currentColor; }
.cw-watermark { position: absolute; z-index: 2; top: 12%; left: 8%; color: var(--text-1); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; opacity: .38; pointer-events: none; user-select: none; white-space: nowrap; transition: top 1.6s var(--ease), left 1.6s var(--ease); }
.cw-player[data-status="idle"] .cw-watermark, .cw-player[data-status="error"] .cw-watermark { display: none; }
.cw-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; }
.cw-loading[hidden] { display: none; }
.cw-spinner { width: 34px; height: 34px; border: 3px solid var(--border-strong); border-top-color: var(--accent-bright); border-radius: 50%; animation: spin .8s linear infinite; }
.cw-message { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: var(--s2); padding: var(--s6); background: var(--surface-1); text-align: center; }
.cw-message[hidden] { display: none; }
.cw-message strong { font-size: var(--fs-lg); font-weight: 540; }
.cw-message span { max-width: 420px; color: var(--text-2); font-size: var(--fs-sm); }
.cw-message .btn { margin-top: var(--s2); }
.cw-message-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--s1); border: 1.5px solid var(--border-strong); border-radius: 50%; color: var(--text-2); }
.cw-message-mark svg { width: 18px; height: 18px; }
.cw-player-empty .cw-message { position: static; height: 100%; }
@media (prefers-reduced-motion: reduce) { .cw-watermark { transition: none; } .cw-play { transition: none; } .cs-savebar { animation: none; } }

/* ── Members: watching a course ── */
.public-main:has(.course-watch) { width: 100%; margin: 0; padding: var(--s6) clamp(16px, 6vw, 112px) var(--s8); }
.course-watch { display: grid; gap: var(--s4); }
.course-watch > .join-back { justify-self: start; }
.cw-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: var(--s7); align-items: start; }
@media (max-width: 1000px) { .cw-layout { grid-template-columns: minmax(0, 1fr); } }
.cw-stage { display: grid; gap: var(--s5); min-width: 0; }
.cw-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); }
.cw-now-eyebrow { color: var(--text-3); font-size: var(--fs-sm); }
.cw-now-title { margin-top: 2px; font-size: var(--fs-2xl); font-weight: 520; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
.cw-now-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cw-now-actions .btn { min-height: var(--control-lg); }
.cw-now-actions [aria-pressed="true"] { border-color: var(--ok-line); color: var(--ok); }
.cw-about { padding-top: var(--s5); border-top: 1px solid var(--border); }
.cw-about-eyebrow { color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.cw-about h1 { margin-top: 4px; font-size: var(--fs-xl); font-weight: 520; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cw-about-meta { margin-top: 2px; font-size: var(--fs-sm); }
.cw-about-text { max-width: 68ch; margin-top: var(--s4); color: var(--text-2); font-size: var(--fs-md); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.cw-outline { position: sticky; top: var(--s5); display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100dvh - 2 * var(--s5)); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); overflow: hidden; }
@media (max-width: 1000px) { .cw-outline { position: static; max-height: none; } }
.cw-outline-head { display: grid; gap: var(--s2); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.cw-outline-head h2 { font-size: var(--fs-base); font-weight: 560; }
.cw-progress-words { color: var(--text-2); font-size: var(--fs-sm); }
.cw-progress { height: 4px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.cw-progress i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width var(--d4) var(--ease); }
.cw-outline-list, .cw-lessons { margin: 0; padding: 0; list-style: none; }
.cw-outline-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; padding-bottom: var(--s2); }
.cw-outline-block + .cw-outline-block { border-top: 1px solid var(--border-subtle); }
.cw-outline-section { padding: var(--s4) var(--s5) var(--s1); color: var(--text-1); font-size: var(--fs-sm); font-weight: 560; }
.cw-outline-sub { padding: var(--s3) var(--s5) var(--s1) 50px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
.cw-lesson { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); min-height: 40px; padding: 7px var(--s5); color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.cw-lesson:hover { background: var(--hover); color: var(--text-1); }
.cw-lesson[aria-current="true"] { background: var(--accent-surface); color: var(--text-1); box-shadow: inset 2px 0 0 var(--accent-bright); }
.cw-lesson-mark { position: relative; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--border-control); border-radius: 50%; color: var(--text-3); }
.cw-lesson-mark svg { position: absolute; width: 11px; height: 11px; stroke-width: 3; opacity: 0; }
.cw-lesson-num { font-size: 10px; font-weight: 560; }
.cw-lesson.done .cw-lesson-mark { border-color: var(--ok); background: var(--ok); color: var(--ok-surface); }
.cw-lesson.done .cw-lesson-num, .cw-lesson[aria-current="true"] .cw-lesson-num { opacity: 0; }
.cw-lesson.done .cw-lesson-done { opacity: 1; }
.cw-lesson[aria-current="true"]:not(.done) .cw-lesson-mark { border-color: var(--accent-bright); color: var(--accent-bright); }
.cw-lesson[aria-current="true"]:not(.done) .cw-lesson-now { opacity: 1; fill: currentColor; stroke-width: 0; margin-left: 2px; width: 10px; height: 10px; }
.cw-lesson-title { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.cw-lesson-length { color: var(--text-3); font-size: var(--fs-xs); }

/* ── Members: their courses, and links that can't open ── */
.cw-course-rows a { grid-template-columns: 32px minmax(0, 1fr) auto; }
.cw-course-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--accent-line); border-radius: 50%; color: var(--accent-text); }
.cw-course-mark svg { width: 13px; height: 13px; margin-left: 2px; }
.cw-closed-body { display: grid; justify-items: center; gap: var(--s3); padding: var(--s8) var(--s6); text-align: center; }
.cw-closed-body h1 { font-size: var(--fs-xl); font-weight: 540; letter-spacing: -.02em; }
.cw-closed-body p { max-width: 400px; color: var(--text-2); }
.cw-closed-body .button-row { justify-content: center; margin-top: var(--s2); }
.cw-closed-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1.5px solid var(--border-strong); border-radius: 50%; color: var(--accent-text); }
.cw-closed-mark svg { width: 20px; height: 20px; }

/* ── Owner: one course, the studio look ──
 * A hero with the cover, then the setup track, then the lessons as a numbered timeline on a rail (no stacked boxes), with
 * the settings as a flat column beside them. A lesson's node fills with the accent once its video is ready, so what is
 * left to do reads down the rail at a glance. */
.cs-head { align-items: center; gap: var(--s4) var(--s6); margin-bottom: var(--s6); padding-bottom: var(--s6); }
.cs-head-main { display: flex; align-items: center; gap: var(--s5); }
.cs-head-cover { position: relative; flex: none; width: 208px; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-2); overflow: hidden; cursor: pointer; transition: border-color var(--d2) var(--ease); }
.cs-head-cover:hover { border-color: var(--border-strong); }
.cs-head-cover:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.cs-head-cover:disabled { cursor: default; }
.cs-head-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-head-cover .cs-title-cover { padding: var(--s3); }
.cs-head-cover .cs-title-cover-text { font-size: var(--fs-md); }
.cs-head-cover-edit { position: absolute; right: 6px; top: 6px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-1); color: var(--text-1); font-size: var(--fs-xs); opacity: 0; transition: opacity var(--d1) var(--ease); }
.cs-head-cover:hover .cs-head-cover-edit, .cs-head-cover:focus-visible .cs-head-cover-edit, .cs-head-cover:not(.has-cover) .cs-head-cover-edit { opacity: 1; }
.cs-head-cover-edit .icon { width: 12px; height: 12px; }
.cs-head .cs-chip { position: static; }
.cs-head-meta { gap: var(--s2) var(--s4); margin-top: var(--s3); color: var(--text-2); }
.cs-head-tiers { display: inline-flex; flex-wrap: wrap; gap: 4px var(--s3); font-size: var(--fs-xs); }
/* Setup: three steps on one track; a done step colours the track up to the next one */
.cs-steps { position: relative; gap: var(--s4); margin: 0 0 var(--s7); border: 0; background: none; overflow: visible; }
.cs-steps li { position: relative; }
.cs-steps li + li { border-left: 0; }
.cs-steps li:not(:last-child)::after { content: ""; position: absolute; top: 11px; left: 34px; right: 6px; height: 2px; border-radius: var(--r-pill); background: var(--border); transition: background var(--d3) var(--ease); }
.cs-steps li.done:not(:last-child)::after { background: var(--ok); }
.cs-step { flex-direction: column; align-items: flex-start; gap: var(--s2); min-height: 0; padding: 0 var(--s4) var(--s1) 0; border-radius: var(--r-control); }
.cs-step:hover { background: none; }
.cs-step:hover .cs-step-text strong { color: var(--text-1); }
.cs-steps li.next .cs-step-mark { background: var(--accent-surface); }
/* Lessons: sections as headings over a rail, each lesson a numbered node on it */
.cs-sections { gap: var(--s6); }
.cs-section { border: 0; border-radius: 0; background: none; }
.cs-section-bar, .cs-section.folded > .cs-section-bar { min-height: 40px; padding: 0 0 var(--s2); border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; }
input.cs-section-title { font-size: var(--fs-md); font-weight: 600; }
.cs-lessons { position: relative; padding: var(--s2) 0 0; }
.cs-lessons:not(:empty)::before { content: ""; position: absolute; top: calc(var(--s2) + 22px); bottom: 22px; left: 15px; width: 2px; border-radius: var(--r-pill); background: var(--border-subtle); }
.cs-lesson { grid-template-columns: 32px minmax(0, 1fr) auto auto; min-height: 44px; padding: 2px var(--s2) 2px 0; border-top: 0; border-radius: var(--r-control); }
.cs-lesson:hover { background: var(--surface-1); }
.cs-lesson-num { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; margin-left: 4px; border: 1.5px solid var(--border-strong); border-radius: 50%; background: var(--bg); color: var(--text-2); font-size: 11px; font-weight: 560; }
.cs-lesson:hover .cs-lesson-num { background: var(--surface-1); }
.cs-lesson:has([data-video-cell][data-state="ready"]) .cs-lesson-num { border-color: var(--accent-bright); background: var(--accent-surface); color: var(--accent-text); }
.cs-lesson:has([data-video-cell][data-state="none"]) .cs-lesson-num, .cs-lesson:has([data-video-cell][data-state="error"]) .cs-lesson-num { border-style: dashed; }
.cs-lesson:has([data-video-cell][data-state="processing"]) .cs-lesson-num, .cs-lesson:has([data-video-cell][data-state="uploading"]) .cs-lesson-num { border-color: var(--accent-line); }
.cs-sub-bar { min-height: 36px; padding-left: 36px; border-top: 0; background: none; }
.cs-subsection .cs-lessons { padding-left: 20px; }
.cs-subsection .cs-lessons:not(:empty)::before { left: 35px; }
.cs-add-row { padding: var(--s1) 0 0 30px; border-top: 0; }
.cs-add.cs-add-section { margin-top: var(--s6); border-radius: var(--r-dialog); }
/* Settings: a flat column of rows, each folded to its value */
.cs-side { gap: var(--s2); }
.cs-settings { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; overflow: visible; }
.cs-group { border-bottom: 1px solid var(--border-subtle); }
.cs-group + .cs-group { border-top: 0; }
.cs-group > summary { padding: var(--s4) var(--s2); border-radius: var(--r-control); }
.cs-group > summary:hover { background: var(--surface-1); }
.cs-group-body { padding: 0 var(--s2) var(--s5); }
@media (max-width: 760px) {
  .cs-head-main { flex-direction: column; align-items: flex-start; }
  .cs-head-cover { width: 100%; }
  .cs-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s6); }
  .cs-steps li + li { border-top: 0; }
  .cs-steps li:not(:last-child)::after { left: 30px; right: 4px; }
  .cs-step { padding-right: var(--s1); }
  .cs-step-text strong { font-size: var(--fs-xs); line-height: 1.3; }
  .cs-step-text span { font-size: 11px; }
}
@media (max-width: 640px) {
  .cs-lesson { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .cs-lesson .cs-lesson-num { margin-top: 4px; padding-top: 0; }
}

/* ── Shared ── */
.rf-state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.rf .field-error { margin: 6px 0 0; color: var(--bad); font-size: var(--fs-xs); }
.rf-amount { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text-1); }
.rf-amount.ok { color: var(--ok); }
.rf-tier { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.rf-tier strong { font-weight: 470; }

/* ── Start: before the program has run. Two steps and one button, with the DM members get beside them. ── */
.rf-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; width: fit-content; margin-bottom: var(--s3); color: var(--text-2); font-size: var(--fs-sm); }
.rf-back:hover { color: var(--text-1); }
.rf-back .icon { width: 14px; height: 14px; }
.rf-program-line strong { color: var(--text-1); font-weight: 500; }
.rf-gear .icon { width: 16px; height: 16px; }
.rf-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: var(--s6); align-items: start; }
.rf-start-form { display: grid; gap: var(--s5); padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.rf-start-copy { display: grid; gap: var(--s2); }
.rf-start-copy h2 { margin: 0; font-size: 22px; font-weight: 560; letter-spacing: -.02em; text-wrap: balance; }
.rf-start-copy p { margin: 0; max-width: 56ch; }
.rf-start-step { display: grid; gap: var(--s3); min-width: 0; margin: 0; padding: var(--s5) 0 0; border: 0; border-top: 1px solid var(--border-subtle); }
.rf-start-step legend { display: flex; align-items: center; gap: var(--s2); float: left; width: 100%; margin-bottom: var(--s3); padding: 0; color: var(--text-1); font-size: var(--fs-md); font-weight: 520; }
.rf-start-step legend + * { clear: both; }
.rf-start-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--accent-line); border-radius: 50%; color: var(--accent-text); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rf-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.rf-pick { position: relative; display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-2); cursor: pointer; transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease); }
.rf-pick:hover { border-color: var(--border-strong); }
.rf-pick input { flex: none; margin-top: 2px; accent-color: var(--accent); }
.rf-pick > span { display: grid; gap: 2px; }
.rf-pick strong { color: var(--text-1); font-weight: 520; }
.rf-pick > span > span { color: var(--text-3); font-size: var(--fs-sm); }
.rf-pick:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.rf-pick:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.rf-start-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.rf-number.rf-big { width: 112px; height: 56px; }
.rf-number.rf-big input { padding: 0 2px 0 12px; font-size: 28px; font-weight: 560; letter-spacing: -.02em; text-align: right; }
.rf-number.rf-big .rf-suffix { padding-right: 14px; color: var(--text-2); font-size: 22px; }
.rf-start-rest { color: var(--text-2); font-size: var(--fs-md); }
.rf-start-go { display: grid; justify-items: start; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--border-subtle); }
.rf-start-go .btn { min-height: var(--control-lg); padding-inline: var(--s5); }
.rf-start-go p { margin: 0; max-width: 60ch; }
.rf-start-go a { color: var(--accent-text); }
.rf-start-preview { position: sticky; top: var(--s6); display: grid; gap: var(--s3); }
.rf-dm .lm-dm-title { font-size: var(--fs-md); }
.rf-dm-link { margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-tag); background: var(--bg-sunken); color: var(--text-1); font: 12px/1.4 var(--font-mono, ui-monospace, Consolas, monospace); overflow-wrap: anywhere; }
@media (max-width: 1000px) { .rf-start { grid-template-columns: minmax(0, 1fr); } .rf-start-preview { position: static; } }
@media (max-width: 560px) { .rf-start-form { padding: var(--s4); } .rf-picks { grid-template-columns: minmax(0, 1fr); } .rf-start-go .btn { width: 100%; justify-content: center; } }

/* ── Overview ── */
.rf-paused { align-items: center; }
.rf-overview > .panel { min-width: 0; }
.rf-feed { display: grid; margin: 0; padding: 0; list-style: none; }
.rf-event { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: var(--s3); align-items: baseline; padding: 10px 0; border-top: 1px solid var(--border-subtle); font-size: var(--fs-sm); }
.rf-event:first-child { border-top: 0; padding-top: 0; }
.rf-event-mark { color: var(--text-3); align-self: center; }
.rf-event-mark .icon { width: 16px; height: 16px; }
.rf-event.sale .rf-event-mark { color: var(--ok); }
.rf-event.tier .rf-event-mark { color: var(--gold); }
.rf-event.refund .rf-event-mark { color: var(--bad); }
.rf-event-text { min-width: 0; overflow-wrap: anywhere; color: var(--text-2); }
.rf-event-text strong { color: var(--text-1); font-weight: 470; }

/* ── People and Payouts ── */
.rf-toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; justify-content: space-between; }
.rf-toolbar:empty { display: none; }
.rf-add { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: end; }
.rf-add .field { min-width: min(100%, 280px); margin: 0; }
.rf-row-actions { display: inline-flex; gap: var(--s1); align-items: center; justify-content: flex-end; }
.rf-row-actions form { margin: 0; }
/* Pause and Resume share one width, so Copy link stays in the same column on every row. */
.rf-row-actions form .btn { min-width: 72px; justify-content: center; }
.rf-more { display: flex; justify-content: center; }
.rf-pay { margin: 0; }
.rf-how { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s3); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.rf-how-mark { color: var(--accent-text); padding-top: 2px; }
.rf-how-mark .icon { width: 16px; height: 16px; }
.rf-how p { margin: 2px 0 0; }
.rf-how strong { font-weight: 500; }

/* ── Settings ── */
.rf-settings { display: grid; gap: var(--s5); }
.rf-sheet { display: grid; gap: var(--s5); min-width: 0; margin: 0; padding: 0; border: 0; }
.rf-sheet:disabled { opacity: .7; }
.rf-switch-row { padding: var(--s5); }
.rf-switch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; cursor: pointer; }
.rf-switch input { position: absolute; opacity: 0; pointer-events: none; }
.rf-switch-track { position: relative; width: 36px; height: 20px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface-3); transition: background var(--d2) var(--ease), border-color var(--d2) var(--ease); }
.rf-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-3); transition: transform var(--d2) var(--ease), background var(--d2) var(--ease); }
.rf-switch input:checked + .rf-switch-track { border-color: var(--accent); background: var(--accent); }
.rf-switch input:checked + .rf-switch-track::after { transform: translateX(16px); background: var(--text-1); }
.rf-switch input:focus-visible + .rf-switch-track { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.rf-switch strong { display: block; font-weight: 500; }
.rf-blocks { display: grid; gap: var(--s5); }
.rf-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s5); min-width: 0; }
.rf-block-text strong { display: block; font-size: var(--fs-sm); font-weight: 500; }
.rf-block-text .soft { display: block; margin-top: 2px; }
.rf-control { min-width: 0; }
.rf-block.has-error input, .rf-block.has-error select { border-color: var(--bad); }
.rf-control { display: grid; gap: var(--s2); justify-items: start; align-content: start; align-items: start; }
.rf-choice { grid-template-columns: auto minmax(0, 1fr) auto; }
.rf-choice > span:not([data-show-when]) { color: var(--text-1); font-size: var(--fs-sm); }
.rf-choice > span:not([data-show-when]) > span { display: block; margin-top: 1px; color: var(--text-3); font-size: var(--fs-xs); }
.rf [data-show-when] > .rf-block { margin-top: var(--s4); }
.rf-inline-select { min-width: 160px; }
.rf-number { display: inline-flex; align-items: center; height: var(--control); border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-2); }
.rf-number:focus-within { border-color: var(--border-focus); }
.rf-number input { width: 100%; height: 100%; min-width: 0; padding: 0 8px; border: 0; background: transparent; color: var(--text-1); font: inherit; font-variant-numeric: tabular-nums; text-align: right; }
.rf-number input:focus { outline: none; }
.rf-number.rf-xs { width: 84px; } .rf-number.rf-sm { width: 150px; }
.rf-suffix, .rf-prefix { padding: 0 8px; color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; }
.rf-suffix { padding-left: 0; } .rf-prefix { padding-right: 0; }
.rf-sentence { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); color: var(--text-2); font-size: var(--fs-sm); }
.rf-segment { display: inline-flex; flex-wrap: wrap; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-2); }
.rf-segment label { position: relative; display: flex; cursor: pointer; }
.rf-segment input { position: absolute; opacity: 0; pointer-events: none; }
.rf-segment span { display: inline-flex; align-items: center; height: var(--control-sm); padding: 0 var(--s3); border-radius: var(--r-tag); color: var(--text-2); font-size: var(--fs-sm); transition: background var(--d1) var(--ease), color var(--d1) var(--ease); }
.rf-segment input:checked + span { background: var(--surface-3); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rf-segment input:focus-visible + span { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.rf-example { margin: 0; padding: var(--s3) var(--s4); border-left: 2px solid var(--accent); border-radius: 0 var(--r-control) var(--r-control) 0; background: var(--surface-2); color: var(--text-2); font-size: var(--fs-sm); }
.rf-memberships td { vertical-align: middle; }
.rf-memberships .num .rf-number { margin-left: auto; }
.rf-check { display: inline-flex; gap: var(--s3); align-items: flex-start; cursor: pointer; }
.rf-check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.rf-check strong { display: block; font-size: var(--fs-sm); font-weight: 470; }
.rf-check span span { display: block; color: var(--text-3); font-size: var(--fs-xs); }
.rf-check-wide { display: flex; }
.rf-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.rf-gap { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border-subtle); }
.rf-pad { padding: 0 14px 12px; }
.rf-tiers { display: grid; gap: var(--s2); margin: 0 0 var(--s3); padding: 0; list-style: none; }
.rf-tier-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(140px, 200px) auto; gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); border: 1px solid var(--border-subtle); border-radius: var(--r-control); background: var(--surface-1); }
.rf-tier-row[hidden] { display: none; }
.rf-tier-row .field-error { grid-column: 2 / -1; margin: 0; }
.rf-tier-base { grid-template-columns: 64px minmax(0, 1fr); background: var(--surface-2); }
.rf-tier-name { color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.rf-s-body > [data-tier-add] + p { margin-top: var(--s2); }
.rf-fixed { display: flex; gap: var(--s2); align-items: flex-start; margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.rf-fixed .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.rf-wide { width: 100%; max-width: 420px; }
.rf-savebar { position: sticky; bottom: 0; z-index: var(--z-sticky); display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--shadow-1); }
.rf-savebar p { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.rf-savebar .icon { width: 14px; height: 14px; }

/* ── The referrer's own page ── */
.rp { display: grid; gap: var(--s7); width: 100%; max-width: 760px; margin: 0 auto; }
.rp-head { display: flex; gap: var(--s3); align-items: center; justify-content: flex-start; text-align: left; }
.rp-head h1 { margin: 1px 0 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }
.rp-head p { margin: 0; }
.rp-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s6); align-items: end; padding-bottom: var(--s6); border-bottom: 1px solid var(--border); }
.rp-hero.fresh .rf-hero-figure { color: var(--accent-text); }
.rp-hero-main { display: grid; gap: var(--s2); min-width: 0; }
.rp-hero-count { display: grid; justify-items: end; gap: 2px; text-align: right; }
.rp-hero-count strong { font-size: 26px; font-weight: 620; line-height: 1.1; letter-spacing: -.02em; }
.rp-hero-count span { color: var(--text-2); font-size: var(--fs-sm); }
.rp-link { display: grid; gap: var(--s3); padding: var(--s5); border: 1px solid var(--accent-line); border-radius: var(--r-dialog); background: var(--surface-1); }
.rp-link h2 { margin: 0; font-size: var(--fs-md); font-weight: 560; }
.rp-link p { margin: 0; }
.rp-link .copy { display: flex; gap: var(--s2); align-items: center; padding: 6px 6px 6px 12px; border: 1px solid var(--border-control); border-radius: var(--r-control); background: var(--surface-2); }
.rp-link .copy code { flex: 1; min-width: 0; overflow: hidden; color: var(--text-1); font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.rp-journey { display: grid; gap: var(--s4); }
.rp-journey .rf-sec-head { margin-bottom: 0; }
.rp-track { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); align-items: center; }
.rp-stop { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: var(--s2); align-items: center; }
.rp-stop strong { font-size: var(--fs-sm); font-weight: 560; }
.rp-stop > span:not(.rp-dot) { grid-column: 2; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.rp-dot { grid-row: span 2; width: 12px; height: 12px; border: 2px solid var(--accent); border-radius: 50%; background: var(--accent); }
.rp-stop.next .rp-dot { background: var(--bg); border-color: var(--border-strong); }
.rp-stop.next { text-align: left; }
.rp-bar { position: relative; height: 6px; border-radius: var(--r-pill); background: var(--surface-3); }
.rp-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--d4) var(--ease); }
.rp-bar em { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); color: var(--text-2); font-size: var(--fs-xs); font-style: normal; white-space: nowrap; }
.rp-bar em strong { color: var(--text-1); font-weight: 600; }
.rp-track { padding-bottom: var(--s4); }
.rp-journey.top { grid-template-columns: 16px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s4) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rp-journey.top p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.rp-journey.top strong { color: var(--text-1); font-weight: 560; }
.rp-crown { color: var(--gold); }
.rp-crown .icon { width: 16px; height: 16px; }
.rp-earn .rf-sec-head { margin-bottom: var(--s4); }
/* Free days: the membership to add them to and one button, on a line, under its own heading. */
.rp-redeem { display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.rp-redeem .rf-sec-head { margin-bottom: 0; }
.rp-redeem-form { display: grid; grid-template-columns: minmax(0, 280px) auto; gap: var(--s3) var(--s4); align-items: end; justify-content: start; }
.rp-redeem-form .field { gap: 6px; }
/* The button stands as tall as the dropdown beside it. */
.rp-redeem-form > .btn { min-height: 36px; }
.rp-redeem-form > p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 560px) { .rp-redeem-form { grid-template-columns: minmax(0, 1fr); } .rp-redeem-form .btn { justify-self: start; } }
.rp-terms { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.rp-terms li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s3); color: var(--text-2); font-size: var(--fs-sm); }
.rp-terms strong { color: var(--text-1); font-weight: 500; }
.rp-terms .icon { width: 16px; height: 16px; color: var(--text-3); margin-top: 1px; }
@media (max-width: 640px) {
  .rp-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .rp-hero-count { justify-items: start; text-align: left; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s2); align-items: baseline; }
  .rp-hero-count .muted { grid-column: 1 / -1; }
  .rf-hero-line { flex-direction: column; gap: 2px; }
  .rp-track { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: var(--s3); }
  .rp-track .rp-bar { grid-column: 1 / -1; grid-row: 2; }
  .rp-stop.next { justify-self: end; }
}
/* ── Messages → Automatic DMs ── */
.lm-lede { margin: 0; max-width: 72ch; }
.lm-sheet { display: grid; gap: var(--s5); min-width: 0; margin: 0; padding: 0; border: 0; }
.lm-rows { display: grid; }
.lm-row { display: flex; gap: var(--s4); align-items: center; justify-content: space-between; padding: var(--s3) 0; border-top: 1px solid var(--border-subtle); cursor: pointer; }
.lm-row:first-child { border-top: 0; padding-top: 0; }
.lm-row:last-child { padding-bottom: 0; }
.lm-row.locked { cursor: default; }
.lm-row-text { display: grid; gap: 2px; min-width: 0; }
.lm-row-text strong { font-size: var(--fs-sm); font-weight: 500; }
.lm-row-text span { color: var(--text-3); font-size: var(--fs-xs); }
.lm-always { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.lm-switch { grid-template-columns: auto; }
.lm-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--s7); align-items: start; }
.lm-sheet { gap: 0; }
.lm-s { display: grid; gap: var(--s4); padding: var(--s6) 0; border-bottom: 1px solid var(--border-subtle); }
.lm-s:first-child { padding-top: 0; }
.lm-s:last-child { border-bottom: 0; }
.lm-rail { position: sticky; top: calc(var(--appbar) + var(--s5)); display: grid; gap: var(--s3); }
.lm-rail > p { margin: 0; }
.lm-welcome { display: grid; gap: var(--s4); }
.lm-welcome .lm-row { border-top: 0; padding-top: 0; }
.lm-welcome textarea { width: 100%; resize: vertical; }
.lm-dm { padding: var(--s4); border-radius: var(--r-panel); background: var(--bg-sunken); }
.lm-dm-card { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: var(--s2) var(--s4); padding: var(--s4); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r-panel); background: var(--surface-2); }
.lm-dm-main { display: grid; gap: 4px; min-width: 0; }
.lm-dm-from { margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.lm-dm-from strong { color: var(--text-2); font-weight: 500; }
.lm-dm-title { margin: 0; color: var(--text-1); font-size: var(--fs-lg); font-weight: 600; }
.lm-dm-body { margin: 0; color: var(--text-2); font-size: var(--fs-sm); white-space: pre-line; overflow-wrap: anywhere; }
.lm-dm-icon { display: grid; justify-items: end; }
.lm-dm-icon .avatar { width: 64px; height: 64px; border-radius: var(--r-panel); }
.lm-dm-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border-subtle); }
.lm-dm-button { display: inline-flex; align-items: center; height: var(--control); padding: 0 var(--s3); border-radius: var(--r-control); background: var(--surface-3); color: var(--text-1); font-size: var(--fs-sm); }
.lm-dm-safety { grid-column: 1 / -1; margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
@media (max-width: 1000px) { .lm-layout { grid-template-columns: minmax(0, 1fr); } .lm-rail { position: static; order: -1; } }

/* ── Join page: arrived through a referral link ── */
.join-invited { display: flex; gap: var(--s3); align-items: center; width: 100%; max-width: var(--w-page); margin: 0 auto var(--s5); padding: var(--s3) var(--s4); border: 1px solid var(--ok-line); border-radius: var(--r-panel); background: var(--surface-1); }
.join-invited p { display: flex; flex-wrap: wrap; gap: 4px var(--s3); align-items: center; margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.join-invited strong { color: var(--text-1); font-weight: 500; }
.join-invited-gift { display: inline-flex; gap: 6px; align-items: center; color: var(--ok); font-weight: 500; }
.join-invited-gift .icon { width: 16px; height: 16px; }

/* ── Phones ── */
@media (max-width: 900px) {
  .rf-intro { grid-template-columns: minmax(0, 1fr); padding: var(--s5); gap: var(--s5); }
  .rf-block { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .rf-checks { grid-template-columns: minmax(0, 1fr); }
  .rf-tier-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--s2); }
  .rf-tier-row .rf-tier-name { grid-column: 1; grid-row: 1; align-self: center; }
  .rf-tier-row [data-tier-remove] { grid-column: 2; grid-row: 1; }
  .rf-tier-row .rf-sentence, .rf-tier-row select { grid-column: 1 / -1; }
  .rf-tier-base { grid-template-columns: auto minmax(0, 1fr); }
  .rf-tier-base .rf-tier-name { grid-column: auto; grid-row: auto; }
}
/* ── Scoreboard: the Overview and Payouts read as one ledger, not a wall of panels ── */
.rf { gap: var(--s7); }
.rf-eyebrow { margin: 0; color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.rf-sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--control); margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--border); }
.rf-sec-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 560; letter-spacing: -.005em; }
.rf-amount.bad { color: var(--bad); }

.rf-hero, .rf-ledger { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: var(--s6); align-items: stretch; }
.rf-hero-main, .rf-ledger-main { display: grid; align-content: center; gap: var(--s2); min-width: 0; }
.rf-hero-figure { margin: 0; color: var(--text-1); font-size: 30px; font-weight: 620; line-height: 1.1; letter-spacing: -.02em; }
.rf-hero-line { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin: var(--s1) 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.rf-hero-line strong { color: var(--text-1); font-weight: 560; }
.rf-owe { display: grid; align-content: center; justify-items: start; gap: 4px; padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); }
.rf-owe.due { border-color: var(--warn-line); }
.rf-owe-figure { margin: 0 0 2px; color: var(--text-1); font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.rf-owe.due .rf-owe-figure { color: var(--warn); }
.rf-owe .btn { margin-top: var(--s3); }

.rf-overview { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.rf-ranks { display: grid; margin: 0; padding: 0; list-style: none; }
.rf-rank { display: grid; grid-template-columns: 28px minmax(0, 1.3fr) minmax(130px, 1fr) 64px 92px; gap: var(--s4); align-items: center; min-height: 60px; padding: var(--s2) var(--s2) var(--s2) 0; border-bottom: 1px solid var(--border-subtle); border-radius: var(--r-control); transition: background var(--d1) var(--ease); }
.rf-rank:last-child { border-bottom: 0; }
.rf-rank:hover { background: var(--surface-1); }
.rf-rank-n { justify-self: center; color: var(--text-3); font-size: var(--fs-lg); font-weight: 600; }
.rf-rank.r1 .rf-rank-n { color: var(--gold); }
.rf-rank.r2 .rf-rank-n { color: var(--text-1); }
.rf-rank.r3 .rf-rank-n { color: var(--warn); }
.rf-rank-tier { display: grid; gap: 5px; min-width: 0; }
.rf-rank-tier-name { display: flex; gap: 6px; align-items: baseline; font-size: var(--fs-sm); white-space: nowrap; }
.rf-rank-tier-name strong { font-weight: 500; }
.rf-meter { display: block; height: 4px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.rf-meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--d4) var(--ease); }
.rf-meter.full i { background: var(--gold); }
.rf-tier-cell { display: grid; gap: 5px; width: 132px; max-width: 100%; }
.rf-tier-cell small { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.rf-rank-note { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-rank-stat { display: grid; justify-items: end; gap: 1px; }
.rf-rank-stat strong { font-size: var(--fs-base); font-weight: 560; }
.rf-rank-stat span { font-size: var(--fs-xs); }

.rf-feed { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rf-feed::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 13px; width: 1px; background: var(--border); }
.rf-event { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 7px 0; border-top: 0; font-size: var(--fs-sm); }
.rf-event:first-child { padding-top: 7px; }
.rf-event-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border); border-radius: 50%; background: var(--bg); color: var(--text-3); }
.rf-event-mark .icon { width: 14px; height: 14px; }
.rf-event.sale .rf-event-mark { border-color: var(--ok-line); color: var(--ok); }
.rf-event.tier .rf-event-mark { border-color: var(--gold); color: var(--gold); }
.rf-event.refund .rf-event-mark { color: var(--bad); }
.rf-event.payout .rf-event-mark { color: var(--accent-text); border-color: var(--accent-line); }
.rf-event-text { display: grid; gap: 1px; min-width: 0; color: var(--text-2); }
.rf-event-text time { font-size: var(--fs-xs); }
.rf-event > .rf-amount { font-size: var(--fs-sm); white-space: nowrap; }

.rf-program-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: var(--s7); align-items: center; }
.rf-program-body.solo { grid-template-columns: minmax(0, 1fr); }
.rf-program-copy { display: grid; gap: var(--s5); min-width: 0; }
.rf-program-line { margin: 0; max-width: 58ch; color: var(--text-2); font-size: var(--fs-lg); line-height: 1.5; text-wrap: pretty; }
.rf-program-line strong { color: var(--text-1); font-weight: 560; }
.rf-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s5); margin: 0; padding: 0; list-style: none; }
.rf-facts li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s2); align-items: start; color: var(--text-2); font-size: var(--fs-sm); }
.rf-facts .icon { width: 16px; height: 16px; margin-top: 1px; color: var(--text-3); }
.rf-ladder { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: var(--s2); align-items: end; height: 150px; margin: 0; padding: 0; list-style: none; }
.rf-ladder li { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 2px; height: 100%; min-width: 0; }
.rf-ladder-bar { align-self: end; display: flex; align-items: flex-start; justify-content: center; padding-top: var(--s2); border: 1px solid var(--accent-line); border-bottom: 2px solid var(--accent); border-radius: var(--r-panel) var(--r-panel) 0 0; background: var(--accent-surface); }
.rf-ladder li:last-child .rf-ladder-bar { border-color: var(--accent); background: var(--accent-fill); }
.rf-ladder-bar strong { color: var(--text-1); font-size: var(--fs-md); font-weight: 600; }
.rf-ladder-name { margin-top: var(--s2); font-size: var(--fs-sm); font-weight: 500; }
.rf-ladder-at { font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rf-ledger-how { display: grid; gap: var(--s4); align-content: center; margin: 0; padding: var(--s5); list-style: none; border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); }
.rf-ledger-how li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s3); color: var(--text-2); font-size: var(--fs-sm); }
.rf-ledger-how .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--accent-text); }
.rf-ledger-how strong { display: block; color: var(--text-1); font-weight: 500; }
.rf-section { display: grid; gap: var(--s3); min-width: 0; }
.rf-section .rf-sec-head { margin-bottom: 0; }
.rf-frame { border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); overflow: hidden; }
.rf-frame.empty { padding: var(--s4); }
.rf-frame .empty-state { border: 0; }

/* ── Settings: an index on the left, flat sections, the program at a glance on the right ── */
.rf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s7); align-items: start; }
.rf-index { position: sticky; top: calc(var(--appbar) + var(--s5)); display: grid; gap: 2px; padding-left: var(--s1); border-left: 1px solid var(--border-subtle); }
.rf-index a { position: relative; display: flex; align-items: center; min-height: 30px; padding: 0 var(--s3); border-radius: var(--r-control); color: var(--text-3); font-size: var(--fs-sm); text-decoration: none; transition: color var(--d1) var(--ease), background var(--d1) var(--ease); }
.rf-index a:hover { color: var(--text-1); background: var(--surface-1); }
.rf-index a.current { color: var(--text-1); }
.rf-index a.current::before { content: ""; position: absolute; top: 7px; bottom: 7px; left: calc(var(--s1) * -1 - 1px); width: 2px; border-radius: var(--r-pill); background: var(--accent); }
.rf-sheet { gap: 0; }
.rf-switch-row { padding: 0 0 var(--s6); border-bottom: 1px solid var(--border); }
.rf-s { display: grid; gap: var(--s4); padding: var(--s6) 0; border-bottom: 1px solid var(--border-subtle); scroll-margin-top: calc(var(--appbar) + var(--s5)); }
.rf-s:last-of-type { border-bottom: 0; }
.rf-s-head { display: grid; gap: 4px; }
.rf-s-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 560; }
.rf-s-head p { margin: 0; max-width: 64ch; }
.rf-s-body { min-width: 0; }
.rf-s-body.flush .table-wrap { border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.rf-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.rf-choice-grid .rf-choice { height: 100%; align-items: start; }
.rf-sheet .rf-block:has(.choices) { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.rf-sheet .rf-block:has(.choices) .rf-control { justify-items: stretch; }
.rf-summary { position: sticky; top: calc(var(--appbar) + var(--s5)); }
.rf-summary-card { display: grid; gap: var(--s4); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-dialog); background: var(--surface-1); }
.rf-summary-state { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.rf-summary-line { margin: 0; color: var(--text-2); font-size: var(--fs-md); line-height: 1.45; }
.rf-summary-line strong { color: var(--text-1); font-weight: 560; }
.rf-summary .rf-example { margin: 0; padding: var(--s3); border: 0; border-radius: var(--r-panel); background: var(--surface-2); line-height: 1.5; }
.rf-mini-ladder { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; padding: var(--s3) 0 0; list-style: none; border-top: 1px solid var(--border-subtle); }
.rf-mini-ladder li { display: grid; gap: 2px; padding: 0 var(--s2); border-left: 1px solid var(--border-subtle); }
.rf-mini-ladder li:first-child { padding-left: 0; border-left: 0; }
.rf-mini-ladder strong { font-size: var(--fs-lg); font-weight: 600; }
.rf-mini-ladder li:last-child strong { color: var(--accent-text); }
.rf-mini-ladder span { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.rf-summary-card > p.muted { margin: 0; }
.rf-savebar { margin-top: var(--s2); }

@media (max-width: 1240px) {
  .rf-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .rf-index { display: none; }
}
@media (max-width: 960px) {
  .rf-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .rf-overview { gap: var(--s6); }
  .rf-rank { grid-template-columns: 24px minmax(0, 1.2fr) minmax(110px, 1fr) 52px 84px; gap: var(--s3); }
  .rf-program-body { grid-template-columns: minmax(0, 1fr); }
  .rf-ladder { max-width: 520px; }
}
@media (max-width: 900px) {
  .rf-hero, .rf-ledger, .rf-layout { grid-template-columns: minmax(0, 1fr); }
  .rf-summary { position: static; order: -1; }
  .rf-hero-figure { font-size: 28px; }
  .rf-hero-line { flex-direction: column; gap: 2px; }
  .rf-choice-grid, .rf-facts { grid-template-columns: minmax(0, 1fr); }
  .rf-rank { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: var(--s2); }
  .rf-rank-tier { grid-column: 2 / -1; grid-row: 2; }
  .rf-rank-stat:not(.end) { display: none; }
  .rf-event { grid-template-columns: 28px minmax(0, 1fr) auto; }
}
/* The simpler overview: the program in one sentence, two numbers, one list. */
.rf-rule { margin: 0; color: var(--text-2); font-size: var(--fs-base); line-height: 1.6; }
.rf-rule strong { color: var(--text-1); font-weight: 560; }
.rf-rule a { color: var(--accent-text); }
.rf-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.rf-number-card { display: grid; align-content: start; gap: 4px; padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.rf-number-card.due { border-color: var(--warn-line); }
.rf-number-card.due .rf-hero-figure { color: var(--warn); }
.rf-number-card a { color: var(--accent-text); }
.rf-under { display: block; }
.rf-links { display: flex; gap: 8px; margin: 0; }
.rf-links a { color: var(--text-2); }
.rf-links a:hover { color: var(--text-1); }
@media (max-width: 720px) { .rf-numbers { grid-template-columns: minmax(0, 1fr); } }
/* Settings: one column; the rarely used rules fold under More options. */
.rf-settings .rf-sheet { max-width: 820px; }
.rf-more-options { border-bottom: 1px solid var(--border-subtle); }
.rf-more-options > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s6) 0; list-style: none; cursor: pointer; }
.rf-more-options > summary::-webkit-details-marker { display: none; }
.rf-more-options > summary > span { display: grid; gap: 4px; }
.rf-more-options > summary strong { font-size: var(--fs-md); font-weight: 560; }
.rf-more-options > summary .chevron { flex: none; width: 16px; height: 16px; color: var(--text-3); transition: transform var(--d2) var(--ease); }
.rf-more-options[open] > summary .chevron { transform: rotate(180deg); }
.rf-more-options > summary:hover strong { color: var(--text-1); }
/* Before referrals have run: one card, one number, one button. */
.rf-start-simple { display: grid; justify-items: start; }
.rf-start-card { display: grid; gap: var(--s4); width: min(100%, 560px); padding: var(--s7); border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); }
.rf-start-card h2 { margin: 0; font-size: 20px; font-weight: 560; letter-spacing: -.02em; }
.rf-start-line { display: block; min-width: 0; margin: 0; padding: 0; border: 0; color: var(--text-2); font-size: var(--fs-md); line-height: 2.2; }
.rf-start-line .rf-number { display: inline-flex; vertical-align: middle; margin: 0 2px; }
.rf-start-card .rf-example { margin: 0; }
.rf-start-card .btn-primary { justify-self: start; min-height: var(--control-lg); padding-inline: var(--s5); }
.rf-start-card p.muted { margin: 0; }
.rf-start-card a { color: var(--accent-text); }
