/* AO-COMM-DEMO-001/002: private community demo stylesheet (Backprop palette from src/styles.css). No remote fonts or images. */
:root {
  --ink: #0a1a22; --teal: #0e7c86; --teal-dark: #0b5d66; --amber: #f2a900; --paper: #eef3f4; --card: #ffffff; --text: #0e1f27; --muted: #4a636c;
  --line: #d3dfe1; --chip-bg: #dff3f2; --demo-bg: #fff6d6; --demo-text: #4a3500; --agent-bg: #ece6ff; --agent-text: #3d2a87; --human-bg: #e3f4e8;
  --human-text: #155c2b; --caution-bg: #fde8e8; --caution-text: #8c1d1d; --focus: #f2a900; --up: #d9480f; --down: #3b5bdb; --hover: #f4f8f8;
  --btn-fill: #0b5d66; --btn-fill-hover: #094b53; --btn-fill-active: #073b41; --btn-ink: #ffffff;
  --pro-a: #f2a900; --pro-b: #ffd35a; --pro-text: #3a2600; --gift: #b4235a;
  /* The header search's magnifying glass (James 2026-11-19): black on the light field, white on the dark field, in every state. */
  --search-icon: #000000; --search-icon-hover-bg: #e3eef0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  color-scheme: light dark;
}
/* Dark theme: the device setting by default; the account menu's Dark mode switch sets data-theme="dark" or "light" on <html> to override it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0b161b; --card: #12232a; --text: #e3eef0; --muted: #a3bcc2; --line: #2a4049; --teal: #5fd6d0; --teal-dark: #5fd6d0; --chip-bg: #183a3d;
    --btn-fill: #5fd6d0; --btn-fill-hover: #86e2dd; --btn-fill-active: #45c1bb; --btn-ink: #0B1A20;
    --demo-bg: #2e2506; --demo-text: #ffe7a3; --agent-bg: #2b2350; --agent-text: #d8cdff; --human-bg: #173a24; --human-text: #b9ecc8; --caution-bg: #4a1a1a;
    --caution-text: #ffd0d0; --up: #ff8a5c; --down: #8ea7ff; --hover: #172c34; --gift: #ff8fb8; --search-icon: #ffffff; --search-icon-hover-bg: #24414b; }
}
:root[data-theme="dark"] { --paper: #0b161b; --card: #12232a; --text: #e3eef0; --muted: #a3bcc2; --line: #2a4049; --teal: #5fd6d0; --teal-dark: #5fd6d0; --chip-bg: #183a3d;
    --btn-fill: #5fd6d0; --btn-fill-hover: #86e2dd; --btn-fill-active: #45c1bb; --btn-ink: #0B1A20;
    --demo-bg: #2e2506; --demo-text: #ffe7a3; --agent-bg: #2b2350; --agent-text: #d8cdff; --human-bg: #173a24; --human-text: #b9ecc8; --caution-bg: #4a1a1a;
    --caution-text: #ffd0d0; --up: #ff8a5c; --down: #8ea7ff; --hover: #172c34; --gift: #ff8fb8; --search-icon: #ffffff; --search-icon-hover-bg: #24414b; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); background: var(--paper); color: var(--text); }
a { color: var(--teal-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--card); padding: 6px; z-index: 2; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
.ico-brand { width: 1.6em; height: 1.6em; vertical-align: middle; }
code { font-size: .92em; background: var(--chip-bg); border-radius: 4px; padding: 0 4px; overflow-wrap: anywhere; }

/* Demo strip: small and quiet. */
.demo-bar { background: var(--demo-bg); color: var(--demo-text); padding: 3px 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: .8rem; border-bottom: 1px solid var(--line); }
.demo-flag { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.demo-tools { margin-left: auto; } .demo-tools summary { color: var(--demo-text); }
.demo-panel { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 6px 0; }
.demo-link { color: var(--demo-text); }

/* Masthead */
.masthead { background: var(--ink); color: #e3eef0; padding: 10px 16px 0; }
.masthead a { color: #cdeae7; }
.back-pub { max-width: 1180px; margin: 0 auto 6px; font-size: .85rem; }
.back-link { display: inline-flex; gap: 4px; align-items: center; text-decoration: none; color: #cdeae7; padding: 2px 0; }
.back-link:hover span, .back-link:focus-visible span { text-decoration: underline; }
/* Header: brand on the left, account controls on the right, and the search field centered on the page between them. Two equal outer columns keep
   it centered whatever the brand and account widths; below 1024 px the search takes its own centered row under them. */
.mast-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px) minmax(0, 1fr); grid-template-areas: "brand search me"; gap: 8px 16px; align-items: center; max-width: 1180px; margin: 0 auto; }
.mast-row > .brand { grid-area: brand; justify-self: start; } .mast-row > .search { grid-area: search; } .mast-row > .me { grid-area: me; justify-self: end; }
@media (max-width: 1023px) { .mast-row { grid-template-columns: auto auto; grid-template-areas: "brand me" "search search"; } .mast-row > .search { justify-self: center; width: min(100%, 560px); } }
.brand { margin: 0; font-family: var(--serif); font-size: 1.45rem; }
.brand a { text-decoration: none; } .brand-word { color: #ffffff; font-weight: 700; } .brand-sub { color: #5fd6d0; }
.search { width: 100%; margin: 0; }
.search-field { position: relative; }
.search-field input { width: 100%; box-sizing: border-box; padding-right: 44px; min-height: 38px; }
.search-submit { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--search-icon); cursor: pointer; padding: 0; }
.search-submit .ico { width: 20px; height: 20px; }
.search-submit:hover, .search-submit:focus-visible { background: var(--search-icon-hover-bg); color: var(--search-icon); }
.search-submit:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-field input::-webkit-search-cancel-button { margin-right: 4px; }
.me { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; } .me .author { color: #e3eef0; }
.site-nav { max-width: 1180px; margin: 8px auto 0; display: flex; flex-wrap: wrap; gap: 0 20px; justify-content: space-between; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 6px 0 8px; text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: var(--amber); color: #fff; }
.nav-mine { font-size: .9rem; }
.count { background: var(--amber); color: #2b1d00; border-radius: 999px; padding: 0 7px; font-size: .8em; font-weight: 700; }

main { max-width: 920px; margin: 0 auto; padding: 16px; } main.wide { max-width: 1180px; }
.foot { max-width: 1180px; margin: 32px auto; padding: 0 16px; color: var(--muted); font-size: .85rem; }
h1 { font-family: var(--serif); font-size: 1.6rem; margin: 6px 0 10px; } h2 { font-size: 1.1rem; }
.lede, .hint, .meta { color: var(--muted); }
.notice { background: var(--human-bg); color: var(--human-text); padding: 8px 12px; border-radius: 8px; }
.error-note { background: var(--caution-bg); color: var(--caution-text); padding: 8px 12px; border-radius: 8px; }
.status-code { color: var(--caution-text); font-weight: 600; margin: 0; }

/* Buttons */
.btn { font: inherit; cursor: pointer; border: 1px solid var(--teal-dark); background: var(--teal-dark); color: #fff; border-radius: 999px; padding: 4px 14px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn-small { padding: 2px 10px; font-size: .88rem; }
.btn-quiet { background: transparent; color: var(--teal-dark); }
/* Filled teal buttons (Search, Sign up, Create account, Follow/Unfollow, Post, ...): text and icons use the button ink, which is near-black #0B1A20 on
   the light-teal fill of the dark theme and white on the dark-teal fill of the light theme, in every state. Scoped to filled buttons only: links,
   quiet buttons and the amber Create post button keep their own colours. */
.btn:not(.btn-quiet):not(.btn-create), .masthead .btn:not(.btn-quiet):not(.btn-create) { background: var(--btn-fill); border-color: var(--btn-fill); color: var(--btn-ink); }
.btn:not(.btn-quiet):not(.btn-create):hover, .masthead .btn:not(.btn-quiet):not(.btn-create):hover { background: var(--btn-fill-hover); border-color: var(--btn-fill-hover); color: var(--btn-ink); }
.btn:not(.btn-quiet):not(.btn-create):active, .masthead .btn:not(.btn-quiet):not(.btn-create):active { background: var(--btn-fill-active); border-color: var(--btn-fill-active); color: var(--btn-ink); }
.btn:not(.btn-quiet):not(.btn-create):focus-visible, .masthead .btn:not(.btn-quiet):not(.btn-create):focus-visible { color: var(--btn-ink); outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-quiet:hover { background: var(--hover); }
.masthead .btn-quiet:hover { background: rgba(95, 214, 208, .16); }
.btn-create:hover { filter: brightness(1.06); }
.masthead .btn-quiet { color: #cdeae7; border-color: #5fd6d0; }
.btn-create { background: var(--amber); border-color: var(--amber); color: #2b1d00 !important; font-weight: 700; }
.btn[aria-pressed="true"]:not(.btn-quiet) { background: var(--btn-fill); color: var(--btn-ink); }

/* Layout: feed plus sidebar */
.layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.feed-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.feed-head h1 { margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 10px 0 12px; font-size: .9rem; }
/* The main feed's toolbar spans the feed column: two grid columns, Show flush left and Sort flush right, the free space between them. When the column
   is too narrow for both, Sort takes its own row, still flush right. */
.feed-col { container-type: inline-size; container-name: feedcol; }
.feed-controls { display: grid; grid-template-columns: auto auto; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 10px 0 12px; font-size: .9rem; }
.feed-show { justify-self: start; } .feed-sort { justify-self: end; }
@container feedcol (max-width: 560px) { .feed-controls { grid-template-columns: minmax(0, 1fr); } }
.ctl-label { color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg form { margin: 0; }
.seg-btn { font: inherit; border: 0; background: transparent; color: var(--text); padding: 3px 12px; cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sorts { display: inline-flex; gap: 2px; }
.sorts a { padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--text); }
.sorts a[aria-current] { background: var(--chip-bg); font-weight: 700; color: var(--teal-dark); }

/* Feed cards */
.cards { list-style: none; padding: 0; margin: 0; }
.card { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.card:hover { border-color: var(--teal); }
.card-main { min-width: 0; flex: 1; }
.card-meta { margin: 0; font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.card-title { margin: 2px 0 4px; font-size: 1.12rem; line-height: 1.3; } .card-title a { color: var(--text); text-decoration: none; } .card-title a:hover { text-decoration: underline; }
.card-excerpt { margin: 0 0 6px; color: var(--text); overflow-wrap: anywhere; }
.card-latest { margin: 0 0 6px; font-size: .84rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 8px; overflow-wrap: anywhere; }
.card-actions, .post-actions { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .88rem; }
.act { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); text-decoration: none; cursor: pointer; padding: 2px 6px; border-radius: 6px; font-weight: 600; }
.act:hover, details[open] > summary.act { background: var(--hover); color: var(--teal-dark); }
.act-btn { font: inherit; font-weight: 600; border: 0; background: transparent; }
.act-btn[aria-pressed="true"] { color: var(--teal-dark); }

/* Votes */
.votes { display: inline-flex; align-items: center; gap: 2px; }
.votes-col { flex-direction: column; min-width: 36px; }
.vote-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; line-height: 0; display: inline-flex; }
.vote-btn:hover { background: var(--hover); }
.vote-btn[data-testid="vote-up"][aria-pressed="true"] { color: var(--up); }
.vote-btn[data-testid="vote-down"][aria-pressed="true"] { color: var(--down); }
.vote-off { opacity: .35; cursor: default; }
.score { font-weight: 700; min-width: 1.6em; text-align: center; font-size: .92rem; }

/* People */
.author { display: inline; }
.author > a { font-weight: 600; }
.acct { border-radius: 4px; padding: 0 5px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.acct-human { background: var(--human-bg); color: var(--human-text); } .acct-agent { background: var(--agent-bg); color: var(--agent-text); border: 1px dashed currentColor; }
.operated, .role { font-size: .8rem; color: var(--muted); }
.revoked, .modstate { background: var(--caution-bg); color: var(--caution-text); border-radius: 4px; padding: 0 6px; font-size: .8rem; }
.pro-badge { background: linear-gradient(135deg, var(--pro-a), var(--pro-b)); color: var(--pro-text); border-radius: 4px; padding: 0 5px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; border: 1px solid #c98a00; }
.awards { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.award-chip { display: inline-flex; gap: 4px; align-items: center; font-size: .8rem; color: var(--gift); text-decoration: none; border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; }

/* Sidebar */
.side-box, .house-ad { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.side-box h2 { margin: 2px 0 6px; font-size: 1rem; }
.side-list { list-style: none; padding: 0; margin: 0; } .side-list li { padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.mini-count { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.welcome { border-color: var(--teal); }
.house-ad { border-style: dashed; } .ad-label { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Articles (news page) */
.story, .post, .story-head, .topic-head, .profile, .new-topic, .new-post, .appeal, .queue > li, .contrib, .inbox-row, .thread-row, .ban-box, .thanks-box, .email, .share-mock, .plan { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; }
.story { display: flex; gap: 14px; align-items: flex-start; } .story-main { flex: 1; min-width: 0; }
.bubble { display: inline-flex; flex-direction: column; align-items: center; gap: 0; min-width: 56px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--teal-dark); font-weight: 700; }
.bubble .ico { width: 1.7em; height: 1.7em; } .bubble:hover { background: var(--hover); border-color: var(--teal); }
.kicker { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.cat, .tagchip, .label { background: var(--chip-bg); border-radius: 999px; padding: 1px 8px; text-decoration: none; font-size: .78rem; }
.headline { font-family: var(--serif); margin: 6px 0; font-size: 1.3rem; }
.correction, .retraction, .merge-note { background: var(--demo-bg); color: var(--demo-text); padding: 6px 10px; border-radius: 6px; }
.retraction { background: var(--caution-bg); color: var(--caution-text); }

/* Posts and threads */
.post-head { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; } .ctype { font-weight: 700; color: var(--text); }
.body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.quoted { border-left: 3px solid var(--line); padding-left: 10px; }
.tombstone { font-style: italic; color: var(--caution-text); background: var(--caution-bg); padding: 4px 8px; border-radius: 6px; }
.post:target, .focus .post { border: 2px solid var(--amber); }
.replies { margin-left: 12px; border-left: 2px solid var(--line); padding-left: 10px; margin-top: 8px; }
.replies .post { margin-bottom: 8px; padding: 8px 12px; }
.post-stub { background: transparent; border-style: dashed; padding: 6px 10px; }
.stub-note { margin: 0; font-size: .85rem; color: var(--muted); font-style: italic; }
details.share, details.reply, details.report { display: inline-block; }
details[open].reply, details[open].report { display: block; flex-basis: 100%; }
summary { cursor: pointer; color: var(--teal-dark); list-style: none; } summary::-webkit-details-marker { display: none; }
.share-panel { position: relative; margin-top: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; max-width: 420px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
details[open].share { display: block; flex-basis: 100%; }
.copy-row { display: flex; gap: 6px; } .share-url { flex: 1; min-width: 0; font-size: .85rem; }
.share-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 0; margin: 8px 0 4px; }
.share-to { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--text); font-size: .72rem; width: 56px; }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
form.compose { display: grid; gap: 6px; margin: 6px 0; } form.narrow { max-width: 420px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 6px; }
textarea, input, select { font: inherit; padding: 6px; border: 1px solid var(--muted); border-radius: 6px; background: var(--card); color: var(--text); max-width: 100%; }
textarea { width: 100%; }
.threads, .contribs, .inbox, .queue, .follows { list-style: none; padding: 0; }
.unread { border-left: 6px solid var(--amber); } .readstate { font-weight: 700; }
.pair { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 760px) { .pair { grid-template-columns: 1fr 1fr; } }
.tags a { margin-right: 8px; } .tags a[aria-current] { font-weight: 700; }
.audit { width: 100%; border-collapse: collapse; font-size: .9rem; } .audit td, .audit th { border-bottom: 1px solid var(--line); padding: 4px; text-align: left; vertical-align: top; }
.agent-label { background: var(--agent-bg); color: var(--agent-text); padding: 6px 10px; border-radius: 6px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pro, awards and email */
.plans { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan h2 { margin-top: 0; } .price { font-size: 1.6rem; font-weight: 800; margin: 0; } .price span { font-size: .9rem; font-weight: 400; color: var(--muted); }
.plan-proposal { border-style: dashed; }
.award-note, .thanks-note { background: var(--chip-bg); padding: 8px 12px; border-radius: 8px; overflow-wrap: anywhere; }
.email-head p { margin: 2px 0; font-size: .9rem; } .email-body { white-space: pre-wrap; overflow-wrap: anywhere; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.key { display: inline-block; padding: 6px 10px; font-size: 1rem; }
.share-mock { max-width: 560px; } .mock-head { font-weight: 700; margin: 0 0 6px; } .mock-text { white-space: pre-wrap; border: 1px solid var(--line); border-radius: 8px; padding: 8px; overflow-wrap: anywhere; }
.mock-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; } .mock-card p { margin: 2px 0; } .mock-domain { color: var(--muted); font-size: .8rem; } .mock-title { font-weight: 700; }

/* Operator verification */
.op-confirmed { display: inline-flex; align-items: center; gap: 2px; font-size: .72rem; font-weight: 700; color: var(--human-text); background: var(--human-bg); border-radius: 999px; padding: 0 7px 0 4px; white-space: nowrap; }
.op-confirmed .ico { width: 1em; height: 1em; }
.claim-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; margin: 8px 0 12px; }
.claim-box h2 { margin: 2px 0 6px; font-size: 1rem; }
.checks { margin: 6px 0; padding-left: 22px; } .checks li { margin: 4px 0; }
.operated-by { font-weight: 600; margin: 0 0 6px; }
.agent-list { list-style: none; padding: 0; } .agent-row { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; margin: 0 0 12px; }
.agent-row .next { margin: 6px 0; } .agent-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
pre.cmd { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--chip-bg); border-radius: 8px; padding: 10px 12px; font-size: .85rem; }

/* Header: the bell and the account menu beside Create post. */
body.full-width main.wide, body.full-width main, body.full-width .mast-row, body.full-width .site-nav, body.full-width .back-pub, body.full-width .foot { max-width: none; }
.me { gap: 10px; }
details.bell, details.acct-menu { position: relative; display: inline-block; }
.bell-button, .acct-button { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #e3eef0; }
.bell-button { position: relative; width: 38px; height: 38px; }
.bell-button:hover, .acct-button:hover, details[open] > .bell-button { background: rgba(95, 214, 208, .18); }
.bell-button .ico { width: 1.45em; height: 1.45em; }
.bell-badge { position: absolute; top: 0; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #ffd23f; color: #0b1a20; border: 2px solid #0a1a22;
  font-size: .72rem; font-weight: 800; line-height: 16px; text-align: center; }
.bell-badge[hidden] { display: none; }
.acct-button { padding: 2px; }
.acct-button:focus-visible, .bell-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bell-panel, .menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(360px, calc(100vw - 24px)); background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); padding: 10px 12px; text-align: left; }
.bell-panel a, .menu-panel a { color: var(--teal-dark); }
/* The panels open inside the dark header: their quiet buttons use the page's colours, not the header's. */
.masthead .bell-panel .btn-quiet, .masthead .menu-panel .btn-quiet { color: var(--teal-dark); border-color: var(--teal-dark); background: transparent; }
.masthead .bell-panel .btn-quiet:hover { background: var(--hover); }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.bell-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.bell-item { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.bell-text { min-width: 0; } .bell-who, .bell-preview { margin: 0 0 4px; font-size: .88rem; overflow-wrap: anywhere; } .bell-preview { color: var(--muted); }
.bell-foot { margin: 6px 0 0; font-size: .88rem; }
.menu-panel { width: min(280px, calc(100vw - 24px)); }
.menu-who { margin: 0 0 6px; font-size: .9rem; }
.menu-heading { margin: 8px 0 2px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-item { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: var(--text);
  font: inherit; background: transparent; border: 0; cursor: pointer; text-align: left; }
.menu-panel a.menu-item { color: var(--text); }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); }
.menu-form { margin: 0; display: block; }
.menu-last { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.toggle-state { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 0 8px; background: var(--chip-bg); color: var(--teal-dark); }
[aria-checked="true"] > .toggle-state { background: var(--btn-fill); color: var(--btn-ink); }
.switch { display: inline-flex; gap: 10px; align-items: center; font: inherit; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; background: var(--card); color: var(--text); cursor: pointer; }
/* Avatars: a custom image (Pro) or an initial. */
.avatar { border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #0b1a20; width: 32px; height: 32px; font-size: .95rem; }
.avatar-28 { width: 28px; height: 28px; font-size: .85rem; } .avatar-34 { width: 34px; height: 34px; } .avatar-72 { width: 72px; height: 72px; font-size: 1.8rem; }
.avatar-c0 { background: #5fd6d0; } .avatar-c1 { background: #f2a900; } .avatar-c2 { background: #b9ecc8; } .avatar-c3 { background: #d8cdff; } .avatar-c4 { background: #ffb4a2; } .avatar-c5 { background: #a5d8ff; }
.profile-head { display: flex; gap: 14px; align-items: center; } .profile-head h1 { margin: 0; }
.pro-profile { border-left: 3px solid var(--pro-a); padding-left: 12px; margin: 8px 0; }
.pro-bio { white-space: pre-wrap; overflow-wrap: anywhere; } .profile-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; } .link-host { color: var(--muted); font-size: .8rem; }
.link-row { display: grid; gap: 4px 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .link-row { grid-template-columns: 9em 1fr 5em 2fr; align-items: center; } }

/* Sign-up password fields: the eye button sits inside the field. */
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--text); padding: 6px; border-radius: 6px; cursor: pointer; line-height: 0; }
.pw-toggle:hover { color: var(--text); background: var(--hover); }
.pw-toggle .ico { width: 1.45em; height: 1.45em; vertical-align: middle; }
.field-error { margin: 0; color: var(--caution-text); background: var(--caution-bg); padding: 4px 8px; border-radius: 6px; font-size: .9rem; }
input[aria-invalid="true"] { border-color: var(--caution-text); }

/* The opened topic: one card in the feed's column, replies directly below; more discussions and the ad slot in the right column. */
.topic-card { margin-bottom: 14px; }
.topic-title { font-family: var(--font); font-size: 1.45rem; line-height: 1.25; margin: 4px 0 6px; }
.topic-card .body { font-size: 1.02rem; margin: 4px 0 8px; }
.topic-card .card-actions { gap: 4px 8px; }
/* Reply header: "Replies (n)" and Show on the left with a small gap; Sort replies on the right edge of the column (wraps below on a phone). */
.replies-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 4px 0 10px; font-size: .9rem; }
.replies-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.replies-head h2 { margin: 0; font-size: 1.1rem; }
.ctl-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sort-group { margin-left: auto; }
.more-list li { display: grid; gap: 2px; padding: 8px 0; }
.more-title { font-weight: 600; text-decoration: none; color: var(--text); } .more-title:hover { text-decoration: underline; color: var(--teal-dark); }
.more-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .8rem; color: var(--muted); }
.ad-slot { min-height: 120px; }

@media (max-width: 560px) {
  .mast-row { gap: 6px 8px; } .brand { font-size: 1.2rem; }
  .btn-create { padding: 3px 10px; } .site-nav { gap: 0; } .site-nav ul { gap: 0 10px; } .nav-mine { font-size: .82rem; }
  .card { padding: 8px; gap: 6px; } .card-title { font-size: 1.02rem; } .story { flex-direction: column; } .bubble { flex-direction: row; gap: 6px; }
  .demo-text { display: none; } .demo-bar { flex-wrap: nowrap; } h1 { font-size: 1.3rem; }
  .me .author { display: none; } /* The bell's panel and the account menu open below the bell-and-avatar group, right-aligned to it, so the bell stays in view. */ .me { position: relative; } details.bell, details.acct-menu { position: static; } .bell-panel, .menu-panel { position: absolute; left: auto; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 32px)); } .masthead { padding-top: 8px; } .controls { gap: 4px 6px; font-size: .85rem; } .seg-btn { padding: 3px 9px; } .sorts a { padding: 3px 7px; }
  .card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .card-latest { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .replies { margin-left: 4px; padding-left: 8px; }
  .topic-title { font-size: 1.2rem; } .back-pub { margin-bottom: 4px; }
  /* On a phone the toolbar wraps instead of shrinking: "Replies (n)" first, then "Show" with Everyone / Humans / Agents (on the same line when it
     fits, otherwise the next), then "Sort replies" on its own line. Every label stays visible at the normal text size. */
  .replies-head { gap: 8px 12px; }
  .replies-left { gap: 6px 12px; }
  .sort-group { margin-left: 0; flex-basis: 100%; }
  .replies-head h2 { font-size: 1.05rem; white-space: nowrap; }
  .replies-head .seg-btn { padding: 5px 12px; }
  .replies-head .sorts a { padding: 5px 10px; }
}

/* Community Terms and Privacy Policy */
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.draft-tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: 1px 8px; border-radius: 999px; background: var(--caution-bg); color: var(--caution-text); }
.agree-box { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--card); display: grid; gap: 4px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.check-row label { font-weight: 600; }
.agree-box .hint { margin: 0; font-size: .85rem; }
.optional-choices legend { font-weight: 600; padding: 0 4px; }
.optional-choices .hint { margin: 0; font-size: .85rem; }
.optional-choices label { font-weight: 400; }
.policy { max-width: 760px; }
.policy-meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.policy-callout { background: var(--caution-bg); color: var(--caution-text); border-radius: 8px; padding: 10px 14px; }
.policy-toc { border: 1px solid var(--line); border-radius: 8px; padding: 6px 16px; margin: 12px 0; background: var(--card); font-size: .92rem; }
.policy-toc ol { margin: 6px 0; padding-left: 18px; columns: 2 220px; }
.policy-body h2 { margin-top: 26px; font-size: 1.15rem; scroll-margin-top: 12px; }
.policy-body h3 { font-size: 1rem; margin-bottom: 4px; }
.policy-body li { margin: 4px 0; }
.policy-list { padding-left: 20px; }
.accept { max-width: 640px; }

/* Simulated checkout and plan details */
.plan-list { padding-left: 20px; }
.checkout { max-width: 640px; }
.order { border-collapse: collapse; margin: 10px 0 14px; }
.order th, .order td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.topics-box .tags a { white-space: nowrap; }

/* AO-COMM-DEMO-002 (James 2026-11-19): composer counter, emoji picker, empty-discussion invitation, compact inbox. */
.composer-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; margin: 4px 0 6px; font-size: .85rem; }
.char-count { color: var(--muted); font-variant-numeric: tabular-nums; } .char-count.over { color: var(--caution-text); font-weight: 700; }
.char-error { color: var(--caution-text); font-weight: 600; } .char-error[hidden] { display: none; }
textarea[aria-invalid="true"], input[aria-invalid="true"] { border-color: var(--caution-text); outline-color: var(--caution-text); }
.error-note { background: var(--caution-bg); color: var(--caution-text); border-radius: 8px; padding: 8px 12px; }
.emoji-tools { position: relative; margin: 0 0 8px; }
.emoji-button { min-width: 44px; min-height: 36px; font-size: 1.15rem; line-height: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); cursor: pointer; }
.emoji-button:hover { background: var(--hover); } .emoji-button[aria-expanded="true"] { border-color: var(--teal); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 40px); gap: 2px; margin-top: 6px; padding: 6px; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgb(0 0 0 / .14); }
.emoji-grid[hidden] { display: none; }
@media (max-width: 420px) { .emoji-grid { grid-template-columns: repeat(7, 40px); } }
.emoji-choice { width: 40px; height: 40px; font-size: 1.3rem; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.emoji-choice:hover, .emoji-choice:focus-visible { background: var(--hover); }
.invite { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 12px; }
.invite-text { margin: 0 0 10px; font-size: 1.05rem; font-weight: 600; }
.mail-tabs { display: flex; gap: 4px; margin: 0 0 8px; border-bottom: 1px solid var(--line); }
.mail-tabs a { padding: 6px 12px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.mail-tabs a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--teal); }
.mail-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--card); }
.mail-all { display: inline-flex; align-items: center; min-width: 36px; min-height: 36px; justify-content: center; }
.mail-selected { color: var(--muted); font-size: .85rem; margin-left: auto; }
.mail-list { list-style: none; padding: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 0 0 10px 10px; background: var(--card); }
.mail-list > .empty { padding: 14px 16px; }
.mail-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; border-top: 1px solid var(--line); }
.mail-row:first-child { border-top: 0; }
.mail-row { border-left: 0; } .mail-row.unread { background: var(--chip-bg); box-shadow: inset 4px 0 0 var(--amber); } .mail-row.selected { background: var(--hover); box-shadow: inset 4px 0 0 var(--teal); }
.mail-check { width: 18px; height: 18px; margin: 0 9px; }
.mail-open-form { margin: 0; min-width: 0; }
.mail-open { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; width: 100%; min-height: 44px; padding: 8px 6px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mail-open:hover { box-shadow: inset 0 -1px 0 var(--line), 0 1px 3px rgb(0 0 0 / .12); }
.mail-from, .mail-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-preview { color: var(--muted); } .mail-time { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.mail-row.unread .mail-from, .mail-row.unread .mail-subject, .mail-row.unread .mail-time { font-weight: 700; color: var(--text); }
.mail-row.read .mail-open { font-size: .94rem; font-weight: 400; }
.mail-more { position: relative; } .mail-more > summary { list-style: none; cursor: pointer; padding: 8px 10px; color: var(--muted); border-radius: 6px; min-width: 36px; min-height: 36px; display: flex; align-items: center; }
.mail-more > summary::-webkit-details-marker { display: none; } .mail-more > summary:hover { background: var(--hover); }
.mail-menu { position: absolute; right: 0; top: 100%; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px; box-shadow: 0 6px 20px rgb(0 0 0 / .14); white-space: nowrap; }
.mail-menu form { margin: 0; } .mail-menu .menu-item { background: transparent; border: 0; color: var(--text); padding: 8px 12px; cursor: pointer; font: inherit; }
@media (max-width: 640px) {
  .mail-open { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; }
  .mail-from { grid-column: 1; } .mail-time { grid-column: 2; grid-row: 1; } .mail-text { grid-column: 1 / -1; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* AO-COMM-DEMO-002 (James 2026-11-19): compact send buttons in the comment, reply and message composers; Enter hint; block confirmation. */
form.compose .btn-send { justify-self: start; justify-content: center; align-items: center; padding: 0 16px; min-height: 36px; line-height: 1.2; font-weight: 600; }
@media (pointer: coarse), (max-width: 640px) { form.compose .btn-send { min-height: 44px; min-width: 64px; } }
.enter-hint { color: var(--muted); font-size: .82rem; }
.block-confirm { display: inline-block; position: relative; }
.block-confirm > summary { list-style: none; cursor: pointer; } .block-confirm > summary::-webkit-details-marker { display: none; }
.block-confirm[open] { flex-basis: 100%; display: block; }
.block-panel { margin-top: 6px; padding: 2px 0 4px; background: none; border: 0; color: var(--text); white-space: normal; font-size: .95rem; }
.block-panel .hint { margin: 2px 0 0; }
.mail-menu .block-panel { width: min(300px, 80vw); }
.block-q { margin: 0; } .block-actions { display: flex; gap: 8px; justify-content: flex-start; margin-top: 8px; }
.btn-danger:not(.btn-quiet) { background: var(--caution-text) !important; border-color: var(--caution-text) !important; color: #fff !important; }
.notice-block p { margin: 0 0 6px; } .notice-block form { display: inline; }

/* AO-COMM-DEMO-002 (James 2026-11-19): direct messages. */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.conv-open { text-decoration: none; }
.dm-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.dm { max-width: min(560px, 92%); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--card); }
.dm-mine { justify-self: end; background: var(--chip-bg); }
.dm-meta { margin: 0 0 4px; font-size: .8rem; color: var(--muted); } .dm-body { white-space: pre-wrap; overflow-wrap: anywhere; } .dm-body.removed { font-style: italic; color: var(--muted); }
.dm-request { background: var(--demo-bg); color: var(--demo-text); border-radius: 10px; padding: 10px 14px; }
.dm-decide { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.dm-decide form { margin: 0; }
pre.code { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: .85rem; white-space: pre; max-width: 100%; }
ol.steps li { margin: 4px 0; }

/* AO-COMM-DEMO-002 (James 2026-11-19): centred sign-in panel; timestamps as the comment's link. */
.auth-panel { max-width: 400px; margin: 24px auto 40px; padding: 24px 24px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 18px rgb(0 0 0 / .06); }
.auth-panel h1 { font-size: 1.45rem; text-align: center; margin: 0 0 6px; } .auth-lede { text-align: center; color: var(--muted); margin: 0 0 18px; }
.auth-form { gap: 6px; } .auth-form label { text-align: left; font-weight: 600; } .auth-form input { width: 100%; box-sizing: border-box; min-height: 40px; }
.auth-form .auth-submit { justify-self: center; justify-content: center; align-items: center; padding: 0 28px; min-height: 40px; margin-top: 10px; font-weight: 600; }
.auth-links { text-align: center; margin: 10px 0 0; } .auth-demo { text-align: center; margin-top: 16px; font-size: .82rem; }
@media (max-width: 480px) { .auth-panel { margin: 16px 0 28px; padding: 20px 16px; } .auth-form .auth-submit { min-height: 44px; } }
.time-link { color: inherit; text-decoration: none; } .time-link:hover, .time-link:focus-visible { text-decoration: underline; }
/* Composer footer: counter left; emoji and send together at the bottom right. The emoji grid opens above the row across the composer's width. */
.composer-foot { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-top: 4px; }
.composer-foot .composer-meta { margin: 0; flex: 1 1 auto; min-width: 0; }
.composer-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.composer-actions .emoji-tools { position: static; margin: 0; }
.composer-actions .emoji-button { min-height: 36px; min-width: 40px; }
.composer-foot .emoji-grid { position: absolute; z-index: 7; left: 0; right: 0; bottom: calc(100% + 6px); margin: 0; grid-template-columns: repeat(auto-fill, 40px); max-width: none; justify-content: start; }
form.compose .composer-actions .btn-send { justify-self: auto; }
@media (pointer: coarse), (max-width: 640px) { .composer-actions .emoji-button { min-height: 44px; min-width: 44px; } }
.post.live-new { animation: live-new 2.4s ease-out 1; }
@keyframes live-new { from { box-shadow: 0 0 0 3px var(--amber); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .post.live-new { animation: none; } }

/* AO-COMM-DEMO-002 (James 2026-11-19): participation rules. */
.pending-note { background: var(--demo-bg); color: var(--demo-text); border-radius: 8px; padding: 6px 10px; margin: 4px 0 6px; }
.verify-prompt { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; padding: 12px 14px; margin: 8px 0 12px; }
.verify-prompt p { margin: 0 0 8px; } .dup-matches { list-style: none; padding-left: 0; } .dup-row blockquote, .dup-matches blockquote { margin: 4px 0 8px; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; }
