/* CircleName components and layouts. Reads tokens.css only (no literal colours here). Mobile first:
   360 / 390 / 430 px, then the two-column community layout from 1000 px. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-16); line-height: var(--lh); color: var(--ink);
  background: var(--surface); }
body.root-site { background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--sky-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
p a:not(.btn), li > a.inline, .notice a:not(.btn), .prose a { text-decoration: underline; text-underline-offset: 2px; }  /* links inside text are not told by colour alone (B7) */
.table-wrap:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0 0 var(--s-3); font-weight: 700; }
h1 { font-size: var(--fs-28); }
h2 { font-size: var(--fs-22); }
h3 { font-size: var(--fs-18); }
p { margin: 0 0 var(--s-3); }
small, .muted { color: var(--ink-2); }
.small { font-size: var(--fs-14); }
hr { border: 0; border-top: var(--bw) solid var(--line); margin: var(--s-4) 0; }
:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-2); top: -40px; background: var(--card); padding: var(--s-2) var(--s-3); border-radius: var(--r-ctl); z-index: 50; }
.skip:focus { top: var(--s-2); }
[lang="hi"] body, .hi { line-height: 1.6; }

/* ---- buttons ---------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--tap);
  padding: 0 var(--s-4); border-radius: var(--r-ctl); border: var(--bw) solid var(--line); background: var(--card);
  color: var(--ink); font: inherit; font-weight: 600; font-size: var(--fs-16); cursor: pointer; text-decoration: none;
  white-space: nowrap; }
.btn:hover { background: var(--surface); text-decoration: none; }
.btn-primary { background: var(--sky-deep); border-color: var(--sky-deep); color: var(--bg); }
.btn-primary:hover { background: var(--sky-deep); filter: brightness(0.94); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--rose-ink); border-color: var(--rose); background: var(--card); }
.btn-sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-14); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
  border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--rose-ink); color: var(--bg); font-size: var(--fs-13); font-weight: 700; line-height: 18px; text-align: center; }

/* ---- forms ------------------------------------------------------------------------------------------ */
label { display: block; font-weight: 600; font-size: var(--fs-14); margin-bottom: var(--s-1); }
.field { margin-bottom: var(--s-4); }
.field .help { font-size: var(--fs-14); color: var(--ink-2); margin-top: var(--s-1); }
.field .error, .form-error { color: var(--rose-ink); font-size: var(--fs-14); margin-top: var(--s-1); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number],
input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; min-height: var(--tap); padding: var(--s-2) var(--s-3); border: var(--bw) solid var(--line);
  border-radius: var(--r-ctl); background: var(--card); color: var(--ink); font: inherit; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sky-deep); outline: none; box-shadow: 0 0 0 3px var(--sky-tint); }
.check { display: flex; align-items: center; gap: var(--s-2); font-weight: 400; font-size: var(--fs-16); min-height: var(--tap); }
.check input { width: 20px; height: 20px; accent-color: var(--sky-deep); flex: none; }  /* HPC-16: a long label squeezed it to 13 px */
.check span a { text-decoration: underline; text-underline-offset: 2px; }  /* a link inside a consent line (axe link-in-text-block) */
.row { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 200px; }
.input-affix { display: flex; align-items: stretch; border: var(--bw) solid var(--line); border-radius: var(--r-ctl); background: var(--card); overflow: hidden; }
.input-affix span { display: flex; align-items: center; padding: 0 var(--s-3); color: var(--ink-2); background: var(--surface); font-size: var(--fs-14); }
.input-affix input { border: 0; border-radius: 0; }
.status-ok { color: var(--leaf-ink); }
.status-bad { color: var(--rose-ink); }

/* ---- chips and tags --------------------------------------------------------------------------------- */
.chips { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-1); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 36px; padding: 0 var(--s-3);
  border-radius: var(--r-pill); border: var(--bw) solid var(--line); background: var(--card); color: var(--ink);
  font-size: var(--fs-14); font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; }
.chip:hover { text-decoration: none; background: var(--surface); }
.chip[aria-current="true"], .chip.on { background: var(--sky-tint); border-color: var(--sky); color: var(--sky-ink); }
.tag { display: inline-flex; align-items: center; gap: var(--s-1); padding: 2px var(--s-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-2); font-size: var(--fs-13); font-weight: 600; }
.tag-sky { background: var(--sky-tint); color: var(--sky-ink); }
.tag-sun { background: var(--sun); color: var(--ink); }
.tag-leaf { color: var(--leaf-ink); background: var(--surface); }
.tag-rose { color: var(--rose-ink); background: var(--surface); }

/* ---- cards ------------------------------------------------------------------------------------------ */
.card { background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-card); padding: var(--s-4); }
.card + .card { margin-top: var(--s-3); }
.grid > .card + .card, .kpis > .card + .card, .row > .card + .card, .admin-grid .grid > .card { margin-top: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card h2, .card h3 { margin-bottom: var(--s-2); }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; border-color: var(--sky); }
.grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.stack > * + * { margin-top: var(--s-3); }
.split { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); color: var(--ink-2); font-size: var(--fs-14); }
.meta .ic { --icon: 16px; }

/* ---- avatar with level badge ------------------------------------------------------------------------ */
.av { position: relative; display: inline-flex; flex: none; width: 40px; height: 40px; }
.av-img, .av-ini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av-ini { display: flex; align-items: center; justify-content: center; background: var(--av-bg, var(--sky-tint)); color: var(--av-fg, var(--sky-deep));
  font-weight: 700; font-size: var(--fs-14); }
.av-lv { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--r-pill);
  background: var(--sun); color: var(--ink); border: 2px solid var(--card); font-size: var(--fs-13); font-weight: 700; line-height: 16px; text-align: center; }
.av-sm { width: 32px; height: 32px; } .av-sm .av-lv { min-width: 18px; height: 18px; padding: 0 3px; right: -5px; bottom: -5px; line-height: 14px; }
.av-xs { width: 24px; height: 24px; } .av-xs .av-lv { display: none; } .av-xs .av-ini { font-size: 10px; letter-spacing: 0; }
.av-lg { width: 72px; height: 72px; } .av-lg .av-ini { font-size: var(--fs-22); } .av-lg .av-lv { min-width: 26px; height: 26px; font-size: 13px; line-height: 22px; }
.av-stack { display: inline-flex; flex-direction: row-reverse; } .av-stack .av { margin-left: -6px; } .av-stack .av:last-child { margin-left: 0; }
.av-stack .av-ini, .av-stack .av-img { border: 2px solid var(--card); }

/* ---- tabs ------------------------------------------------------------------------------------------- */
.tabs { display: flex; gap: var(--s-1); overflow-x: auto; border-bottom: var(--bw) solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-3);
  border: 0; background: none; color: var(--ink-2); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sky); }

/* ---- dropdown, modal, bottom sheet, toast ----------------------------------------------------------- */
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 220px; background: var(--card); border: var(--bw) solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-menu); padding: var(--s-2); z-index: 40; display: none; }
.dd.open .dd-menu { display: block; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 40px; padding: 0 var(--s-2);
  border: 0; background: none; border-radius: var(--r-ctl); color: var(--ink); font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--sky-tint); text-decoration: none; }
.dd-menu .sep { height: 1px; background: var(--line); margin: var(--s-1) 0; }
.dd-left .dd-menu { left: 0; right: auto; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: none; }
.scrim.open { display: block; }
.modal { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px); overflow: auto; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-menu);
  padding: var(--s-5); display: none; }
.modal.open { display: block; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-3); }
@media (max-width: 639px) {
  .modal.sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 92vh; border-radius: var(--r-card) var(--r-card) 0 0; }
  .modal.sheet.full { top: 0; max-height: none; height: 100%; border-radius: 0; }
}
.toast-wrap { position: fixed; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70;
  display: flex; flex-direction: column; gap: var(--s-2); width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: var(--s-3) var(--s-4); border-radius: var(--r-ctl); box-shadow: var(--shadow-menu); font-size: var(--fs-14); }
.toast.ok { border-left: 4px solid var(--leaf); } .toast.bad { border-left: 4px solid var(--rose); }
@media (min-width: 1000px) { .toast-wrap { bottom: var(--s-5); } }
.notice { padding: var(--s-3) var(--s-4); border-radius: var(--r-ctl); background: var(--sky-tint); color: var(--ink); font-size: var(--fs-14); margin-bottom: var(--s-4); }
.notice.bad { background: var(--surface); border-left: 4px solid var(--rose); }
.notice.ok { background: var(--surface); border-left: 4px solid var(--leaf); }

/* ---- states: skeleton, empty, error, no permission -------------------------------------------------- */
.skel { background: var(--surface); border-radius: var(--r-ctl); position: relative; overflow: hidden; min-height: 14px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--bg), transparent); animation: skel 1.3s infinite; }
@keyframes skel { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
.skel-card { height: 140px; margin-bottom: var(--s-3); border-radius: var(--r-card); }
.state { text-align: center; padding: var(--s-6) var(--s-4); }
.state img { width: 180px; height: auto; margin: 0 auto var(--s-4); display: block; }
.state h2 { font-size: var(--fs-18); }
.state p { color: var(--ink-2); max-width: 420px; margin: 0 auto var(--s-4); }
.more { display: flex; justify-content: center; padding: var(--s-4); }
.pager { display: flex; gap: var(--s-2); justify-content: center; padding: var(--s-4) 0; }

/* ---- tables ----------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: var(--bw) solid var(--line); border-radius: var(--r-card); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.tbl th, .tbl td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: var(--bw) solid var(--line); vertical-align: middle; }
.tbl th { color: var(--ink-2); font-weight: 600; background: var(--surface); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--sky-tint); }

/* ---- root site layout ------------------------------------------------------------------------------- */
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 var(--s-4); }
.wrap-narrow { width: min(720px, 100%); margin: 0 auto; padding: 0 var(--s-4); }
.r-head { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: var(--bw) solid var(--line); }
.r-head .wrap { display: flex; align-items: center; gap: var(--s-3); height: var(--topbar-h); }
.logo { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: var(--fs-18); color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 28px; height: 28px; }
.r-nav { display: none; gap: var(--s-1); margin-left: var(--s-4); }
.r-nav a { color: var(--ink-2); font-weight: 600; padding: var(--s-2) var(--s-3); border-radius: var(--r-ctl); }
.r-nav a:hover, .r-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); text-decoration: none; }
.r-head .end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
@media (min-width: 860px) { .r-nav { display: flex; } .r-menu-btn { display: none; } }
/* HPC-16: at 360 px "Sign in", "Start free trial" and the menu button pushed the menu 26 px off the screen; the drawer
   already has Sign in, so the header drops its own below 420 px */
@media (max-width: 419px) { .r-head .end .r-signin { display: none; } .r-head .wrap { gap: var(--s-2); } }
/* signed in, "Platform", "Profile" and "My account" did not fit beside the menu below about 520 px; the drawer has both */
@media (max-width: 519px) { .r-head .end .r-hide-sm { display: none; } }
.r-drawer { display: none; border-top: var(--bw) solid var(--line); padding: var(--s-2) var(--s-4) var(--s-4); background: var(--bg); }
.r-drawer.open { display: block; }
.r-drawer a { display: flex; align-items: center; min-height: var(--tap); color: var(--ink); font-weight: 600; }
.r-main { min-height: 60vh; }
.hero { padding: var(--s-7) 0 var(--s-6); }
.hero h1 { font-size: var(--fs-28); max-width: 18ch; }
.hero .lead { font-size: var(--fs-18); color: var(--ink-2); max-width: 54ch; margin-bottom: var(--s-5); }
@media (min-width: 860px) { .hero { padding: var(--s-8) 0 var(--s-7); } .hero h1 { font-size: var(--fs-36); } }
.hero-grid { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.section { padding: var(--s-7) 0; border-top: var(--bw) solid var(--line); }
.section-alt { background: var(--surface); }
.steps { counter-reset: step; display: grid; gap: var(--s-4); }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-left: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sky-tint); color: var(--sky-ink); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.r-foot { border-top: var(--bw) solid var(--line); padding: var(--s-6) 0; color: var(--ink-2); font-size: var(--fs-14); background: var(--surface); }
.r-foot .cols { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .r-foot .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.r-foot a { color: var(--ink-2); display: block; padding: 2px 0; }

/* pricing */
.toggle { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface); border: var(--bw) solid var(--line); }
.toggle button, .toggle a { min-height: 36px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.toggle [aria-pressed="true"], .toggle .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 10%, transparent); }
.price-card { display: flex; flex-direction: column; }
.price-card .amount { font-size: var(--fs-36); font-weight: 700; line-height: 1; margin: var(--s-3) 0 var(--s-1); }
.price-card .per { color: var(--ink-2); font-size: var(--fs-14); }
.price-card ul { list-style: none; padding: 0; margin: var(--s-4) 0; flex: 1; }
.price-card li { display: flex; gap: var(--s-2); padding: var(--s-1) 0; }
.price-card li .ic { color: var(--leaf); }
.price-card.featured { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); }

/* community card (discover) */
.cc { display: flex; flex-direction: column; overflow: hidden; padding: 0; color: inherit; }
.cc:hover { text-decoration: none; border-color: var(--sky); }
.cc-cover { aspect-ratio: 16 / 7; background: var(--sky-tint); overflow: hidden; }
.cc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-body { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.cc-head { display: flex; align-items: center; gap: var(--s-3); }
.logo-sq { width: 40px; height: 40px; border-radius: var(--r-ctl); flex: none; object-fit: cover; background: var(--sky-tint);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--sky-ink); }
.logo-sq-sm { width: 28px; height: 28px; font-size: var(--fs-13); border-radius: 6px; }
.cc-name { font-weight: 700; color: var(--ink); }
.cc-tag { color: var(--ink-2); font-size: var(--fs-14); }
.cc-foot { margin-top: auto; display: flex; justify-content: space-between; color: var(--ink-2); font-size: var(--fs-14); }

/* wizard */
.wizard-steps { display: flex; gap: var(--s-1); margin-bottom: var(--s-5); }
.wizard-steps span { flex: 1; height: 4px; border-radius: var(--r-pill); background: var(--line); }
.wizard-steps span.done { background: var(--sky); }
.choice-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
.choice { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: var(--s-2) var(--s-3); border: var(--bw) solid var(--line);
  border-radius: var(--r-ctl); background: var(--card); cursor: pointer; font-weight: 600; font-size: var(--fs-14); }
.choice:has(input:checked) { border-color: var(--sky-deep); background: var(--sky-tint); color: var(--sky-ink); }
.choice input { accent-color: var(--sky-deep); }
.cover-pick { display: grid; gap: var(--s-2); grid-template-columns: repeat(3, 1fr); }
.cover-pick label { margin: 0; cursor: pointer; border: 2px solid transparent; border-radius: var(--r-ctl); overflow: hidden; }
.cover-pick label:has(input:checked) { border-color: var(--sky-deep); }
.cover-pick img { display: block; aspect-ratio: 16 / 7; object-fit: cover; width: 100%; }
.cover-pick input { position: absolute; opacity: 0; }
.swatches { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.swatch { width: var(--tap); height: var(--tap); border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; position: relative; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--ink); }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: var(--bw) solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.checklist li.done .tick { background: var(--leaf); border-color: var(--leaf); color: var(--bg); }
.checklist li.done .what { color: var(--ink-2); text-decoration: line-through; }
.checklist .what { flex: 1; }

/* ---- community layout ------------------------------------------------------------------------------- */
.c-top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: var(--bw) solid var(--line); }
.c-top-in { display: flex; align-items: center; gap: var(--s-2); height: var(--topbar-h); width: min(var(--page-w), 100%); margin: 0 auto; padding: 0 var(--s-3); }
.switcher > button { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-2); border: 0; background: none;
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; border-radius: var(--r-ctl); max-width: 56vw; }
.switcher > button:hover { background: var(--surface); }
.switcher .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .dd-menu { left: 0; right: auto; min-width: 260px; }
.switcher .dd-menu .count { margin-left: auto; }
.c-search { display: none; flex: 1; max-width: 420px; margin: 0 auto; position: relative; }
.c-search input { padding-left: 40px; background: var(--surface); border-color: var(--surface); }
.c-search .ic { position: absolute; left: 12px; top: 12px; color: var(--ink-2); }
@media (min-width: 760px) { .c-search { display: block; } .c-search-btn { display: none !important; } }
.c-top .end { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); }
.c-tabs { background: var(--bg); border-bottom: var(--bw) solid var(--line); display: none; }
.c-tabs .tabs { border-bottom: 0; width: min(var(--page-w), 100%); margin: 0 auto; padding: 0 var(--s-2); }
@media (min-width: 760px) { .c-tabs { display: block; } }
.c-main { width: min(var(--page-w), 100%); margin: 0 auto; padding: var(--s-4) var(--s-3) calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 1000px) { .c-main { padding-bottom: var(--s-7); } }
@media (min-width: 900px) {
  .cols { display: grid; grid-template-columns: minmax(0, var(--feed-w)) var(--side-w); gap: var(--s-5); align-items: start; }
  .side { position: sticky; top: calc(var(--topbar-h) + 64px); }
}
.side > * + * { margin-top: var(--s-3); }
.c-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--bg); border-top: var(--bw) solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.c-bottom a, .c-bottom button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
  color: var(--ink-2); font: inherit; font-size: var(--fs-13); font-weight: 600; border: 0; background: none; text-decoration: none; position: relative; }
.c-bottom [aria-current="page"] { color: var(--sky-ink); }
.c-bottom .dot { top: 4px; right: calc(50% - 22px); }
@media (min-width: 760px) { .c-bottom { display: none; } }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: var(--fs-22); }

/* community card on the right column */
.ccard { padding: 0; overflow: hidden; }
.ccard-cover { aspect-ratio: 16 / 7; background: var(--sky-tint); }
.ccard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard-body { padding: var(--s-4); }
.ccard .stats { display: flex; gap: var(--s-4); margin: var(--s-3) 0; text-align: center; }
.ccard .stats b { display: block; font-size: var(--fs-18); }
.ccard .stats span { font-size: var(--fs-13); color: var(--ink-2); }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--surface); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--sun); border-radius: var(--r-pill); }
.meter.sky > span { background: var(--sky); }
.meter.leaf > span { background: var(--leaf); }

/* ---- feed ------------------------------------------------------------------------------------------- */
.composer-open { display: flex; align-items: center; gap: var(--s-3); cursor: pointer; width: 100%; text-align: left; font: inherit; }
.composer-open .fake { flex: 1; min-height: var(--tap); display: flex; align-items: center; padding: 0 var(--s-3); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink-2); }
.feed-bar { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-4) 0 var(--s-3); }
.feed-bar .chips { flex: 1; }
.post { padding: var(--s-4); }
.post-head { display: flex; gap: var(--s-3); align-items: flex-start; margin-bottom: var(--s-3); }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who b { color: var(--ink); }
.post h2 { font-size: var(--fs-18); margin-bottom: var(--s-2); }
.post h2 a { color: var(--ink); }
.post .excerpt { color: var(--ink); margin-bottom: var(--s-3); overflow-wrap: anywhere; }
.post .thumb { border-radius: var(--r-ctl); overflow: hidden; margin-bottom: var(--s-3); background: var(--surface); position: relative; }
.post .thumb img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.post .thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--bg); }
.post .thumb .play .ic { --icon: 56px; stroke-width: 1.25; }
.post-foot { display: flex; align-items: center; gap: var(--s-2); color: var(--ink-2); font-size: var(--fs-14); }
.post-foot .grow { flex: 1; }
.pinned-label { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--sky-ink); font-size: var(--fs-13); font-weight: 700; }
.like-btn { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 36px; padding: 0 var(--s-2); border-radius: var(--r-ctl);
  border: 0; background: none; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.like-btn:hover { background: var(--surface); }
.like-btn[aria-pressed="true"] { color: var(--sky-ink); }
.like-btn[aria-pressed="true"] .ic { fill: var(--sky-tint); }
.prose { overflow-wrap: anywhere; }
.prose h2 { font-size: var(--fs-18); margin-top: var(--s-4); }
.prose h3 { font-size: var(--fs-16); margin-top: var(--s-3); }
.prose blockquote { margin: var(--s-3) 0; padding-left: var(--s-3); border-left: 3px solid var(--sky); color: var(--ink-2); }
.prose img { border-radius: var(--r-ctl); }
.prose ul, .prose ol { padding-left: var(--s-5); }
.mention { color: var(--sky-ink); font-weight: 600; }
.gallery { display: grid; gap: var(--s-2); grid-template-columns: repeat(2, 1fr); margin: var(--s-3) 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-ctl); }
.files a { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: var(--bw) solid var(--line); border-radius: var(--r-ctl); margin-top: var(--s-2); color: var(--ink); }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-ctl); overflow: hidden; background: var(--ink); margin: var(--s-3) 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* poll */
.poll { border: var(--bw) solid var(--line); border-radius: var(--r-card); padding: var(--s-3); margin: var(--s-3) 0; }
.poll-opt { display: block; position: relative; border: var(--bw) solid var(--line); border-radius: var(--r-ctl); padding: var(--s-2) var(--s-3);
  margin-bottom: var(--s-2); overflow: hidden; min-height: var(--tap); background: var(--card); width: 100%; text-align: left; font: inherit; cursor: pointer; }
.poll-opt .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sky-tint); z-index: 0; }
.poll-opt .txt { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: var(--s-2); }
.poll-opt.mine { border-color: var(--sky-deep); }

/* comments */
.comments { margin-top: var(--s-4); }
.cmt { display: flex; gap: var(--s-3); padding: var(--s-3) 0; }
.cmt .body { flex: 1; min-width: 0; }
.cmt .bubble { background: var(--surface); border-radius: var(--r-card); padding: var(--s-2) var(--s-3); overflow-wrap: anywhere; }
.cmt .bubble img { max-height: 240px; border-radius: var(--r-ctl); margin-top: var(--s-2); }
.cmt .acts { display: flex; gap: var(--s-2); align-items: center; font-size: var(--fs-13); color: var(--ink-2); padding: var(--s-1) var(--s-2); }
.cmt .acts button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; padding: 4px; min-height: 28px; }
.replies { margin-left: 44px; border-left: 2px solid var(--line); padding-left: var(--s-3); }
.cmt-form { display: flex; gap: var(--s-2); align-items: flex-start; }
.cmt-form textarea { min-height: var(--tap); height: var(--tap); }

/* rich text composer */
.rt-bar { display: flex; gap: 2px; flex-wrap: wrap; border: var(--bw) solid var(--line); border-bottom: 0; border-radius: var(--r-ctl) var(--r-ctl) 0 0; padding: 4px; background: var(--surface); }
.rt-bar button { width: 36px; height: 36px; border: 0; background: none; border-radius: 6px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rt-bar button:hover { background: var(--card); color: var(--ink); }
.rt { min-height: 180px; border: var(--bw) solid var(--line); border-radius: 0 0 var(--r-ctl) var(--r-ctl); padding: var(--s-3); background: var(--card); overflow-wrap: anywhere; }
.rt:focus { outline: none; border-color: var(--sky-deep); }
.rt:empty::before { content: attr(data-placeholder); color: var(--ink-2); }
.attach-row { display: flex; gap: var(--s-1); align-items: center; flex-wrap: wrap; margin-top: var(--s-2); }
.mention-list { position: absolute; z-index: 65; background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-ctl); box-shadow: var(--shadow-menu); min-width: 220px; padding: 4px; }
.mention-list button { display: flex; gap: var(--s-2); align-items: center; width: 100%; padding: 6px var(--s-2); border: 0; background: none; border-radius: 6px; font: inherit; cursor: pointer; text-align: left; }
.mention-list button:hover, .mention-list button.on { background: var(--sky-tint); }

/* classroom */
.course-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; }
.course-card:hover { text-decoration: none; border-color: var(--sky); }
.course-card .cover { aspect-ratio: 16 / 9; background: var(--sky-tint); position: relative; }
.course-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card .lock { position: absolute; inset: 0; background: var(--scrim); color: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1); font-weight: 700; text-align: center; padding: var(--s-3); }
.course-card .body { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.course-card .body h3 { margin: 0; color: var(--ink); }
.course-card .body p { color: var(--ink-2); font-size: var(--fs-14); margin: 0; flex: 1; }
.player { display: grid; gap: var(--s-4); }
@media (min-width: 1000px) { .player { grid-template-columns: 300px minmax(0, 1fr); } }
.outline { padding: 0; }
.outline h3 { padding: var(--s-3) var(--s-4) 0; font-size: var(--fs-14); color: var(--ink-2); text-transform: none; }
.outline a { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-4); color: var(--ink); min-height: var(--tap); font-size: var(--fs-14); }
.outline a:hover { background: var(--surface); text-decoration: none; }
.outline a[aria-current="page"] { background: var(--sky-tint); color: var(--sky-ink); font-weight: 600; }
.outline a .ic { color: var(--line); }
.outline a.done .ic { color: var(--leaf); }
.outline a.locked { color: var(--ink-2); }
@media (max-width: 999px) {
  .outline-drawer { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); z-index: 62; background: var(--card); overflow: auto; transform: translateX(-100%); transition: transform .2s; border-radius: 0; }
  .outline-drawer.open { transform: none; }
}
@media (min-width: 1000px) { .outline-toggle { display: none !important; } }
.lesson-nav { display: flex; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-4); }
.locked-box { text-align: center; padding: var(--s-6) var(--s-4); }
.locked-box .ic { --icon: 40px; color: var(--ink-2); }

/* calendar */
.ev { display: flex; gap: var(--s-3); align-items: flex-start; }
.ev-date { flex: none; width: 56px; text-align: center; border: var(--bw) solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: var(--card); }
.ev-date .m { display: block; background: var(--sky-deep); color: var(--bg); font-size: var(--fs-13); font-weight: 700; text-transform: uppercase; padding: 2px 0; }
.ev-date .d { display: block; font-size: var(--fs-22); font-weight: 700; padding: 2px 0; }
.ev .body { flex: 1; min-width: 0; }
.ev .body h3 { margin: 0 0 2px; }
.month { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--card); }
.month th { font-size: var(--fs-13); color: var(--ink-2); padding: var(--s-2) 0; font-weight: 600; }
.month td { border: var(--bw) solid var(--line); vertical-align: top; height: 96px; padding: 4px; font-size: var(--fs-13); }
.month td.other { background: var(--surface); color: var(--ink-2); }
.month td.today .n { background: var(--sky-deep); color: var(--bg); border-radius: 50%; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; }
.month .e { display: block; margin-top: 2px; padding: 2px 4px; border-radius: 4px; background: var(--sky-tint); color: var(--sky-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.month .e.batch { background: var(--surface); color: var(--leaf-ink); }

/* members / leaderboard */
.mem { display: flex; gap: var(--s-3); align-items: flex-start; }
.mem .body { flex: 1; min-width: 0; }
.mem .body b { color: var(--ink); }
.online { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); margin-left: 4px; }
.lb-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: var(--bw) solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-row .rank { width: 28px; text-align: center; font-weight: 700; color: var(--ink-2); }
.lb-row .rank.top { background: var(--sun); color: var(--ink); border-radius: 50%; height: 28px; line-height: 28px; }
.lb-row .pts { margin-left: auto; font-weight: 700; color: var(--sky-ink); }
.lb-row.me { background: var(--sky-tint); border-radius: var(--r-ctl); padding-left: var(--s-2); padding-right: var(--s-2); }
.levels { display: grid; gap: var(--s-2); }
.level-row { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-14); }
.level-row .lv { width: 28px; height: 28px; border-radius: 50%; background: var(--sun); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.level-row .lv.off { background: var(--surface); color: var(--ink-2); }
.level-row .meter { flex: 1; }
.profile-head { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }

/* admin inside a community */
.admin-grid { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); }
.admin-grid > section, .cols > section, .player > section { min-width: 0; }
@media (min-width: 1000px) { .admin-grid { grid-template-columns: 220px minmax(0, 1fr); } }
.admin-nav a { display: flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-ctl); color: var(--ink); font-size: var(--fs-14); font-weight: 600; }
.admin-nav a:hover { background: var(--card); text-decoration: none; }
.admin-nav a[aria-current="page"] { background: var(--sky-tint); color: var(--sky-ink); }
@media (max-width: 999px) { .admin-nav { display: flex; overflow-x: auto; gap: var(--s-1); } .admin-nav a { white-space: nowrap; } }
.kpis { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi b { display: block; font-size: var(--fs-22); }
.kpi span { color: var(--ink-2); font-size: var(--fs-14); }

/* notifications */
.notes { list-style: none; padding: 0; margin: 0; }
.notes li a { display: flex; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-ctl); color: var(--ink); }
.notes li a:hover { background: var(--surface); text-decoration: none; }
.notes li.unread a { background: var(--sky-tint); }
.notes .when { font-size: var(--fs-13); color: var(--ink-2); }
.bell-menu { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; }

/* ---- the hub's own templates inside CircleName (sign-up, reset, receipts, quizzes): same tokens, no new colours ------------ */
.auth-card { max-width: 440px; margin: 0 auto; background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.sec { padding: var(--s-4) 0; } .sec .wrap { padding: 0; }
.h2 { font-size: var(--fs-22); font-weight: 700; } .h3 { font-size: var(--fs-18); font-weight: 700; }
.h-inline { font: inherit; font-weight: 700; margin: 0; display: inline; }  /* a heading that looks like the bold text it replaced (HPC-12, axe page-has-heading-one) */
.eyebrow { color: var(--ink-2); font-size: var(--fs-14); font-weight: 600; }
.flash { padding: var(--s-3) var(--s-4); border-radius: var(--r-ctl); background: var(--sky-tint); margin: var(--s-3) 0; font-size: var(--fs-14); }
.flash.bad { background: var(--surface); border-left: 4px solid var(--rose); } .flash.ok { background: var(--surface); border-left: 4px solid var(--leaf); }
.auth-alt { font-size: var(--fs-14); margin-top: var(--s-3); }
.btn-saffron, .btn-gold, .btn-royal { background: var(--sky-deep); border-color: var(--sky-deep); color: var(--bg); }
.rtable { width: 100%; border-collapse: collapse; font-size: var(--fs-14); } .rtable td, .rtable th { padding: var(--s-2); border-bottom: var(--bw) solid var(--line); text-align: left; }
.rtable .v { text-align: right; }
.panel { border: var(--bw) solid var(--line); border-radius: var(--r-card); margin: var(--s-3) 0; } .panel .pb, .panel .ph { padding: var(--s-3) var(--s-4); }

/* ---- HPC-02: avatar tints, the phone strip above the composer, the welcome card ----------------------- */
.av-t0 { --av-bg: var(--av-0-bg); --av-fg: var(--av-0-fg); } .av-t1 { --av-bg: var(--av-1-bg); --av-fg: var(--av-1-fg); }
.av-t2 { --av-bg: var(--av-2-bg); --av-fg: var(--av-2-fg); } .av-t3 { --av-bg: var(--av-3-bg); --av-fg: var(--av-3-fg); }
.av-t4 { --av-bg: var(--av-4-bg); --av-fg: var(--av-4-fg); } .av-t5 { --av-bg: var(--av-5-bg); --av-fg: var(--av-5-fg); }
.av-t6 { --av-bg: var(--av-6-bg); --av-fg: var(--av-6-fg); } .av-t7 { --av-bg: var(--av-7-bg); --av-fg: var(--av-7-fg); }
.one-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nowrap { white-space: nowrap; }
.c-strip { padding: var(--s-2) var(--s-3); }
.strip-row { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); color: var(--ink); text-decoration: none; }
.strip-row + .strip-row { border-top: var(--bw) solid var(--line); }
.strip-row:hover { text-decoration: none; }
.strip-row .ic { color: var(--ink-2); }
.strip-row .grow { flex: 1; }
.strip-row .one-line { flex: 1; }
@media (min-width: 900px) { .c-strip { display: none; } }
@media (max-width: 899px) { .side-wide { display: none; } }
.sheet-side { margin-bottom: var(--s-3); }
.sheet-side > * + * { margin-top: var(--s-3); }
.onboard { display: flex; gap: var(--s-3); align-items: flex-start; }
.onboard > img { flex: none; width: 88px; height: auto; }
.onboard .body { flex: 1; min-width: 0; }
.onboard .body p { margin: var(--s-1) 0 0; }
@media (max-width: 479px) { .onboard > img { width: 64px; } }

/* a community whose creator's plan is unpaid past the grace days (HPC-02) */
.ro-bar { background: color-mix(in srgb, var(--sun) 22%, var(--bg)); border-bottom: var(--bw) solid var(--line); }
.ro-in { width: min(var(--page-w), 100%); margin: 0 auto; padding: var(--s-2) var(--s-3); display: flex; gap: var(--s-2); align-items: center;
  flex-wrap: wrap; font-size: var(--fs-14); color: var(--ink); }

/* platform admin: the Discover listing review and the printable fee statement (HPC-02) */
.listing { display: grid; gap: var(--s-4); }
@media (min-width: 860px) { .listing { grid-template-columns: 280px minmax(0, 1fr); } }
.listing-cover { border-radius: var(--r-ctl); overflow: hidden; aspect-ratio: 16 / 9; background: var(--sky-tint); }
.listing-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-about { max-height: 220px; overflow: auto; border-top: var(--bw) solid var(--line); margin-top: var(--s-3); padding-top: var(--s-3); }
@media print {
  .r-top, .r-head, .r-foot, .no-print, .toast-wrap { display: none !important; }
  .statement .card { border: 0; padding: 0; }
  body { background: var(--bg); }
}

/* the members map (HPC-02 extra): a light graticule, dots sized by members per city */
.map-grid { display: grid; gap: var(--s-3); margin: var(--s-3) 0; }
.map-grid > .card + .card { margin-top: 0; }
@media (min-width: 900px) { .map-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.map-card { margin: 0; padding: var(--s-3); }
.map-card svg { display: block; width: 100%; height: auto; margin-top: var(--s-2); }
.map-bg { fill: var(--sky-tint); }
.map-grid-line { stroke: var(--card); stroke-width: 1.5; }
.map-dot circle { fill: color-mix(in srgb, var(--sky-deep) 75%, transparent); stroke: var(--card); stroke-width: 2; }
.map-dot-in circle { fill: color-mix(in srgb, var(--sky) 55%, transparent); }
.map-dot text { font-family: var(--font); font-size: 13px; fill: var(--ink); paint-order: stroke; stroke: var(--sky-tint); stroke-width: 3px; }
.map-dot .lbl-n { display: none; font-size: 22px; stroke-width: 4px; }
@media (max-width: 699px) { .map-dot .lbl-w { display: none; } .map-dot .lbl-n { display: inline; } }

/* ---- HPC-03: the lesson player ------------------------------------------------------------------------------- */
.preview-bar { background: var(--sky-tint); color: var(--ink); margin-bottom: var(--s-3); display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.outline-head { padding: var(--s-4) var(--s-4) var(--s-2); display: grid; gap: var(--s-2); border-bottom: var(--bw) solid var(--line); }
.upnext { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); margin: var(--s-3) 0; border: var(--bw) solid var(--leaf);
  border-radius: var(--r-ctl); background: color-mix(in srgb, var(--leaf) 8%, var(--bg)); flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.embed-empty { display: flex; align-items: center; justify-content: center; gap: var(--s-2); aspect-ratio: 16 / 5; margin: var(--s-3) 0;
  border: var(--bw) dashed var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink-2); text-align: center; padding: var(--s-3); }
.quiz-q { border: var(--bw) solid var(--line); border-radius: var(--r-ctl); padding: var(--s-3); margin: 0 0 var(--s-3); }
.quiz-q legend { padding: 0 var(--s-1); }
.quiz-opt { border-radius: var(--r-ctl); padding: var(--s-1) var(--s-2); min-height: var(--tap); }
.quiz-opt.right { background: color-mix(in srgb, var(--leaf) 10%, var(--bg)); }
.quiz-opt.wrong { background: color-mix(in srgb, var(--rose) 10%, var(--bg)); }
.quiz-why { background: var(--surface); border-radius: var(--r-ctl); padding: var(--s-2) var(--s-3); margin: var(--s-2) 0 0; }
.kbd-hint { margin: var(--s-3) 0 0; }
@media (max-width: 899px) { .kbd-hint { display: none; } }
.copy-field { max-width: 420px; margin: var(--s-2) auto; text-align: center; font-size: var(--fs-14); }

/* ---- HPC-03: the course builder ------------------------------------------------------------------------------ */
.outline-ed { display: grid; gap: var(--s-3); margin: var(--s-3) 0; }
.mod { padding: var(--s-3); }
.mod-head { display: flex; align-items: center; gap: var(--s-2); }
.mod-title { margin: 0; font-size: var(--fs-18); }
.les-list { list-style: none; margin: var(--s-3) 0; padding: 0; display: grid; gap: var(--s-1); min-height: var(--tap); }
.les { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-2); border: var(--bw) solid var(--line); border-radius: var(--r-ctl);
  background: var(--card); flex-wrap: wrap; }
.les-title { font-weight: 600; flex: 1 1 0; min-width: 150px; }
.les-tags, .les-tools { display: inline-flex; gap: var(--s-1); align-items: center; flex-wrap: wrap; }
.les-tools form { margin: 0; }
.move-to select { width: auto; max-width: 180px; min-height: 36px; padding: 0 var(--s-2); }
.les-empty { padding: var(--s-2); border: var(--bw) dashed var(--line); border-radius: var(--r-ctl); }
.grip { cursor: grab; color: var(--ink-2); }
.grip:active { cursor: grabbing; }
.dragging { opacity: .55; outline: 2px dashed var(--sky-deep); }
.mod-more { position: relative; }
.mod-more > summary { list-style: none; cursor: pointer; }
.mod-more > summary::-webkit-details-marker { display: none; }
.mod-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; width: min(320px, 86vw); box-shadow: var(--shadow-menu); }
.add-les { margin: 0; }
.add-les input { min-width: 0; }
.blk { padding: var(--s-3); margin-bottom: var(--s-3); }
.blk-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.blk-kind { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; color: var(--ink-2); }
.bi { display: grid; gap: var(--s-3); grid-template-columns: 1fr; margin-bottom: var(--s-2); }
@media (min-width: 760px) { .bi { grid-template-columns: 1fr 1fr; } }
.add-menu { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin: var(--s-2) 0 var(--s-5); }
.res-row { display: flex; gap: var(--s-2); align-items: center; margin-bottom: var(--s-2); flex-wrap: wrap; }
.res-row input { flex: 1 1 160px; }
.opt { display: flex; gap: var(--s-2); align-items: center; margin-bottom: var(--s-2); flex-wrap: wrap; }
.opt input[type=text], .opt input:not([type]) { flex: 1 1 160px; }
.opt-right { min-height: var(--tap); }
.quiz-ed { padding: var(--s-3); margin-bottom: var(--s-3); }
.upload-btn { position: relative; cursor: pointer; }
.save-bar { position: sticky; bottom: 0; z-index: 25; display: flex; gap: var(--s-2); justify-content: flex-end; align-items: center; flex-wrap: wrap;
  margin: var(--s-5) calc(-1 * var(--s-2)) 0; padding: var(--s-3) var(--s-2); background: var(--bg); border-top: var(--bw) solid var(--line); }
.save-bar [data-save-note] { margin-right: auto; }
@media (max-width: 899px) { .save-bar { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); } }
fieldset.field { border: 0; padding: 0; margin: 0 0 var(--s-4); min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: var(--s-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
/* HPC-03: the top bar fits 360-390 px: the switcher shrinks (its name ellipsised), the icons never do; chat sits in the bottom bar there */
.switcher { min-width: 0; flex: 0 1 auto; }
.switcher > button { max-width: 100%; min-width: 0; }
.c-top .end { flex: none; }
@media (max-width: 759px) { .c-top .c-chat-btn { display: none; } }

/* HPC-03: lesson blocks inside a community (the hub's own block styles live in the hub's CSS) */
.prose figure { margin: var(--s-3) 0; }
.prose figure img { display: block; max-width: 100%; height: auto; }
.lesson-episode { font-size: var(--fs-18); margin: var(--s-5) 0 var(--s-2); }
.cblk { border-left: 4px solid var(--sky); background: var(--sky-tint); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; padding: var(--s-3) var(--s-4); margin: var(--s-3) 0; }
.cblk-exercise { border-left-color: var(--leaf); background: color-mix(in srgb, var(--leaf) 8%, var(--bg)); }
.cblk-case { border-left-color: var(--sun); background: color-mix(in srgb, var(--sun) 12%, var(--bg)); }
.cbk-h { font-size: var(--fs-13); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: var(--s-1); }
.cbk-b > :first-child { margin-top: 0; } .cbk-b > :last-child { margin-bottom: 0; }
.lesson-slides .slides { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.lesson-slides .slide { display: flex; gap: var(--s-3); align-items: flex-start; border: var(--bw) solid var(--line); border-radius: var(--r-ctl); padding: var(--s-3); background: var(--card); }
.lesson-slides .slide p { margin: 0; }
.lesson-slides .sn { flex: none; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--sky-deep); color: var(--bg); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-14); }
.lesson-audio.soon { display: flex; gap: var(--s-3); align-items: center; border: var(--bw) dashed var(--line); border-radius: var(--r-ctl); padding: var(--s-3); }
/* HPC-03: the event editor */
fieldset.repeat-box { border: var(--bw) solid var(--line); border-radius: var(--r-ctl); padding: var(--s-3); }
.next-dates ol { margin: var(--s-1) 0 0; padding-left: var(--s-5); }
.draft-note { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin: 0 0 var(--s-2); }
.bulk-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-3); padding: var(--s-3); }
.bulk-bar select, .bulk-bar input { width: auto; min-height: 36px; }
/* HPC-03 A7: the first-run tour */
.tour { margin: var(--s-2) 0 0; padding-left: 0; list-style: none; display: grid; gap: var(--s-3); }
.tour p { margin: var(--s-1) 0 var(--s-2); }
.tour-nav { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); flex-wrap: wrap; }
.tour-nav [data-tour-count] { margin-right: auto; }
/* HPC-03 A8 */
.answers { display: grid; gap: var(--s-2); margin: 0; }
.answers dt { font-size: var(--fs-13); color: var(--ink-2); font-weight: 600; }
.answers dd { margin: 0 0 var(--s-2); }
.preview-post { padding: var(--s-2) 0; border-bottom: var(--bw) solid var(--line); }
.preview-post p { margin: var(--s-1) 0 0; }
.held-post { border-left: 4px solid var(--sun); }
.wrap-any { overflow-wrap: anywhere; }

/* HPC-05 tips: a small "i" beside a control, its popover, and first-visit coach marks */
.tip { position: relative; display: inline-flex; vertical-align: middle; }
.tip-i { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--sky-ink);
  font: 600 12px/22px var(--font-sans, inherit); font-style: italic; cursor: pointer; padding: 0; margin-left: 4px; } /* HPC-16: 24 px, the smallest tap target (WCAG 2.5.8); it was 20 */
.tip-i:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 2px; }
.tip-pop { position: absolute; z-index: 40; top: 26px; left: -8px; width: min(280px, 80vw); background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md, 10px); box-shadow: 0 6px 24px rgba(22, 33, 44, .12); padding: 10px 12px;
  font-size: var(--fs-14); font-weight: 400; font-style: normal; line-height: 1.45; text-align: left; }
.tip-pop a { display: inline-block; margin-top: 4px; }
.coach { border: 1px solid var(--sky-tint); background: var(--sky-tint); border-radius: var(--r-md, 10px); padding: 12px 16px; margin: 0 0 16px; }
.coach ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.coach-mark p { margin: 0 0 6px; color: var(--ink); }
.flag-row { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.flag-row:first-child { border-top: 0; }
.flag-what { flex: 1 1 320px; min-width: 0; }
.flag-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.flag-form input[name=confirm] { min-width: min(320px, 100%); }

/* HPC-07: protected lesson videos, assignments and live classes */
.protected-video video { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--ink); }
.watermark { position: absolute; z-index: 2; pointer-events: none; user-select: none; color: var(--card); font-size: var(--fs-14);
  font-weight: 600; text-shadow: 0 0 2px var(--ink); white-space: nowrap; transition: left 1.2s ease, top 1.2s ease; left: 8px; top: 8px; }
.assignment { margin: var(--s-4) 0; }
.assignment .submission { border-top: var(--bw) solid var(--line); padding: var(--s-3) 0; }
.live-grid { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .live-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .live-grid > section:first-child { grid-row: span 2; } }
.chat-list, .qa-list { list-style: none; margin: 0 0 var(--s-3); padding: 0; max-height: 320px; overflow-y: auto; }
.chat-list li, .qa-list li { padding: var(--s-1) 0; border-bottom: var(--bw) solid var(--line); overflow-wrap: anywhere; }
.qa-list li { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; justify-content: space-between; }
.qa-list li.answered span:first-child { color: var(--ink-2); }
.live-chat form, .live-qa form { display: flex; gap: var(--s-2); }
.live-chat input, .live-qa input { flex: 1; min-width: 0; }
.live-row { padding: var(--s-3) 0; border-bottom: var(--bw) solid var(--line); flex-wrap: wrap; gap: var(--s-2); }
.device-list { list-style: none; padding: 0; margin: 0; }
.device-list li { padding: var(--s-2) 0; border-bottom: var(--bw) solid var(--line); gap: var(--s-2); flex-wrap: wrap; }
.assignment .submission a, .live-row .small a, .embed-empty a { text-decoration: underline; text-underline-offset: 2px; }

/* HPC-13: the Preview banner on a public preview (HUB_PREVIEW) */
.preview-banner{background:var(--ink,#1d1d1f);color:var(--surface,#fff);font-size:13px;line-height:1.4;padding:6px 16px;text-align:center}
/* HPC-16: the pilot's Feedback button (partials/feedback.html), bottom left so it never covers the WhatsApp button */
.fb{position:fixed;left:16px;bottom:16px;z-index:39}
.fb-btn{list-style:none;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:var(--r-pill);background:var(--card);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow-menu);cursor:pointer;font-size:var(--fs-14)}
.fb-btn::-webkit-details-marker{display:none}
.fb-btn:focus-visible{outline:3px solid var(--sky-deep);outline-offset:2px}
.fb-panel{position:absolute;left:0;bottom:56px;width:min(360px,calc(100vw - 32px));display:grid;gap:8px;padding:var(--s-4)}
.fb-h{font-size:var(--fs-18);margin:0}
.fb-msg.bad{color:var(--rose-ink)}
@media print{.fb{display:none}}

/* HPC-20 Part 0b: Occult Master's header logo (an image with the name as its text) and its accents */
.brand-lockup { display: block; height: 40px; width: auto; max-width: min(216px, 60vw); }
.r-head { border-top: 3px solid var(--om-gold); }
.r-foot .brand-lockup { height: 36px; }
.brand-tagline { color: var(--om-navy); font-weight: 600; letter-spacing: .02em; }
@media (max-width: 380px) { .brand-lockup { height: 32px; } }
