/* ─── Public announcements feed (announcements.html + league-announcements.html)
 * Rendered by js/announcements-public.js. Accent = --highlight-color, shapes =
 * --brand-radius-*. Class names avoid the -card/-panel/-badge/-chip/-pill
 * suffixes styles.css themes globally, and button rules carry :not(#_) to beat
 * the brand control-shape rules.
 */

.anp-shell {
  --anp-accent: var(--highlight-color, var(--button-primary-bg, #8b5cf6));
  --anp-line: var(--surface-border, rgba(255,255,255,.1));
  --anp-surface: var(--surface-1, rgba(255,255,255,.05));
  --anp-radius: var(--brand-radius-lg, 18px);
  --anp-radius-sm: var(--brand-radius-sm, 10px);
  width: 100%;
  box-sizing: border-box;
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 18px 72px;
  position: relative;
  z-index: 1;
  color: var(--text);
}
body { font-family: "Plus Jakarta Sans", sans-serif; min-height: 100vh; overflow-x: hidden; }

/* Spinner-only until the feed is ready, like the schedule and home pages. */
.anp-loading { display: flex; align-items: center; justify-content: center; min-height: 50vh; }
.anp-loading .loading-spinner { margin: 0; border-color: rgba(255,255,255,.14); border-top-color: var(--anp-accent); }
.anp-shell.is-loading .anp-head,
.anp-shell.is-loading .anp-toolbar { display: none; }
.anp-shell.is-ready > * { animation: anp-in .35s ease both; }
@keyframes anp-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .anp-shell.is-ready > * { animation: none; } .anp-post.is-focused { animation: none; } }
.anp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header -------------------------------------------------------------- */
.anp-head { margin-bottom: 16px; }
.anp-title { margin: 0; font-size: clamp(1.45rem, 3.2vw, 1.85rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); }
.anp-sub { margin: 6px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }

.anp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.anp-toolbar[hidden] { display: none; }
.anp-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--anp-line); border-radius: var(--brand-radius-pill, 999px); background: var(--anp-surface); max-width: 100%; overflow-x: auto; }
.anp-tab:not(#_) {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; min-height: 0; white-space: nowrap;
  border: 0 !important; border-radius: var(--brand-radius-pill, 999px) !important; background: transparent !important; box-shadow: none !important;
  color: var(--muted) !important; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; transform: none !important;
}
.anp-tab:not(#_):hover { color: var(--text) !important; }
.anp-tab.is-on:not(#_) { color: var(--text) !important; background: color-mix(in srgb, var(--anp-accent) 18%, transparent) !important; }
.anp-tab span { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.anp-tab.is-on span { color: var(--anp-accent); }
.anp-search { display: flex; align-items: center; gap: 8px; flex: 0 1 280px; min-width: 180px; padding: 0 12px; border: 1px solid var(--anp-line); border-radius: var(--brand-radius-pill, 999px); background: var(--anp-surface); color: var(--muted); }
.anp-search input:not(#_) { flex: 1 1 auto; min-width: 0; min-height: 0; padding: 9px 0; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; color: var(--text); font: inherit; font-size: .88rem; }
@media (max-width: 560px) { .anp-search { flex: 1 1 100%; } }

.anp-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 11px 14px; font-size: .9rem; border-radius: var(--anp-radius-sm); border: 1px solid color-mix(in srgb, var(--anp-accent) 35%, transparent); background: color-mix(in srgb, var(--anp-accent) 8%, transparent); }
.anp-notice i { color: var(--anp-accent); font-size: 1.1rem; }

/* ---- Feed ---------------------------------------------------------------- */
.anp-feed { display: grid; gap: 16px; }
.anp-post {
  position: relative; overflow: hidden;
  border: 1px solid var(--anp-line); border-radius: var(--anp-radius);
  background: var(--anp-surface);
  scroll-margin-top: 90px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.anp-post.is-pinned { border-color: color-mix(in srgb, var(--anp-accent) 40%, var(--anp-line)); }
.anp-post.is-focused { box-shadow: 0 0 0 2px var(--anp-accent), 0 18px 50px -20px color-mix(in srgb, var(--anp-accent) 60%, transparent); animation: anp-focus 1.2s ease 1; }
@keyframes anp-focus { 0% { transform: translateY(6px); } 100% { transform: none; } }
.anp-post__cover { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 420px; object-fit: cover; background: rgba(255,255,255,.04); }
.anp-post__inner { padding: 20px 22px 18px; }
@media (max-width: 600px) { .anp-post__inner { padding: 16px 16px 14px; } .anp-post { border-radius: var(--brand-radius-md, 14px); } }

.anp-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .78rem; font-weight: 650; color: var(--muted); }
.anp-meta i { font-size: .95rem; }
.anp-meta__dot { opacity: .6; }
.anp-meta__pin { display: inline-flex; align-items: center; gap: 4px; color: var(--anp-accent); font-weight: 800; }
.anp-meta__type { display: inline-flex; align-items: center; gap: 4px; }
.anp-meta__type--q { color: var(--text); }
.anp-post__title { margin: 8px 0 0; font-size: clamp(1.12rem, 2.4vw, 1.35rem); line-height: 1.3; font-weight: 750; letter-spacing: -0.01em; color: var(--text); overflow-wrap: anywhere; }

.anp-body { margin-top: 10px; color: var(--text); line-height: 1.68; font-size: .98rem; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
/* Rich bodies carry their own block structure — pre-wrap would double every
   line break coming from the editor's markup. */
.anp-body--rich { white-space: normal; }
.anp-body--rich > :first-child { margin-top: 0; }
.anp-body--rich > :last-child { margin-bottom: 0; }
.anp-body--rich p { margin: 0 0 10px; }
.anp-body--rich h2 { font-size: 1.15rem; margin: 18px 0 8px; color: var(--text); }
.anp-body--rich h3 { font-size: 1.02rem; margin: 14px 0 6px; color: var(--text); }
.anp-body--rich ul, .anp-body--rich ol { margin: 0 0 10px; padding-left: 22px; }
.anp-body--rich li { margin: 3px 0; }
.anp-body--rich a { color: var(--link, var(--anp-accent)); text-decoration: underline; }
.anp-body--rich img { max-width: 100%; height: auto; border-radius: 10px; }
.anp-body--rich hr { border: none; border-top: 1px solid var(--anp-line); margin: 16px 0; }
.anp-body--rich table { border-collapse: collapse; width: 100%; margin: 12px 0; display: block; overflow-x: auto; }
.anp-body--rich th, .anp-body--rich td { border: 1px solid var(--anp-line); padding: 8px 10px; text-align: left; }
.anp-body--rich th { background: rgba(255,255,255,.06); font-weight: 700; }
.anp-body.is-collapsed { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }

.anp-more:not(#_), .anp-link:not(#_) {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; min-height: 0; width: auto;
  border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 6px !important; transform: none !important;
  color: var(--anp-accent) !important; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
}
.anp-more:not(#_) { margin-top: 6px; }
.anp-more:not(#_):hover, .anp-link:not(#_):hover { text-decoration: underline; }
.anp-share:not(#_) { color: var(--muted) !important; margin-left: auto; }
.anp-share:not(#_):hover { color: var(--text) !important; }

.anp-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--anp-line); }
.anp-respond:not(#_) { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; width: auto; }
.anp-done { display: inline-flex; align-items: center; gap: 6px; color: #4ade80; font-size: .88rem; font-weight: 700; }
.anp-deadline { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .84rem; font-weight: 600; }

/* ---- Questionnaire form -------------------------------------------------- */
.anp-formwrap { margin-top: 14px; }
.anp-formwrap[hidden] { display: none; }
.anp-form { display: grid; gap: 14px; padding: 18px; border-radius: var(--anp-radius-sm); border: 1px solid var(--anp-line); background: rgba(0,0,0,.14); }
.anp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.anp-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.anp-field__label { color: var(--text); font-size: .9rem; font-weight: 700; padding: 0; }
.anp-req { color: var(--anp-accent); }
.anp-optional { color: var(--muted); font-size: .78rem; font-weight: 500; margin-left: 4px; }
.anp-field .input { width: 100%; box-sizing: border-box; }
.anp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.anp-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--anp-line); border-radius: var(--anp-radius-sm); background: var(--anp-surface); color: var(--text); font-size: .92rem; font-weight: 550; cursor: pointer; line-height: 1.35; transition: border-color .15s ease, background .15s ease; }
.anp-opt:hover { border-color: color-mix(in srgb, var(--anp-accent) 45%, var(--anp-line)); }
.anp-opt:has(input:checked) { border-color: var(--anp-accent); background: color-mix(in srgb, var(--anp-accent) 12%, transparent); }
/* Global form styles skin every input; give radios/checkboxes back their shape. */
.anp-opt input[type="radio"]:not(#_),
.anp-opt input[type="checkbox"]:not(#_) {
  width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: 0 0 auto;
  border: none; background: transparent; box-shadow: none; transform: none;
  appearance: auto; -webkit-appearance: auto; accent-color: var(--anp-accent);
}
.anp-turnstile { display: none; margin: 4px 0; }
.anp-form__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.anp-submit:not(#_) { flex: 0 0 auto; width: auto; }
.anp-status { color: var(--muted); font-size: .9rem; }
.anp-status.is-error { color: var(--color-error, #ff8a8a); }
.anp-thanks { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--anp-radius-sm); border: 1px solid rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
.anp-thanks i { font-size: 1.6rem; color: #4ade80; }
.anp-thanks div { display: flex; flex-direction: column; gap: 2px; }
.anp-thanks span { color: var(--muted); font-size: .88rem; }

/* ---- Empty state --------------------------------------------------------- */
.anp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 20px; border: 1px solid var(--anp-line); border-radius: var(--anp-radius); background: var(--anp-surface); color: var(--muted); }
.anp-empty h2 { margin: 6px 0 0; font-size: 1.15rem; color: var(--text); }
.anp-empty p { margin: 0; max-width: 420px; line-height: 1.5; }
.anp-empty--small { padding: 28px 20px; }
.anp-empty__icon { width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 18px; background: color-mix(in srgb, var(--anp-accent) 14%, transparent); color: var(--anp-accent); }

/* styles.css makes every `label span` a block with a bottom margin. */
.anp-form .anp-field__label:not(#_) { display: block; margin: 0; line-height: 1.35; }
.anp-form .anp-field__label span:not(#_) { display: inline; margin: 0; }
.anp-form .anp-opt > span:not(#_) { display: inline; margin: 0; line-height: 1.35; }

/* styles.css blurs every field's backdrop and lifts it on focus; inside the
   pill search box that shows up as a hard-edged dark box. */
.anp-shell input:not(#_), .anp-shell select:not(#_), .anp-shell textarea:not(#_) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
}
