/*
  Kalliope Circle — the member web, in the 2026-10 brand.

  Source: Figma "Kalliope Sub-Pages" (RIBwlSz2kkC0tEpNXBDYmr), frames
  Circle Home / Find A Circle / Circle Page / Start A New Circle / Account
  Settings, and the Components frame for every state.

  The design is drawn dark (night ground, lavender ink). Light is derived:
  parchment ground, ink type, and the light-scheme accent green; a lavender
  FILL always carries the dark label, never white (white on lavender fails AA).

  CSP: `style-src 'self'`, so this file is the whole of the styling. No
  `style=` attributes anywhere; icons are CSS masks over same-origin SVGs.

  The operator console still loads the retired brand (`circles.css`); this
  file is loaded only by `layout.leaf`'s member shell.
*/

@font-face {
  font-family: "Journey Levels";
  src: url("/assets/fonts/JourneyLevels-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Journey Levels";
  src: url("/assets/fonts/JourneyLevels-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --night: #152b30;
  --lavender: #cdacdd;
  --violet: #5c2b9e;
  --parchment: #ede9de;
  --silver: #e8e5f4;
  --ink: #0c0e13;
  --iris: #54d5e2;
  --green: #2b6e2f;

  /* Dark, as drawn. */
  --bg: var(--night);
  --surface: #24363b;
  --raised: #384a4f;
  --line: #384a4f;
  --rule: #cdacdd;
  --accent: var(--lavender);
  --on-accent: var(--night);
  --title: #ffffff;
  --text: var(--lavender);
  --text-2: #8d9fba;
  --muted: #6c7c94;
  --alert: #d76464;
  --on-alert: var(--night);
  --ok: #99e2b4;
  --dot: #d76464;
  --field: transparent;
  --focus: #ffffff;
  --overlay: rgba(21, 43, 48, 0.72);

  --face: "Journey Levels", "Marker Felt", "Chalkboard SE", system-ui, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --r-small: 6px;
  --r-card: 24px;
  --page: 1228px;
  --side: 300px;
  --gutter: clamp(16px, 3vw, 40px);
  --quick: 160ms;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--parchment);
    --surface: #f6f3ea;
    --raised: #e2dccb;
    --line: #cfc7b3;
    --rule: #8f8571;
    --accent: var(--green);
    --on-accent: #ffffff;
    --title: var(--ink);
    --text: #1f3a24;
    --text-2: #4a5160;
    --muted: #6b6f78;
    --alert: #a83232;
    --on-alert: #ffffff;
    --ok: #2b6e2f;
    --dot: #c0392b;
    --field: #fbfaf5;
    --focus: var(--ink);
    --overlay: rgba(12, 14, 19, 0.62);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--face);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; font-weight: 300; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
code { font-family: var(--mono); font-size: 0.9em; letter-spacing: 0; }
strong { font-weight: 400; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.skip {
  position: absolute; left: 8px; top: -100px; z-index: 50;
  padding: 8px 12px; background: var(--accent); color: var(--on-accent);
  border-radius: var(--r-small);
}
.skip:focus { top: 8px; }

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

/* ---------- Icons: the designer's SVGs, painted in currentColor ---------- */

.icon {
  display: inline-block; flex: none;
  width: 24px; height: 24px;
  background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat;
  mask: var(--glyph) center / contain no-repeat;
}
.icon--add { --glyph: url("/web-assets/icon-add.svg"); }
.icon--down { --glyph: url("/web-assets/icon-down.svg"); }
.icon--up { --glyph: url("/web-assets/icon-up.svg"); }
.icon--updown { --glyph: url("/web-assets/icon-updown.svg"); }
.icon--elipsis { --glyph: url("/web-assets/icon-elipsis.svg"); }
.icon--locked { --glyph: url("/web-assets/icon-locked.svg"); }
.icon--external { --glyph: url("/web-assets/icon-open-external.svg"); }
.icon--private { --glyph: url("/web-assets/icon-private.svg"); }
.icon--public { --glyph: url("/web-assets/icon-public.svg"); }
.icon--recruiting { --glyph: url("/web-assets/icon-recruiting.svg"); }
.icon--search { --glyph: url("/web-assets/icon-search.svg"); }
.icon--upload { --glyph: url("/web-assets/icon-upload.svg"); }
.icon--small { width: 18px; height: 18px; }

/* ---------- The shell ---------- */

.shell {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead {
  position: relative;
  padding-top: clamp(24px, 4.5vw, 77px);
}
/* The rule the tabs sit on runs edge to edge, under the pill. */
.masthead::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 28px;
  border-bottom: 1px solid var(--rule);
  z-index: 0;
}
.masthead__bar {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.wordmark {
  display: block; flex: none;
  padding: 12px 12px;
  background: var(--night);
  border: 1px solid var(--lavender);
  border-radius: var(--r-card);
  margin-bottom: 0;
}
.wordmark img { width: 213px; height: auto; }
.masthead__end { margin-left: auto; padding-bottom: 40px; display: flex; gap: 12px; }

.tabs { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 45px; padding: 10px 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  text-decoration: none;
  border-bottom: 4px solid transparent;
}
.tab:hover { background: var(--raised); }
.tab[aria-current="page"] { background: var(--raised); border-bottom-color: var(--accent); }
.tab__dot {
  position: absolute; top: -6px; right: -6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--dot);
}

.frame {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 36px;
  /* Block only: the inline padding is `.shell`'s gutter. */
  padding-top: 36px;
  padding-bottom: 72px;
  flex: 1 0 auto;
}
.frame--single { grid-template-columns: minmax(0, 1fr); }
.page { min-width: 0; }

main { flex: 1 0 auto; display: flex; flex-direction: column; }

@media (max-width: 860px) {
  .frame { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 24px; }
  /* On a phone the page comes first; the account menu follows it. */
  .frame > .side { order: 2; }
  .wordmark img { width: 160px; }
  .tab { font-size: 17px; padding: 8px 14px; min-height: 40px; }
  .masthead__end { padding-bottom: 32px; }
}

/* ---------- Side menu: My Account (an accordion) and the list below ---------- */

.side { display: flex; flex-direction: column; gap: 16px; }
.account-menu { position: relative; }
.account-menu > summary {
  list-style: none;
  display: flex; align-items: center; gap: 13px;
  min-height: 60px; padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: var(--r-small);
  cursor: pointer;
  font-size: 16px;
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover,
.account-menu[open] > summary { background: var(--raised); }
.account-menu > summary .icon { margin-left: auto; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--lavender); color: var(--night);
  font-size: 16px; font-weight: 400; text-transform: uppercase;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-menu__panel {
  margin-top: 8px;
  padding: 4px 0;
  background: var(--raised);
  border: 1px solid var(--accent);
  border-radius: var(--r-small);
}
.account-menu__panel a,
.account-menu__panel button {
  display: flex; align-items: center; width: 100%;
  min-height: 42px; padding: 6px 12px;
  background: none; border: 0; text-align: left;
  color: var(--text); font-size: 14px; text-decoration: none; cursor: pointer;
}
.account-menu__panel a:hover,
.account-menu__panel button:hover { background: var(--surface); }

.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav li { border-bottom: 1px solid var(--line); }
.side-nav a,
.side-nav button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 42px; padding: 10px 12px;
  background: none; border: 0; text-align: left; cursor: pointer;
  color: var(--text); font-size: 16px; text-decoration: none;
}
.side-nav a:hover,
.side-nav button:hover { background: var(--surface); }
.side-nav a[aria-current="page"] { background: var(--surface); }
.side-nav form { margin: 0; }

/* ---------- Type ---------- */

.page-title {
  color: var(--accent);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.lede { color: var(--text-2); font-size: 16px; max-width: 46em; }
.prose p + p { margin-top: 8px; }
.hint { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.muted { color: var(--text-2); }

/* The tabbed section head: a filled label on a full-width rule. */
.section { margin-top: 56px; }
.section:first-child { margin-top: 0; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.section__title {
  display: inline-block;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--accent);
  font-size: 20px;
}
.section__head .btn { margin-bottom: 6px; }
.section > p { max-width: 46em; }
.section > p + p { margin-top: 8px; }

/* ---------- Buttons (Components → Button, every colourway) ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--r-small);
  background: transparent;
  color: var(--accent);
  font-size: 16px; line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--quick), color var(--quick);
}
.btn:hover { background: var(--raised); }
.btn--tertiary { border-color: var(--text-2); color: var(--text-2); }
.btn--tertiary:hover { color: var(--text); }
.btn--selected,
.btn[aria-pressed="true"] { background: var(--raised); border-color: var(--accent); color: var(--accent); }
.btn--high { background: var(--accent); color: var(--on-accent); }
.btn--high:hover { background: var(--accent); filter: brightness(1.08); }
.btn--alert { background: var(--alert); border-color: var(--alert); color: var(--on-alert); }
.btn--alert:hover { background: var(--alert); filter: brightness(1.1); }
.btn:disabled,
.btn[aria-disabled="true"] {
  border-color: var(--line); color: var(--muted); background: transparent;
  cursor: not-allowed; filter: none;
}
.btn--small { min-height: 26px; padding: 2px 8px; font-size: 13px; }
.btn .icon { width: 20px; height: 20px; }

.inline-form { display: inline; margin: 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

/* ---------- Toolbar: search + Start a Circle ---------- */

.toolbar { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.search {
  flex: 1 1 320px; max-width: 546px;
  display: flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 8px;
  border: 1px solid var(--accent); border-radius: var(--r-small);
  background: var(--field);
  color: var(--text-2);
}
.search input {
  flex: 1; min-width: 0; border: 0; background: none; padding: 6px 2px;
  color: var(--text); font-size: 16px;
}
.search input::placeholder { color: var(--text-2); }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }

.filters { margin: -8px 0 20px; }
.filters > summary { cursor: pointer; color: var(--text-2); font-size: 14px; min-height: 24px; }
.filters__row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.filters__row .field { min-width: 160px; }

/* ---------- Circle card (Components → Circle Card: Default, Hover, Quick Actions) ---------- */

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 263px));
  gap: 20px;
}
.circle-card {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--accent);
  border-radius: var(--r-card);
  background: var(--bg);
  min-height: 260px;
}
.circle-card__cover {
  position: relative; display: block;
  height: 156px;
  border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--accent);
  text-decoration: none;
}
.circle-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.circle-card__enter {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--overlay);
  color: #ffffff; font-size: 18px;
  opacity: 0; transition: opacity var(--quick);
}
.circle-card__cover:hover .circle-card__enter,
.circle-card__cover:focus-visible .circle-card__enter { opacity: 1; }
.circle-card__cover:focus-visible { outline-offset: -4px; }
.circle-card__body { display: flex; flex-direction: column; gap: 16px; padding: 7px 11px 16px; flex: 1; }
.circle-card__top { display: flex; gap: 10px; align-items: flex-start; }
.circle-card__titles { flex: 1; min-width: 0; }
.circle-card__name { color: var(--title); font-size: 18px; overflow-wrap: anywhere; }
.circle-card__name a { text-decoration: none; }
.circle-card__name a:hover { text-decoration: underline; }
.circle-card__desc { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.circle-card__bottom { display: flex; gap: 10px; align-items: center; margin-top: auto; }
.circle-card__bottom .tags { flex: 1; }
.badges { display: flex; gap: 6px; align-items: center; }
.badge { display: inline-flex; color: var(--accent); }
.badge--recruiting { color: var(--ok); }

/* The quick-actions menu ("…"). A <details>, so it opens with no script. */
.quick { position: relative; flex: none; }
.quick > summary {
  list-style: none; cursor: pointer;
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: var(--r-small);
  background: var(--surface); color: var(--accent);
}
.quick > summary::-webkit-details-marker { display: none; }
.quick[open] > summary,
.quick > summary:hover { background: var(--raised); }
.quick__menu {
  position: absolute; z-index: 5; top: 28px; left: -4px;
  min-width: 180px; padding: 4px 0;
  background: var(--raised);
  border-radius: var(--r-small);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.quick__menu a,
.quick__menu button {
  display: flex; align-items: center; gap: 4px; width: 100%;
  min-height: 42px; padding: 6px 12px;
  background: none; border: 0; text-align: left; cursor: pointer;
  color: var(--text-2); font-size: 14px; text-decoration: none;
}
.quick__menu a:hover,
.quick__menu button:hover { background: var(--surface); color: var(--text); }
.quick__menu .icon { width: 18px; height: 18px; }
.quick__menu form { margin: 0; }

/* ---------- Tags (Components → Tag, one shade per genre) ---------- */

.tags { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.tag {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 0 6px;
  border-radius: var(--r-small);
  background: #78c6a3; color: var(--night);
  font-size: 13px;
}
.tag--fantasy { background: #99e2b4; }
.tag--romance { background: #88d4ab; }
.tag--sf { background: #78c6a3; }
.tag--literary { background: #67b99a; }
.tag--ya { background: #88d4ab; }
.tag--horror { background: #56ab91; }
.tag--mystery-thriller { background: #469d89; }
/* The three deepest shades carry a light label; night on them fails AA. */
.tag--memoir { background: #248277; color: #ffffff; }
.tag--nonfiction { background: #14746f; color: #ffffff; }
.tag--historical { background: #036666; color: #ffffff; }
.tag--poetry { background: #248277; color: #ffffff; }
.tag--other { background: var(--raised); color: var(--text); }

/* The visibility chip beside a circle's name. */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 24px; padding: 0 8px;
  border-radius: var(--r-small);
  background: var(--surface); color: var(--text-2);
  font-size: 13px;
}
.chip .icon { width: 18px; height: 18px; }
.chip--recruiting { color: var(--ok); }

/* ---------- Circle page ---------- */

.banner {
  height: clamp(110px, 12vw, 156px);
  border: 1px solid var(--accent);
  border-radius: var(--r-card);
  overflow: hidden;
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner + .tags { margin-top: 12px; }
.purpose { color: var(--text-2); font-size: 18px; margin-top: 16px; max-width: 46em; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-small);
  overflow-x: auto;
}
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th {
  text-align: left; font-weight: 400;
  padding: 16px 14px;
  background: var(--surface); color: var(--accent);
}
.table td { padding: 14px; border-top: 1px solid var(--line); color: var(--text-2); }
.table tr.is-you td { color: var(--text); font-weight: 400; }
.table__more { display: flex; justify-content: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); }
.table .inline-form + .inline-form { margin-left: 6px; }

.modules {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 420px));
  gap: 14px;
}
.module {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-small);
  background: var(--bg);
}
.module:hover { background: var(--surface); }
.module__title {
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--accent); font-size: 18px;
}
.module:hover .module__title { background: var(--raised); }
.module__body { padding: 16px 14px; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.module__body .actions { margin-top: auto; padding-top: 8px; }

.threads { list-style: none; margin: 0; padding: 0; }
.threads li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.threads a { color: var(--title); }

.code-box {
  display: inline-block; padding: 8px 14px;
  border: 1px dashed var(--accent); border-radius: var(--r-small);
  font-family: var(--mono); font-size: 20px; letter-spacing: 0.15em; color: var(--title);
}

/* ---------- Forms ---------- */

.form { display: flex; flex-direction: column; gap: 40px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label,
.field > .label,
fieldset > legend { color: var(--text); font-size: 14px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset > legend { padding: 0; margin-bottom: 8px; }

input[type="text"], input[type="email"], input[type="search"], textarea, select {
  width: 100%;
  min-height: 34px; padding: 6px 10px;
  border: 1px solid var(--accent); border-radius: var(--r-small);
  background: var(--field);
  color: var(--accent);
  font-size: 16px;
}
textarea { min-height: 146px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--text-2); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
input[readonly], input:disabled {
  border-color: var(--line); color: var(--muted); background: transparent; cursor: not-allowed;
}
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
  background-image: none;
}
.select { position: relative; }
.select > .icon { position: absolute; right: 6px; top: 5px; pointer-events: none; color: var(--accent); }
.select select { color: var(--title); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* The floating form (Start A New Circle). */
.sheet {
  position: relative;
  max-width: 958px; margin: 48px auto 72px;
  padding: clamp(24px, 5vw, 60px) clamp(16px, 11vw, 172px);
  background: var(--bg);
  border-radius: var(--r-small);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: light) { .sheet { background: var(--surface); box-shadow: 0 0 40px rgba(12, 14, 19, 0.12); } }
.sheet__close {
  position: absolute; top: 40px; right: 36px;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-small);
  background: var(--surface); color: var(--title);
  font-size: 28px; line-height: 1; text-decoration: none;
}
.sheet__close:hover { background: var(--raised); }

/* The name field (Components → Form Section — Title: "Start & Live", "Set"). */
.title-field {
  display: inline-block; max-width: 100%;
  font-size: clamp(26px, 3.2vw, 40px); font-weight: 400;
}
.title-field input {
  width: auto; min-width: 8ch; max-width: 100%;
  min-height: 0; padding: 4px 8px;
  border: 0; border-radius: var(--r-small);
  background: var(--surface);
  color: var(--accent);
  font-size: inherit; font-weight: 400;
  caret-color: var(--accent);
}
.title-field input::placeholder { color: var(--text-2); }
.title-field input.is-set { background: transparent; padding-left: 0; }
.title-field input.is-set:focus { background: var(--surface); padding-left: 8px; }

/* Discoverability (Components → Visibility Class, Discoverability Grid). */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; display: flex; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  display: flex; flex-direction: column; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-small);
  cursor: pointer;
}
.choice__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--text-2); font-size: 16px;
}
.choice__head .icon { color: var(--raised); background: var(--text-2); border-radius: 4px; }
.choice__body { padding: 10px; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.choice__body em { font-style: normal; color: var(--accent); }
.choice input:checked + label { border-color: var(--accent); }
.choice input:checked + label .choice__head { background: var(--raised); color: var(--title); }
.choice input:checked + label .choice__head .icon { background: var(--accent); }
.choice input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice label:hover .choice__head { color: var(--text); }

.subset {
  margin-top: 10px; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--r-small);
}
.subset > legend {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 4px; color: var(--text-2); font-size: 13px;
}
.subset > legend .icon { width: 16px; height: 16px; }
/* Public's own choices: only shown when Public is the choice. */
.subset[hidden] { display: none; }
.has-js .subset.is-collapsed { display: none; }

/* A button group (Submit by / Review by): radios drawn as buttons. */
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 6px 16px;
  border: 1px solid var(--text-2); border-radius: var(--r-small);
  color: var(--text-2); cursor: pointer;
}
.segmented label:hover { color: var(--text); }
.segmented input:checked + label { background: var(--raised); border-color: var(--accent); color: var(--accent); }
.segmented input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }

/* The pen-name typeahead (Components → Form Section w Dropdown: Open). */
.typeahead { position: relative; display: flex; gap: 10px; align-items: flex-start; }
.typeahead__input { position: relative; flex: 1; }
.typeahead__list {
  position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: 4px 0;
  background: var(--night);
  border: 1px solid var(--accent); border-radius: var(--r-small);
  max-height: 220px; overflow-y: auto;
}
@media (prefers-color-scheme: light) { .typeahead__list { background: var(--field); } }
.typeahead__list[hidden] { display: none; }
.typeahead__list li {
  min-height: 34px; padding: 6px 10px; cursor: pointer;
  color: var(--text); font-size: 14px;
}
.typeahead__list li[aria-selected="true"],
.typeahead__list li:hover { background: var(--surface); }

/* ---------- Account settings ---------- */

.settings-grid { display: grid; gap: 16px; }
.roster { list-style: none; margin: 0; padding: 0; }
.roster__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 12px; align-items: center;
  padding: 12px 10px; border-bottom: 1px solid var(--line);
}
.roster__name { color: var(--text-2); }
.roster__meta { color: var(--text-2); font-size: 13px; }
@media (max-width: 640px) { .roster__row { grid-template-columns: 1fr auto; } .roster__meta { grid-column: 1; } }

.confirm > summary { list-style: none; display: inline-flex; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary { margin-bottom: 12px; }

/* ---------- Flash, empty states, pager ---------- */

.flash {
  margin: 0 0 20px; padding: 10px 14px;
  border: 1px solid var(--ok); border-radius: var(--r-small);
  color: var(--text);
}
.flash[data-tone="bad"] { border-color: var(--alert); }
.empty { color: var(--text-2); max-width: 46em; }
.empty p + p { margin-top: 8px; }
.pager { margin-top: 24px; }

/* ---------- Signed-out and long-form pages (store, legal, sign-in) ---------- */

.narrow { max-width: 720px; }
.longform { max-width: 46em; }
.longform h1 { color: var(--accent); font-size: 28px; font-weight: 400; margin-bottom: 20px; }
.longform h2 { color: var(--accent); font-size: 20px; font-weight: 400; margin: 32px 0 10px; }
.longform h3 { color: var(--title); font-size: 17px; margin: 20px 0 8px; }
.longform p, .longform li { color: var(--text-2); }
.longform p + p { margin-top: 10px; }
.longform ul, .longform ol { padding-left: 1.3em; }
.longform li + li { margin-top: 6px; }
.longform a { color: var(--accent); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.cards--plans { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.plan {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--r-small);
}
.plan__price { color: var(--title); font-size: 22px; }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  color: var(--text-2); font-size: 14px;
}
.foot__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--text-2); text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
.foot a:hover { color: var(--accent); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Inherited class names ----------
   Pages not redrawn in this pass (sign-in and its doors, invite links,
   threads, moderation, circle settings, the signed-out landing) keep their
   markup and their class names; these rules carry them into the new brand
   so they sit in the new shell without looking like the old one. */

.band { margin-bottom: 40px; }
.band--rule { padding-top: 32px; border-top: 1px solid var(--line); }
.band__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.measure { max-width: 46em; }
.display, .band h1 { color: var(--accent); font-size: 28px; font-weight: 400; margin-bottom: 16px; }
.band h2 { color: var(--accent); font-size: 20px; font-weight: 400; margin: 8px 0 12px; }
.band h3 { color: var(--title); font-size: 18px; margin-bottom: 6px; }
.band p { margin-bottom: 10px; }
.eyebrow { color: var(--text-2); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.signature { color: var(--title); font-size: 24px; }
.prose { color: var(--text); }
.prose--quote { border-left: 2px solid var(--line); padding-left: 12px; color: var(--text-2); }
.linkish, .display-link { color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.btn--quiet { border-color: var(--text-2); color: var(--text-2); }
.btn--display, .btn--prose { /* the old type families: one face now */ }
.btn--danger { border-color: var(--alert); color: var(--alert); }
.btn--danger:not(.btn--quiet) { background: var(--alert); color: var(--on-alert); }
.field--check { flex-direction: row; align-items: center; gap: 10px; }
.field--check input { width: 20px; height: 20px; accent-color: var(--accent); }
.hint--prose, .fineprint, .fineprint--onground, .fineprint--prose { color: var(--text-2); font-size: 14px; }
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-small); }
.card__title { color: var(--title); font-size: 18px; }
.card__meta { color: var(--text-2); font-size: 14px; }
.roster__actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.posts { list-style: none; margin: 0; padding: 0; }
.post { padding: 16px 0; border-bottom: 1px solid var(--line); }
.post__by, .post__name { color: var(--text-2); font-size: 14px; }
.post__gone, .reported { color: var(--muted); font-style: italic; }
.code-reveal { display: flex; flex-direction: column; gap: 6px; }
.code-reveal__code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.15em; color: var(--title); }
.code-reveal__label, .code-reveal__hint { color: var(--text-2); font-size: 14px; }
.alt-signin { margin-top: 20px; }
.auth-form { max-width: 480px; }
.doorway, .landing__doorway { margin-top: 16px; }
.landing__title { color: var(--accent); font-size: clamp(32px, 4vw, 52px); font-weight: 400; }
.landing__strap, .landing__lede { color: var(--text-2); font-size: 18px; margin-top: 12px; }
.landing__columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 32px; }
.landing__point { color: var(--text-2); }
.legal__date { color: var(--text-2); font-size: 14px; }
.rule-label { color: var(--text-2); font-size: 14px; }
.status { color: var(--text-2); }
.inline-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.store__product { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-small); margin-bottom: 14px; }
.actions--quiet { margin-top: 8px; }
.band .cards, .band .card + .card { margin-top: 12px; }

/* The roster's Show All (circle.js): rows past the fifth fold away. */
.table.is-collapsed .is-extra { display: none; }
[data-expands][hidden] { display: none; }
.table td.role { text-transform: capitalize; }
.store__product { margin: 0; padding: 0; }
.cards--plans > .module { list-style: none; }

/* The search box is the bordered thing; its input is bare inside it. */
.search input[type="search"],
.search input[type="text"] { border: 0; min-height: 0; background: none; padding: 6px 2px; }
.search input:focus-visible { outline: none; }
/* One line, as drawn ("Descriptor if needed"). */
.circle-card__desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section .lede { margin-bottom: 16px; }

@media (max-width: 640px) {
  .sheet { margin-top: 24px; padding: 64px 16px 32px; }
  .sheet__close { top: 14px; right: 14px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
