/* introfirst.com: marketing pages and signup. Colors, type, spacing and radii come from
   tokens.css (the brand manual, brand/BRAND.md). Hexagons are for people and groups only. */

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink-soft);
  font: 400 15px/24px var(--font-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
p { margin: 0; }
a { color: var(--forest); }
a:hover { color: var(--forest-deep); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 20px; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--ink); color: var(--paper); }
.skip:focus { top: 8px; color: var(--paper); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Icons: Lucide-style line icons, inline SVG */
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i--lg { width: 24px; height: 24px; }

/* ---- Top bar and footer ---- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; }
.brand img { height: 32px; width: auto; display: block; }
.brand__dark { display: none !important; }
html[data-theme="dark"] .brand__light { display: none !important; }
html[data-theme="dark"] .brand__dark { display: block !important; }
.topnav { display: flex; gap: var(--space-6); margin-left: var(--space-6); }
.topnav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--ink); }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.me { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
@media (max-width: 720px) { .topnav { display: none; } }

.footer { border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: var(--space-6); font-size: 14px; }
.footer__inner img { width: 28px; height: 28px; }
.footer nav { display: flex; gap: 16px; margin-left: auto; }
.footer nav a { color: var(--muted); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent;
  font: 500 14px/1 var(--font-text); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn--primary { background: var(--forest); color: var(--on-forest); }
.btn--primary:hover { background: var(--forest-deep); color: var(--on-forest); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--secondary:hover { color: var(--ink); border-color: var(--sage-300); }
.btn--quiet { background: none; padding: 0 var(--space-2); min-height: 32px; color: var(--forest); }
.btn--lg { min-height: 48px; padding: 0 var(--space-6); font-size: 16px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---- Hexagons (people and groups only) ---- */
.hex {
  --s: 48px;
  display: inline-grid; place-items: center; flex: none;
  width: calc(var(--s) * 0.866); height: var(--s);
  background: var(--sage-100); color: var(--ink);
  font: 600 calc(var(--s) * 0.3)/1 var(--font-display);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86.6 100'%3E%3Cpolygon points='43.3,7 80.5,28.5 80.5,71.5 43.3,93 6.1,71.5 6.1,28.5' stroke='black' stroke-width='12' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86.6 100'%3E%3Cpolygon points='43.3,7 80.5,28.5 80.5,71.5 43.3,93 6.1,71.5 6.1,28.5' stroke='black' stroke-width='12' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hex--32 { --s: 32px; } .hex--48 { --s: 48px; } .hex--72 { --s: 72px; } .hex--112 { --s: 112px; }
.hex--forest { background: var(--forest); color: var(--on-forest); }
.hex--honey { background: var(--honey); color: var(--ink); }

/* ---- Chips, callouts, fields ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--sage-100); color: var(--ink); font: 500 12px/16px var(--font-text); }
.chip--outline { background: var(--surface); border: 1px solid var(--line); }
.chip .i { width: 13px; height: 13px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--radius-md); background: var(--sage-100); color: var(--ink); font-size: 14px; line-height: 21px; }
.callout .i { margin-top: 2px; }
.callout--error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--ink); }
.callout--error .i { color: var(--danger); }

.field { position: relative; display: flex; flex-direction: column; gap: 6px; }
.field label { color: var(--ink); font-weight: 600; font-size: 14px; }
.field input[type="text"], .field input[type="url"], .field input[type="month"], .field select, .field textarea {
  font: 400 15px/22px var(--font-text); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.field__help { color: var(--muted); font-size: 13px; line-height: 20px; }
.optional { color: var(--muted); font-weight: 400; }

/* ---- Introduction path (used in the hero art) ---- */
.path { display: flex; align-items: flex-start; justify-content: space-between; }
.path__node { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.path__node b { color: var(--ink); font: 600 13px/16px var(--font-display); }
.path__link { flex: 1; height: 3px; margin-top: 22px; background: var(--forest); border-radius: 2px; min-width: 16px; }
.path__link--pending { background: repeating-linear-gradient(90deg, var(--honey) 0 6px, transparent 6px 11px); }

/* ---- Landing page ---- */
.hero { border-bottom: 1px solid var(--line); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--space-12); align-items: center; padding-block: 72px 80px; }
.hero h1 { font-size: 60px; line-height: 62px; letter-spacing: -0.025em; }
.hero__copy { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.hero__lede { font-size: 19px; line-height: 30px; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero__fine { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); padding-block: var(--space-12); gap: var(--space-8); }
  .hero h1 { font-size: 42px; line-height: 46px; }
}
.hero__art { display: flex; flex-direction: column; gap: var(--space-4); }
.mini-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); overflow: hidden; }
.mini-page__bar { padding: 10px 16px; background: var(--paper-shade); border-bottom: 1px solid var(--line); color: var(--muted); }
.mini-page__body { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-6); }
.mini-page__name { color: var(--ink); font: 600 22px/28px var(--font-display); }
.mini-page__aud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini-intro { align-self: flex-end; width: min(340px, 100%); display: flex; flex-direction: column; gap: 10px; padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); margin-top: -8px; }
.mini-intro__label { color: var(--ink); font-weight: 600; font-size: 14px; }

.band { background: var(--paper-shade); border-bottom: 1px solid var(--line); padding-block: 72px; }
.section-title { font-size: 34px; line-height: 40px; letter-spacing: -0.015em; margin-bottom: var(--space-8); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
.step { display: flex; flex-direction: column; gap: var(--space-3); }
.step__n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--forest); color: var(--on-forest); font: 600 16px/1 var(--font-display); }
.step h3 { font-size: 20px; line-height: 26px; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8) var(--space-12); padding-block: 72px; }
.feature { display: flex; flex-direction: column; gap: var(--space-2); max-width: 30em; }
.feature .i--lg { color: var(--forest); margin-bottom: 4px; }
.feature h3 { font-size: 20px; line-height: 26px; }
@media (max-width: 720px) { .features { grid-template-columns: minmax(0, 1fr); } }

.band--deep { background: var(--forest); border: 0; color: var(--on-forest); }
.band--deep .section-title { color: var(--on-forest); margin-bottom: var(--space-4); }
.why { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; }
.why__copy { display: flex; flex-direction: column; gap: var(--space-4); font-size: 17px; line-height: 27px; max-width: 34em; }
.mini-page__note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 24px 16px; border-top: 1px solid var(--line); background: var(--paper-shade); color: var(--ink); font-size: 13px; line-height: 20px; }
.mini-page__note .i { width: 14px; height: 14px; margin-top: 3px; color: var(--muted); }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.rules li { padding: var(--space-4) var(--space-6); border-radius: var(--radius-md); background: color-mix(in srgb, var(--on-forest) 10%, transparent); font-size: 15px; line-height: 23px; }
.rules b { display: block; font-weight: 600; }
[data-theme="dark"] .rules li { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.why__fig { margin: 0; padding: var(--space-8); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--on-forest) 10%, transparent); }
.why__num { font: 600 88px/1 var(--font-display); letter-spacing: -0.03em; color: var(--honey); }
.why__label { font-size: 17px; line-height: 25px; margin-top: var(--space-3); }
.why__fig figcaption { margin-top: var(--space-3); opacity: .85; }
@media (max-width: 820px) { .why { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); } .why__num { font-size: 64px; } }

.closer { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4); padding-block: 88px; }
.closer h2 { font-size: 40px; line-height: 44px; letter-spacing: -0.015em; }

/* ---- Text pages (privacy) ---- */
.prose-page { max-width: 760px; padding-block: var(--space-12); display: flex; flex-direction: column; gap: var(--space-4); }
.prose-page h1 { font-size: 40px; line-height: 44px; letter-spacing: -0.015em; }
.prose-page h2 { font-size: 22px; line-height: 28px; margin-top: var(--space-6); }
.prose-page ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose-page li, .prose-page p { font-size: 16px; line-height: 26px; }

/* ---- Join and signup ---- */
.flow { max-width: 760px; padding-block: var(--space-8) var(--space-12); display: flex; flex-direction: column; gap: var(--space-6); }
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; counter-reset: step; font-size: 13px; color: var(--muted); }
.progress li { counter-increment: step; display: inline-flex; align-items: center; gap: 8px; }
.progress li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 12px/1 var(--font-text);
}
.progress li[aria-current] { color: var(--ink); font-weight: 600; }
.progress li[aria-current]::before { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.progress li.is-done::before { content: "✓"; background: var(--sage-100); border-color: var(--sage-100); color: var(--ink); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); }
.panel h1 { font-size: 30px; line-height: 36px; letter-spacing: -0.01em; }
/* ui.js show() focuses each screen's heading (tabindex -1) so screen readers announce it; it isn't a control, so no ring. */
h1[tabindex="-1"]:focus { outline: none; }
.lede { font-size: 16px; line-height: 25px; max-width: 40em; margin-top: calc(var(--space-4) * -1); }
.fine { color: var(--muted); font-size: 13px; }
.panel__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); border-top: 1px solid var(--line); padding-top: var(--space-6); }
.panel__actions .btn--quiet:first-child { margin-right: auto; }
@media (max-width: 560px) { .panel { padding: var(--space-6); } }

.inviter { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-md); background: var(--paper-shade); }
.inviter b { color: var(--ink); }
.invite-message { margin: 0; padding: var(--space-3) var(--space-4); border-left: 3px solid var(--forest); white-space: pre-line; }
.invite-message p { margin: 0; }

.sso { display: flex; flex-direction: column; gap: var(--space-3); max-width: 360px; }
.sso > .btn, .sso > div > .btn { width: 100%; }
.btn--sso { justify-content: flex-start; gap: 12px; min-height: 48px; background: var(--surface); color: var(--ink); border-color: var(--line); font-size: 15px; }
.btn--sso:hover { border-color: var(--sage-300); color: var(--ink); }
.btn--sso svg { width: 20px; height: 20px; }

.host-input { display: flex; align-items: center; max-width: 520px; height: 52px; padding: 0 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); }
.host-input:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.field .host-input input[type="text"] { flex: 1; min-width: 0; border: 0; padding: 0; background: none; font: 500 18px/1 var(--font-mono); text-align: right; }
.field .host-input input[type="text"]:focus-visible { outline: 0; }
.host-input__suffix { color: var(--muted); font: 400 18px/1 var(--font-mono); }
.host-status { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; min-height: 22px; }
.host-status.is-good { color: var(--forest); }
.host-status.is-good::before { content: "✓"; }
.host-status.is-bad { color: var(--danger); }
.host-status.is-bad::before { content: "✕"; }
.host-status.is-checking { color: var(--muted); }
.suggest { display: flex; flex-direction: column; gap: 8px; }
.suggest__label { color: var(--muted); font-size: 13px; font-weight: 500; }
.suggest__list { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest__chip { font-family: var(--font-mono); font-weight: 400; cursor: pointer; padding: 6px 12px; }
.suggest__chip:hover { border-color: var(--sage-300); }

.about-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.about-grid .fields { display: flex; flex-direction: column; gap: var(--space-4); }
@media (max-width: 560px) { .about-grid { grid-template-columns: minmax(0, 1fr); } .about-grid .hex { --s: 88px; } }

.aud-table { display: flex; flex-direction: column; }
.aud-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-4); border-top: 1px solid var(--line); }
.aud-row b { color: var(--ink); font-weight: 600; }
.aud-row select { font: 500 14px/20px var(--font-text); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; min-width: 190px; }
@media (max-width: 560px) { .aud-row { flex-direction: column; align-items: stretch; } .aud-row select { min-width: 0; } }

.panel--done { align-items: center; text-align: center; }
.done-mark { width: 56px; height: 56px; fill: none; stroke: var(--forest); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.done-host { font-size: 17px; }
.mini-page--done { width: min(440px, 100%); text-align: left; box-shadow: var(--shadow-card); }

/* ---- Light / dark toggle (assets/js/theme.js) ---- */
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-md); background: none; color: var(--ink-soft); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--line); }
.theme-toggle .i { width: 18px; height: 18px; vertical-align: 0; }

/* In dark mode the forest token turns light, so the deep band keeps a dark green of its own. */
[data-theme="dark"] .band--deep { background: #163a31; color: var(--ink); }
[data-theme="dark"] .band--deep .section-title { color: var(--ink); }
@media (max-width: 560px) { .me [data-fill="me-email"] { display: none; } }

/* A photo inside a hexagon: the hex mask crops it, and the initials stay underneath as the fallback. */
.hex { position: relative; }
.hex > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

/* ---- Member pages (<host>.introfirst.com, rendered by lambda/lib/page.mjs) ---- */
.member { max-width: 640px; padding-block: var(--space-12, 48px); }
.member__card .mini-page__body { padding: var(--space-8, 32px); gap: var(--space-6, 24px); }
.member__card h1.mini-page__name { margin: 0 0 4px; font-size: 28px; line-height: 36px; }
.member__card .muted { margin: 2px 0; }
.member__more { margin-top: var(--space-4, 16px); text-align: center; }
@media (max-width: 520px) { .member__card .mini-page__body { flex-direction: column; text-align: center; } }

/* Member page sections (site/assets/js/member-page.js) */
.member__section { margin-top: var(--space-6, 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6, 24px); }
.member__section h2 { margin: 0 0 var(--space-3); font-size: 18px; line-height: 26px; }
.member__section p { margin: 0 0 var(--space-3); }
.member__section p:last-child { margin-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4, 16px); }
.timeline h3 { margin: 0; font-size: 16px; line-height: 24px; }
.timeline p { margin: 0; }
.timeline__org { color: var(--ink); }
.member__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.member__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* The editor (/me/) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.editor { width: 100%; max-width: 760px; padding-block: var(--space-8, 32px); display: flex; flex-direction: column; gap: var(--space-6, 24px); }
.editor form, .editor [data-state="list"] { display: flex; flex-direction: column; gap: var(--space-6, 24px); }
.editor__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4, 16px); flex-wrap: wrap; }
.editor__head h1 { margin: 0; }
.editor__head p { margin: 4px 0 0; }
.editor__status { min-height: 21px; }
.editor__section { gap: var(--space-4, 16px); }
.editor__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4, 16px); flex-wrap: wrap; }
.editor__bar h2 { margin: 0; font-size: 18px; line-height: 26px; }
.editor__bar select { font: 500 14px/20px var(--font-text); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; }
.editor__photo { display: flex; align-items: center; gap: var(--space-6, 24px); flex-wrap: wrap; }
.editor__photo > div { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2, 8px); flex: 1; min-width: 220px; }
.editor__photo label.btn, .editor__section label.btn { cursor: pointer; }
.editor__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4, 16px); }
.editor__dates { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.editor__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4, 16px); }
.editor__list:empty { display: none; }
.editor__item { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4, 16px); display: flex; flex-direction: column; gap: var(--space-3); background: var(--paper); }
.editor__item-actions { display: flex; justify-content: flex-end; gap: var(--space-2, 8px); }
.editor__check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.editor__save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; background: var(--paper); border-top: 1px solid var(--line); }
.editor__note h1 { margin: 0; }
.editor input[type="month"]:disabled { opacity: .5; }
@media (max-width: 600px) {
  .editor__grid { grid-template-columns: 1fr; }
}

/* The owner's view slider, in their card under the name (site/assets/js/owner-view.js) */
.view-slider { margin-top: var(--space-4, 16px); max-width: 340px; }
.view-slider__label { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.view-slider__label b { color: var(--ink); font-weight: 600; }
.view-slider input[type="range"] { width: 100%; margin: 8px 0 2px; accent-color: var(--forest); cursor: pointer; }
.view-slider__stops { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 12px; line-height: 16px; }
.view-slider__stops button { background: none; border: 0; padding: 2px 0; color: var(--muted); font: inherit; cursor: pointer; }
.view-slider__stops button:first-child { text-align: left; }
.view-slider__stops button:last-child { text-align: right; }
.view-slider__stops button.is-on { color: var(--forest); font-weight: 600; }
.owner-error { margin-bottom: var(--space-4, 16px); }

/* Member page: two columns, the sidebar on the right (mocksite/index.html) */
.member { max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6, 24px); align-items: start; }
.member__col { min-width: 0; }
/* Sticks below the top bar (64px and its border, also sticky), and scrolls itself when it's taller than the window. */
.member__side { --side-top: calc(65px + var(--space-6, 24px)); display: flex; flex-direction: column; gap: var(--space-6, 24px); position: sticky; top: var(--side-top); max-height: calc(100vh - var(--side-top) - var(--space-6, 24px)); max-height: calc(100dvh - var(--side-top) - var(--space-6, 24px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; margin: -2px; }
@media (max-width: 900px) {
  .member { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
  .member__side { position: static; max-height: none; overflow: visible; }
}
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-6, 24px); display: flex; flex-direction: column; gap: var(--space-4, 16px); }
.side-card h2 { margin: 0; font-size: 18px; line-height: 26px; }
.side-card p { margin: 0; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn--block { width: 100%; justify-content: center; }
.center { text-align: center; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.people li { display: flex; align-items: center; gap: 12px; }
.people li div { display: flex; flex-direction: column; min-width: 0; }
.people a { text-decoration: none; }
.people a:hover b { text-decoration: underline; }
.people b { color: var(--ink); font-weight: 600; font-size: 14px; line-height: 20px; }
.path { display: flex; align-items: flex-start; justify-content: space-between; }
.path__node { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.path__node b { color: var(--ink); font: 600 13px/16px var(--font-display); }
.path__node .chip { font-size: 11px; padding: 2px 8px; }
a.path__node { text-decoration: none; border-radius: var(--radius-md, 8px); }
a.path__node:hover .hex, a.path__node:focus-visible .hex { filter: brightness(1.12); transform: scale(1.06); }
a.path__node:hover b, a.path__node:focus-visible b { text-decoration: underline; }
a.path__node:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.path__link { flex: 1; height: 3px; margin-top: 22px; background: var(--forest); border-radius: 2px; min-width: 16px; }
.conn-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.invite-form { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.invite-link { display: flex; flex-direction: column; gap: 8px; padding: var(--space-4, 16px); background: var(--paper-shade); border: 1px dashed var(--sage-300); border-radius: var(--radius-md); }
.invite-link input { width: 100%; font: 13px/20px var(--font-mono, monospace); }
.invite-link__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.invite-link__actions .btn { flex: 1 1 auto; }
.invite-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.invite-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.invite-list .btn { padding-inline: 10px; min-height: 32px; }
.field > span { color: var(--ink); font-weight: 600; font-size: 14px; }

/* Your notes on a connection, and searching your connections (site/assets/js/contacts.js) */
.contact-filter { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-4, 16px); }
.contact-filter input, .contact-filter select { font: 400 14px/20px var(--font-text); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; }
.contact-filter input:focus-visible, .contact-filter select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.contact-note { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-form { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.notes-cats { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.notes-cats legend { padding: 0; margin-bottom: 6px; color: var(--ink); font-weight: 600; font-size: 14px; }
.notes-cats .editor__check { font-size: 13px; }
.notes-actions { display: flex; align-items: center; gap: 12px; }

/* Articles (site/assets/js/articles.js, article-editor.js) */
.article-page { max-width: 720px; padding-block: var(--space-6, 24px); }
.article { display: flex; flex-direction: column; gap: var(--space-2, 8px); min-width: 0; }
.article p { margin: 0; }
.article__title { margin: var(--space-2, 8px) 0 0; font: 700 34px/42px var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.article__body { margin-top: var(--space-4, 16px); font: 400 17px/28px var(--font-text); color: var(--ink); overflow-wrap: anywhere; }
.article__body > * + * { margin-top: var(--space-4, 16px); }
.article__body p, .article__body h2, .article__body h3, .article__body blockquote, .article__body pre { margin-bottom: 0; }
.article__body h2 { font: 700 24px/32px var(--font-display); margin-top: var(--space-6, 24px); }
.article__body h3 { font: 600 19px/28px var(--font-display); margin-top: var(--space-5, 20px); }
.article__body blockquote { margin-left: 0; margin-right: 0; padding-left: var(--space-4, 16px); border-left: 3px solid var(--sage-300); color: var(--muted); }
.article__body pre { background: var(--paper-shade); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; font: 14px/22px var(--font-mono, monospace); white-space: pre; }
.article__body code { font-family: var(--font-mono, monospace); }
.article-title-input { font: 700 24px/32px var(--font-display) !important; }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--paper-shade); }
.rte-toolbar .btn { min-height: 32px; padding-inline: 10px; }
.rte { margin-top: 0; min-height: 320px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--paper); }
.rte:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* A member's page: About inside the card, then tabs (member-page.js) */
.member__about { padding: 0 var(--space-8, 32px) var(--space-6, 24px); color: var(--ink); }
.member__about p { margin: 0 0 var(--space-3, 12px); }
.member__about p:last-child { margin-bottom: 0; }
@media (max-width: 520px) { .member__about { padding-inline: var(--space-6, 24px); } }
.tabs { margin-top: var(--space-6, 24px); }
.tabs__radio { position: absolute; opacity: 0; pointer-events: none; }
.tabs__bar { display: flex; gap: var(--space-2, 8px); border-bottom: 1px solid var(--line); }
.tabs__bar label { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; }
.tabs__bar label:hover { color: var(--ink); }
#tab-writing:checked ~ .tabs__bar label[for="tab-writing"], #tab-work:checked ~ .tabs__bar label[for="tab-work"] { color: var(--ink); border-bottom-color: var(--forest); }
#tab-writing:focus-visible ~ .tabs__bar label[for="tab-writing"], #tab-work:focus-visible ~ .tabs__bar label[for="tab-work"] { outline: 2px solid var(--focus); outline-offset: 2px; }
.tabs__panel { display: none; }
#tab-writing:checked ~ .tabs__panel--writing, #tab-work:checked ~ .tabs__panel--work { display: block; }

/* Posts and articles in a list (writingList) */
.writing { list-style: none; margin: 0; padding: 0; }
.writing__item { display: flex; flex-direction: column; gap: 6px; }
.writing__item p { margin: 0; }
.writing__item a { text-decoration: none; }
.writing__item a:hover { text-decoration: underline; }
.writing__title { color: var(--ink); font: 600 19px/26px var(--font-display); }
.writing__text { color: var(--ink); font-size: 16px; line-height: 26px; overflow-wrap: anywhere; }
.writing__text p + p { margin-top: var(--space-3, 12px); }

/* Your dashboard (dashboard.js) */
.dash__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash__title { margin: 0; font-size: 30px; line-height: 36px; }
.dash__head p { margin: 0; }
.dash__recent-head { margin-top: var(--space-6, 24px); }
.dash__recent-head h2 { margin: 0; font-size: 18px; line-height: 26px; }
.composer form { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.composer__top { display: flex; gap: var(--space-3, 12px); align-items: flex-start; }
.composer__box { flex: 1; min-width: 0; }
.composer__actions { display: flex; align-items: center; gap: var(--space-3, 12px); flex-wrap: wrap; justify-content: flex-end; }
.composer__actions select { font: 400 14px/20px var(--font-text); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-right: auto; }
.composer__status { flex: 1; }
.rte--short { min-height: 96px; font-size: 16px; line-height: 26px; }
.rte[data-placeholder]:has(> p:only-child > br:only-child)::before, .rte[data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--muted); position: absolute; pointer-events: none; }
.rte[data-placeholder] { position: relative; }
.feed__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feed__who { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.feed__more { display: flex; justify-content: center; margin: var(--space-4, 16px) 0 0; }
.feed__more[hidden] { display: none; }

/* Dashboard: your card and work history, each part with Edit or Add (dashboard.js). */
.btn--sm { min-height: 32px; padding: 0 var(--space-3, 12px); font-size: 14px; }
.dash__part-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: var(--space-3, 12px); }
.dash__part-head h3 { margin: 0; font-size: 16px; line-height: 24px; }
.dash__part-actions { display: inline-flex; align-items: center; gap: 8px; }
.dash__part .timeline { margin: 0; }
.dash__me-top { display: flex; align-items: flex-start; gap: var(--space-4, 16px); margin-bottom: var(--space-4, 16px); }
.dash__me-text { flex: 1; min-width: 0; }
.dash__me-text p { margin: 0; }
.dash__me-name { margin: 0; font-size: 22px; line-height: 30px; }
.dash__welcome { margin-top: var(--space-4, 16px); }

/* Invite QR codes, full screen (page-view.js, qrScreen): black, the code as big as fits. */
.qr-screen { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; box-sizing: border-box; }
.qr-screen__code { width: min(92vw, calc(100dvh - 190px)); aspect-ratio: 1; }
.qr-screen__code svg { display: block; width: 100%; height: 100%; }
.qr-screen__caption { margin: 0; text-align: center; font-size: 18px; line-height: 26px; display: flex; flex-direction: column; }
.qr-screen__tag { color: #b8c4bd; font-size: 15px; }
.qr-screen__tag:empty { display: none; }
.qr-screen__status { margin: 0; min-height: 21px; font-size: 14px; color: #9fe0c4; }
.qr-screen__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.qr-screen__btn { min-height: 44px; padding: 0 18px; border-radius: 8px; border: 2px solid #fff; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.qr-screen__btn:hover, .qr-screen__btn:focus-visible { background: rgba(255, 255, 255, .25); }
/* Held sideways: just the code and the buttons. (A QR code scans at any angle, so no turning.) */
@media screen and (orientation: landscape) and (max-height: 600px) {
  .qr-screen__code { width: min(80vw, calc(100dvh - 90px)); }
  .qr-screen__caption, .qr-screen__status { display: none; }
}
body.has-qr-screen { overflow: hidden; }

/* Exploring your connections (explorer.js): hexagons for people and groups on a square stage
   you zoom through. Each hexagon is an edge in its tone with the surface inset inside it. */
.xp__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: var(--space-4, 16px); }
.xp__by { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); }
.xp__by-link { padding: 4px 14px; border-radius: var(--radius-pill); color: var(--muted); font: 500 13px/20px var(--font-text); text-decoration: none; }
.xp__by-link:hover { color: var(--ink); }
.xp__by-link[aria-current="true"] { background: var(--sage-100); color: var(--ink); }
.xp__filters { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; min-width: 0; }
.xp__select { flex: 1 1 140px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 400 14px/20px var(--font-text); max-width: 100%; }
.xp__q { flex: 1 1 220px; min-width: 0; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 400 14px/20px var(--font-text); }
.xp__trail { display: flex; flex-wrap: wrap; gap: 4px 0; margin: var(--space-4, 16px) 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.xp__trail li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.xp__trail [aria-current] span { color: var(--ink); font-weight: 600; outline: none; }
.xp__stage { position: relative; width: 100%; max-width: 760px; margin: var(--space-3, 12px) auto 0; aspect-ratio: 1; container-type: inline-size; overflow: hidden; border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 46%, var(--surface) 0%, var(--paper) 72%); border: 1px solid var(--line); }
.xp__view { position: absolute; inset: 0; transform-origin: 50% 50%; }
.xp__view.is-moving { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.xp__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; }
.xp__backdrop polygon { fill: var(--paper-shade); stroke: var(--line); stroke-width: 2; cursor: zoom-out; }
.xp__backdrop a:hover polygon { stroke: var(--sage-300); }
.xp__up { position: absolute; left: 2.5%; top: 2.5%; z-index: 2; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 500 12px/18px var(--font-text); text-decoration: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp__up:hover { color: var(--ink); border-color: var(--sage-300); }
.xp__hex {
  --tone: var(--sage-300);
  position: absolute; transform: translate(-50%, -50%); display: block; color: var(--ink); text-decoration: none;
  background: var(--tone);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86.6 100'%3E%3Cpolygon points='43.3,7 80.5,28.5 80.5,71.5 43.3,93 6.1,71.5 6.1,28.5' stroke='black' stroke-width='12' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86.6 100'%3E%3Cpolygon points='43.3,7 80.5,28.5 80.5,71.5 43.3,93 6.1,71.5 6.1,28.5' stroke='black' stroke-width='12' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation: xpIn .35s cubic-bezier(.2, .8, .2, 1) both;
  transition: opacity .2s ease, filter .15s ease;
}
.xp__in {
  position: absolute; inset: 3.5%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em;
  padding: 0 9%; text-align: center; background: color-mix(in srgb, var(--tone) 16%, var(--surface));
  -webkit-mask: inherit; mask: inherit;
}
a.xp__hex:hover, a.xp__hex:focus-visible { filter: brightness(1.08); z-index: 1; }
a.xp__hex:hover .xp__in, a.xp__hex:focus-visible .xp__in { background: color-mix(in srgb, var(--tone) 32%, var(--surface)); }
a.xp__hex:focus-visible { outline: none; }
a.xp__hex:focus-visible .xp__in { box-shadow: inset 0 0 0 3px var(--focus); }
.xp__hex.is-dim { opacity: .18; }
.xp__hex--center { z-index: 1; }
/* Whoever you've opened is filled in their tone, so they stand out from those around them. */
.xp__hex--center .xp__in { background: color-mix(in srgb, var(--tone) 55%, var(--surface)); inset: 5%; }
.xp__hex--center .xp__label { font-weight: 700; }
.xp__hex--you { --tone: var(--forest); }
.xp__hex--you .xp__in { background: var(--forest); color: var(--on-forest); }
.xp__hex--you .xp__sub { color: inherit; opacity: .85; }
.xp__hex--forest { --tone: var(--forest); } .xp__hex--forest-deep { --tone: var(--forest-deep); }
.xp__hex--honey { --tone: var(--honey); } .xp__hex--moss { --tone: var(--moss); }
.xp__hex--amber { --tone: var(--amber); } .xp__hex--slate { --tone: var(--slate); }
.xp__hex--sage-300 { --tone: var(--sage-300); } .xp__hex--danger { --tone: var(--danger); }
.xp__mark { font-family: var(--font-display); font-weight: 600; line-height: 1; }
.xp__label { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: break-word; hyphens: auto; font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
.xp__sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); line-height: 1.25; }
.xp__hint { margin: var(--space-3, 12px) 0 0; text-align: center; }
.xp__who { margin: 0; font-size: 20px; line-height: 28px; }
.xp__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-3, 12px) 0 0; }
.xp__chips .chip { text-decoration: none; }
.xp__note { margin-top: var(--space-3, 12px); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
/* No opacity at the end, so a faded hexagon stays faded. */
@keyframes xpIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .xp__hex { animation: none; } .xp__view.is-moving { transition: none; } }

/* The explorer at the top of the dashboard, with photos, and the person you open: in the
   sidebar on a wide screen, in a sheet over the bottom on a narrow one (page-view.js). */
.xp__share { margin: 4px 0 0; }
.xp__head h2 { margin: 0; font-size: 18px; line-height: 26px; }
.xp .xp__stage { margin-top: var(--space-3, 12px); }
.xp__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.xp__hex--photo .xp__in { padding: 0; justify-content: flex-end; background: var(--sage-100); }
.xp__band { position: relative; width: 100%; padding: .35em 14% .9em; background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0)); color: #fff; font-family: var(--font-display); font-weight: 600; line-height: 1.15; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-detail { position: relative; }
.xp-detail__close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 22px; line-height: 1; text-decoration: none; }
.xp-detail__close:hover { background: var(--sage-100); color: var(--ink); }
.xp-detail__top { display: flex; gap: var(--space-3, 12px); align-items: flex-start; padding-right: 28px; }
.xp-detail__who { min-width: 0; }
.xp-detail__who h2 { margin: 0; font-size: 20px; line-height: 28px; overflow-wrap: anywhere; }
.xp-detail__who .mono { overflow-wrap: anywhere; }
.xp-detail__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.xp-detail__h { margin: 0 0 6px; font-size: 14px; line-height: 20px; }
.xp-detail__posts, .xp-detail__work { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.xp-detail__posts li, .xp-detail__work li { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.xp-detail__posts a { color: var(--ink); text-decoration: none; }
.xp-detail__posts a:hover { text-decoration: underline; }
.xp-detail .xp__chips { margin: 0 0 6px; }
.xp-detail .xp__note { margin: 6px 0; font-size: 14px; line-height: 21px; }
.xp-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-height: 48vh; max-height: 48dvh; overflow-y: auto; overscroll-behavior: contain; padding: 0 max(8px, env(safe-area-inset-left, 0px)) env(safe-area-inset-bottom, 0px); animation: xpSheet .25s cubic-bezier(.2, .8, .2, 1) both; }
.xp-sheet .xp-detail { border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-lift); border-bottom: 0; }
.xp-sheet .xp-detail::before { content: ""; display: block; width: 40px; height: 4px; margin: -12px auto 0; border-radius: 2px; background: var(--line); }
@keyframes xpSheet { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .xp-sheet { animation: none; } }

/* Settings in tabs (site/me/index.html): Profile and privacy, Work history, Posts. */
.editor__tabs { margin-top: 0; }
.editor__tabs .tabs__bar { margin-bottom: var(--space-4, 16px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.editor__tabs .tabs__bar label { white-space: nowrap; }
.editor__tabs .tabs__panel { flex-direction: column; gap: var(--space-6, 24px); }
/* The dashboard's tabs (dashboard.js, DASH_TABS). */
.dash__tabs { margin-top: var(--space-4, 16px); }
.dash__tabs .tabs__panel { gap: var(--space-4, 16px); }
.tabs__count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--sage-100); color: var(--forest); font-size: 12px; line-height: 20px; text-align: center; }
#dash-xp:checked ~ .tabs__bar label[for="dash-xp"], #dash-posts:checked ~ .tabs__bar label[for="dash-posts"], #dash-groups:checked ~ .tabs__bar label[for="dash-groups"], #dash-messages:checked ~ .tabs__bar label[for="dash-messages"], #dash-work:checked ~ .tabs__bar label[for="dash-work"], #dash-setup:checked ~ .tabs__bar label[for="dash-setup"] { color: var(--ink); border-bottom-color: var(--forest); }
#dash-xp:focus-visible ~ .tabs__bar label[for="dash-xp"], #dash-posts:focus-visible ~ .tabs__bar label[for="dash-posts"], #dash-groups:focus-visible ~ .tabs__bar label[for="dash-groups"], #dash-messages:focus-visible ~ .tabs__bar label[for="dash-messages"], #dash-work:focus-visible ~ .tabs__bar label[for="dash-work"], #dash-setup:focus-visible ~ .tabs__bar label[for="dash-setup"] { outline: 2px solid var(--focus); outline-offset: 2px; }
#dash-xp:checked ~ .tabs__panel--xp, #dash-posts:checked ~ .tabs__panel--posts, #dash-groups:checked ~ .tabs__panel--groups, #dash-messages:checked ~ .tabs__panel--messages, #dash-work:checked ~ .tabs__panel--work, #dash-setup:checked ~ .tabs__panel--setup { display: flex; }
#set-general:checked ~ .tabs__bar label[for="set-general"], #set-work:checked ~ .tabs__bar label[for="set-work"], #set-posts:checked ~ .tabs__bar label[for="set-posts"] { color: var(--ink); border-bottom-color: var(--forest); }
#set-general:focus-visible ~ .tabs__bar label[for="set-general"], #set-work:focus-visible ~ .tabs__bar label[for="set-work"], #set-posts:focus-visible ~ .tabs__bar label[for="set-posts"] { outline: 2px solid var(--focus); outline-offset: 2px; }
#set-general:checked ~ .tabs__panel--general, #set-work:checked ~ .tabs__panel--work, #set-posts:checked ~ .tabs__panel--posts { display: flex; }

/* Around a person: the people they know that you don't (when they show all their connections),
   quieter than your own, and the person card's tabs (explorer.js, personDetail). */
.xp__hex--outside { --tone: var(--line); }
.xp__hex--outside .xp__in { background: var(--surface); color: var(--muted); }
/* Invite someone: the first hexagon next to you (explorer.js, INVITE), opening .invite-dialog. */
.xp__hex--invite { --tone: var(--honey); }
.xp__hex--invite .xp__in { background: color-mix(in srgb, var(--honey) 14%, var(--surface)); }
.xp__hex--invite .xp__mark { font-weight: 400; }
.invite-dialog { padding: 0; border: 0; background: transparent; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; color: var(--ink); }
.invite-dialog::backdrop { background: rgb(0 0 0 / .5); }
.invite-dialog .side-card { margin: 0; }
.invite-dialog__close { position: absolute; top: 8px; right: 8px; z-index: 1; font-size: 22px; line-height: 1; }
@media (max-width: 900px) {
  .invite-dialog { width: 100%; max-width: none; margin: auto 0 0; max-height: 85dvh; }
  .invite-dialog .side-card { border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
}
.xp__hex--outside:hover .xp__in, .xp__hex--outside:focus-visible .xp__in { color: var(--ink); }
.xp__hex--outside.xp__hex--photo .xp__photo { opacity: .55; filter: grayscale(.6); }
.xp__hex--outside.xp__hex--photo:hover .xp__photo { opacity: 1; filter: none; }
.chip--outside { border-style: dashed; }
.xp-detail__beyond { margin: 8px 0 6px; }
.xp-detail__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: -4px; }
.xp-detail__tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.xp-detail__tab:hover { color: var(--ink); }
.xp-detail__tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--forest); }
.xp-detail__tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.xp-detail__panel { display: flex; flex-direction: column; gap: var(--space-4, 16px); }

/* Someone picked from around a person (a connection of theirs, not yours), and the request to be
   introduced: in the panel, and in your connection's feed (feed.js). */
.xp__hex--outside.is-picked { --tone: var(--forest); }
.xp__hex--outside.is-picked .xp__in { color: var(--ink); }
.xp__hex--outside.is-picked .xp__photo { opacity: 1; filter: none; }
.xp-detail__ask { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.xp-detail__ask textarea { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md, 8px); background: var(--surface); color: var(--ink); }
.writing__item--ask p { margin: 0; }
.feed__note { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); }
/* A message from IntroFirst (the console, feed.js kind "admin"). */
.writing__item--admin { border-left: 3px solid var(--forest); }
.feed__brand { width: 32px; height: 32px; }

/* Finish setting up: the checklist at the top of your dashboard (dashboard.js, setupCard). */
.setup .card__head h2 { margin: 0; font-size: 18px; line-height: 26px; }
.setup__bar { height: 6px; border-radius: 3px; background: var(--sage-100); overflow: hidden; margin: 10px 0 14px; }
.setup__bar span { display: block; height: 100%; background: var(--forest); border-radius: 3px; }
.setup__list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.setup__item { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md, 8px); }
.setup__why { flex: 1; }

/* Groups (site/g/index.html, group-page.js; docs/groups/) */
.group { max-width: 820px; padding-block: var(--space-8, 32px); display: flex; flex-direction: column; gap: var(--space-6, 24px); }
.group__top { display: flex; align-items: center; gap: var(--space-4, 16px); flex-wrap: wrap; }
.group__who { flex: 1 1 240px; min-width: 0; }
.group__who h1 { margin: 0; font-size: 28px; line-height: 36px; }
.group__who p { margin: 2px 0; }
.group__stand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group__about p { margin: 0 0 var(--space-3, 12px); }
.group__about p:last-child { margin-bottom: 0; }
.group__ask { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.group__tabs { display: flex; gap: var(--space-2, 8px); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--space-4, 16px); }
.group__tabs a { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.group__tabs a:hover { color: var(--ink); }
.group__tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--forest); }
.group__tabs a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.group__view { display: flex; flex-direction: column; gap: var(--space-4, 16px); }
.group__view h2 { margin: 0; font-size: 20px; line-height: 28px; }
.group__new summary { list-style: none; cursor: pointer; align-self: flex-start; }
.group__new summary::-webkit-details-marker { display: none; }
.group__new[open] summary { margin-bottom: var(--space-2, 8px); }
.group__new form, .group__settings, .group__create, .group__invite-form, [data-reply-form] { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.group__actions { display: flex; align-items: center; gap: var(--space-3, 12px); flex-wrap: wrap; }
.group__threads, .group__replies, .group__members, .group__invites, .group__mine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.group__threads li { gap: 4px; }
.group__thread-title { color: var(--ink); font: 600 19px/26px var(--font-display); text-decoration: none; }
.group__thread-title:hover { text-decoration: underline; }
.group__threads .chip, .group__thread .chip { margin-left: 4px; font-size: 12px; padding: 1px 8px; }
.group__thread h2 { font-size: 24px; line-height: 32px; }
.group__thread header p, .group__replies p.small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.group__replies li { gap: var(--space-2, 8px); }
.group__replies-h { margin: var(--space-2, 8px) 0 0; font-size: 16px; }
.group__members li { display: flex; align-items: center; gap: var(--space-3, 12px); padding: var(--space-3, 12px) 0; border-bottom: 1px solid var(--line); }
.group__members li:last-child { border-bottom: 0; }
.group__member-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.group__members select { min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius-md, 8px); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; padding: 4px 8px; }
.group__invites li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3, 12px); flex-wrap: wrap; }
.group__check { display: flex; gap: 10px; align-items: flex-start; }
.group__check input { margin-top: 4px; }
.group__check > span { display: flex; flex-direction: column; }
.group__settings h2 { margin-top: var(--space-4, 16px); }
.group__settings h2:first-child { margin-top: 0; }
.group__mine li { display: flex; align-items: baseline; gap: 8px; }
/* Signing up: who you're signed in as, and switching (signup/index.html). */
@media (max-width: 600px) { .me [data-fill="me-email"] { display: none; } }

/* Messages (messages.js): the Messages tab, and a conversation in a dialog. */
.msg__threads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.msg__thread { display: flex; align-items: center; gap: var(--space-3, 12px); width: 100%; padding: var(--space-3, 12px) 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.msg__threads li:last-child .msg__thread { border-bottom: 0; }
.msg__thread:hover { background: var(--paper-shade); }
.msg__thread:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.msg__thread-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.msg__thread-text > .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__thread-top { display: flex; justify-content: space-between; gap: 8px; }
.msg__thread.is-unread b { color: var(--forest); }
.msg-dialog { padding: var(--space-6, 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; gap: var(--space-3, 12px); width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 32px)); }
.msg-dialog:not([open]) { display: none; }
.msg__head .invite-dialog__close { background: none; border: 0; color: var(--muted); cursor: pointer; }
.msg__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 32px; }
.msg__head a { color: var(--ink); text-decoration: none; font-size: 18px; }
.msg__head a:hover { text-decoration: underline; }
.msg__log { flex: 1 1 auto; min-height: 200px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.msg__day { align-self: center; margin: 8px 0 0; }
.msg__bubble { align-self: flex-start; max-width: 80%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--paper-shade); color: var(--ink); overflow-wrap: anywhere; }
.msg__bubble--mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--forest); color: var(--on-forest); }
.msg__bubble p { margin: 0; }
.msg__bubble p + p { margin-top: 6px; }
.msg__time { display: block; margin-top: 2px; font-size: 11px; opacity: .7; text-align: right; }
.msg__form { display: flex; gap: 8px; align-items: flex-end; }
.msg__form textarea { flex: 1 1 auto; min-height: 44px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md, 8px); background: var(--surface); color: var(--ink); font: inherit; }
.msg__form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.msg__fine { margin: 0; }
@media (max-width: 900px) { .msg-dialog { width: 100%; max-height: 90dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); } .msg__log { max-height: none; } }

/* Inviting your connections to a group (page-view.js, #invite-to/<group>). */
.xp-inviting { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: var(--space-4, 16px); }
.xp-inviting p { margin: 0; }
.xp-inviting > span { display: flex; gap: 8px; flex-wrap: wrap; }
.xp-detail__invite { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-md, 8px); background: var(--paper-shade); }
.xp-detail__invite p { margin: 0; }
.xp-detail__invite .btn { align-self: flex-start; }
