/* =============================================
   Baby Junctions — Learning mode
   Loaded by components/header.php only when $bjMode === 'learning', layered
   over style.css. Two jobs:
     1. body.mode-learning re-points the brand tokens to the green-led "growth"
        palette so the header and every shared component follow without edits.
     2. The .learn-* classes that used to be duplicated inline in learning/index.php
        and learning/_band.php live here once, plus the pillar-block styles.
   ============================================= */

/* ─── Palette: green-led, same logo, same type ─── */
body.mode-learning {
    --blue:   #166534;   /* deep leaf — links, active nav, accents */
    --pink:   #7BC67E;   /* brand green — buttons, highlights      */
    --yellow: #FFD166;
    --learn-soft:   #e7f6ec;
    --learn-line:   #cdebd6;
    --learn-ink:    #12341f;
    --learn-muted:  #5c6b75;
}
body.mode-learning .site-header { border-bottom: 3px solid #7BC67E; }
body.mode-learning .nav-link.is-current { color: #166534; font-weight: 800; }
body.mode-learning .nav-link-shop { color: #5BC8F5; }

/* ─── Band memory chip (filled by bj-band.js in a later phase; hidden until then) ─── */

/* ─── Hub (learning/index.php) ─── */
.learn-hero { background: linear-gradient(135deg, #e7f6ec 0%, #eaf6ff 55%, #fff8e1 100%); padding: 44px 0 30px; text-align: center; }
.learn-hero h1 { font-size: 2.3rem; font-weight: 900; color: #1a1a2e; margin: 0 0 10px; }
.learn-hero p { font-size: 1.08rem; color: #3a4a55; max-width: 660px; margin: 0 auto; line-height: 1.6; }
.learn-age-picker { margin: 22px auto 4px; max-width: 860px; }
.learn-age-picker .lap-label { font-weight: 800; color: #166534; margin-bottom: 10px; font-size: .95rem; }
.learn-age-picker .lap-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.learn-age-picker a { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 96px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 2px solid #dbe7ee; text-decoration: none; color: #1a1a2e; font-weight: 800; }
.learn-age-picker a:hover { border-color: #7BC67E; transform: translateY(-2px); }
.learn-age-picker a .lap-emoji { font-size: 1.7rem; }
.learn-age-picker a small { font-weight: 600; color: #5c6b75; }
.learn-sec { padding: 34px 0; }
.learn-sec h2 { font-size: 1.5rem; margin: 0 0 6px; }
.learn-sec .sub { color: #5c6b75; margin: 0 0 18px; }
.learn-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.learn-tile { display: block; background: #fff; border: 1px solid #e7eef3; border-radius: 16px; padding: 18px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.learn-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.08); }
.learn-tile .lt-emoji { font-size: 2rem; }
.learn-tile h3 { font-size: 1.05rem; margin: 6px 0 4px; }
.learn-tile p { font-size: .85rem; color: #5c6b75; line-height: 1.5; margin: 0; }
.learn-tile .lt-count { font-size: .75rem; font-weight: 800; color: #166534; }
.learn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.learn-feature { border-radius: 18px; padding: 24px; color: #12341f; background: linear-gradient(135deg, #e7f6ec, #d3f0e0); }
.learn-feature.blue { background: linear-gradient(135deg, #e6f4ff, #d3e9fb); color: #0b2f45; }
.learn-feature h3 { font-size: 1.2rem; margin: 0 0 8px; }
.learn-feature p { margin: 0 0 14px; line-height: 1.55; }
.learn-feature a { display: inline-block; font-weight: 800; color: #0f5132; text-decoration: none; border-bottom: 2px solid currentColor; }
.learn-feature.blue a { color: #0b5aa2; }
.learn-values { display: flex; flex-wrap: wrap; gap: 16px; background: #f7fbf8; border: 1px solid #e0efe6; border-radius: 16px; padding: 20px; }
.learn-values div { flex: 1; min-width: 220px; }
.learn-values strong { display: block; color: #166534; }

/* ─── Pillar explainer tiles (hub) ─── */
.learn-pillar-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.learn-pillar-tile { position: relative; display: block; background: #fff; border: 1px solid #e7eef3; border-left: 5px solid var(--pillar-color, #7BC67E); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: inherit; }
.learn-pillar-tile .lp-emoji { font-size: 1.6rem; }
.learn-pillar-tile h3 { font-size: 1rem; margin: 4px 0 4px; }
.learn-pillar-tile p { font-size: .84rem; color: #5c6b75; margin: 0; line-height: 1.45; }

/* ─── Guide cards (hub + band) ─── */
.learn-guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.learn-guide-card { display: block; background: #fff; border: 1px solid #e7eef3; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.learn-guide-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.08); }
.learn-guide-card img { width: 100%; height: 150px; object-fit: cover; background: #eef4f7; }
.learn-guide-card .lg-body { padding: 14px 16px; }
.learn-guide-card .lg-tag { font-size: .72rem; font-weight: 800; color: #166534; text-transform: uppercase; letter-spacing: .4px; }
.learn-guide-card h3 { font-size: 1rem; margin: 4px 0 6px; line-height: 1.3; }
.learn-guide-card p { font-size: .85rem; color: #5c6b75; line-height: 1.5; margin: 0; }
.learn-empty { background: #f7fbf8; border: 1px dashed #cdebd6; border-radius: 14px; padding: 22px; color: #3a5b45; }

/* ─── Band page (learning/_band.php) ─── */
.learn-band-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--band-color, #7BC67E) 14%, #fff) 0%, #fff 70%); padding: 40px 0 26px; }
.learn-band-hero .lb-emoji { font-size: 3rem; }
.learn-band-hero h1 { font-size: 2rem; font-weight: 900; color: #1a1a2e; margin: 8px 0; }
.learn-band-hero .lb-nep { display: inline-block; margin-top: 6px; font-size: .82rem; font-weight: 700; color: #166534; background: #e7f6ec; border: 1px solid #cdebd6; padding: 4px 12px; border-radius: 50px; }
.learn-band-intro { font-size: 1.08rem; color: #3a4a55; max-width: 760px; line-height: 1.65; margin: 14px 0 0; }
.learn-band-section { padding: 30px 0; }
.learn-band-section h2 { font-size: 1.4rem; margin: 0 0 14px; }
.learn-domain-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.learn-domain-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid #dbe7ee; border-radius: 50px; font-size: .86rem; font-weight: 700; color: #2b3d4a; text-decoration: none; background: #fff; }
.learn-domain-chips a:hover { border-color: #7BC67E; color: #166534; }
.learn-tools-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.learn-tools-cta a { flex: 1; min-width: 240px; display: block; padding: 16px 18px; border-radius: 14px; text-decoration: none; color: #fff; font-weight: 800; background: linear-gradient(135deg, #7BC67E, #34d399); }
.learn-tools-cta a.alt { background: linear-gradient(135deg, #5BC8F5, #38b2e8); }
.learn-band-jump { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 10px 0 0; }
.learn-band-jump a { font-weight: 700; color: #1f6f8b; text-decoration: none; }

/* ─── Pillar jump row on a band page ─── */
.learn-pillar-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.learn-pillar-jump a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 50px; font-size: .86rem; font-weight: 800; text-decoration: none; color: #1a1a2e; background: #fff; border: 2px solid var(--pillar-color, #dbe7ee); }
.learn-pillar-jump a:hover { background: var(--pillar-color, #f7fbf8); color: #fff; }

/* ─── Pillar blocks ─── */
.learn-pillar { padding: 30px 0; border-top: 1px solid #edf2f5; scroll-margin-top: 90px; }
.learn-pillar-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.learn-pillar-head .lp-emoji { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; font-size: 1.6rem; background: color-mix(in srgb, var(--pillar-color, #7BC67E) 18%, #fff); }
.learn-pillar-head h2 { font-size: 1.45rem; margin: 0 0 4px; }
.learn-pillar-head .lp-intro { color: #3a4a55; line-height: 1.6; margin: 0; max-width: 780px; }
.learn-pillar-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.learn-pillar-side { display: grid; gap: 12px; }
.learn-pillar-side .learn-tools-cta a { min-width: 0; }
.learn-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.learn-checklist li { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid #e7eef3; border-radius: 12px; padding: 10px 14px; font-size: .92rem; line-height: 1.45; }
.learn-checklist li::before { content: "☐"; color: #7BC67E; font-weight: 900; }
.learn-watchfor { background: #fff8f2; border: 1px solid #fde2c8; border-radius: 14px; padding: 16px 18px; margin-top: 14px; }
.learn-watchfor h3 { font-size: 1rem; margin: 0 0 8px; color: #9a3412; }
.learn-watchfor ul { margin: 0 0 8px; padding-left: 18px; font-size: .9rem; line-height: 1.5; color: #3a4a55; }
.learn-watchfor li { margin-bottom: 6px; }
.learn-watchfor .lw-src { display: inline-block; font-size: .76rem; font-weight: 800; color: #9a3412; text-transform: uppercase;
    letter-spacing: .3px; margin-left: 6px; padding: 4px 7px; border-radius: 6px; background: #fff1e5; line-height: 1.2; }
.learn-watchfor .lw-note { font-size: .82rem; color: #6a7a84; margin: 8px 0 0; line-height: 1.5; }
.learn-activities { display: grid; gap: 10px; }
.learn-activity { background: #fff; border: 1px solid #e7eef3; border-radius: 12px; padding: 12px 14px; }
.learn-activity strong { display: block; font-size: .95rem; }
.learn-activity .la-meta { font-size: .78rem; font-weight: 800; color: #166534; text-transform: uppercase; letter-spacing: .3px; }
.learn-activity p { font-size: .88rem; color: #4a5b66; line-height: 1.5; margin: 6px 0 0; }
.learn-sources-inline { font-size: .82rem; color: #5b6b75; margin: 10px 0 0; line-height: 1.9; }
.learn-sources-inline a { display: inline-block; color: #166534; padding: 3px 2px; }
.learn-checklist-more { font-size: .88rem; margin: 10px 0 0; }
.learn-checklist-more a { color: #166534; font-weight: 700; }

/* Phones are the majority of this site's traffic, so every new component is sized
   for a thumb: nothing under 13px, and any link that is not inside a sentence gets
   a tap area of at least 34px. */
@media (max-width: 760px) {
    .learn-two, .learn-pillar-grid { grid-template-columns: 1fr; }
    .learn-hero h1 { font-size: 1.7rem; }
    .learn-band-hero h1 { font-size: 1.6rem; }
    .learn-pillar-head .lp-emoji { width: 44px; height: 44px; font-size: 1.3rem; }
    .learn-pillar { padding: 18px 0 22px; }
    .learn-pillar-head h2 { font-size: 1.25rem; }
    .learn-sources-inline { font-size: .84rem; line-height: 2.1; }
    .learn-sources-inline a { padding: 6px 4px; }
    .learn-watchfor ul { font-size: .94rem; }
    .learn-watchfor .lw-src { padding: 6px 9px; font-size: .78rem; }
    .learn-watchfor .lw-note { font-size: .86rem; }
    .learn-activity p { font-size: .92rem; }
    .learn-activity .la-meta { font-size: .8rem; }
    .learn-checklist li { padding: 11px 12px; font-size: .95rem; }
    .learn-pillar-jump { gap: 8px; }
    .learn-pillar-jump a { padding: 9px 14px; }
    .learn-pillar-row { grid-template-columns: 1fr; }
    .learn-pillar-tile { padding: 16px; }
    .learn-guide-card .lg-tag { font-size: .82rem; }
    .learn-checklist-more a { display: inline-block; padding: 8px 2px; font-size: .92rem; }
    .learn-tile .lt-count { font-size: .82rem; }
    .learn-tile { padding: 16px; }
    .learn-tile p, .learn-guide-card .lg-body p { font-size: .9rem; }
}

/* ── Remembered age band ───────────────────────────────────────────────────────
   The chip in the header, the welcome-back row on the hub, the progress bar and
   the "this week" card. All of it is filled in by bj-band.js from one localStorage
   key; with JS off or storage blocked none of it renders and the pages are the
   same as before. */
/* The band chip itself is styled in style.css: it lives in the shared header and
   appears in shop mode too, where learning.css is not loaded. */

.learn-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center;
    margin: 0 0 18px; padding: 14px 18px; background: #fff; border: 1.5px solid #bbf7d0; border-radius: 16px; }
.learn-welcome[hidden] { display: none; }
.learn-welcome p { margin: 0; font-size: .95rem; color: #3a4a55; }
.learn-welcome a.lw-go { display: inline-block; padding: 10px 18px; border-radius: 50px; font-weight: 800;
    font-size: .92rem; color: #fff; background: linear-gradient(135deg, #7BC67E, #34d399); text-decoration: none; }
.learn-welcome button.lw-clear { border: 0; background: none; font: inherit; font-size: .86rem;
    color: #6a7a84; text-decoration: underline; cursor: pointer; padding: 8px 4px; }

.learn-progress { margin: 14px 0 0; }
.learn-progress .lp-bar { height: 10px; border-radius: 50px; background: #e7f5ec; overflow: hidden; }
.learn-progress .lp-bar span { display: block; height: 100%; width: 0; border-radius: 50px;
    background: linear-gradient(90deg, #7BC67E, #34d399); transition: width .35s ease; }
.learn-progress .lp-label { margin: 8px 0 0; font-size: .88rem; color: #5b6b75; }
.learn-progress .lp-label strong { color: #166534; }

.learn-thisweek { margin-top: 16px; background: #fffdf5; border: 1.5px solid #fde68a; border-radius: 14px; padding: 16px 18px; }
.learn-thisweek h3 { margin: 0 0 4px; font-size: 1rem; color: #92400e; }
.learn-thisweek .lt-week { font-size: .8rem; font-weight: 800; color: #b45309; text-transform: uppercase; letter-spacing: .3px; }
.learn-thisweek strong.lt-name { display: block; margin-top: 8px; font-size: 1.02rem; color: #1f2d38; }
.learn-thisweek p { margin: 6px 0 0; font-size: .92rem; color: #4a5b66; line-height: 1.55; }
.learn-thisweek .lt-how { margin-top: 8px; font-size: .9rem; }

@media (max-width: 760px) {
    .learn-welcome { flex-direction: column; align-items: stretch; text-align: center; }
    .learn-welcome a.lw-go { display: block; }
    .learn-thisweek p, .learn-thisweek .lt-how { font-size: .94rem; }
}
