/* =====================================================================
   askJBoss 2.91 — homepage rebrand: the "Everything hub" in the Afrideals look.
   Pine #12403c, gold #f4b942, warm cream, Inter. Loaded on the homepage only.
   To roll the look out to every page later, change "body:has(.hx.hub)" below to "body".
   ===================================================================== */

/* ---------- Colours (light) ---------- */
html:not([data-theme="dark"]) body:has(.hx.hub) {
  --bg: #fdf8ee; --card: #ffffff; --line: #e3dccb; --soft: #f3ecdc; --soft-2: #f8f2e4;
  --ink: #0f1f1c; --ink-2: #1f332f; --muted: #4c5f5b; --muted-2: #5b6d69;
  --green: #12403c; --green-dark: #0a2522; --green-soft: #e6efe9; --green-text: #12403c; --gold: #f4b942;
  --x-ink: #12403c; --x-ink-2: #1b4c47; --x-paper: #fdf8ee; --x-line: #e3dccb; --x-gold: #f4b942; --x-cream: #fdfcfa; --x-sage: #a9bdb8;
  --hub-tint: #e6efe9; --hub-gold-soft: #fbe7b5; --hub-gold-text: #8f5f06;
}
/* ---------- Colours (night mode) ---------- */
html[data-theme="dark"] body:has(.hx.hub) {
  --bg: #0b1f1c; --card: #13302c; --line: #24433f; --soft: #18382f; --soft-2: #112925;
  --ink: #f3efe6; --ink-2: #ddd8cc; --muted: #a9bdb8; --muted-2: #95aaa4;
  --green-soft: #1d3f39; --gold: #f4b942;   /* --green etc. keep the night-mode greens, so white text on green buttons stays readable */
  --x-ink: #0a2522; --x-paper: #0b1f1c; --x-line: #24433f; --x-gold: #f4b942; --x-cream: #f3efe6; --x-sage: #a9bdb8;
  --hub-tint: #1d3f39; --hub-gold-soft: #3b3218; --hub-gold-text: #f4b942;
}
body:has(.hx.hub) { background: var(--bg); --display: "Inter", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-family: var(--body); }
body:has(.hx.hub) h1, body:has(.hx.hub) h2, body:has(.hx.hub) h3 { font-family: var(--display); }
body:has(.hx.hub) :focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Left menu: pill rows, the open page in pine ---------- */
.hub .hx-left-nav a { border-radius: 999px; padding: 6px 12px 6px 6px; }
.hub .hx-left-nav a span { border-radius: 50%; background: transparent; color: var(--ink); }
.hub .hx-left-nav a:hover { background: var(--soft); }
.hub .hx-left-nav a.on { background: #12403c; color: #fdfcfa; }
.hub .hx-left-nav a.on span { background: transparent; color: #f4b942; }
.hub .hx-left-places { border-radius: 14px; }
.hub .hx-left-places h2 { color: var(--hub-gold-text); letter-spacing: .3em; font-size: 11.5px; }
.hub .hx-left-places a b { background: var(--hub-tint); color: var(--green-text); padding: 1px 10px; border-radius: 999px; font-weight: 600; }
.hub .hx-left-places .hx-left-add { color: var(--hub-gold-text); }

/* ---------- Hero ---------- */
.hub-hero { background: #12403c; color: #fdfcfa; border-radius: 24px; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.hub-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: #f4b942; }
.hub-hero h1 { margin: 0; color: #fdfcfa; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.02; font-weight: 900; letter-spacing: -0.02em; font-variation-settings: "opsz" 32; max-width: 14em; }
.hub-hero p { margin: 0; color: #cfe0d9; font-size: 17px; line-height: 1.6; max-width: 38em; }
.hub-hero p a { color: #f4b942; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.hub-btn-gold, .hub-btn-line, .hub-btn-text { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.hub-btn-gold { background: #f4b942; color: #12403c; }
.hub-btn-gold:hover { background: #f7c766; color: #12403c; }
.hub-btn-line { background: transparent; color: #fdfcfa; border: 1px solid rgba(253, 252, 250, .45); font-weight: 600; }
.hub-btn-line:hover { color: #fdfcfa; border-color: #fdfcfa; }
.hub-btn-text { background: transparent; color: #cfe0d9; padding: 0 8px; font-weight: 600; font-size: 14px; }
.hub-btn-text:hover { color: #fdfcfa; }
.hub-btn-gold:disabled, .hub-btn-text:disabled { opacity: .6; cursor: default; }
.hub-msg { flex-basis: 100%; margin: 2px 0 0; font-size: 13px; color: #cfe0d9; }

/* ---------- Everything hub ---------- */
.hub-sec { display: flex; flex-direction: column; gap: 14px; }
.hub-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hub-sec-head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -0.01em; }
.hub-sec-head a { font-size: 14px; font-weight: 600; color: var(--hub-gold-text); }
.hub-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hub-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 128px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); transition: border-color .15s, transform .15s; }
.hub-tile:hover { border-color: var(--green); color: var(--ink); transform: translateY(-1px); }
.hub-ic { width: 44px; height: 44px; border-radius: 22%; background: var(--hub-tint); color: var(--green-text); display: grid; place-items: center; margin-bottom: 8px; }
.hub-tile b { font-size: 16.5px; font-weight: 700; line-height: 1.25; }
.hub-tile small { font-size: 13px; line-height: 1.4; color: var(--muted); }
.hub-tile.hi { background: #0a2522; border-color: #0a2522; color: #fdfcfa; }
.hub-tile.hi .hub-ic { background: #f4b942; color: #12403c; }
.hub-tile.hi small { color: #f4b942; }
.hub-tile.hi:hover { border-color: #f4b942; color: #fdfcfa; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-chips a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; }
.hub-chips a:hover { border-color: var(--green); color: var(--green); }
@media (max-width: 880px) { .hub-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .hub-tiles { gap: 8px; }
  .hub-tile { align-items: center; text-align: center; padding: 12px 6px; min-height: 104px; }
  .hub-tile small { display: none; }
  .hub-tile b { font-size: 13.5px; }
  .hub-ic { margin-bottom: 4px; }
  .hub-hero { border-radius: 20px; }
  .hub-actions > * { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Town Pulse in the new colours ---------- */
.hub .pulse { background: #12403c; border-radius: 24px; }
.hub .pulse-head h2 span { color: #f4b942; }

/* ---------- Composer, feed, cards ---------- */
.hub .hx-compose, .hub .post, .hub .side-card, .hub .svc-card, .hub .hx-scope { border-radius: 14px; border-color: var(--line); }
.hub .hx-type { border-color: var(--line); }
.hub .hx-type:hover { border-color: var(--green); }
.hub .feed-bar .seg { gap: 6px; }
.hub .feed-bar .seg a { padding: 8px 16px; border-radius: 999px; border-bottom: 0; margin: 6px 0; color: var(--ink); font-weight: 500; }
.hub .feed-bar .seg a.on { background: #12403c; color: #fdfcfa; font-weight: 600; }
html[data-theme="dark"] .hub .feed-bar .seg a.on { background: #f4b942; color: #12403c; }
.hub .btn-dark { background: #12403c; color: #fdfcfa; }
.hub .btn-dark:hover { background: #0a2522; color: #fdfcfa; }
.hub .btn-gold { background: #f4b942; color: #12403c; }
html[data-theme="dark"] .hub .btn-dark { background: #f4b942; color: #12403c; }
.hub .hx-scope-steps a.on { background: #12403c; color: #fdfcfa; }

/* ---------- Footer line ---------- */
.hub-foot { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.hub-foot b { color: var(--hub-gold-text); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .hub-tile { transition: none; } .hub-tile:hover { transform: none; } }

/* night mode: keep the open menu item pine with a gold icon */
html[data-theme="dark"] .hub .hx-left-nav a.on { background: #12403c; color: #fdfcfa; }
html[data-theme="dark"] .hub .hx-left-nav a.on span { background: transparent; color: #f4b942; }
html[data-theme="dark"] .hub .hub-tile.hi { background: #12403c; border-color: #12403c; }
