/* One turquoise on cool neutrals, taken from the app icon. The palette
   is spelled out first, then mapped onto the semantic tokens the rest of
   this file uses — so it can be swapped without touching 500 lines of
   rules, and each rule still says what it means rather than what colour
   it is.

   The rules that hold it together:
   - teal is the only saturated colour on a default screen. If two
     things compete for it, one of them is not primary;
   - #0AA79C is a fill, not type: teal *text* on light is #07655F;
   - #1FD1C1 is never text on white — it leads on dark instead;
   - coral and amber are semantic only: failures and cautions, never
     decoration, and never two of them in one component;
   - shadows are neutral and cool, never coloured. */
:root {
  --prism-turquoise: #1fd1c1;
  --prism-teal: #0aa79c;
  --prism-teal-deep: #07655f;
  --prism-mint: #e4faf6;

  --prism-ink: #0b1416;
  --prism-slate-800: #1e2b2e;
  --prism-slate-600: #4a5c5f;
  --prism-slate-400: #8fa3a5;
  --prism-line: #e2e9e8;
  --prism-surface: #f7faf9;

  --prism-coral: #ff6b5b;
  --prism-amber: #ffc24b;

  /* light */
  --bg: var(--prism-surface);
  --surface: #ffffff;
  --text: var(--prism-ink);
  --text-muted: var(--prism-slate-600);
  /* names and titles, as against the words of a post: ink is a hard
     black beside cool greys and a turquoise. Slate-800 was the obvious
     pick, but at #1E2B2E it is a near-black too — indistinguishable
     from ink at text size. Slate-600 is the first step that actually
     reads as grey. Post text stays on --text: that is the thing you
     came to read. */
  --heading: var(--prism-slate-600);
  /* placeholders only. It measures 2.6:1 on white, which is under AA —
     chosen for the look: a placeholder that reads as strongly as a
     typed value looks like a filled field. Nothing but example text is
     ever this colour. */
  --text-faint: var(--prism-slate-400);
  --border: var(--prism-line);

  /* fill vs type: the same brand colour can't do both — see rule 2 */
  --accent: var(--prism-teal);
  --accent-ink: var(--prism-teal-deep);
  /* white on the teal fill. It measures 3.0:1, which is AA only for
     large bold text — the primary label is 600 weight for that reason.
     The alternative, dark ink on teal, is 4.8:1 but reads washed out at
     button size. */
  --accent-text: #ffffff;
  --accent-hover: var(--prism-teal-deep);
  --wash: var(--prism-mint);

  /* a counter is a quiet fact, not an action, so it sits in the cool
     grey the neutrals already provide and leaves teal to the buttons.
     White on slate-400 is 2.6:1, chosen for the look over the ratio —
     the chips carry a count or a name that is repeated as text nearby,
     never anything that is only legible here. */
  --badge: var(--prism-slate-400);
  --badge-ink: #ffffff;

  /* the document names no surface for the accents, so these two tints
     are derived: the accent at ~10% over the page background */
  --error-bg: #fdedea;
  --error-text: #c4372a;
  --warn-bg: #fff6e3;
  --warn-text: #8a5a00;

  --shadow: 0 8px 22px rgba(11, 20, 22, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* the pair inverts: turquoise leads, teal recedes to borders */
    --bg: var(--prism-ink);
    --surface: var(--prism-slate-800);
    --text: var(--prism-surface);
    --text-muted: var(--prism-slate-400);
    /* on dark the softening would go the wrong way: a grey heading on
       an ink page recedes instead of settling, so headings take the
       page's own light neutral */
    --heading: var(--prism-surface);
    --text-faint: var(--prism-slate-400);
    --border: rgba(255, 255, 255, 0.10);

    --accent: var(--prism-turquoise);
    --accent-ink: var(--prism-turquoise);
    --accent-text: #06302d;
    --accent-hover: #4ee0d3;
    --wash: rgba(31, 209, 193, 0.14);

    /* the pair flips on dark: slate-600 is only 2:1 against the card, so
       the pill itself would disappear and leave its text floating. The
       lighter grey separates at 5.5:1 and takes ink at 7:1 — white on it
       would be 2.6:1, so this is the one place the white doesn't hold. */
    --badge: var(--prism-slate-400);
    --badge-ink: var(--prism-ink);

    --error-bg: rgba(255, 107, 91, 0.14);
    --error-text: var(--prism-coral);
    --warn-bg: rgba(255, 194, 75, 0.14);
    --warn-text: var(--prism-amber);

    --shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

#app { min-height: 100vh; }

.shell {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.centered {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.hint { color: var(--text-muted); font-size: 0.9rem; }

.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

/* One button style. Every button that isn't .subtle, .link, or a
   component with rules of its own — Post, Log in, Create, Adopt, Give
   access, Allow, Add — is the main action of the panel it sits in, so
   the primary look is the default rather than a class each of them has
   to remember. The .primary class stays in the markup where saying so
   is worth it; it selects the same style. */
button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--accent);
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.4rem 0.9rem;
}

button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button:disabled { opacity: 0.5; cursor: default; }
button:disabled:hover { background: var(--accent); border-color: var(--accent); }

/* Every button that carries its own surface has to say so again here,
   or the filled hover above paints deep teal over it. Grouped rather
   than left beside each component, so the list of exceptions is visible
   from the rule that needs them. The teal border they keep on hover is
   wanted: it's the affordance, without the fill. */
.tabs button:hover,
button.subtle:hover,
button.link:hover { background: none; }

.chip:hover,
.audience-control:hover { background: var(--surface); }

/* one ring everywhere, on both themes: 2px of the brand colour held off
   the element by the page background */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

button.subtle {
  border: none;
  background: none;
  color: var(--text-muted);
  /* not the action of anything: it must not inherit the primary weight */
  font-weight: 400;
  padding: 0.2rem 0.4rem;
}

button.subtle:hover { color: var(--text); border-color: transparent; }

input, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  width: 100%;
}

::placeholder { color: var(--text-faint); }

/* ------------------------------------------------------------------ login */

.login {
  max-width: 26rem;
  margin: 0 auto;
  padding: 4rem 1rem;
  text-align: center;
}

.login .app-icon { display: block; width: 4rem; height: 4rem; margin: 0 auto 0.75rem; }
.login h1 { margin-top: 0; color: var(--heading); }
.login .tagline { color: var(--text-muted); }

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.provider-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* picking a provider is a choice, not an action, so these stay quiet —
   and the one teal fill on the login screen belongs to Log in. */
.chip {
  font-size: 0.85rem; font-weight: 400; border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border);
}

.chip.active {
  background: var(--wash);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ----------------------------------------------------------------- header */

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.25rem 0 0.75rem;
}

.app-header h1 { font-size: 1.25rem; margin: 0; color: var(--heading); }

/* the mark sits beside the name rather than above it, and carries its
   own rounded background — so no radius or border here. */
.app-header .brand { display: flex; align-items: center; gap: 0.5rem; }
.app-header .app-icon { width: 1.5rem; height: 1.5rem; }

.session {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.session a { color: var(--text-muted); text-decoration: none; }
.session a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------- tabs */

/* Posting and reading on one side, deciding who sees what on the other.
   They shared a screen and it was cluttered — the sharing panels are
   set up occasionally, not while writing. */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.tabs button {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  font-weight: 500;
}
.tabs button:hover { color: var(--text); }
.tabs button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* --------------------------------------------------------------- composer */

.composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.composer textarea { resize: vertical; border: none; padding: 0.25rem; }
.composer textarea:focus { outline: none; }

.composer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.composer-actions .primary { margin-left: auto; }

.file-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.file-label input[type="file"] { display: none; }

.file-count { font-size: 0.85rem; color: var(--text-muted); }

/* -------------------------------------------------------------- audiences */

/* Same shape as the contacts panel below — both are lists of things you
   manage, and looking alike is the point. */
.audiences {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.audiences summary { cursor: pointer; font-weight: 500; }

/* Three panels whose names are all abstract nouns, two of them nearly
   the same word. The title says which list it is; the line under it
   says what the list is for, and stays visible while the panel is shut
   — which is the moment you have to choose one. Read down the tab they
   make a sentence: where posts go, who can read them, whose you see. */
summary .title { font-weight: 500; }
summary .what {
  display: block;
  margin-left: 1.15rem;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.audiences .hint { margin: 0.5rem 0; }
.adopt { margin-top: 0.75rem; border-top: 1px solid var(--border); padding-top: 0.5rem; }
.adopt-name { display: flex; gap: 0.35rem; align-items: center; }
.adopt-name input { width: 9rem; }

/* -------------------------------------------------------------- followers */

.followers {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.followers summary { cursor: pointer; font-weight: 500; }
.followers .hint { margin: 0.5rem 0; }
.followers select {
  font: inherit; font-size: 0.9rem; padding: 0.4rem;
  border: 1px solid var(--border); border-radius: 0.5rem;
  background: var(--surface); color: var(--text);
}
.followers .who { font-weight: 500; }
.granted { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

/* the audience picker in a follower's row sizes to its chips rather
   than filling the line, so a row with one audience stays a row. In the
   grant form above it takes the space the WebID field leaves. */
.granted .audience-select { min-width: 9rem; }
.contact-add .audience-select { flex: 1; min-width: 9rem; }
.followers .warn { font-size: 0.9rem; color: var(--error-text); }
.followers button.link {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--accent-ink); text-decoration: underline; cursor: pointer;
}

/* a request waiting on you, and what happened when you sent one */
.requests li { background: var(--wash); }
.followers .asked { color: var(--text-muted); font-weight: 400; }
.badge {
  margin-left: 0.5rem; font-size: 0.7rem; font-weight: 500;
  background: var(--badge); color: var(--badge-ink);
  border-radius: 999px; padding: 0.05rem 0.45rem;
}
.notice {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; margin-bottom: 1rem;
  padding: 0.6rem 0.9rem; border-radius: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
}
.notice.warn { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.notice button.subtle { margin-left: auto; color: inherit; }

/* --------------------------------------------------------------- contacts */

.contacts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.contacts summary { cursor: pointer; font-weight: 500; }

/* input, sometimes an audience picker, and a button. Stretch keeps the
   three the same height; wrapping and a button that won't break give it
   somewhere to go when the panel is too narrow for all three — the
   alternative was a two-line button standing a head taller than what it
   sits beside. */
.contact-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.contact-add input { flex: 1 1 12rem; }
.contact-add button { white-space: nowrap; }
/* the picker is a div around a button, so it has to pass the stretch on
   rather than leaving its control short */
.contact-add .audience-select { display: flex; }
.contact-add .audience-select .audience-control { flex: 1; }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-top: 1px solid var(--border);
}

/* the audience a new post starts in. A radio rather than a badge and a
   button: "one of these" is what a radio group means, and it needs no
   second control to say which one is chosen. */
.default-choice {
  display: flex; align-items: center; gap: 0.4rem; cursor: pointer;
}
/* drawn rather than left to accent-color: the browser derives the inner
   dot from the fill, and against a mid teal it lands close enough to
   read as one blurred circle. A ring, a gap of the card colour, then
   the dot keeps the three apart at 16px. */
.default-choice input {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  /* the shared input rule pads every field; here 1.5rem of horizontal
     padding against a 1rem box stretches the circle into an oval */
  padding: 0;
  /* and a flex row would otherwise be free to squeeze it */
  flex: none;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
}

.default-choice input::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 80ms ease-out;
}

.default-choice input:checked { border-color: var(--accent); }
.default-choice input:checked::before { transform: scale(1); }
.default-choice input:disabled { cursor: default; opacity: 0.5; }

/* someone opened a follow link: who it names, and the question it wants
   answered. Louder than a notice on purpose — it is the one thing on
   screen that arrived from outside and is waiting on a decision. */
.invite {
  display: flex; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 1rem; padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-left-width: 3px;
  border-radius: 0.5rem;
}
.invite .who {
  display: flex; flex-direction: column; gap: 0.15rem;
  flex: 1; min-width: 12rem;
}
.invite .ask { font-size: 1rem; }
.invite .hint { margin: 0; font-size: 0.85rem; }
.invite .url {
  font-size: 0.72rem; color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.invite-actions {
  display: flex; align-items: center; gap: 0.5rem; margin-left: auto;
}

/* adding someone, and inviting someone — both secondary to the list of
   people above them, so they sit below a rule and quieter */
.contact-tools {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.contact-tools .contact-add { margin: 0; }
/* the one thing on the sharing tab you hand to another person, and it
   belongs to neither panel under it — so it gets a card of its own,
   above them, with the button doing the talking. */
.share-card {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1rem; padding: 0.85rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.share-text { display: flex; flex-direction: column; flex: 1; min-width: 12rem; }
.share-card .hint { margin: 0; font-size: 0.85rem; }
.share-card button { white-space: nowrap; }

/* a row reads as a small card — a face, or a radio, then a name —
   rather than a line of text. The first loses its rule: directly under
   the summary it made the top of the panel look ruled off twice. */
.contact-list.people,
.contact-list.audience-list { margin: 0.35rem 0 0.25rem; }
.contact-list.people li {
  gap: 0.6rem; padding: 0.45rem 0;
  /* the name takes the slack (margin-right: auto below), so the face
     and the name stay together and the ✕ keeps the far edge */
  justify-content: flex-start;
}
.contact-list.people li:first-child,
.contact-list.audience-list li:first-child { border-top: none; }
.contact-list.audience-list li { padding: 0.4rem 0; }
.contact-list.people .avatar { width: 1.9rem; height: 1.9rem; }
.contact-list.people .who,
.contact-list.audience-list .who {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--heading);
  margin-right: auto;
}

/* a standing condition rather than an alert: this pod has no inbox, so
   follow requests can't reach it. Informational styling deliberately —
   nothing is broken and nothing needs doing today. */
.no-inbox {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.no-inbox h3 { font-size: 0.95rem; margin: 0 0 0.4rem; }
.no-inbox p { margin: 0 0 0.5rem; }
.no-inbox summary { cursor: pointer; color: var(--accent-ink); }
.no-inbox ol { margin: 0.5rem 0; padding-left: 1.25rem; }
.no-inbox li { margin-bottom: 0.3rem; }
.no-inbox code {
  font-size: 0.85em; background: var(--bg);
  padding: 0.05rem 0.25rem; border-radius: 0.25rem;
}

/* --------------------------------------------------------------- timeline */

.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.post header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* the mint pair, not the teal one: a timeline shows a column of these,
   and a dozen solid teal circles would compete with the one control on
   the screen that is actually primary. */
.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wash);
  color: var(--accent-ink);
  font-weight: 600;
}

.byline { display: flex; flex-direction: column; }

.byline .author {
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
}

.byline .author:hover { text-decoration: underline; }

.byline time { font-size: 0.8rem; color: var(--text-muted); }



.content p { margin: 0.25rem 0; overflow-wrap: break-word; }

.attachments {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

img.attachment, video.attachment {
  max-width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

/* placeholder while media is being fetched with the session's credentials */
.attachment-loading {
  height: 10rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
}

.attachment-link { word-break: break-all; font-size: 0.85rem; }




/* a pod we couldn't read — distinct from a pod with nothing in it */
.unreadable {
  background: var(--error-bg);
  color: var(--error-text);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.unreadable p { margin: 0 0 0.25rem; }
.unreadable ul { margin: 0.25rem 0; padding-left: 1.25rem; }
.unreadable .who { font-weight: 500; }
.unreadable .hint { color: inherit; opacity: 0.8; padding: 0; font-size: 0.85rem; }

/* an attachment we couldn't fetch — distinct from one with no preview */
.attachment-broken {
  border: 1px dashed var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--error-bg);
  color: var(--error-text);
}
.attachment-broken .why { margin: 0 0 0.35rem; font-size: 0.85rem; }
.attachment-broken a { color: inherit; font-size: 0.8rem; word-break: break-all; }

/* Which container a post was read from — useful once a pod registers
   more than one place for as:Note. Pushed to the post's right edge and
   pinned to the top of the header, so it lines up with the author's
   name rather than centring itself against the taller avatar. */
.post header .tags {
  margin-left: auto;
  align-self: flex-start;
  display: flex;
  gap: 0.35rem;
}

/* the provenance chips that used to live here are in the about panel
   now; what's left is the way in to it */
.post header .about-toggle {
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem 0.35rem;
  border-radius: 0.375rem;
}

.post header .about-toggle:hover { background: var(--wash); }

/* what a post *is*, as against what it says: a spec sheet, read like
   the info panel on a photo. Labels in one column, values in the other,
   and the raw address under each value where there is one. */
.about {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.3rem 0.75rem;
  margin: 0.75rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.about dt { color: var(--text-muted); }
.about dd { margin: 0; min-width: 0; }
.about .filed { display: block; }

/* addresses are for reading and copying, so they wrap anywhere rather
   than pushing the grid wider than the card */
.about .url {
  display: block;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

/* where a post is headed, and who will be able to read it */
.destination {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-top: 0.5rem; font-size: 0.8rem; color: var(--text-muted);
}
.audience.checking { font-style: italic; }
.audience.wide { color: var(--warn-text); font-weight: 500; }
.destination .where { color: var(--text); font-weight: 500; }

/* more than one audience to choose from: a chip each for what's
   selected, and a dropdown to change them. One line for the ordinary
   case of a single audience — it only grows when several are chosen,
   which is the rare case. */
.destination.picker {
  flex-direction: column; align-items: stretch; gap: 0.35rem;
}
.destination .where-label { color: var(--text); font-weight: 500; }

.audience-select { position: relative; }
.audience-control {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer;
  padding: 0.3rem 0.5rem; border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.audience-control:disabled { cursor: default; color: var(--text-muted); }
.audience-control .chips {
  display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1;
}
.audience-control .chevron { color: var(--text-muted); }

/* the same filled pill as .badge — these are all counters and labels
   rather than actions, and one grey keeps them together */
.audience-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; padding: 0.1rem 0.5rem;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--badge); color: var(--badge-ink);
}
/* on a filled pill the ✕ takes the pill's own colour: coral on grey is
   2.3:1, so the destructive hint is weight rather than hue */
.audience-chip .remove { color: inherit; opacity: 0.7; cursor: pointer; }
.audience-chip .remove:hover { opacity: 1; }

.audience-options {
  position: absolute; z-index: 10; left: 0; right: 0; top: 100%;
  margin: 0.25rem 0 0; padding: 0.25rem; list-style: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0.5rem; box-shadow: var(--shadow);
  max-height: 14rem; overflow-y: auto;
}
.audience-options button {
  display: flex; align-items: baseline; gap: 0.5rem; width: 100%;
  font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer;
  padding: 0.35rem 0.5rem; border: none; border-radius: 0.375rem;
  background: none; color: var(--text);
}
.audience-options button:hover { background: var(--wash); }
.audience-options button.selected { font-weight: 500; }
.audience-options .tick { width: 0.9rem; color: var(--accent-ink); }
.audience-options .note { margin-left: auto; }

/* one line per audience when a post is going to several, since each has
   its own answer to who can read it */
.selection-notes { list-style: none; margin: 0; padding: 0; }
.selection-notes li { display: flex; gap: 0.5rem; align-items: baseline; }
.selection-notes .where { min-width: 7rem; }

.note { font-size: 0.75rem; color: var(--text-muted); }
.note.checking { font-style: italic; }
.note.wide { color: var(--warn-text); font-weight: 500; }

/* which app wrote a post — read from the client identifier document it
   names as its as:generator. Filled where the container chip beside it
   is outlined: the two are different *kinds* of fact, and doing that
   with shape rather than a second hue leaves teal as the only strong
   colour on a default screen. */
.post header .via {
  background: var(--badge);
  color: var(--badge-ink);
  border-color: transparent;
}

/* inline "try again" inside a sentence */
.destination button.link {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--accent-ink); text-decoration: underline; cursor: pointer;
}

/* @mentions. The menu is positioned against .compose-box rather than
   the textarea itself, which can't host absolutely positioned children. */
.compose-box { position: relative; }

.mention-menu {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: 100%;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}
.mention-menu li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
}
.mention-menu li.active { background: var(--accent); color: var(--accent-text); }
.mention-name { font-weight: 500; }
/* the WebID host disambiguates two contacts with the same display name */
.mention-webid { font-size: 0.75rem; opacity: 0.7; }

.post .mention {
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
}
.post .mention:hover { text-decoration: underline; }
