/* =====================================================================================================================================
 * Round 350 (v1.86.87) — Members Portal Home cards: one colour system, three card styles, a button hierarchy, readable text.
 * Visual only. Loaded last (after portal-ui.css and portal-backdrop.css) by includes/member-portal.php.
 *
 *   A  FEATURE card, dark   navy surface, white text, gold accents       Bible Reading Plans, Verse of the day
 *   B  CONTENT card, light  white surface, navy text, soft grey notes    the sign-up rows (under a navy header)
 *   C  HIGHLIGHT, soft      light tint, navy text                        the signed-up tag, the group chips
 *
 * The rule everywhere: a dark surface carries white text (#FFFFFF, #E9EEF4, #C6D0DB); a light surface carries navy text (#102840, #667586).
 * The spec's tokens are defined on the Home cards only (.td, .hm-verse), so the rest of the Portal keeps its own navy and gold.
 * Selectors are written a little heavier than the inline card styles so the cards never depend on the order the styles load in.
 * ===================================================================================================================================== */

.td, .hm-verse, .bh {
  --acts-navy: #102840; --acts-navy-light: #294462; --acts-navy-soft: #3d5875;
  --acts-gold: #D5A23A; --acts-cream: #FAF8F3; --white: #FFFFFF; --page-light: #F4F7FA;
  --text-dark: #10253B; --text-muted: #677586;
  --text-on-dark-primary: #FFFFFF; --text-on-dark-body: #E9EEF4; --text-on-dark-secondary: #C6D0DB;
  --text-on-light-primary: #102840; --text-on-light-secondary: #667586;
  --surface-light: #FFFFFF; --surface-warm: #FAF8F3; --acts-verse: #0C2847;
  /* light surfaces; the dark theme swaps these (below) */
  --pc-surface: #FFFFFF; --pc-surface-2: #FFFFFF; --pc-line: #E1E7EE; --pc-ink: #102840; --pc-ink-2: #667586;
  --pc-chip: #F5E9CC; --pc-chip-ink: #10253B; --pc-chip-2: #F3F5F8; --pc-label: #86601E; --pc-glass: rgba(255, 255, 255, .88);
  --pc-ok-bg: #EAF4EC; --pc-ok-ink: #2F6B3C; --pc-ok-line: #BBD7C0; --pc-btn: #102840; --pc-btn-line: #102840;
  --pc-card-line: rgba(16, 40, 64, .08); --bh-gold: #FFF6DE; --bh-blue: #EDF4FB; --bh-purple: #F3EEF9;
  --pc-radius: 18px; --pc-radius-sm: 12px; --pc-shadow: 0 6px 18px rgba(16, 40, 64, .10);
}
:root[data-theme="dark"] .td, :root[data-theme="dark"] .hm-verse, :root[data-theme="dark"] .bh {
  --pc-surface: #16243A; --pc-surface-2: #1D2E47; --pc-line: #2B3C57; --pc-ink: #F2F4F8; --pc-ink-2: #B7C2D0;
  --pc-chip: #3A2C10; --pc-chip-ink: #F5DEAA; --pc-chip-2: #22344F; --pc-label: #E3B861; --pc-glass: rgba(22, 36, 58, .90);
  --pc-ok-bg: #1D3A2A; --pc-ok-ink: #BFE3C8; --pc-ok-line: #2F6B3C; --pc-btn: #294462; --pc-btn-line: #557595;
  --pc-card-line: #2B3C57; --bh-gold: #3A2C10; --bh-blue: #1F3550; --bh-purple: #2E2542;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .td, :root:not([data-theme="light"]) .hm-verse, :root:not([data-theme="light"]) .bh {
    --pc-surface: #16243A; --pc-surface-2: #1D2E47; --pc-line: #2B3C57; --pc-ink: #F2F4F8; --pc-ink-2: #B7C2D0;
    --pc-chip: #3A2C10; --pc-chip-ink: #F5DEAA; --pc-chip-2: #22344F; --pc-label: #E3B861; --pc-glass: rgba(22, 36, 58, .90);
    --pc-ok-bg: #1D3A2A; --pc-ok-ink: #BFE3C8; --pc-ok-line: #2F6B3C; --pc-btn: #294462; --pc-btn-line: #557595;
    --pc-card-line: #2B3C57; --bh-gold: #3A2C10; --bh-blue: #1F3550; --bh-purple: #2E2542;
  }
}

/* ---------- A · the Bible Reading Plans card (dark feature card) ---------- */
body .td .td-rp.td-rp:not(.bm-card) {
  background: var(--acts-navy); color: var(--text-on-dark-primary); border: 0; border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow); margin: 0 0 16px; overflow: hidden;
}
body .td .td-rp:not(.bm-card) .td-rp-details > summary { padding: 18px 20px 10px; color: var(--text-on-dark-primary); font-size: 17px; font-weight: 700; }
body .td .td-rp:not(.bm-card) .td-rp-sum { color: var(--text-on-dark-primary); font-weight: 700; border-left: 3px solid var(--acts-gold); padding-left: 10px; }
body .td .td-rp:not(.bm-card) .td-rp-body { padding: 0 20px 20px; }

/* the shared header parts (the reading plans card, and the header of the sign-up card): always white on navy */
body .td .td-rp .td-rp-presby small { color: #BFCBDC; font-size: 11px; letter-spacing: .06em; }
body .td .td-rp .td-rp-presby b { color: var(--text-on-dark-primary); font-weight: 700; font-size: 14px; }
body .td .td-rp .td-rp-logo { background: #fff; border: 1px solid rgba(255, 255, 255, .55); }
body .td .td-rp .td-rp-title { color: var(--text-on-dark-primary); font-size: 20px; font-weight: 700; line-height: 1.25; margin: 0 0 6px; }
body .td .td-rp .td-rp-next { color: var(--text-on-dark-secondary); font-size: 14px; margin: 0 0 12px; }

body .td .td-rp:not(.bm-card) .td-rp-bar { background: rgba(255, 255, 255, .16); height: 8px; }
body .td .td-rp:not(.bm-card) .td-rp-bar span { background: var(--acts-gold); }

/* primary action: white with navy text */
body .td .td-rp:not(.bm-card) .td-rp-cta {
  background: #fff; color: var(--acts-navy); border: 0; font-size: 15px; font-weight: 700; min-height: 48px; gap: 10px; margin: 14px 0 18px;
}
body .td .td-rp:not(.bm-card) .td-rp-cta:hover { background: #F4F6F8; }
body .td .td-rp:not(.bm-card) .td-rp-cta::after { content: "\2192" / ""; font-weight: 700; }

body .td .td-rp:not(.bm-card) .td-rp-label { color: var(--acts-gold); font-size: 12px; font-weight: 700; letter-spacing: .08em; margin: 0 0 8px; }

/* the four plans: quiet when not chosen, gold edge and a tick when chosen (never only a different shade of blue) */
body .td .td-rp:not(.bm-card) .td-rp-grid a {
  background: rgba(255, 255, 255, .06); border: 1px solid #46617D; color: #fff; min-height: 48px; font-size: 14px; font-weight: 600; border-radius: var(--pc-radius-sm);
}
body .td .td-rp:not(.bm-card) .td-rp-grid a:hover { background: rgba(255, 255, 255, .12); }
body .td .td-rp:not(.bm-card) .td-rp-grid a.is-current {
  background: var(--acts-navy-light); border: 2px solid var(--acts-gold); justify-content: space-between; gap: 8px; padding: 8px 10px 8px 9px;
}
body .td .td-rp:not(.bm-card) .td-rp-grid a.is-current::after { content: "\2713" / ""; color: var(--acts-gold); font-weight: 700; }

/* the weekly journal line and button that sit at the foot of the card (they were navy on navy) */
body .td .td-rp:not(.bm-card) .td-rp-wj { display: flex; align-items: center; min-height: 48px; margin: 12px 0 0; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
body .td .td-rp:not(.bm-card) .td-rp-wj-btn {
  min-height: 48px; padding: 10px 16px; border-radius: var(--pc-radius-sm); border: 1px solid rgba(255, 255, 255, .45); background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
body .td .td-rp:not(.bm-card) .td-rp-wj-btn:hover { background: rgba(255, 255, 255, .10); }

/* gold focus ring on every control in the cards */
body .td .td-rp a:focus-visible, body .td .td-rp button:focus-visible, body .td .td-rp summary:focus-visible, body .td .bm-pick:focus-within, body .hm-verse .hm-pill:focus-visible, body .td .td-next a:focus-visible {
  outline: 3px solid var(--acts-gold); outline-offset: 2px;
}

/* ---------- B · the sign-up card: navy header, light body ---------- */
body .td .td-rp.td-rp.bm-card {
  background: var(--pc-surface); color: var(--pc-ink); border: 0; border-radius: var(--pc-radius); box-shadow: var(--pc-shadow); margin: 0 0 16px; padding: 0; overflow: hidden;
}
body .td .bm-card .bm-head { background: var(--acts-navy); color: var(--text-on-dark-primary); padding: 20px; }
body .td .bm-card .bm-head .td-rp-pres { margin-bottom: 12px; }
body .td .bm-card .bm-body { background: var(--pc-surface); color: var(--pc-ink); padding: 16px 20px 20px; }
body .td .bm-card .bm-fold { margin: 0; padding: 16px 20px; color: var(--pc-ink); }
body .td .bm-card .bm-all { margin: 12px 0 0; }

/* the group label is a soft gold chip (a highlight, not a heading in grey) */
body .td .bm-card .bm-group { display: inline-block; margin: 0 0 8px; padding: 4px 12px; border-radius: 999px; background: var(--pc-chip); color: var(--pc-chip-ink); font-size: 13px; font-weight: 700; }
body .td .bm-card .bm-list + .bm-group { margin-top: 14px; }
body .td .bm-card .bm-row { background: var(--pc-surface-2); border: 1px solid var(--pc-line); border-radius: var(--pc-radius-sm); padding: 14px; color: var(--pc-ink); }
body .td .bm-card .bm-info b { color: var(--pc-ink); font-weight: 700; }
body .td .bm-card .bm-info small { color: var(--pc-ink-2); }
body .td .bm-card .bm-tag { background: var(--pc-chip-2); border-color: var(--pc-line); color: var(--pc-ink); }
body .td .bm-card .bm-tag-ok { background: var(--pc-ok-bg); border-color: var(--pc-ok-line); color: var(--pc-ok-ink); font-weight: 600; }

/* the sign-up button: navy, white text; it turns gold with navy text once ticked, so the choice is not only a tick */
body .td .bm-card .bm-pick { min-height: 48px; padding: 0 16px; border-radius: var(--pc-radius-sm); background: var(--pc-btn); border: 1px solid var(--pc-btn-line); color: #fff; font-weight: 700; }
body .td .bm-card .bm-pick input { accent-color: var(--acts-gold); }
body .td .bm-card .bm-pick:has(input:checked) { background: var(--acts-gold); border-color: var(--acts-gold); color: var(--acts-navy); }
body .td .bm-card .bm-pick:has(input:checked) input { accent-color: var(--acts-navy); }
body .td .bm-card .bm-go { min-height: 48px; background: var(--pc-btn); border: 1px solid var(--pc-btn-line); color: #fff; font-weight: 700; border-radius: var(--pc-radius-sm); }
body .td .bm-card .bm-link, body .td .bm-card .bm-more { color: var(--pc-ink); font-weight: 700; }

/* ---------- A · the Verse of the day card (dark feature card) with a three-level button hierarchy ---------- */
body.mp-body .hm-verse, body .td .hm-verse.hm-verse { background: var(--acts-verse); color: var(--text-on-dark-primary); border-radius: var(--pc-radius); padding: 20px; box-shadow: var(--pc-shadow); }
body .hm-verse .hm-verse-cap { color: var(--acts-gold) !important; font-weight: 700; }
body .hm-verse .hm-verse-text { color: #fff; }
body .hm-verse .hm-verse-ref { color: #D7E0E9; }

/* primary: white. secondary: gold. tertiary: outline */
body.mp-body .hm-verse .hm-pill.hm-pill--primary { background: #fff; color: var(--acts-navy); border: 1px solid #fff; font-weight: 700; min-height: 48px; }
body.mp-body .hm-verse .hm-pill.hm-pill--secondary { background: var(--acts-gold); color: var(--acts-navy); border: 1px solid var(--acts-gold); font-weight: 700; min-height: 48px; }
body.mp-body .hm-verse .hm-pill.hm-pill--tertiary { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35); font-weight: 600; min-height: 44px; }
body.mp-body .hm-verse .hm-pill.hm-pill--tertiary.is-liked { background: #fff; color: var(--acts-red-text, #B42318); border-color: #fff; }

/* the reflection question: a quiet panel with a gold edge */
body .hm-verse .hm-verse-ref-q {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--acts-gold); border-radius: 8px;
  background: rgba(255, 255, 255, .06); color: var(--text-on-dark-body); text-decoration: none; font-size: .875rem; font-weight: 500;
}
body .hm-verse .hm-verse-ref-q:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- One next step: a light, slightly see-through card, so its text never sits straight on the photo ---------- */
body.mp-body.mp-ui .td .td-next.td-card {
  background: var(--pc-glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 0; border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow); padding: 16px 20px; margin: 0 0 16px; color: var(--pc-ink); overflow: hidden;
}
body.mp-body.mp-ui .td .td-next.td-card > * + * { border-top: 0; padding-top: 0; margin-top: 8px; }
body.mp-body.mp-ui .td .td-next .td-h, body.mp-body.mp-ui .td .td-next .td-kicker {
  color: var(--pc-label); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
body.mp-body.mp-ui .td .td-next .td-next-t { color: var(--pc-ink); font-size: 1.0625rem; font-weight: 700; }
body.mp-body.mp-ui .td .td-next .td-muted { color: var(--pc-ink-2); }
body.mp-body.mp-ui .td .td-next .td-btn { background: var(--pc-btn); border: 1px solid var(--pc-btn-line); color: #fff; min-height: 48px; font-size: 15px; font-weight: 700; border-radius: var(--pc-radius-sm); }

/* ---------- the page background: a soft light veil over the photo, so the card text never depends on the picture ---------- */
body.pbg-on .pbg.pbg--photo { --pbg-wash: linear-gradient(rgba(239, 246, 252, .72), rgba(239, 246, 252, .72)); }
@media (max-width: 767px) {
  body.pbg-on .pbg.pbg--photo { --pbg-wash: linear-gradient(rgba(239, 246, 252, .72), rgba(239, 246, 252, .72)); }
}

/* ---------- spacing touches on the sign-up card ---------- */
body .td .bm-card .bm-head .td-rp-next { margin: 0; }
body .td .bm-card .bm-info { flex: 1 1 120px; }
body .td .bm-card .bm-row { padding: 12px; }

/* =====================================================================================================================================
 * Round 351 (v1.86.88, brought to the written spec in v1.86.89) — the Bible hub shortcut cards: one card system. Every card has the
 * same size, padding and fixed zones (icon, small line, title, description), so the length of a title or a description never changes
 * a card's height, and short text leaves blank space.
 *   1101 px and wider  4 columns, 240 px   ·  820–1100  3 columns, 240 px   ·  601–819  2 columns, 210 px
 *   360–600            2 columns, 190 px, 12 px gap   ·  under 360  1 column, 150 px or taller (two columns are too narrow there)
 * The zones add up inside the card (its height less the padding and the border): 58 + 16 + 3 lines + 50 on a laptop (inside 194),
 * 50 + 16 + 3 lines + 40 on a tablet (inside 172), 48 + 16 + 2 lines + 44 on a phone (inside 156; a third title line does not fit in a
 * 190 px card under the small line).
 * Visual only: the links, the order of the plans and the stored plan names are unchanged (the words shown are a shorter form).
 * ===================================================================================================================================== */
body .bh { --bhc-h: 190px; --bhc-pad: 16px; --bhc-ic: 44px; --bhc-glyph: 24px; --bhc-icarea: 48px; --bhc-lines: 2; --bhc-title-fs: 17px; --bhc-desc-h: 44px; --bhc-desc-fs: 13px; --bhc-gap: 12px; --bhc-kick: #9A6C20; }
@media (min-width: 601px) and (max-width: 819px) { body .bh { --bhc-h: 210px; --bhc-pad: 18px; --bhc-ic: 48px; --bhc-glyph: 26px; --bhc-icarea: 50px; --bhc-lines: 3; --bhc-desc-h: 40px; --bhc-desc-fs: 14px; --bhc-gap: 16px; } }
@media (min-width: 820px) { body .bh { --bhc-h: 240px; --bhc-pad: 22px; --bhc-ic: 52px; --bhc-glyph: 28px; --bhc-icarea: 58px; --bhc-lines: 3; --bhc-title-fs: 18px; --bhc-desc-h: 50px; --bhc-desc-fs: 14px; --bhc-gap: 20px; } }
:root[data-theme="dark"] body .bh { --bhc-kick: #E3B95C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body .bh { --bhc-kick: #E3B95C; } }

/* the hub lines up with the rest of the Portal: on a phone it has the same 16 px page edge as Home (it was 16 px further in on each side,
   which left two columns too narrow for the words), and on a laptop it uses up to 1200 px */
@media (max-width: 719px) { body .bh { padding-left: 0; padding-right: 0; } }
@media (min-width: 720px) { body .bh { max-width: 1200px; width: 100%; } }

/* the grid: only the number of columns changes with the width */
body .bh .bh-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bhc-gap); align-items: stretch; list-style: none; margin: 0 0 16px; padding: 0; }
@media (min-width: 820px) and (max-width: 1100px) { body .bh .bh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1101px) { body .bh .bh-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 359px) { body .bh .bh-tiles { grid-template-columns: minmax(0, 1fr); } }
body .bh .bh-tiles > li { min-width: 0; display: flex; }

/* the card */
body .bh .bh-tile {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; flex: 1 1 auto; min-width: 0;
  box-sizing: border-box; height: var(--bhc-h); min-height: 0; padding: var(--bhc-pad); overflow: hidden;
  background: var(--pc-surface); border: 1px solid var(--pc-card-line); border-radius: 18px; box-shadow: 0 5px 16px rgba(16, 40, 64, .08);
  color: var(--pc-ink); text-decoration: none; text-align: left; overflow-wrap: normal; word-break: normal; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* zone 1: the icon, always at the same place */
body .bh .bh-tile .bh-tile-ic {
  flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: var(--bhc-ic); height: var(--bhc-ic); margin: 0 0 calc(var(--bhc-icarea) - var(--bhc-ic)); border-radius: 14px; background: var(--bh-gold);
}
body .bh .bh-tile.bh-tone-blue .bh-tile-ic { background: var(--bh-blue); }
body .bh .bh-tile.bh-tone-purple .bh-tile-ic { background: var(--bh-purple); }
body .bh .bh-tile.bh-tone-gold .bh-tile-ic { background: var(--bh-gold); }
body .bh .bh-tile .bh-tile-ic > * { width: var(--bhc-glyph); height: var(--bhc-glyph); }
body .bh .bh-tile .bh-tile-ic img.mp-icon--3d { width: var(--bhc-glyph) !important; height: var(--bhc-glyph) !important; max-width: none !important; }
/* zone 2a: the small line above the title ("2027 READING PLAN"). Its 16 px are kept on every card, so a card without one still lines up */
body .bh .bh-tile .bh-tile-k {
  flex: none; display: block; box-sizing: border-box; height: 16px; line-height: 16px; min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--bhc-kick);
}
@media (max-width: 379px) { body .bh .bh-tile .bh-tile-k { letter-spacing: .04em; } }   /* the narrowest two-column cards: the small line still fits whole */
/* zone 2b: the title, a reserved height (three lines; two on a phone) */
body .bh .bh-tile .bh-tile-t {
  flex: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--bhc-lines); line-clamp: var(--bhc-lines); overflow: hidden; box-sizing: border-box; min-width: 0;
  height: calc(var(--bhc-title-fs) * 1.25 * var(--bhc-lines)); margin: 0; font-size: var(--bhc-title-fs); font-weight: 700; line-height: 1.25; color: var(--pc-ink); letter-spacing: 0;
}
/* zone 3: the description, a reserved height at the foot of the card, two lines at most */
body .bh .bh-tile .bh-tile-d {
  flex: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; box-sizing: border-box; min-width: 0;
  height: var(--bhc-desc-h); max-height: calc(var(--bhc-desc-fs) * 1.4 * 2); margin: auto 0 calc(var(--bhc-desc-h) - var(--bhc-desc-fs) * 1.4 * 2); font-size: var(--bhc-desc-fs); font-weight: 400; line-height: 1.4; color: var(--pc-ink-2);
}
/* one column (a very narrow screen): no neighbour to match, so the card sizes to its words; the zones keep their order */
@media (max-width: 359px) {
  body .bh .bh-tile { height: auto; min-height: 150px; }
  body .bh .bh-tile .bh-tile-t { height: auto; max-height: calc(var(--bhc-title-fs) * 1.25 * 3); -webkit-line-clamp: 3; line-clamp: 3; margin-bottom: 6px; }
}

/* hover (laptops), keyboard focus, and the chosen plan */
@media (hover: hover) {
  body .bh .bh-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 40, 64, .12); border-color: rgba(213, 162, 58, .45); }
}
body .bh .bh-tile:focus-visible { outline: 2px solid #D5A23A; outline-offset: 3px; }
body .bh .bh-tile.is-current, body .bh .bh-tile.is-current:hover { border: 2px solid #D5A23A; padding: calc(var(--bhc-pad) - 1px); box-shadow: 0 5px 16px rgba(16, 40, 64, .08), 0 0 0 3px rgba(213, 162, 58, .12); }
@media (prefers-reduced-motion: reduce) { body .bh .bh-tile { transition: none; } body .bh .bh-tile:hover { transform: none; } }
