/* ═══════════════════════════════════════════════════════════════════════
   GROUP NOTICEBOARD — the feed  (css/23, Prompt 58)
   ─────────────────────────────────────────────────────────────────────
   A calm, cross-hotel announcement feed staff enjoy opening. Deliberately a
   CARD FEED — not the collection-browser shell (a feed is time-ordered
   content, not a library, pack header line 10). It reuses the app-wide
   chrome wherever one exists:
     • month folds  → the Tasks `.tasks-month-*` classes (css/05) verbatim
     • buttons      → `.tasks-btn` / `.tasks-btn-secondary` (css/05)
     • site chip    → `.card-loc-chip` (css/04)
     • empty/error  → `.asset-empty` (css/13) + AngelHubUI.loadErrorHtml
   so this file only styles what is genuinely new: the post card (two-tier
   law), the 16:9 photo hero, the calm category chip (accent on the ICON
   only), the pinned strip, the "N new" chip, and a minimal read-only detail
   sheet (Prompt 60 replaces the sheet body with the full P31 detail).

   Both themes ride the shared tokens (no literal colours). Mobile full-width
   overrides live at the END of the file (source order — §4). No hover-only
   controls; visible focus rings; motion respects prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── layout: a single readable column, centred on wide screens ────────── */
.nb-feed { max-width: 680px; margin: 0 auto; padding: 4px 0 40px; }
.nb-feed-body { display: flex; flex-direction: column; gap: 14px; }
/* A run of cards (the recent block, a month fold's body, a search result). */
.nb-cards { display: flex; flex-direction: column; gap: 14px; }

/* Quiet "N new since your last visit" chip (capture-once, dismissable). */
.nb-seen-chip {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 12px; padding: 8px 12px;
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary); font: 600 var(--text-sm)/1.2 var(--body);
}
.nb-seen-chip svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--accent); }
.nb-seen-chip-text { flex: 1; min-width: 0; }
.nb-seen-dismiss {
  position: relative;
  flex-shrink: 0; display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0; border: none; border-radius: 50%;
  background: transparent; color: var(--text-secondary); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* ≥44px hit area without growing the pill (§4): a transparent overlay. */
.nb-seen-dismiss::before { content: ""; position: absolute; inset: -9px; }
.nb-seen-dismiss svg { width: 15px; height: 15px; }
.nb-seen-dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .nb-seen-dismiss:hover { background: var(--bg-elevated); color: var(--text-primary); } }

/* ── the PINNED strip (collapsible, remembered per org) ───────────────── */
.nb-pinned { margin-bottom: 6px; }
.nb-pinned-header {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 44px;                 /* §4 touch floor */
  padding: 8px 4px; border: none; background: transparent; cursor: pointer;
  color: var(--text-secondary); font: 700 var(--text-sm)/1 var(--body);
  letter-spacing: 0.03em; text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}
.nb-pinned-header:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.nb-pinned-header svg.nb-pin-glyph { width: 14px; height: 14px; color: var(--accent); }
.nb-pinned-count { color: var(--text-muted); font-weight: 600; }
.nb-pinned-chevron {
  width: 16px; height: 16px; margin-left: auto; color: var(--text-muted);
  transition: transform .18s ease;
}
.nb-pinned-chevron.is-open { transform: rotate(180deg); }
.nb-pinned-list { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }

/* ── THE CARD (two-tier law) ──────────────────────────────────────────── */
.nb-card {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-card); -webkit-tap-highlight-color: transparent;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
@media (hover: hover) {
  .nb-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card-hover); }
}
.nb-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nb-card.is-pinned { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* Per-category identity (P62): the ONE colour lives on the icon (below); the
   card gets only a HAIRLINE border tint — the fill stays neutral, so this
   honours the two-tier law (identifying colour concentrated on the icon, a
   whisper on the edge). Tokens only → both themes inherit; each category ALSO
   carries a distinct glyph + label, so it reads apart without colour (print-
   /grayscale-safe). The card root carries `nb-accent--<cat>` (a var-only class,
   NOT `nb-cat--*`, so it never recolours the site-pin / must-read icons). */
.nb-card { --nb-cat-accent: var(--text-muted); }
.nb-accent--announcement { --nb-cat-accent: var(--accent); }
.nb-accent--win          { --nb-cat-accent: var(--warning); }
.nb-accent--people       { --nb-cat-accent: var(--purple); }
.nb-accent--event        { --nb-cat-accent: color-mix(in srgb, var(--purple) 55%, var(--success) 45%); }
.nb-accent--food         { --nb-cat-accent: var(--success); }
.nb-accent--other        { --nb-cat-accent: var(--text-muted); }
/* Resting, non-pinned, non-hover cards wear the whisper. `.nb-card.is-pinned`
   (accent 40%) and `.nb-card:hover` (border-strong) are (0,2,0) → they win by
   specificity, so a pin/hover always overrides the category tint. */
.nb-card { border-color: color-mix(in srgb, var(--nb-cat-accent) 30%, var(--border)); }

/* 16:9 photo hero — thumbnail-first, lazy, --bg-elevated placeholder (P32). */
.nb-card-hero { position: relative; aspect-ratio: 16 / 9; background: var(--bg-elevated); overflow: hidden; }
.nb-card-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nb-card-hero-more {
  position: absolute; right: 8px; bottom: 8px;
  padding: 3px 8px; border-radius: var(--radius-pill);
  background: rgba(0,0,0,.58); color: #fff; font: 600 var(--text-xs)/1 var(--body);
  backdrop-filter: blur(2px);
}

.nb-card-body { padding: 12px 14px 12px; }

/* Calm context strip — neutral chips, colour lives on the category ICON. */
.nb-card-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }

/* Category chip: the .card-loc-chip shape, neutral body, accent on icon only. */
.nb-cat-chip {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  padding: 4px 9px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); font: 600 var(--text-xs)/1 var(--body); letter-spacing: 0.01em;
}
.nb-cat-chip svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-secondary); }
/* per-category identity — the ONE colour, on the icon only (two-tier law).
   Six distinct calm hues from the shared tokens; matches the card's
   `nb-accent--*` edge tint. `announcement` intentionally rides the brand
   `--accent` (the megaphone IS the group's voice) — so in an accent THEME that
   happens to equal a fixed category token (amber accent == --warning == win;
   purple accent == --purple == people) announcement's hue coincides with that
   one category. That is by design; the glyph + label always disambiguate.
   `event` is a FIXED purple⊕success blend (a calm calendar-blue) — NEVER built
   from --accent — so it can't collapse into announcement in any accent theme
   (the P62-review finding: an --accent-based event reverted to pure purple in
   the purple theme, undoing its own distinctness). */
.nb-cat--announcement svg { color: var(--accent); }
.nb-cat--win svg          { color: var(--warning); }
.nb-cat--people svg       { color: var(--purple); }
.nb-cat--event svg        { color: color-mix(in srgb, var(--purple) 55%, var(--success) 45%); }
.nb-cat--food svg         { color: var(--success, var(--accent)); }
.nb-cat--other svg        { color: var(--text-secondary); }

/* The ONLY loud element — an unconfirmed must-read (conditional-signal law). */
.nb-mustread-chip {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  padding: 4px 9px; border-radius: var(--radius-sm);
  background: var(--warning-soft); border: 1px solid transparent;
  color: var(--warning); font: 700 var(--text-xs)/1 var(--body); letter-spacing: 0.01em;
}
.nb-mustread-chip svg { width: 13px; height: 13px; flex-shrink: 0; }

.nb-card-title {
  margin: 0 0 4px; color: var(--text-primary);
  font: 700 var(--text-lg)/1.25 var(--display, var(--body)); letter-spacing: -0.01em;
}
.nb-card-excerpt {
  margin: 0; color: var(--text-secondary); font: 500 var(--text-base)/1.45 var(--body);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nb-card-excerpt:empty { display: none; }

.nb-card-footer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; color: var(--text-muted); font: 500 var(--text-sm)/1.2 var(--body);
}
.nb-card-author { color: var(--text-secondary); font-weight: 600; }
.nb-card-dot { color: var(--text-muted); }
.nb-card-reacts { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.nb-react-mini { display: inline-flex; align-items: center; gap: 3px; color: var(--text-secondary); font-weight: 600; }

/* "Show older" + search hint */
.nb-show-older { width: 100%; margin-top: 4px; }
.nb-search-hint { margin: 8px 2px 0; color: var(--text-muted); font: 500 var(--text-sm)/1.4 var(--body); text-align: center; }
.nb-loading { padding: 32px 12px; text-align: center; color: var(--text-muted); font: 500 var(--text-base)/1.4 var(--body); }

/* Empty-state CTA (warm empty state reuses .asset-empty from css/13). */
.nb-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-top: 6px;
  min-height: 44px;                 /* §4 touch floor */
  padding: 10px 16px; border: none; border-radius: var(--radius-pill);
  background: var(--accent); color: #04121a; cursor: pointer; white-space: nowrap;
  font: 700 var(--text-base)/1 var(--body); -webkit-tap-highlight-color: transparent;
  transition: filter .12s ease, transform .12s ease;
}
.nb-cta svg { width: 16px; height: 16px; }
@media (hover: hover) { .nb-cta:hover { filter: brightness(1.06); } }
.nb-cta:active { transform: scale(0.98); }
.nb-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Gentle FIRST-PAINT rise — calm, and only when motion is welcome. Scoped to a
   one-shot `.nb-enter` class (feed.js sets it only on the first card paint of a
   mount), so the SWR cache→network overwrite, "Show older", surgical swaps and
   silent reloads all paint STATICALLY — the rise happens once, never a re-render
   blink (the P62-review finding; §5 "seamless" bar). */
@media (prefers-reduced-motion: no-preference) {
  .nb-card.nb-enter { animation: nbCardIn .22s cubic-bezier(.22,1,.36,1) both; }
  @keyframes nbCardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ═══════════════════════════════════════════════════════════════════════
   POST DETAIL + ENGAGEMENT  (Prompt 60)
   ─────────────────────────────────────────────────────────────────────
   The detail rides the shared `.tasks-modal` spine (css/05) — centred on
   desktop, a bottom sheet that grows to full-height ≤599px, with the
   body.tasks-modal-open scroll-lock + the openModal_ touchmove guard (§6).
   So this section only styles the detail BODY content + the engagement row.
   ═══════════════════════════════════════════════════════════════════════ */
.nb-detail2 { max-width: 620px; }
.nb-d-head { border-bottom: none; padding-bottom: 4px; }     /* content leads, header is just controls */
/* §4 touch floor for the two reused header controls (✕ and the manager ⋯): the
   shared .tasks-modal-close is 32px on a non-fullscreen sheet. Grow the HIT area
   with a transparent ::before (the .nb-seen-dismiss pattern) so the visible 32px
   box stays identical to every other modal's close (§3), and widen the head gap
   from 6→12px so the two expanded areas just meet — never overlap (a mid-gap tap
   can't steal ⋯→✕). The button is position:static + un-clipped, so relative +
   the inset ::before reach 44px cleanly. */
.nb-detail2 .tasks-modal-head { gap: 12px; }
.nb-detail2 .tasks-modal-close { position: relative; }
.nb-detail2 .tasks-modal-close::before { content: ""; position: absolute; inset: -6px; }
.nb-d-body-wrap { padding-top: 6px; }
.nb-d-strip { margin-bottom: 10px; }
.nb-d-title {
  margin: 0 0 8px; color: var(--text-primary);
  font: 700 22px/1.22 var(--display, var(--body)); letter-spacing: -0.01em;
}
.nb-d-meta { margin: 0 0 14px; color: var(--text-muted); font: 500 var(--text-sm)/1.35 var(--body); }
.nb-d-meta b { color: var(--text-secondary); font-weight: 600; }
.nb-d-body {
  color: var(--text-primary); font: 500 var(--text-base)/1.6 var(--body);
  white-space: pre-wrap; word-break: break-word;
}
.nb-d-link { margin: 14px 0 2px; }
.nb-d-hero-slot:not(:empty) { margin: 14px 0 4px; border-radius: var(--radius-md); overflow: hidden; }

/* ── engagement (reactions + must-read + reach) ───────────────────────── */
.nb-engage { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.nb-react-row { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-react-pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-pill); color: var(--text-secondary);
  font: 700 var(--text-base)/1 var(--body); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .1s ease;
}
.nb-react-pill:active { transform: scale(.96); }
@media (hover: hover) { .nb-react-pill:hover { border-color: var(--border-strong); color: var(--text-primary); } }
.nb-react-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nb-react-pill.is-on {
  background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--text-primary);
}
.nb-react-emoji { font-size: 18px; line-height: 1; display: inline-block; }
.nb-react-count { min-width: 6px; font-variant-numeric: tabular-nums; }
.nb-react-count:empty { display: none; }
/* The "staff enjoy it" moment — a short pop on the tapped emoji. */
@media (prefers-reduced-motion: no-preference) {
  .nb-react-emoji.is-pop { animation: nbReactPop .22s cubic-bezier(.34,1.56,.64,1); }
  @keyframes nbReactPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.42); }
    100% { transform: scale(1); }
  }
}

.nb-confirm-block { display: flex; flex-direction: column; gap: 10px; }
.nb-confirm-block:not(:empty) { margin-top: 14px; }
.nb-gotit { align-self: flex-start; }
.nb-gotit svg { width: 17px; height: 17px; }
.nb-read-done {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--success-soft, var(--accent-soft)); color: var(--success, var(--accent));
  font: 700 var(--text-sm)/1 var(--body);
}
.nb-read-done svg { width: 16px; height: 16px; }
.nb-read-note { color: var(--text-muted); font: 500 var(--text-sm)/1.4 var(--body); }

/* Manager reach line — muted; the must-read variant is a tappable roster. */
.nb-reach {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  color: var(--text-secondary); font: 500 var(--text-sm)/1.3 var(--body);
}
.nb-reach-strong { color: var(--text-primary); font-weight: 700; }
button.nb-reach.is-tappable {
  min-height: 44px;   /* §4 touch floor — matches the sibling .nb-react-pill */
  padding: 8px 12px; margin: -2px 0; border: 1px solid var(--border);
  background: var(--bg-elevated); border-radius: var(--radius-md); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { button.nb-reach.is-tappable:hover { border-color: var(--border-strong); } }
button.nb-reach.is-tappable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nb-reach-chev { display: inline-flex; margin-left: 2px; color: var(--text-muted); }
.nb-reach-chev svg { width: 15px; height: 15px; }

/* The read-confirmations roster header (inside the shared picker sheet). */
.nb-who-head { padding: 2px 2px 6px; color: var(--text-secondary); font: 600 var(--text-sm)/1.35 var(--body); }

/* ═══════════════════════════════════════════════════════════════════════
   DASHBOARD REACH (Prompt 61) — the board where staff already look.
   ─────────────────────────────────────────────────────────────────────
   Two surfaces styled here (both precached with this file, for cohesion): the
   home-grid tile "N new" badge, and the dashboard "Latest from the group"
   collapsible section (its rows reuse .dashboard-mytask-row from css/04).
   Both themes; ≥44px taps (§4).
   ═══════════════════════════════════════════════════════════════════════ */

/* Home-grid tile unread badge (index.html renderModuleGrid) — sits where the
   "Soon" chip sits (top-right of the .module-card). A quiet accent pill, never
   loud. pointer-events:none — the whole card is the button. */
.module-card-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 3px 9px; border-radius: var(--radius-pill);
  line-height: 1.2;
  pointer-events: none;
}

/* (The "Latest from the group" dashboard fold was REMOVED 2026-07-16 — the
   "Noticeboard" KPI tile, css/04, is the only dashboard noticeboard surface.) */

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE ≤599px — full-width (§4). Override AFTER the base rules (source
   order), longhand horizontal padding so nothing clobbers vertical padding.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 599px) {
  .nb-feed { max-width: 100%; padding-left: 0; padding-right: 0; }
  .nb-card-body { padding-left: 12px; padding-right: 12px; }
  .nb-card-title { font-size: 16px; }
  .nb-d-title { font-size: 19px; }
}
