/* Compact volunteer disclosure keeps secondary actions out of the main flow. */
.m-volunteer-section { margin-block: 16px; border-block: 1px solid var(--border); }
.m-volunteer-section > summary { cursor: pointer; min-height: 52px; padding: 14px 4px; }
.m-volunteer-section > summary > strong { margin-right: 12px; }
.m-volunteer-section > summary:focus-visible { outline: 2px solid var(--sage-main); outline-offset: 2px; }
.m-volunteer-section[open] { padding-bottom: 12px; }

/* Capital Commons: an editorial community workspace.
   Uses the existing theme tokens so all member palettes remain available. */
:root {
  --workspace-ease: cubic-bezier(.22, 1, .36, 1);
  --radius: 16px;
}
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 18px; background: var(--panel); color: var(--text); transform: translateY(-150%); border: 2px solid var(--sage-main); border-radius: 8px; }
.skip-link:focus { transform: none; }
.app-update-notice { position: fixed; z-index: 70; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px; max-width: 480px; margin-inline: auto; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); box-shadow: var(--lift); font-size: 13px; line-height: 1.5; pointer-events: none; }
.workspace-rail { display: none; }
body { background: var(--bg); }
.main { background: var(--bg); }
.topbar { min-height: 72px; padding-inline: 24px; background: var(--panel); backdrop-filter: none; }
.top-brand { font-size: 25px; letter-spacing: -.055em; }
.top-actions { gap: 5px; }
.icon-btn { min-width: 44px; min-height: 44px; }
.column { width: 100%; padding: 30px 24px 48px; }
.page-title { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; margin-bottom: 24px; }
.primary, .g-cta, .send-btn { background: var(--sage-main); box-shadow: none; border-radius: 10px; }
.primary { min-height: 44px; }
input, textarea, select { border-radius: 10px; }
.card, .post, .compose-card, .cc, .lj-card, .lp-card, .ib-row, .match-card, .listing-card, .exchange-card, .g-settings { box-shadow: none; }
.g-kicker { letter-spacing: .12em; font-size: 10px; font-weight: 600; }
.feed-column { width: 100%; padding: 24px 20px 48px; }
.home-hero { margin: 0 0 24px; padding: 30px; min-height: 230px; border: 0; border-radius: 18px; background: var(--mint); box-shadow: none; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.home-hero-text { padding: 0; gap: 12px; }
.home-hero-text h1 { font-size: clamp(30px, 3.5vw, 47px); line-height: 1.08; letter-spacing: -.055em; max-width: 15ch; }
.home-hero-text .home-hero-lead { color: var(--text); font-size: 15px; max-width: 30ch; line-height: 1.6; }
.home-hero-text > p:last-child { font-size: 12px; }
.home-hero-art { opacity: .92; }
.daily-quote { margin: 0 0 20px; padding: 16px 20px; border-left: 3px solid var(--sage-main); border-radius: 0 10px 10px 0; background: var(--panel); }
.daily-quote .g-kicker { margin: 0 0 8px; color: var(--sage-deep); }
.daily-quote blockquote { margin: 0; max-width: 70ch; color: var(--text); font-family: var(--font-display); font-size: clamp(16px, 1.3vw, 20px); line-height: 1.5; letter-spacing: -.015em; text-wrap: pretty; }
.daily-quote-credit { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.home-hero .daily-quote-inline { margin: 2px 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.daily-quote-inline .g-kicker, .daily-quote-inline .daily-quote-credit { display: none; }
.daily-quote-inline blockquote { max-width: 55ch; font-family: inherit; font-size: clamp(15px, 1.25vw, 19px); font-weight: 600; font-style: italic; line-height: 1.6; letter-spacing: 0; }
@media (max-width: 680px) {
  .daily-quote { padding: 12px 14px; margin-bottom: 16px; }
  .daily-quote-credit { font-size: 10px; }
  .home-hero:has(.daily-quote-inline) { grid-template-columns: minmax(0, 1fr); }
  .home-hero:has(.daily-quote-inline) .home-hero-art { display: none; }
  .daily-quote-inline blockquote { font-size: 14px; }
}
.stories { padding: 0 0 22px; gap: 20px; border: 0; background: transparent; }
.story-ring { box-shadow: none; }
.compose-card { margin: 0 0 22px; padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.compose-row { gap: 12px; }
.compose-input { background: var(--bg); border-radius: 9px; min-height: 44px; font-size: 14px; }
.compose-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; gap: 4px; }
.compose-chips button { min-width: 0; gap: 5px; font-size: 12px; padding-inline: 3px; }
.compose-chips .icon { width: 16px; height: 16px; flex: none; }
.compose-chips .icon { color: var(--sage-deep); }
.compose-chips button { min-height: 36px; border-radius: 6px; }
.feed-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 12px 0 20px; }
.feed-heading .g-kicker { color: var(--muted); margin: 0 0 8px; }
.feed-heading h2 { font-size: 25px; letter-spacing: -.04em; margin: 0; }
.feed-heading > span { font-size: 12px; color: var(--muted); }
.post-list { gap: 18px; }
.card.post { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 0; box-shadow: none; }
.post-head { padding: 18px; }
.post-desc { line-height: 1.7; }
.post-actions { padding-inline: 16px; }
.post-actions .icon-action { display: inline-flex; align-items: center; gap: 7px; min-width: 44px; min-height: 44px; color: var(--text); }
.post-actions .icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.post-actions .like.liked { color: var(--like); }
.post-actions .like.liked .icon { fill: currentColor; stroke: currentColor; }
.comments { gap: 14px; margin: 12px 0; }
.comment-item { min-width: 0; list-style: none; }
.comment-content { min-width: 0; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.comment-meta time { font-size: 10px; color: var(--muted); }
.comment-text { margin-top: 4px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.comment-reply-to { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.comment-actions { display: flex; align-items: center; gap: 16px; }
.comment-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.comment-actions .icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.comment-actions .liked { color: var(--like); }
.comment-actions .liked .icon { fill: currentColor; }
.comment-replies { list-style: none; display: grid; gap: 12px; margin: 2px 0 0 12px; padding-left: 14px; border-left: 1px solid var(--border); }
.comment-compose { min-width: 0; flex: 1; }
.comment-compose input { width: 100%; min-height: 44px; }
.comment-reply-context { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 10px; background: var(--mint); border-radius: 6px; font-size: 12px; }
.comment-reply-context button { min-height: 32px; }
.comment-form > button { align-self: end; min-height: 44px; }
body[data-role="viewer"] .comment-actions { display: none; }
.home-mission { gap: 14px; margin-bottom: 20px; }
.home-mission-main, .home-mission-campaign { padding: 22px; border-radius: 14px; background: var(--panel); box-shadow: none; }
.home-mission-main .g-kicker { color: var(--sage-deep); }
.home-mission-main strong { font-size: 22px; line-height: 1.3; letter-spacing: -.035em; }
.home-mission-help { border-style: solid; padding: 18px; border-radius: 12px; }
.home-skills { border: 1px solid var(--border); border-radius: 14px; background: var(--mint); padding: 20px; box-shadow: none; }
.feed-empty { padding: 36px 24px; border: 1px dashed var(--border-strong); border-radius: 14px; text-align: center; background: var(--panel); }
.feed-empty > .icon { width: 32px; height: 32px; color: var(--sage-deep); margin-bottom: 12px; }
.feed-empty h3 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.feed-empty p { color: var(--muted); max-width: 38ch; margin: 12px auto 22px; }
.feed-empty .primary { padding-inline: 20px; }
.tabbar { background: var(--panel); }
.tabbar button.active { color: var(--sage-deep); }
.tabbar button.active .icon { transform: none; }
.tabbar .tab-create .tab-create-disc { background: var(--sage-main); box-shadow: none; border-radius: 10px; }
.tabbar .tab-create:active .tab-create-disc { transform: scale(.96); }
.gf-wave { display: none; }
.g-footer { width: 100%; min-width: 0; background: transparent; border-top: 1px solid var(--border); border-radius: 0; margin-top: 32px; padding: 0; content-visibility: visible; contain-intrinsic-size: none; }
.gf-inner { width: 100%; padding: 20px 0; background: transparent; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; text-align: left; }
.gf-inner::before, .gf-inner::after { display: none; }
.gf-brand { font-size: 20px; }
.gf-tag { display: none; }
.g-footer .gf-links { justify-content: flex-end; gap: 4px 12px; margin: 0; }
.gf-link { min-height: 40px; padding: 8px 4px; border: 0; background: transparent; border-radius: 4px; font-size: 12px; font-weight: 400; }
.gf-link:hover, .gf-link:focus-visible, .g-footer.gf-await.in .gf-link:hover { transform: none; box-shadow: none; color: var(--sage-deep); text-decoration: underline; }
.gf-link .icon { display: none; }
.gf-bottom { flex-basis: 100%; width: 100%; justify-content: space-between; gap: 12px; margin: 0; font-size: 11px; line-height: 1.6; }
.gf-top { min-height: 36px; padding: 6px 10px; background: var(--hover); color: var(--text); border-radius: 6px; }
.gf-star, .gf-pulse-dot::after { animation: none; }
.g-footer.gf-await .gf-inner > *, .g-footer.gf-await .gf-link { opacity: 1; transform: none; transition: none; }
.gf-pulse { font-size: 11px; background: transparent; padding: 0; }
.auth { min-height: 100dvh; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; align-content: stretch; row-gap: 32px; padding: 64px 32px 0; background: var(--bg); }
.auth-wrap { width: min(1120px, 100%); grid-template-columns: minmax(0, 1.25fr) minmax(340px, .8fr); gap: clamp(40px, 7vw, 100px); align-items: center; margin: 0 auto; }
.auth-hero .brand { margin-bottom: 40px; font-size: 31px; }
.auth-hero { display: flex; flex-direction: column; }
.auth-hero .brand { order: -4; }
.auth-hero > .g-kicker { order: -3; }
.auth-hero h1 { order: -2; text-transform: none; font-size: clamp(44px, 5.7vw, 76px); line-height: 1.02; letter-spacing: -.065em; margin: 20px 0 24px; }
.auth-hero .lead { order: -1; }
.auth-art { order: 2; }
.lp-head { align-items: center; padding: 24px; background: var(--mint); border-radius: 16px; gap: 24px; }
.lp-head-text .page-title { margin-bottom: 12px; }
.path-art.il { width: 200px; max-width: 40%; flex: 0 0 auto; }
.filters { flex-wrap: wrap; }
.filters select { min-width: 0; max-width: 100%; flex: 1 1 140px; }
.auth-hero .lead { font-size: 16px; line-height: 1.7; max-width: 44ch; }
.auth-art { max-width: 290px; margin: 24px 0 0; }
.auth-points { margin-top: 24px; gap: 14px; max-width: 45ch; }
.auth-points li { font-size: 13px; line-height: 1.5; }
.auth-card { padding: 34px; border-radius: 18px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 18px 60px color-mix(in srgb, var(--text) 5%, transparent); }
.auth-form { gap: 16px; }
.auth-form h2 { font-size: 28px; letter-spacing: -.04em; }
.auth-form label { font-size: 13px; }
.auth-form input { min-height: 46px; background: var(--bg); }
.auth .g-footer { width: 100%; max-width: 1120px; margin-inline: auto; justify-self: stretch; align-self: end; }
@media (max-width: 680px) {
  .gf-inner { justify-content: center; gap: 8px 16px; padding: 16px 0; text-align: center; }
  .gf-brand { font-size: 18px; }
  .g-footer .gf-links { width: 100%; justify-content: center; gap: 0 12px; }
  .gf-bottom { justify-content: center; gap: 8px; }
  .gf-bottom p { flex-basis: 100%; }
  .gf-top { min-height: 44px; }
}
@media (min-width: 1000px) {
  .app { display: grid; grid-template-columns: 228px minmax(0, 1fr); max-width: none; margin-inline: auto; }
  .workspace-rail { display: flex; flex-direction: column; gap: 0; height: 100dvh; overflow-y: auto; scrollbar-width: thin; padding: 28px 20px 22px; background: var(--panel); border-right: 1px solid var(--border); }
  .workspace-brand { display: block; color: var(--text); text-decoration: none; font-size: 30px; letter-spacing: -.06em; padding-inline: 10px; }
  .rail-caption { color: var(--muted); font-size: 11px; padding-inline: 12px; margin: 10px 0 38px; }
  .workspace-links { display: grid; gap: 6px; }
  .workspace-links button, .rail-bottom button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 12px; border: 0; background: transparent; border-radius: 9px; color: var(--muted); font-size: 14px; text-align: left; }
  .workspace-links button.active { background: var(--mint); color: var(--sage-deep); }
  .workspace-links button.active::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-left: auto; }
  .workspace-links .icon, .rail-bottom .icon { width: 20px; height: 20px; flex: none; }
  .rail-divider { border-top: 1px solid var(--border); margin: 20px 12px 8px; }
  .rail-section { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-inline: 12px; margin-bottom: 8px; }
  .rail-create { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 28px; flex-shrink: 0; }
  .rail-create .icon { width: 18px; }
  .rail-note { border-top: 1px solid var(--border); margin: 24px 12px 16px; padding-top: 18px; }
  .rail-note-mark { display: block; font-size: 24px; color: var(--sage-deep); margin-bottom: 12px; }
  .rail-note strong { font-family: var(--font-display); font-size: 18px; letter-spacing: -.035em; line-height: 1.35; }
  .rail-note p { color: var(--muted); font-size: 12px; line-height: 1.7; }
  .rail-bottom { margin-top: auto; }
  .rail-bottom > span { display: block; color: var(--muted); font-size: 9px; padding: 16px 12px 0; }
  .main { width: 100%; max-width: none; border: 0; }
  .topbar { min-height: 80px; padding-inline: 36px; }
  body[data-view="feed"] .top-brand { display: none; }
  body[data-view="feed"] #view-title { visibility: visible; }
  #view-title { font-size: 18px; letter-spacing: -.025em; }
  .tabbar { display: none; }
  .feed-column { max-width: 1100px; padding: 32px 36px 48px; }
  .home-hero { min-height: 255px; padding: 36px; }
  .home-hero-art { max-width: 300px; justify-self: end; }
  .column:not(.feed-column) { padding-top: 36px; }
  .workspace-links button:hover, .rail-bottom button:hover { background: var(--hover); color: var(--text); }
}
@media (min-width: 1200px) {
  .feed-column { display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 26px; align-items: start; }
  #feed-hero { grid-area: 1 / 1 / 2 / 3; }
  #feed-top { grid-area: 2 / 1 / 3 / 3; }
  #feed-mission { grid-area: 3 / 2 / 7 / 3; }
  .compose-card { grid-area: 3 / 1; }
  #feed-trends { grid-area: 4 / 1; }
  .feed-heading { grid-area: 5 / 1; }
  #feed-list { grid-area: 6 / 1; }
  #feed-empty { grid-area: 7 / 1; }
  #feed-more { grid-area: 8 / 1; }
  #feed-skills { grid-area: 7 / 2 / 9 / 3; }
  .feed-column > .g-footer { grid-column: 1 / -1; }
  .home-skills { flex-wrap: wrap; }
  .home-skills-text { flex-basis: 140px; }
  .home-mission-main strong { font-size: 23px; }
  .feed-heading > span { display: none; }
}
@media (max-width: 999px) {
  .main { max-width: none; width: 100%; border-inline: 0; }
  .auth-wrap { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); }
  .auth { padding-inline: 24px; }
  .auth-card { padding: 26px; }
}
@media (max-width: 680px) {
  .auth { padding: 28px 20px 0; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .auth-hero .brand { margin-bottom: 26px; font-size: 27px; }
  .auth-hero h1 { font-size: 48px; }
  .auth-hero .lead { font-size: 14px; }
  .auth-art, .auth-points { display: none; }
  .auth-card { padding: 26px 22px; }
  .topbar { min-height: 64px; padding-inline: 14px; }
  .top-actions { gap: 0; }
  .column { padding: 24px 16px 36px; }
  .feed-column { padding-top: 16px; }
  .home-hero { padding: 24px 20px; min-height: 210px; gap: 0; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); }
  .home-hero-text h1 { font-size: 32px; }
  .home-hero { grid-template-columns: minmax(0, 1fr) 90px; }
  .home-hero-art { width: 110px; }
  .path-art.il { width: 110px; max-width: 35%; }
  .lp-head { padding: 20px 16px; gap: 12px; }
  .lp-head .page-title { font-size: 28px; }
  .lp-head p { font-size: 13px; }
  .home-hero-text .g-kicker { font-size: 8px; letter-spacing: .08em; }
  .home-hero-text .home-hero-lead { font-size: 13px; }
  .home-hero-art { margin-right: -22px; }
  .feed-heading > span { display: none; }
  .feed-heading h2 { font-size: 24px; }
  .compose-chips button { font-size: 11px; }
  .compose-card { padding: 14px; }
  .compose-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-mission-main, .home-mission-campaign { padding: 20px; }
  .tabbar { flex-shrink: 0; }
}
/* Daily-use controls get short feedback; content stays still while reading. */
.workspace-links button, .rail-bottom button, .compose-input { transition: background-color 160ms var(--workspace-ease), color 160ms var(--workspace-ease); }
.primary, .ghost, .icon-btn { transition: transform 140ms var(--workspace-ease), background-color 160ms var(--workspace-ease); }
.primary:active, .ghost:active { transform: scale(.98); }
.home-hero-art *, .auth-art *, .rail-note-mark { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  .primary:active, .ghost:active, .tabbar .tab-create:active .tab-create-disc { transform: none; }
}

/* Window-aware community layout: laptop canvases and compact phones. */
html, body { min-width: 0; }
.app, .main { height: 100dvh; height: var(--app-height, 100dvh); }
.app { width: 100%; max-width: none; }
.main { min-height: 0; }
.workspace-rail { height: var(--app-height, 100dvh); }
.column, .feed-column { min-width: 0; }
.section-row, .section-head { flex-wrap: wrap; gap: 12px; }
.section-row > *, .section-head > *, .filters > * { min-width: 0; }
.prose, .lesson-body { overflow-wrap: anywhere; }
dialog { max-width: calc(100vw - 24px); max-height: calc(var(--app-height, 100dvh) - 24px); overflow-y: auto; }
button, a, input, textarea, select { touch-action: manipulation; }
.topbar, .tabbar { flex-shrink: 0; }
.view { min-width: 0; overscroll-behavior-y: contain; scrollbar-width: thin; }
.post-desc, .msg-text, .home-mission-main strong { overflow-wrap: anywhere; }
.post-title { max-width: 70ch; line-height: 1.65; }
.post-img { max-height: min(65dvh, 620px); object-fit: contain; background: var(--bg); }
.stories .story-ring { width: 62px; height: 62px; padding: 3px; }
.stories .story-ring .avatar { width: 100%; height: 100%; min-width: 0; box-shadow: none; font-size: 21px; }
@media (min-width: 1000px) {
  .app { grid-template-columns: clamp(216px, 17vw, 244px) minmax(0, 1fr); }
  .workspace-rail { padding: 24px 16px 16px; }
  .workspace-links button { font-size: 13px; min-height: 44px; padding: 10px; gap: 10px; }
  .workspace-brand { font-size: 28px; }
  .rail-caption { margin-bottom: 24px; }
  .rail-section { margin-top: 4px; }
  .rail-divider { margin-block: 14px 8px; }
  .rail-create { padding: 12px; margin-top: 20px; font-size: 13px; white-space: nowrap; }
  .rail-note { margin-top: 22px; }
  .rail-note strong { font-size: 17px; }
  .rail-note p { font-size: 11px; }
  .rail-bottom button { min-height: 44px; }
  .topbar { min-height: 68px; padding-inline: clamp(24px, 2.3vw, 36px); }
  .feed-column { max-width: none; padding: 24px clamp(24px, 2.3vw, 48px) 40px; }
  .home-hero { min-height: 178px; padding: 26px 30px; margin-bottom: 20px; grid-template-columns: minmax(0, 1.6fr) minmax(160px, .8fr); }
  .home-hero-text { gap: 9px; }
  .home-hero-text h1 { font-size: clamp(32px, 2.8vw, 40px); max-width: 24ch; }
  .home-hero-text .home-hero-lead { max-width: 48ch; font-size: 14px; }
  .home-hero-art { width: 220px; max-width: 100%; }
  .stories { gap: 18px; padding-bottom: 18px; }
  .stories .story-ring { width: 54px; height: 54px; }
  .story-label { font-size: 11px; }
  .home-mission-main, .home-mission-campaign { padding: 20px; }
  .home-mission-main strong { font-size: 20px; line-height: 1.4; }
  .feed-heading { padding-block: 10px 16px; }
  .column:not(.feed-column) { width: 100%; padding: 28px clamp(24px, 3vw, 56px) 40px; }
}
@media (min-width: 1200px) {
  .feed-column { grid-template-columns: minmax(0, 1fr) clamp(250px, 20vw, 288px); column-gap: 24px; }
}
@media (min-width: 1000px) and (max-height: 850px) {
  .rail-note { display: none; }
  .workspace-rail { padding-top: 20px; }
  .rail-bottom { padding-top: 16px; }
  .rail-bottom > span { padding-top: 6px; }
}
@media (max-width: 680px) {
  .topbar { min-height: 58px; padding-inline: 10px; gap: 0; }
  .top-brand { font-size: 23px; }
  .topbar .icon-btn { width: 44px; min-width: 44px; min-height: 44px; padding: 8px; }
  #topbar-create { display: none; }
  .topbar .conn { margin-left: 4px; }
  .topbar #view-title { font-size: 17px; }
  .feed-column { display: flex; flex-direction: column; padding: 12px 12px 28px; }
  .feed-column > * { width: 100%; flex-shrink: 0; }
  #feed-hero { order: 1; }
  #feed-top { order: 2; }
  .compose-card { order: 3; }
  #feed-trends { order: 4; }
  .feed-heading { order: 5; }
  #feed-list { order: 6; }
  #feed-empty { order: 7; }
  #feed-more { order: 8; }
  #feed-mission { order: 9; margin-top: 24px; }
  #feed-skills { order: 10; }
  .feed-column > .g-footer { order: 11; }
  .home-hero { min-height: 112px; margin: 0 0 16px; padding: 16px; grid-template-columns: minmax(0, 1fr) 72px; gap: 12px; border-radius: 14px; }
  .home-hero-text { gap: 8px; min-width: 0; }
  .home-hero-text { grid-column: 1; grid-row: 1; order: 0; }
  .home-hero-art { grid-column: 2; grid-row: 1; }
  .home-hero-text h1 { font-size: clamp(23px, 6.4vw, 27px); line-height: 1.12; max-width: 22ch; }
  .home-hero-text .g-kicker { font-size: 8px; letter-spacing: .06em; }
  .home-hero-text .home-hero-lead { display: none; }
  .home-hero-text > p:last-child { font-size: 11px; line-height: 1.45; }
  .home-hero-art { width: 78px; margin-right: -6px; }
  .stories { gap: 16px; padding-bottom: 16px; }
  .story { min-width: 58px; }
  .stories .story-ring { width: 48px; height: 48px; }
  .story-label { font-size: 10px; }
  .story-plus { width: 20px; height: 20px; }
  .compose-card { padding: 12px; margin-bottom: 14px; gap: 8px; }
  .compose-row { gap: 10px; }
  .compose-row .avatar { width: 36px; height: 36px; }
  .compose-input { min-height: 42px; font-size: 12px; padding: 10px 12px; line-height: 1.4; }
  .compose-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; padding-top: 8px; gap: 3px; }
  .compose-chips button { flex-direction: column; min-height: 46px; gap: 4px; font-size: 10px; padding: 4px 0; background: transparent; border-color: transparent; }
  .compose-chips .icon { width: 17px; height: 17px; }
  .feed-heading { padding: 8px 2px 14px; }
  .feed-heading .g-kicker { display: none; }
  .feed-heading h2 { font-size: 21px; }
  .post-list { gap: 14px; }
  .post-head { padding: 14px; }
  .post-desc { font-size: 14px; line-height: 1.65; }
  .home-mission-main strong { font-size: 18px; }
  .tabbar { min-height: 60px; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tabbar button { min-height: 56px; }
  .tabbar .tab-label { font-size: 10px; }
  .column:not(.feed-column) { padding: 20px 14px 32px; }
  .page-title { font-size: 28px; }
  input, textarea, select { font-size: 16px; }
  dialog { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
  .auth { padding: 24px 16px 0; }
  .auth-hero .brand { margin-bottom: 18px; }
  .auth-hero h1 { font-size: 40px; margin-block: 12px 16px; }
  .auth-hero .lead { font-size: 13px; }
  .auth-wrap { gap: 20px; }
  .auth-card { padding: 24px 18px; }
}
@media (max-width: 680px) and (max-height: 700px) {
  .home-hero { min-height: 96px; padding-block: 12px; margin-bottom: 12px; }
  .home-hero-text .g-kicker { display: none; }
  .stories { padding-bottom: 12px; }
  .auth-hero h1 { font-size: 34px; }
  .auth-hero .lead { display: none; }
}

@media (min-width: 681px) and (max-width: 999px) {
  .feed-column { padding: 24px clamp(20px, 4vw, 40px) 40px; }
  .column:not(.feed-column) { padding-inline: clamp(20px, 4vw, 40px); }
  .home-hero { min-height: 160px; padding: 24px; }
  .home-hero-text h1 { font-size: 32px; max-width: 24ch; }
  .home-hero-art { width: min(100%, 190px); justify-self: end; }
}
@media (min-width: 681px) and (max-width: 1199px) {
  .feed-column { display: flex; flex-direction: column; }
  .feed-column > * { width: 100%; flex-shrink: 0; }
  #feed-hero { order: 1; }
  #feed-top { order: 2; }
  .compose-card { order: 3; }
  #feed-trends { order: 4; }
  .feed-heading { order: 5; }
  #feed-list { order: 6; }
  #feed-empty { order: 7; }
  #feed-more { order: 8; }
  #feed-mission { order: 9; margin-top: 24px; }
  #feed-skills { order: 10; }
  .feed-column > .g-footer { order: 11; }
}
@media (min-width: 1800px) {
  .feed-column { grid-template-columns: minmax(0, 1fr) clamp(300px, 21vw, 420px); column-gap: 36px; }
  .home-hero { min-height: 210px; }
  .home-hero-text h1 { font-size: clamp(40px, 2.4vw, 54px); }
  .home-hero-art { width: 280px; }
  .home-mission-main strong { font-size: 24px; }
  .post-head, .post-actions { padding-inline: 24px; }
}
@media (max-width: 359px) {
  .top-brand { font-size: 21px; }
  .topbar { padding-inline: 6px; }
  .home-hero { grid-template-columns: minmax(0, 1fr) 52px; gap: 8px; padding-inline: 12px; }
  .home-hero-art { width: 58px; }
  .home-hero-text h1 { font-size: 22px; }
  .p-card { flex-wrap: wrap; }
  .p-ring .avatar.xl { width: 72px; height: 72px; }
}
@media (min-width: 681px) and (max-height: 600px) {
  .topbar { min-height: 54px; }
  .workspace-rail { padding-block: 12px; }
  .rail-caption, .rail-section, .rail-note { display: none; }
  .rail-divider { margin-block: 8px; }
  .workspace-links { gap: 2px; margin-top: 12px; }
  .rail-create { margin-top: 12px; }
  .home-hero { min-height: 130px; padding-block: 18px; }
  .home-hero-art { width: 160px; }
}
@media (hover: none) {
  .story:hover .story-ring { transform: none; }
  .compose-chips button, .chip, .gf-link { min-height: 44px; }
}

/* Keep the daily reflection visible even on short and narrow mobile screens. */
@media (max-width: 680px) {
  .home-hero.has-daily-quote { grid-template-columns: minmax(0, 1fr); height: auto; overflow: visible; padding: 18px 16px; }
  .home-hero.has-daily-quote .home-hero-art { display: none; }
  .home-hero.has-daily-quote .home-hero-text { width: 100%; min-width: 0; gap: 12px; }
  .home-hero.has-daily-quote .daily-quote-inline { display: block; width: 100%; height: auto; max-height: none; overflow: visible; margin: 0; }
  .home-hero.has-daily-quote .daily-quote-inline blockquote { display: block; visibility: visible; margin: 0; max-width: none; font-size: 15px; line-height: 1.65; font-weight: 600; font-style: italic; white-space: normal; overflow-wrap: anywhere; }
}

/* Compact spacing: one consistent rhythm across community screens. */
.column, .feed-column { padding: 16px clamp(16px, 2vw, 28px) 24px; }
.column:not(.feed-column) { padding: 16px clamp(16px, 2vw, 28px) 24px; }
.page-title { margin: 0 0 16px; font-size: clamp(26px, 2.4vw, 34px); }
.section-row { margin: 16px 0 10px; gap: 8px; }
.section-row:first-child { margin-top: 0; }
.section-row .page-title { margin-bottom: 0; }
.section-head, .g-section-head { margin-block: 16px 10px; gap: 10px; }
.topbar { min-height: 60px; }
.workspace-rail { padding-top: 20px; }
.rail-caption { margin-bottom: 16px; }
.workspace-links { gap: 2px; }
.rail-divider { margin-block: 12px 6px; }
.rail-create { margin-top: 16px; }
.rail-note { display: none; }
.home-hero { min-height: 0; padding: 18px 22px; margin-bottom: 14px; }
.home-hero-text { gap: 7px; }
.home-hero-text h1 { font-size: clamp(27px, 2.5vw, 36px); }
.home-hero-art { width: 160px; }
.daily-quote-inline blockquote { font-size: 16px; line-height: 1.5; }
.stories { padding-bottom: 12px; gap: 14px; }
.compose-card { padding: 12px; gap: 8px; margin-bottom: 12px; }
.compose-chips { margin-top: 0; padding-top: 8px; }
.compose-chips button { min-height: 40px; }
.feed-heading { padding: 6px 0 12px; }
.feed-heading .g-kicker { margin-bottom: 4px; }
.feed-heading h2 { font-size: 23px; }
.post-list { gap: 12px; }
.post-head { padding: 14px 16px 10px; }
.post-actions { padding-inline: 0; }
.post-text { padding-bottom: 8px; }
.post-title, .post-desc { line-height: 1.55; }
.comments { gap: 10px; margin-block: 8px; }
.comment-replies { gap: 8px; }
.comment-text { line-height: 1.55; }
.home-mission { gap: 10px; margin-bottom: 12px; }
.home-mission-main, .home-mission-campaign, .home-mission-help, .home-skills { padding: 14px 16px; }
.home-mission-main strong { font-size: 18px; }
.g-footer { margin-top: 20px; }
.gf-inner { padding-block: 14px; gap: 8px 20px; }
.lp-head { padding: 16px 20px; gap: 16px; }
.lp-head .page-title { margin-bottom: 8px; }
.lp-head p { margin-block: 0; line-height: 1.55; }
.path-art.il { width: 140px; }
.lp { margin-top: 16px; }
.lp-card { padding: 14px; gap: 10px; margin-bottom: 12px; }
.lp-level { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
.lp-marker { width: 40px; height: 40px; font-size: 18px; }
.lp-line { min-height: 16px; }
.lp-title { font-size: 19px; }
.skills-hero { padding-bottom: 12px; }
.skills-hero h1 { font-size: 28px; }
.skills-hero-art.il-art { width: 110px; }
.skills-tabs { margin-bottom: 12px; }
.skills-content, .skills-section { gap: 12px; }
.g-settings { padding: 16px; gap: 10px; margin-bottom: 12px; }
.g-settings > h2 { margin-block: 0; }
.p-card { padding: 16px; gap: 16px; }
.p-statbar { margin-block: 12px; padding-block: 12px; }
.empty-moments, .feed-empty { padding: 24px 16px; }
.empty-art.il-art { width: 110px; }
.qa-list, .m-list, .m-content, .a-panel { gap: 10px; }
.qa-item { padding: 12px 14px; gap: 12px; }
.filters { margin-block: 10px 12px; }
.m-me, .m-campaign, .m-progress, .m-propose, .m-stance, .m-request, .m-kudos, .m-role, .m-profile { padding: 14px; }
.m-impact { gap: 8px; margin-top: 12px; }
.m-stat { padding: 12px; }
.ib-row { padding: 12px; gap: 12px; }
.ib-avatar .avatar.lg, .ib-avatar .chan-avatar { width: 44px; height: 44px; }
.ib-name { font-size: 16px; }
.ib-preview { font-size: 14px; }
#inbox-view .conv-list { gap: 8px; }
#inbox-view .section-head { padding: 8px 0; margin-block: 8px; }
.a-request { padding: 12px; }
.a-tiles { gap: 8px; margin-bottom: 12px; }
.auth { padding-top: 32px; row-gap: 16px; }
.auth-wrap { gap: clamp(28px, 5vw, 64px); }
.auth-hero .brand { margin-bottom: 24px; }
.auth-hero h1 { font-size: clamp(40px, 4.6vw, 64px); margin-block: 12px 18px; }
.auth-points { margin-block: 16px; gap: 10px; }
.auth-art { max-width: 180px; margin-top: 12px; }
.auth-card { padding: 26px; }
.auth-form { gap: 12px; }
@media (min-width: 1200px) {
  #settings-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
  #settings-body > .page-title, #settings-body > .g-footer { grid-column: 1 / -1; }
  #settings-body > .page-title { margin-bottom: 0; }
  #settings-body > .g-settings { margin-bottom: 0; }
}
@media (max-width: 680px) {
  .column, .feed-column, .column:not(.feed-column) { padding: 12px 12px 20px; }
  .topbar { min-height: 56px; }
  .page-title { font-size: 26px; margin-bottom: 12px; }
  .home-hero.has-daily-quote { padding: 14px; margin-bottom: 12px; }
  .home-hero.has-daily-quote .home-hero-text { gap: 8px; }
  .home-hero-text h1 { font-size: 25px; }
  .home-hero.has-daily-quote .daily-quote-inline blockquote { line-height: 1.5; }
  .stories { gap: 12px; }
  .compose-card { padding: 10px; margin-bottom: 10px; }
  .compose-chips { padding-top: 4px; }
  .compose-chips button { min-height: 44px; }
  .feed-heading { padding-block: 4px 10px; }
  .feed-heading h2 { font-size: 20px; }
  #feed-trends .trend-chips { padding-bottom: 8px; }
  #feed-mission { margin-top: 16px; }
  .post-head { padding: 12px 14px 8px; }
  .post-body, .post-text { padding-inline: 14px; }
  .lp-head { padding: 14px; gap: 10px; }
  .path-art.il { width: 90px; }
  .lp-title { font-size: 17px; }
  .lp-level { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; }
  .lp-marker { width: 32px; height: 32px; font-size: 16px; }
  .skills-hero-art.il-art { width: 80px; }
  .skills-hero h1 { font-size: 25px; }
  .g-settings, .m-me, .m-campaign, .m-progress, .m-propose, .m-stance, .m-request, .m-kudos, .m-role, .m-profile { padding: 12px; }
  .p-card { padding: 14px; gap: 12px; }
  .auth { padding: 20px 16px 0; }
  .auth-wrap { gap: 16px; }
  .auth-hero .brand { margin-bottom: 16px; }
  .auth-hero h1 { font-size: 36px; margin-block: 8px 12px; }
  .auth-card { padding: 20px 18px; }
  .gf-inner { gap: 6px 12px; padding-block: 12px; }
  .g-footer .gf-links { gap: 0 10px; }
}

/* Conversation dock: reactions, threads, and writing share a compact rhythm. */
.post .post-body { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 14px 12px; min-height: 0; }
.post .post-actions { flex: none; gap: 8px; margin: 0; padding: 0; min-height: 44px; }
.post-actions .icon-action { gap: 6px; padding: 8px; border-radius: 10px; font-size: 14px; line-height: 1; }
.post-actions .icon-action .icon { width: 23px; height: 23px; }
.post-actions .like.liked { background: color-mix(in srgb, var(--like) 9%, transparent); }
.post .comments-area:empty { display: none; }
.post .comments-area { min-height: 0; padding: 0; }
.comments-area > .link { display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 0; font-size: 12px; }
.post .comments { gap: 12px; margin: 4px 0 0; }
.comment-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0 8px; align-items: start; }
.comment-avatar { grid-column: 1; grid-row: 1; padding-top: 2px; }
.comment-avatar .avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 9px; }
.comment-content { grid-column: 2; padding: 0; }
.comment-meta { gap: 6px; line-height: 1.4; }
.comment-meta .user-link { font-size: 12px; }
.comment-meta time { font-size: 10px; }
.comment-text { margin-top: 5px; padding: 7px 10px; background: var(--panel-2); border-radius: 0 10px 10px 10px; font-size: 13px; line-height: 1.5; }
.comment-actions { gap: 12px; margin-top: 0; }
.comment-actions button { gap: 5px; min-height: 44px; padding: 4px 2px; font-size: 11px; }
.comment-actions .icon { width: 15px; height: 15px; }
.comment-reply-to { font-size: 10px; margin-top: 4px; }
.comment-replies { grid-column: 2; gap: 8px; margin: 0; padding-left: 10px; border-left: 1px solid var(--border-strong); }
.comment-replies .comment-item { grid-template-columns: 22px minmax(0, 1fr); gap: 0 7px; }
.comment-replies .comment-avatar .avatar { width: 22px; height: 22px; font-size: 10px; border-radius: 7px; }
.post .comment-form { display: flex; align-items: flex-end; gap: 6px; width: 100%; margin: 2px 0 0; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel-2); }
.post .comment-form:focus-within { border-color: var(--sage-main); outline: 2px solid color-mix(in srgb, var(--sage-main) 18%, transparent); outline-offset: 1px; }
.post .comment-compose { min-width: 0; flex: 1; }
.post .comment-compose input { display: block; min-width: 0; min-height: 44px; padding: 10px; background: transparent; border: 0; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.post .comment-compose input:focus-visible { outline: none; }
.post .comment-form .comment-submit { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 10px; background: var(--sage-main); color: var(--on-accent); border: 0; border-radius: 10px; }
.comment-submit .icon { width: 20px; height: 20px; }
.post .comment-form .comment-submit:disabled { background: var(--hover); color: var(--muted); opacity: .65; cursor: default; }
.post .comment-reply-context { margin: 2px 2px 0; padding: 4px 6px; border-radius: 8px; font-size: 11px; }
@media (max-width: 680px) {
  .post .post-body { padding: 6px 12px 10px; }
  .post .comment-compose input { font-size: 16px; }
  .post .comments { gap: 8px; }
}

/* Quiet participation: discussion first, two-comment previews, compact navigation. */
.card.post, .suggest .g-person { border-radius: 12px; border: 1px solid var(--border); }
.post-head { padding: 10px 12px 8px; gap: 10px; }
.post-head .avatar { width: 34px; height: 34px; }
.post-who .user-link { font-size: 14px; }
.post-who .small { font-size: 11px; }
.post-actions .icon-action { min-width: 44px; padding: 8px; gap: 5px; font-size: 13px; }
.post-actions .icon-action .icon { width: 21px; height: 21px; }
.post-actions .like.liked, .comment-actions .liked { color: var(--sage-deep); }
.post-actions .like.liked { background: color-mix(in srgb, var(--sage-main) 8%, transparent); }
.discussion-label { font-size: 12px; font-weight: 400; }
.post .comments { gap: 10px; }
.comment-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 6px; }
.comment-meta { grid-column: 1; grid-row: 1; min-width: 0; gap: 4px; }
.comment-meta .user-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.comment-meta time, .comment-reply-to { color: color-mix(in srgb, var(--text) 75%, var(--panel)); }
.comment-actions { grid-column: 2; grid-row: 1; gap: 8px; }
.comment-actions button { min-width: 36px; min-height: 44px; padding: 4px; }
.comment-avatar { padding-top: 9px; }
.comment-reply-to { grid-column: 1 / -1; grid-row: 2; margin: 0 0 3px; }
.comment-text { grid-column: 1 / -1; grid-row: 3; margin-top: 0; padding: 6px 8px; border-radius: 0 8px 8px 8px; line-height: 1.45; font-size: 13px; }
.comment-replies { margin-top: 8px; padding-left: 8px; gap: 8px; }
.post .comment-form { border-radius: 12px; padding: 2px; gap: 4px; }
.post .comment-input { display: block; width: 100%; height: 44px; min-height: 44px; max-height: 140px; padding: 9px 10px; margin: 0; background: transparent; color: var(--text); border: 0; border-radius: 10px; font: inherit; font-size: 14px; line-height: 1.5; resize: none; overflow-y: hidden; }
.post .comment-input:focus, .post .comment-input.is-writing { min-height: 76px; height: 76px; outline: none; overflow-y: auto; }
.post .comment-form .comment-submit { background: var(--sage-main); border-radius: 10px; }
.suggest { padding: 8px 0 12px; margin: 0; }
.suggest-head { align-items: center; padding: 0 2px 8px; }
.suggest-head strong { font-size: 14px; }
.suggest-head > button { min-height: 44px; }
.suggest .g-people { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; padding: 0 0 8px; scroll-snap-type: x proximity; scroll-padding-inline: 2px; scrollbar-width: none; }
.suggest .g-people::-webkit-scrollbar { display: none; }
.suggest .g-person { flex: 0 0 190px; min-width: 0; padding: 12px; gap: 8px; justify-items: stretch; text-align: left; scroll-snap-align: start; box-shadow: none; }
.suggest .g-person-main { grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto auto; justify-items: start; align-items: center; column-gap: 8px; text-align: left; }
.suggest .g-person-main > .presence-wrap { grid-column: 1; grid-row: 1 / 3; }
.suggest .g-person-main .avatar { width: 36px; height: 36px; font-size: 14px; }
.suggest .g-person-main > strong { grid-column: 2; grid-row: 1; margin: 0; font-size: 13px; }
.suggest .g-person-main > .muted { grid-column: 2; grid-row: 2; font-size: 11px; }
.suggest .g-person-main > .g-reason { grid-column: 1 / -1; grid-row: 3; font-size: 11px; margin-top: 6px; color: var(--muted); font-weight: 400; }
.suggest .g-person-actions button { flex: 1; min-height: 44px; background: var(--panel-2); border-color: var(--border); border-radius: 8px; font-size: 12px; }
.main > .scroll { scroll-padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 999px) {
  .topbar { min-height: 48px; padding-block: 1px; }
  .top-brand { font-size: 22px; }
  #theme-btn, #topbar-create { display: none; }
  .top-actions .icon { width: 22px; height: 22px; }
  .tabbar { min-height: 56px; flex-shrink: 0; padding-top: 0; }
  .tabbar button { min-height: 54px; padding-block: 5px; gap: 2px; }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar .tab-create { padding-block: 3px; }
  .tabbar .tab-create .tab-create-disc { width: 34px; height: 30px; border-radius: 8px; box-shadow: none; }
  .tabbar .tab-create .icon { width: 19px; height: 19px; }
  .tabbar .tab-label { font-size: 10px; line-height: 1.2; }
  .feed-column { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 680px) {
  .post .comment-input { font-size: 16px; }
  .comment-item { grid-template-columns: 24px minmax(0, 1fr); column-gap: 7px; }
  .comment-avatar .avatar { width: 24px; height: 24px; }
  .comment-replies .comment-item { grid-template-columns: 20px minmax(0, 1fr); column-gap: 6px; }
  .comment-replies .comment-avatar .avatar { width: 20px; height: 20px; }
  .comment-actions { gap: 4px; }
}
.post-actions .save-post { margin-left: auto; }
.post-actions .save-post.is-saved { color: var(--sage-deep); }
.post-actions .save-post.is-saved .icon { fill: currentColor; }
.saved-intro { margin: -4px 0 16px; font-size: 13px; }
.saved-post-list { margin-bottom: 16px; }
.post-share-dialog { width: min(440px, calc(100vw - 24px)); }
.post-share-dialog input { font-size: 14px; }
.post-share-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.share-member-list { display: grid; gap: 8px; max-height: 42dvh; overflow-y: auto; margin: 12px 0; }
.share-member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.share-member-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.share-member-row .avatar { flex-shrink: 0; }
.new-message-members { display: grid; gap: 4px; max-height: 45dvh; overflow-y: auto; margin-block: 12px; }
.inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.inbox-heading .page-title { margin: 0; }
.inbox-heading button { flex-shrink: 0; }
.new-message-member { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 4px; text-align: left; background: transparent; }
.new-message-member > span:not(.avatar) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.new-message-member .avatar { flex-shrink: 0; }
.new-message-member strong, .new-message-member small { display: block; }
.share-member-row strong, .share-member-row small { display: block; }
.shared-post-link { color: var(--sage-deep); text-decoration: underline; }
@media (max-width: 359px) {
  .post-actions .discussion-label { display: none; }
}
.push-prompt { padding: 14px 16px; }
.push-controls { display: grid; gap: 10px; justify-items: start; }
.push-controls p { margin: 6px 0 0; line-height: 1.5; }

/* Track / Tracking: on post headers and people cards (the profile has its own button). */
.g-person-actions { display: flex; gap: 8px; }
.g-person-actions > button { flex: 1; justify-content: center; }
.track-btn { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.track-btn .icon { width: 14px; height: 14px; }
.track-chip { min-height: 32px; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.track-chip:hover { background: var(--hover); }
.track-btn.is-tracked { border-color: var(--sage-main); background: color-mix(in srgb, var(--sage-main) 12%, transparent); color: var(--sage-deep); }

/* ---------- View-only access (role "viewer", see viewer.js) ----------
   Only the home feed (read, like, save) and the viewer's own dashboard remain. */
body[data-role="viewer"] :is(.workspace-links, #more-sheet .sheet-list) button[data-nav]:not([data-nav="home"], [data-nav="saved"], [data-nav="settings"]),
body[data-role="viewer"] :is(.rail-create, .rail-divider, .rail-section, #topbar-create, #inbox-btn, #members-btn, #invite-btn),
body[data-role="viewer"] .tabbar button[data-nav]:not([data-nav="home"], [data-nav="me"]),
body[data-role="viewer"] :is(#feed-top, #feed-mission, #feed-skills, #feed-trends, .compose-card, .suggest, #feed-empty > button),
body[data-role="viewer"] :is(.comment-form, .comment-like, .track-btn, .share-btn, .p-track) { display: none !important; }
body[data-role="viewer"] .tabbar { grid-template-columns: repeat(2, 1fr); }

#dashboard-body { display: grid; gap: 12px; align-content: start; }
.dash-profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 20px; }
.dash-who { display: grid; gap: 2px; min-width: 0; }
.dash-name { margin: 0; font-size: clamp(22px, 5vw, 28px); overflow-wrap: anywhere; }
.dash-who .muted { margin: 0; }
.dash-bio { margin: 6px 0 0; }
.dash-role { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; background: var(--mint); color: var(--sage-deep); font-size: 12px; }
.dash-role .icon { width: 13px; height: 13px; }
.dash-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.dash-actions .icon { width: 15px; height: 15px; margin-right: 4px; }
.dash-note { margin: 0 4px; }
.dash-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.dash-empty { padding: 24px 8px; }

/* ---------- Theme window: live preview on top, one tile system below ----------
   Every picker (palettes, fonts, Color Hunt) shares the same tile: 16px corners, a 2px
   border, the accent border + check badge when chosen. Hover outlines only on real hover
   devices, so a tapped tile on a phone never keeps a stray outline. */
.theme-dialog { width: min(480px, calc(100vw - 20px)); padding: 20px; }
.theme-head { align-items: flex-start; margin-bottom: 14px; }
.theme-head h2 { font-size: 26px; line-height: 1.1; }
.theme-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.theme-live { position: relative; display: grid; gap: 10px; padding: 14px; margin-bottom: 14px; border-radius: 20px; background: var(--cream-bg); border: 1px solid var(--border); overflow: hidden; }
.theme-live::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--sage-main) 28%, transparent), transparent 70%); pointer-events: none; }
.tl-bar { position: relative; display: flex; align-items: center; gap: 6px; }
.tl-mark { height: 16px; width: auto; }
.tl-brand { font-family: var(--font-ui); font-weight: 700; letter-spacing: -0.03em; }
.tl-dot { color: var(--brand-ember); }
.tl-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--offwhite); color: var(--muted); font-size: 11px; font-weight: 600; }
.tl-pill .icon { width: 12px; height: 12px; }
.tl-kicker { position: relative; margin: 4px 0 0; color: var(--sage-deep); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.tl-title { position: relative; margin: -4px 0 2px; font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; color: var(--text); }
.tl-title span { color: var(--sage-deep); }
.theme-live .tp-card { position: relative; }
.tl-meta { position: relative; margin: 0; color: var(--muted); font-size: 12px; }
.tl-meta strong { color: var(--text); }

.theme-section { margin-top: 20px; }
.theme-section .theme-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.hunt-credit { font-size: 12px; }

.theme-grid { display: grid; gap: 10px; }
.theme-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.font-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hunt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 380px) { .theme-presets, .font-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hunt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.theme-grid .theme-tile { position: relative; display: grid; align-content: start; gap: 8px; width: 100%; min-width: 0; padding: 8px; border: 2px solid var(--border); border-radius: 16px; background: var(--offwhite); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, transform 0.12s var(--ease-out), background 0.15s; -webkit-tap-highlight-color: transparent; }
.theme-grid .theme-tile:active { transform: scale(0.97); }
.theme-grid .theme-tile:hover { border-color: var(--border); }
.theme-grid .theme-tile.on:hover { border-color: var(--sage-main); }
@media (hover: hover) { .theme-grid .theme-tile:hover:not(.on) { border-color: color-mix(in srgb, var(--text) 35%, var(--border)); } }
.theme-grid .theme-tile:focus { outline: none; }
.theme-grid .theme-tile:focus-visible { outline: 2px solid var(--sage-main); outline-offset: 2px; }
.theme-grid .theme-tile.on { border-color: var(--sage-main); background: color-mix(in srgb, var(--sage-main) 10%, var(--offwhite)); }
.theme-grid .theme-tile.on::after { content: "✓"; position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--sage-main); color: var(--on-accent); font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px var(--panel); }
.tile-name { font-size: 13px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.tile-note { color: var(--muted); font-size: 11px; line-height: 1.3; margin-top: -4px; }

.theme-presets .theme-strip { height: 34px; border-radius: 10px; border: 0; }
.theme-presets .tile-name { padding: 0 2px 2px; }
.font-presets .theme-tile { padding: 10px 12px; gap: 4px; }
.font-aa { font-size: 28px; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }

.hunt-grid .hunt-tile { padding: 5px 5px 7px; gap: 6px; color: var(--muted); }
.hunt-tile .hunt-bands { height: 64px; border-radius: 11px; }
.hunt-tile.on { color: var(--text); }
.hunt-more { margin-top: 10px; }

.theme-inline { display: flex; gap: 8px; margin-top: 10px; }
.theme-inline input { flex: 1; min-width: 0; margin: 0; }
.theme-section .tc-list { gap: 8px; }
.theme-section .theme-ratio { margin-top: 10px; }
.theme-actions { position: sticky; bottom: -20px; margin: 20px -20px -20px; padding: 14px 20px 18px; background: linear-gradient(to top, var(--panel) 70%, transparent); display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* ---------- Discussion: comic thought clouds ----------
   Each comment sits in a puffy cloud. The text box is cut into a scalloped cloud shape with a
   mask (a row of round puffs along every edge around a solid middle). Its wrapper,
   .comment-cloud, traces that shape in ink with stacked drop-shadows and adds a hard comic
   shadow, so the outline follows every puff, including the little thought bubbles that drift
   toward the commenter's avatar. Replies use the highlight tint. */
.post .comment-cloud {
  --cloud-ink: var(--text);
  --cloud-fill: var(--offwhite);
  --cloud-shadow: color-mix(in srgb, var(--text) 80%, transparent);
  --puff: 18px;
  grid-column: 1 / -1;
  grid-row: 3;
  position: relative;
  justify-self: start;
  max-width: 100%;
  margin: 2px 0 6px 10px;
  filter:
    drop-shadow(1.5px 0 0 var(--cloud-ink)) drop-shadow(-1.5px 0 0 var(--cloud-ink))
    drop-shadow(0 1.5px 0 var(--cloud-ink)) drop-shadow(0 -1.5px 0 var(--cloud-ink))
    drop-shadow(3px 3px 0 var(--cloud-shadow));
  transform: rotate(-0.6deg);
  transform-origin: left center;
}
.post .comments > .comment-item:nth-child(even) > .comment-content > .comment-cloud { transform: rotate(0.5deg); }

.post .comment-cloud > .comment-text {
  margin: 0;
  padding: 15px 20px 14px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background-color: var(--cloud-fill);
  background-image: radial-gradient(color-mix(in srgb, var(--sage-main) 18%, transparent) 1px, transparent 1.5px);
  background-size: 7px 7px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  /* A hand-placed cartoon cloud: round puffs on the corners, big puffs along the top and
     bottom, one on each side, around a solid middle. Positions are percentages, so the puffs
     spread out on long comments and gather on short ones. */
  --cloud-shape:
    radial-gradient(closest-side, #000 97%, #0000) 0 0 / 26px 26px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 100% 0 / 26px 26px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 0 100% / 26px 26px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 100% 100% / 26px 26px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 14% 0 / 42px 30px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 32% 0 / 46px 34px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 50% 0 / 42px 30px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 68% 0 / 48px 34px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 86% 0 / 42px 30px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 22% 100% / 46px 28px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 44% 100% / 42px 30px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 64% 100% / 46px 28px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 84% 100% / 40px 28px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 0 50% / 24px 30px no-repeat,
    radial-gradient(closest-side, #000 97%, #0000) 100% 50% / 24px 30px no-repeat,
    linear-gradient(#000 0 0) 50% 50% / calc(100% - 24px) calc(100% - 24px) no-repeat;
  -webkit-mask: var(--cloud-shape);
  mask: var(--cloud-shape);
}

/* The thought trail: two shrinking puffs drifting toward the avatar (outlined by the filter). */
.post .comment-cloud::before,
.post .comment-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--cloud-fill);
}
.post .comment-cloud::before { left: -10px; top: 6px; width: 10px; height: 10px; }
.post .comment-cloud::after { left: -17px; top: -3px; width: 6px; height: 6px; }

/* Replies: a tinted, slightly smaller cloud. */
.post .comment-replies .comment-cloud { --cloud-fill: var(--mint); --puff: 16px; transform: rotate(0.4deg); }
.post .comment-replies .comment-cloud > .comment-text { font-size: 13px; }
.post .comment-replies .comment-cloud::before { width: 8px; height: 8px; left: -9px; top: 6px; }
.post .comment-replies .comment-cloud::after { width: 5px; height: 5px; left: -15px; top: -1px; }

/* Only the newest comment pops in, so likes and re-renders don't replay it for everyone. */
.post .comments > .comment-item:last-child > .comment-content > .comment-cloud,
.post .comment-replies > .comment-item:last-child > .comment-content > .comment-cloud { animation: cloud-pop 0.45s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes cloud-pop {
  0% { opacity: 0; transform: scale(0.55) rotate(-5deg); }
  60% { opacity: 1; }
  100% { opacity: 1; }
}

/* The compose box: a cloud waiting for your words. */
.post .comment-form {
  border: 2px solid var(--text);
  border-radius: 26px 30px 24px 28px / 24px 26px 30px 24px;
  background: var(--offwhite);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--text) 85%, transparent);
  padding: 3px 3px 3px 6px;
}
.post .comment-form:focus-within { border-color: var(--sage-main); outline: 0; box-shadow: 3px 3px 0 var(--sage-main); }
.post .comment-form .comment-submit { border-radius: 50%; border: 2px solid var(--text); }
.post .comment-form .comment-submit:not(:disabled):active { transform: scale(0.9) rotate(-8deg); }

@media (prefers-reduced-motion: reduce) {
  .post .comment-cloud, .post .comments .comment-item .comment-cloud { animation: none !important; }
}


/* Mission actions: compact invitation and clear, quiet secondary rows. */
.m-campaign-invite { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px 14px; padding: 20px; background: var(--panel); border-radius: 18px; border-left: 3px solid var(--sage-main); }
.m-invite-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mint); color: var(--sage-deep); }
.m-invite-icon .icon { width: 22px; height: 22px; }
.m-invite-copy { min-width: 0; }
.m-invite-copy h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.3; letter-spacing: -.025em; }
.m-invite-copy p { margin: 0; max-width: 45ch; color: var(--muted); font-size: 14px; line-height: 1.5; }
.m-campaign-invite > button { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; padding: 10px 16px; border-radius: 10px; }
.m-campaign-invite > button .icon { width: 18px; height: 18px; }
.m-campaign-proposals { margin-top: 10px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: transparent; }
.m-campaign-proposals strong { font-size: 14px; }
.m-campaign-proposals .small { font-size: 12px; margin-top: 3px; }
.m-campaign-proposals:hover, .m-campaign-proposals:focus-visible { background: var(--panel); border-color: var(--sage-main); }
.m-volunteer-section { margin-block: 14px; }
.m-volunteer-section > summary { min-height: 48px; padding-block: 12px; }
#mission-body .m-leader { min-height: 60px; padding: 10px 14px; border-radius: 12px; }
#mission-body .m-leader-pts { font-size: 15px; }
@media (max-width: 380px) {
  .m-campaign-invite { padding: 16px; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .m-invite-icon { width: 32px; height: 32px; border-radius: 9px; }
  .m-invite-copy h3 { font-size: 18px; }
  .m-invite-copy p { font-size: 13px; }
}
