/* ============================================================
   index.css — landing page specific styles
   ============================================================ */

@import url('/css/fonts.css');   /* self-hosted — see scripts/fetch-webfonts.js */

/* CSS custom properties for the green palette */
:root {
    --green-dark:    #1A2E25;
    --green-primary: #2D4A3E;
    --green-mid:     #1E6644;
    --green-text:    #3D5E4E;
    --green-muted:   #4A6B5A;
    --green-subtle:  #5A7A6A;
    --green-border:  #C8DFD2;
    --green-light:   #EEF7F1;
    --green-pale:    #F5FAF7;
    --green-hover:   #D4EFE2;
    --accent-warm:   #F4A261;
    --accent-cream:  #FEF3E2;
    --accent-gold:   #E9C46A;
    --text-cta:      #E8F5EF;
}

body {
    /* margin: 0 — the browser default is 8px, which showed as a gap above the
       nav and down both sides so the nav and the green waitlist banner floated
       instead of meeting the window edge.
       common.css resets this globally, but three pages load index.css WITHOUT
       common.css — /, /charts/ and /coloring/ — so they were the only pages in
       the product still carrying the default. Deliberately margin only, not the
       full `* { margin: 0; padding: 0; box-sizing: border-box }` reset from
       common.css: five of the eight pages on this stylesheet already get that
       reset, and forcing border-box onto the three that never had it would
       resize padded boxes that were laid out without it. */
    margin: 0;
    background: var(--green-pale);
    color: #333;
    font-family: 'DM Sans', sans-serif;
}

/* ── Nav ──────────────────────────────────────────────────── */

nav {
    background: #FFFFFF;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid #E0EDE6;
}

.nav-brand {
    font-family: 'Lora', serif;
    font-size: 21px;
    font-weight: 600;
    color: var(--green-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* PHONE: common.css hides the page title below 600px on purpose — the header
   drops to two columns (brand | account) and has no room for a third. The rule
   above redeclares `display: flex` with no media query, and this file loads
   AFTER common.css, so on every page that loads it (home, the storybooks hub)
   the title came back, the two columns held three items, and the account
   button fell onto a second row by itself. This restores common.css's intent;
   the greeting under the header already says where you are. */
@media (max-width: 600px) {
    .header .nav-brand { display: none; }
}

.nav-brand-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Lora', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--green-primary);
    text-decoration: none;
}

.nav-brand-home:hover,
.nav-brand-home:visited,
.nav-brand-home:focus {
    color: var(--green-primary);
    text-decoration: none;
}

.nav-brand-home img {
    height: 32px;
    width: auto;
}

.nav-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--green-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    color: var(--green-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.15s;
}

.nav-link:hover {
    background: var(--green-light);
}

.nav-btn {
    background: var(--green-primary);
    color: var(--text-cta);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 100px;
    transition: opacity 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.nav-btn:hover {
    opacity: 0.88;
}

/* ── Waitlist banner ──────────────────────────────────────── */

.waitlist-banner {
    background: var(--green-primary);
    color: var(--text-cta);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 24px;
    font-size: 13.5px;
}

.waitlist-banner-text {
    opacity: 0.9;
    white-space: nowrap;
}

.waitlist-banner-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.waitlist-banner-form input[type="email"] {
    padding: 6px 12px;
    border-radius: 100px;
    border: none;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    background: rgba(255,255,255,0.15);
    color: #fff;
    outline: none;
    width: 200px;
}

.waitlist-banner-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.55);
}

.waitlist-banner-form input[type="email"]:focus {
    background: rgba(255,255,255,0.25);
}

.waitlist-banner-form button {
    padding: 6px 16px;
    border-radius: 100px;
    border: 1.5px solid rgba(255,255,255,0.7);
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.waitlist-banner-form button:hover {
    background: rgba(255,255,255,0.12);
}

.waitlist-banner-msg {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.waitlist-banner-msg.visible {
    display: inline;
}

.waitlist-banner-msg.error {
    color: #FFCDD2;
}

/* ── Inline waitlist (inside register panel) ─────────────── */

.inline-waitlist-box {
    background: var(--green-light);
    border: 1px solid var(--green-border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 16px;
    display: none;
}

.inline-waitlist-msg {
    margin: 0 0 12px;
    font-size: 13.5px;
    color: var(--green-text);
    line-height: 1.5;
}

.inline-waitlist-form {
    display: flex;
    gap: 8px;
}

.inline-waitlist-form input[type="email"] {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--green-border);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: 'DM Sans', sans-serif;
    color: #333;
    background: #fff;
    outline: none;
}

.inline-waitlist-form input[type="email"]:focus {
    border-color: var(--green-mid);
}

.inline-waitlist-form button {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: var(--green-primary);
    color: var(--text-cta);
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.inline-waitlist-form button:hover {
    opacity: 0.88;
}

.inline-waitlist-result {
    display: none;
    margin-top: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--green-mid);
}

.inline-waitlist-result.visible {
    display: block;
}

.inline-waitlist-result.error {
    color: #c0392b;
}

/* Nav avatar dropdown (logged-in state) */
.nav-user-menu {
    position: relative;
}

.nav-avatar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--green-light);
    border: 1px solid var(--green-border);
    border-radius: 20px;
    padding: 5px 12px 5px 5px;
    cursor: pointer;
    width: auto;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--green-dark);
    transition: background 0.2s;
}

.nav-avatar-btn:hover {
    background: var(--green-hover);
}

.nav-avatar-initial {
    width: 26px;
    height: 26px;
    background: var(--green-primary);
    color: var(--text-cta);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-avatar-caret {
    font-size: 16px;
    color: var(--green-mid);
}

.nav-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    border: 0.5px solid var(--green-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(45, 74, 62, 0.12);
    min-width: 170px;
    z-index: 200;
    overflow: hidden;
}

.nav-dropdown.open {
    display: block;
}

.nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: none;
    border: none;
    margin: 0;
    font-size: 14px;
    color: var(--green-dark);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.nav-dropdown-item:hover {
    background: var(--green-light);
}

.nav-dropdown-divider {
    height: 1px;
    background: #E0EDE6;
    margin: 4px 0;
}

.nav-dropdown-tier {
    padding: 2px 16px 8px;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--green-muted);
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 40px 32px;
    align-items: start;
    position: relative;
}

/* Decorative blobs */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}
.hero-blob-1 { width: 300px; height: 300px; background: var(--accent-warm); top: -80px; left: -120px; }
.hero-blob-2 { width: 220px; height: 220px; background: var(--green-primary); bottom: -40px; right: -60px; }
.hero-blob-3 { width: 160px; height: 160px; background: var(--accent-gold); top: 40px; right: 80px; }

.hero-content,
.auth-card,
.user-card {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--green-mid);
    font-weight: 500;
    margin-bottom: 14px;
}
.hero-eyebrow-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-mid);
    flex-shrink: 0;
}

.hero-content h1 {
    font-family: 'Lora', serif;
    font-size: 42px;
    font-weight: 600;
    line-height: 1.12;
    color: var(--green-dark);
    margin-bottom: 20px;
}

.hero-content h1 span {
    font-style: italic;
    color: var(--green-mid);
    -webkit-text-fill-color: var(--green-mid);
    background: none;
}

.hero-content p {
    font-size: 16px;
    color: var(--green-text);
    line-height: 1.68;
    margin-bottom: 24px;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--green-primary);
    color: var(--text-cta);
    border: none;
    padding: 13px 28px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.15s, transform 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #FFFFFF;
    color: var(--green-primary);
    border: 1.5px solid var(--green-primary);
    padding: 12px 28px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, transform 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.btn-secondary:hover {
    background: var(--green-light);
    transform: translateY(-1px);
}

/* ── Logged-in user card ──────────────────────────────────── */

.user-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(45, 74, 62, 0.12);
    border: 0.5px solid var(--green-border);
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.user-card-greeting {
    font-family: 'Lora', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--green-dark);
}

.user-card-stats {
    display: flex;
    gap: 20px;
}

.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--green-light);
    border-radius: 12px;
    padding: 14px 20px;
    flex: 1;
}

.user-stat-num {
    font-family: 'Lora', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--green-primary);
    line-height: 1.1;
}

.user-stat-label {
    font-size: 12px;
    color: var(--green-muted);
    margin-top: 4px;
    text-align: center;
}

.user-card-actions {
    display: flex;
    gap: 10px;
}

.user-card-actions .btn-primary,
.user-card-actions .btn-secondary {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
}

/* ── Auth card ────────────────────────────────────────────── */

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(45, 74, 62, 0.12);
    border: 0.5px solid var(--green-border);
    padding: 36px;
}

.auth-tabs {
    display: flex;
    background: var(--green-light);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    width: auto;
    margin: 0;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--green-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
}

.auth-tab.active {
    background: white;
    color: var(--green-primary);
    box-shadow: 0 1px 4px rgba(45, 74, 62, 0.12);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

/* border-box: this is `width: 100%` WITH padding, and index.html does not load
   common.css (which sets border-box globally), so it used to render 24px wider
   than the fields above and below it. */
.oauth-btn {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px;
    border: 0.5px solid var(--green-border);
    border-radius: 10px;
    background: white;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.oauth-btn:hover {
    border-color: #7ABDA0;
    box-shadow: 0 2px 8px rgba(45, 74, 62, 0.08);
}

.oauth-btn svg {
    flex-shrink: 0;
}

/* `hidden` DOES NOT WORK ON THIS BUTTON WITHOUT THIS LINE. The `display: flex`
   above is an author rule and beats the UA stylesheet's `[hidden] {display:none}`
   whatever the specificity, so the Apple button — which ships hidden until
   /api/auth/providers says it is configured — would render on every page that
   cannot use it. */
.oauth-btn[hidden] {
    display: none;
}

/* Apple's branding guidance: its own mark, on black, not visually subordinate
   to the other sign-in buttons. The green hover of the outline buttons would
   be invisible here, so it lifts instead. */
.oauth-btn--apple {
    background: #000;
    border-color: #000;
    color: #fff;
}

.oauth-btn--apple:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--green-subtle);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E0EDE6;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--green-primary);
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 0.5px solid var(--green-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--green-dark);
    background: #FFFFFF;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: #9BBDAD;
}

.form-group input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.1);
}

.form-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* A SERVER REFUSAL THAT NAMES A FIELD, SHOWN UNDER THAT FIELD.
   Rendered by /js/field-error.js. It sits in the row BELOW the input rather
   than beside it — the two name fields share a grid row, so a message placed
   inline would squeeze the box it is about. */
.field-error-msg {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.35;
    color: #B3261E;
}

.form-group input[data-field-invalid] {
    border-color: #B3261E;
}

.form-group input[data-field-invalid]:focus {
    border-color: #B3261E;
    box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

.submit-btn {
    width: 100%;
    padding: 13px;
    background: var(--green-primary);
    color: var(--text-cta);
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 6px;
    transition: opacity 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.submit-btn:hover {
    opacity: 0.88;
}

.submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-error {
    padding: 10px 12px;
    margin-bottom: 16px;
    background: #fee;
    border: 0.5px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 13px;
    display: none;
}

.auth-error.visible {
    display: block;
}

.auth-notice {
    padding: 10px 12px;
    margin-bottom: 16px;
    background: #f0faf4;
    border: 0.5px solid #a3d9b8;
    border-radius: 8px;
    color: #1e6644;
    font-size: 13px;
    display: none;
}

.auth-notice.visible {
    display: block;
}

/* Password strength indicators */
#pwdRequirements li {
    color: #9BBDAD !important;
}
#pwdRequirements li[style*="27ae60"] {
    color: var(--green-mid) !important;
}

/* ── Trust strip ─────────────────────────────────────────── */

.trust-strip {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 14px 40px;
    flex-wrap: wrap;
    border-bottom: 0.5px solid #E0EDE6;
    background: #FFFFFF;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--green-primary);
    font-weight: 500;
}

.trust-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-mid);
    flex-shrink: 0;
}

/* ── Shared section heading styles ───────────────────────── */

.section-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--green-mid);
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
}

.section-title {
    font-family: 'Lora', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--green-dark);
    text-align: center;
    margin-bottom: 10px;
}

.section-sub {
    font-size: 14px;
    color: var(--green-text);
    text-align: center;
    line-height: 1.65;
    max-width: 520px;
    margin: 0 auto;
}

/* ── Toolkit section ─────────────────────────────────────── */

.toolkit-sec {
    padding: 72px 40px;
    background: #FFFFFF;
    border-top: 0.5px solid #E0EDE6;
}

.toolkit-inner {
    max-width: 900px;
    margin: 0 auto;
}

.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.toolkit-card {
    border: 0.5px solid var(--green-border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    background: #FFFFFF;
}

.toolkit-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.toolkit-card h3 {
    font-family: 'Lora', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.toolkit-card p {
    font-size: 13px;
    color: var(--green-muted);
    line-height: 1.6;
}

/* ── Commitment section ───────────────────────────────────── */

.commitment-sec {
    padding: 40px 40px 56px;
    background: var(--green-light);
    border-top: 0.5px solid #E0EDE6;
}

.commitment-inner {
    max-width: 900px;
    margin: 0 auto;
}

.commitment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.commitment-card {
    background: #FFFFFF;
    border: 0.5px solid var(--green-border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
}

.commitment-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.ci-green { background: #D4EFE2; }
.ci-warm  { background: var(--accent-cream); }
.ci-blue  { background: #E8F3FE; }

.commitment-card h3 {
    font-family: 'Lora', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.commitment-card p {
    font-size: 13px;
    color: var(--green-text);
    line-height: 1.6;
}

/* ── Testimonials section ────────────────────────────────── */

.testimonials-sec {
    padding: 72px 40px;
    background: #FFFFFF;
    border-top: 0.5px solid #E0EDE6;
}

.testimonials-inner {
    max-width: 900px;
    margin: 0 auto;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.testimonial-card {
    border: 0.5px solid var(--green-border);
    border-radius: 16px;
    padding: 24px 20px;
    background: #FFFFFF;
}

.testimonial-stars {
    color: #D4900A;
    font-size: 14px;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.testimonial-quote {
    font-size: 14px;
    color: var(--green-dark);
    line-height: 1.65;
    margin-bottom: 16px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testimonial-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.ta-green { background: #D4EFE2; color: #1A4032; }
.ta-warm  { background: var(--accent-cream); color: #7A4208; }
.ta-blue  { background: #E8F3FE; color: #0C447C; }

.testimonial-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--green-dark);
}

.testimonial-meta {
    font-size: 12px;
    color: var(--green-muted);
}

/* ── Features section ────────────────────────────────────── */

.features {
    background: #FFFFFF;
    padding: 80px 40px;
    border-top: 0.5px solid #E0EDE6;
}

.features-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.features h2 {
    font-family: 'Lora', serif;
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 12px;
}

.features-sub {
    text-align: center;
    color: var(--green-text);
    font-size: 15px;
    margin-bottom: 52px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--green-light);
    border-radius: 16px;
    padding: 28px;
    border: 0.5px solid var(--green-border);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-family: 'Lora', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--green-text);
    line-height: 1.6;
}

/* ── Examples / Apps section ─────────────────────────────── */

.examples {
    max-width: 1100px;
    margin: 24px auto;
    padding: 40px 40px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(45, 74, 62, 0.06);
    overflow: hidden;
}

.examples h2 {
    font-family: 'Lora', serif;
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 12px;
    padding: 0 40px;
}

.examples-sub {
    text-align: center;
    color: var(--green-text);
    font-size: 15px;
    margin-bottom: 28px;
    padding: 0 40px;
}

/* Carousel wrapper: holds arrows + scrollable track */
.examples-carousel-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.examples-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 60px 16px;
}

.examples-carousel::-webkit-scrollbar {
    display: none;
}

/* Cards sit inside the flex track */
.example-card {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 16px rgba(45, 74, 62, 0.08);
    border: 0.5px solid var(--green-border);
    scroll-snap-align: start;
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.example-card-icon {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    line-height: 1;
    flex-shrink: 0;
    overflow: hidden;
}

.example-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.example-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--green-muted);
}

.example-card h4 {
    font-family: 'Lora', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1.3;
    margin: 0;
}

.example-card p {
    font-size: 13px;
    color: var(--green-text);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.example-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--green-mid) !important;
    text-decoration: none;
    margin-top: auto;
    display: inline-block;
}

.example-link:hover {
    text-decoration: underline;
}

.example-card-coming-soon {
    border-style: dashed;
    background: #fff;
}

.coming-soon-label {
    color: #9B8EC4;
}

.coming-soon-link {
    color: #B0A8CC !important;
    cursor: default;
}

/* Arrow buttons */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0.5px solid var(--green-border);
    background: white;
    color: var(--green-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(45, 74, 62, 0.12);
    transition: background 0.15s, box-shadow 0.15s;
    line-height: 1;
}

.carousel-arrow:hover {
    background: var(--green-light);
    box-shadow: 0 4px 12px rgba(45, 74, 62, 0.16);
}

.carousel-arrow-left  { left: 12px; }
.carousel-arrow-right { right: 12px; }

/* ── Footer ──────────────────────────────────────────────────
   Intentionally empty. The site footer is injected and styled by
   public/js/site-footer.js, on the page's own background.

   These rules used to paint a dark green band — and because this
   stylesheet is loaded by eight pages, three public and five
   authenticated, which footer you saw depended on whether a page
   happened to include this file rather than on who you were. Do not
   re-add a bare `footer` rule here. */

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 40px;
    }

    .hero-blob-1 { display: none; }
    .hero-blob-2 { display: none; }
    .hero-blob-3 { display: none; }

    .hero-content h1 {
        font-size: 30px;
    }

    .features,
    .examples {
        padding: 60px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .toolkit-sec,
    .commitment-sec,
    .testimonials-sec {
        padding: 52px 20px;
    }

    .toolkit-grid,
    .commitment-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .trust-strip {
        padding: 12px 20px;
        gap: 12px;
    }

    .examples {
        padding: 60px 0;
    }

    .example-card {
        flex: 0 0 260px;
    }

    .examples-carousel {
        padding: 8px 20px 16px;
    }

    .carousel-arrow {
        display: none;
    }

    nav {
        padding: 14px 20px;
    }

    .nav-link {
        display: none;
    }
}

/* ============================================================
   Founders / Who We Are section
   ============================================================ */

.founders-sec {
    background: var(--green-dark);
    padding: 40px 24px 72px;
    text-align: center;
}

.founders-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7ABDA0;
    margin: 0 0 12px;
}

.founders-title {
    font-family: 'Lora', serif;
    font-size: 28px;
    font-weight: 600;
    color: #E8F5EF;
    margin: 0 0 14px;
}

.founders-sub {
    font-size: 15px;
    color: #7ABDA0;
    max-width: 560px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

.founders-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(184, 216, 200, 0.25);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #B8D8C8;
    margin-bottom: 40px;
}

.founders-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 340px));
    gap: 20px;
    justify-content: center;
    max-width: 740px;
    margin: 0 auto;
}

.founder-card {
    perspective: 1200px;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    /* Sized for the QUOTE, not the old bio — the faces are position:absolute so
       they can't push this open themselves, and a testimonial runs a few lines
       longer than a job history. Keep the two min-heights below in step. */
    min-height: 400px;
    position: relative;
    outline: none;
}

.founder-card-inner {
    position: relative;
    width: 100%;
    min-height: 400px;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.founder-card.flipped .founder-card-inner {
    transform: rotateY(180deg);
}

.founder-card-face {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(184,216,200,0.15);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.founder-card-back {
    transform: rotateY(180deg);
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.founder-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.founder-card-back-empty {
    color: #8DB8A4;
    font-size: 14px;
    letter-spacing: 0.04em;
}

.founder-avatar {
    /* flex: none — the card face is a flex column, so without this the avatar is
       a shrinkable item and a long quote squashes the 72px circle into a strip.
       The old short bio never pushed hard enough to show it. */
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.founder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-name {
    font-family: 'Lora', serif;
    font-size: 18px;
    font-weight: 600;
    color: #E8F5EF;
    margin-bottom: 2px;
}

.founder-role {
    font-size: 12px;
    font-weight: 600;
    color: #7ABDA0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}

.founder-fam {
    font-size: 12px;
    color: #5A8A72;
    margin-bottom: 12px;
}

.founder-bio {
    font-size: 13px;
    color: #8DB8A4;
    line-height: 1.65;
    margin: 0;
}

/* The founder cards carry a TESTIMONIAL, not a CV. Set slightly larger and
   lighter than .founder-bio was, because a quote is the thing you want read —
   a work history could afford to be small print, a parent's own words can't.
   Left-aligned on purpose: centred prose is fine for two lines of role text and
   hard work for four lines of quote. */
.founder-quote {
    position: relative;
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #A8CDBB;
    text-align: left;
    font-style: italic;
}

.founder-quote-mark {
    position: absolute;
    left: -2px;
    top: -6px;
    font-family: 'Lora', serif;
    font-size: 34px;
    line-height: 1;
    color: #3E7A61;
    font-style: normal;
}

/* These cards flip, and nothing said so. The bio version got away with it
   because there was no reason to expect a back; a quote card invites the
   question "is that all?" — so answer it. Hidden from screen readers, which
   already get the button's aria-label. */
.founder-flip-hint {
    margin-top: auto;
    padding-top: 16px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4C806A;
}

/* ── Rotating parent quotes ───────────────────────────────────────────────
   One quote at a time, set LARGE — the whole section is the sentence, so the
   type does the work that a photo or a card border would do elsewhere. Sits
   directly under the dark founders section and stays on the same dark ground so
   the two read as one closing statement rather than two competing blocks.

   Content is data, not markup: see PARENT_QUOTES in index.html. An empty list
   leaves #pqSec at display:none, so this never renders a placeholder. */
.pq-sec {
    background: var(--green-dark);
    padding: 8px 24px 88px;
}

.pq-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

/* The crossfade. Opacity only — a transform would move the text under the
   reader's eye mid-sentence. */
.pq-quote,
.pq-attr {
    transition: opacity 0.26s ease;
}

.pq-sec.pq-fading .pq-quote,
.pq-sec.pq-fading .pq-attr {
    opacity: 0;
}

.pq-mark {
    display: block;
    font-family: 'Lora', serif;
    font-size: 64px;
    line-height: 0.6;
    color: #2F5F4B;
    margin-bottom: 14px;
}

.pq-quote {
    margin: 0;
    font-family: 'Lora', serif;
    /* Fluid, and capped so a long quote on a wide desktop doesn't become a
       billboard. min-height holds the section still across quotes of different
       lengths — without it the footer jumps on every rotation. */
    font-size: clamp(21px, 3.4vw, 33px);
    line-height: 1.45;
    font-weight: 500;
    color: #E8F5EF;
    min-height: 4.35em;
}

.pq-attr {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.pq-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #7ABDA0;
}

.pq-meta {
    font-size: 13px;
    color: #5A8A72;
}

.pq-dots {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 30px;
}

.pq-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 0;
    background: #35604D;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.pq-dot:hover { background: #4C806A; }
.pq-dot.is-active { background: #7ABDA0; transform: scale(1.25); }

/* Keyboard users need to see where they are; the dots are real buttons. */
.pq-dot:focus-visible {
    outline: 2px solid #7ABDA0;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .pq-sec { padding: 4px 20px 64px; }
    .pq-quote { min-height: 6.5em; }   /* the same words wrap to more lines */
}

/* Someone who asked for less motion gets no crossfade; the JS also stops the
   auto-advance for them and leaves the dots as the way through. */
@media (prefers-reduced-motion: reduce) {
    .pq-quote,
    .pq-attr { transition: none; }
    .pq-dot { transition: none; }
}

.founders-contact {
    margin-top: 36px;
    font-size: 13px;
    color: #5A8A72;
}

.founders-email {
    color: #B8D8C8;
    text-decoration: none;
}

.founders-email:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .founders-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Logged-in home page
   ============================================================ */

#loggedInHome {
    min-height: calc(100vh - 64px);
    background: var(--green-pale);
    padding: 40px 24px 64px;
}

.li-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.li-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.li-greeting {
    font-family: 'Lora', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1.2;
}

/* The sentence under the name. Sans and muted against the serif greeting, so
   it reads as the subtitle it is rather than a second heading — the
   prototype's `.mk-sub`. */
.li-greeting-sub {
    margin: 6px 0 0;
    color: var(--green-muted);
    font-size: 1rem;
    line-height: 1.45;
}


.li-dashboard-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--green-mid);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s;
    margin-top: 6px;
}

.li-dashboard-btn:hover {
    background: var(--green-primary);
}

/* Stats row */
.li-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.li-stat {
    background: #fff;
    border: 1px solid var(--green-border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

a.li-stat:hover {
    border-color: var(--green-mid);
    box-shadow: 0 2px 10px rgba(30,102,68,0.08);
}

.li-stat-num {
    display: block;
    font-family: 'Lora', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--green-mid);
    line-height: 1;
    margin-bottom: 6px;
}

.li-stat-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--green-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Period-over-period change badge under a pinned stat (e.g. vs last month). */
.li-stat-delta {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}
.li-stat-delta--up   { color: #1E6644; background: rgba(30,102,68,0.10); }
.li-stat-delta--down { color: #B4451F; background: rgba(180,69,31,0.10); }
.li-stat-delta--flat { color: var(--green-muted); background: rgba(0,0,0,0.05); }
.li-stat-delta--new  { color: #1E6644; background: rgba(30,102,68,0.10); }

/* Info (i) button + tap-to-reveal explanation on each stat tile. Every .li-stat
   carries a data-tooltip describing how its number is computed; parents tap the
   "i" to read it (works on touch, unlike hover). Buttons are injected by
   addStatInfoButtons() and toggled by a delegated click handler in home.html. */
.li-stat { position: relative; }
.li-stat-info {
    position: absolute; top: 7px; right: 7px;
    width: 18px; height: 18px; padding: 0; margin: 0;
    border: none; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Lora', Georgia, serif; font-style: italic;
    font-size: 12px; font-weight: 600; line-height: 1;
    color: var(--green-muted); background: rgba(30,102,68,0.08);
    cursor: pointer; z-index: 3; transition: background 0.15s, color 0.15s;
}
.li-stat-info:hover { background: rgba(30,102,68,0.16); color: var(--green-primary); }
.li-stat.info-open { z-index: 5; }
.li-stat.info-open::after {
    content: attr(data-tooltip);
    position: absolute; left: 8px; right: 8px; top: calc(100% + 6px);
    z-index: 30;
    background: #1f2d27; color: #fff;
    font-size: 0.72rem; font-weight: 500; line-height: 1.4;
    letter-spacing: normal; text-transform: none; text-align: left;
    padding: 9px 11px; border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    white-space: normal;
}

/* ── Engagement / streak row ──────────────────────────────── */

.li-engagement {
    display: none; /* shown via JS */
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.li-eng-card {
    background: var(--green-pale);
    border: 1.5px solid var(--green-border);
    border-radius: 14px;
    padding: 18px 14px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
}

.li-eng-card[data-tooltip] {
    cursor: default;
}

.li-eng-card[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--green-dark);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 7px 11px;
    border-radius: 8px;
    width: 200px;
    text-align: center;
    pointer-events: none;
    z-index: 10;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.li-eng-card[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--green-dark);
    pointer-events: none;
    z-index: 10;
}

.li-eng-card--active {
    background: linear-gradient(135deg, #FFF8F0, #FEF3E2);
    border-color: var(--accent-warm);
}

.li-eng-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 4px;
}

.li-eng-num {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--green-primary);
    line-height: 1;
}

.li-eng-card--active .li-eng-num {
    color: #C1440E;
}

.li-eng-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-top: 4px;
}

.li-eng-sub {
    font-size: 0.72rem;
    color: var(--green-subtle);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Achievement badges ───────────────────────────────────── */

.li-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.li-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 14px 10px;
    border-radius: 12px;
    border: 1.5px solid var(--green-border);
    min-width: 72px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.li-badge--unlocked {
    background: #fff;
    border-color: var(--green-mid);
    box-shadow: 0 2px 8px rgba(30,102,68,0.08);
}

.li-badge--locked {
    background: var(--green-pale);
    opacity: 0.55;
}

.li-badge-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.li-badge-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--green-dark);
    text-align: center;
    line-height: 1.2;
}

.li-badge--locked .li-badge-label {
    color: var(--green-muted);
}

.li-badge-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    background: var(--green-mid);
    color: #fff;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Next milestone progress bar */
.li-next-milestone {
    display: none; /* shown via JS */
    align-items: center;
    gap: 12px;
    background: var(--green-light);
    border: 1px solid var(--green-border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 44px;
    flex-wrap: wrap;
}

.li-milestone-text {
    font-size: 0.83rem;
    color: var(--green-text);
    white-space: nowrap;
}

.li-milestone-track {
    flex: 1;
    min-width: 100px;
    height: 8px;
    background: var(--green-border);
    border-radius: 100px;
    overflow: hidden;
}

.li-milestone-fill {
    height: 100%;
    background: var(--green-mid);
    border-radius: 100px;
    transition: width 0.4s ease;
}

.li-milestone-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green-muted);
    white-space: nowrap;
}

/* Tool cards */
.li-tools-heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--green-dark);
    margin: 0 0 10px;
}

/* Section divider — applied to top-level home.html sections */
.li-section {
    border-top: 1px solid var(--green-border);
    padding-top: 1.25rem;
    margin-top: 1.5rem;
}

.li-tools-heading.li-section {
    margin-bottom: 10px;
}

/* THE SAMPLES RAIL IS AN INVITATION, NOT A SECTION HEADING, so it is set
   lighter than its neighbours: Janet's prototype has it as a <p class="rail-head">
   — Lora at 1.05rem, regular weight — rather than the 1.55rem/600 every other
   heading on this page uses, and that difference is the whole reason it reads
   as a quiet lead-in to the rail instead of a peer of "Recently created".
   `font-weight` has to be stated because this is an <h2> and the prototype's
   was a <p>, so the browser's own bold would otherwise win.

   Scoped to the rail. Left on `.li-tools-heading` it would shrink Featured,
   Recently created and Your creator toolkit with it. */
#liGettingStartedWrap .li-tools-heading {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--green-primary);
}

.li-tools-carousel {
    position: relative;
}

.li-tools {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0 16px;
}

.li-tools::-webkit-scrollbar {
    display: none;
}

.li-tools-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--green-border);
    background: #fff;
    color: var(--green-mid);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(30,102,68,0.12);
    z-index: 2;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.li-tools-nav:hover {
    background: var(--green-mid);
    color: #fff;
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(30,102,68,0.12);
}

.li-tools-nav:active {
    transform: translateY(-50%);
}

.li-tools-nav[disabled] {
    opacity: 0.35;
    cursor: default;
}

.li-tools-prev { left: -16px; }
.li-tools-next { right: -16px; }

.li-tool-card {
    background: #fff;
    border: 1px solid var(--green-border);
    border-radius: 14px;
    padding: 16px 18px 18px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: 0;
    scroll-snap-align: start;
}

.li-tool-card:hover {
    border-color: var(--green-mid);
    box-shadow: 0 4px 16px rgba(30,102,68,0.1);
    transform: translateY(-2px);
}

.li-tool-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--green-pale);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.li-tool-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.li-tool-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 4px;
}

.li-tool-preview .li-tool-icon {
    margin-bottom: 0;
}

.li-tool-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-dark);
}

.li-tool-desc {
    font-size: 0.875rem;
    color: var(--green-muted);
    line-height: 1.5;
    flex: 1;
}

.li-tool-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.li-tool-cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-mid);
    margin-top: 4px;
    text-decoration: none;
    align-self: flex-start;
}

a.li-tool-cta:hover {
    text-decoration: underline;
}

/* Recent content carousel */
.li-recent-carousel {
    position: relative;
}

.li-recent {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0 16px;
    margin-bottom: 0;
}

.li-recent::-webkit-scrollbar { display: none; }

.li-recent-prev, .li-featured-prev, .li-gs-prev { left: -16px; }
.li-recent-next, .li-featured-next, .li-gs-next { right: -16px; }

/* The one sentence above the Getting started rail saying what it is for. Sits
   between the section header and the carousel, so its bottom margin is the
   rail's own top padding and it needs none of its own. */
/* NO MEASURE CAP. It was `max-width: 64ch`, the usual readability measure, and
   on the ~780px card that wrapped three lines across about 60% of the width
   with a visibly empty right-hand third — which reads as text that got cut off
   rather than as a comfortable line length. The sentence is two lines of
   supporting copy under a heading, not a paragraph somebody settles into, so
   the full width wins here. */
.li-shelf-intro {
    margin: -2px 0 2px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--green-muted);
}

.li-recent-card {
    position: relative;
    flex: 0 0 220px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--green-border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

/* Diagonal corner ribbons — match the storybook collection + All Content cards. */
.li-recent-card-ribbon {
    position: absolute; top: 10px; right: -38px; width: 140px;
    transform: rotate(45deg); text-align: center;
    font-size: 9px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.1em; padding: 3px 0; color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18); z-index: 5; pointer-events: none;
}
.li-recent-card-ribbon.ribbon-new         { background: linear-gradient(135deg, #2d6a4f 0%, #74c69d 100%); }
.li-recent-card-ribbon.ribbon-in-progress { background: linear-gradient(135deg, #4338ca 0%, #818cf8 100%); }
.li-recent-card-ribbon.ribbon-incomplete  { top: 26px; background: linear-gradient(135deg, #c98818 0%, #f5b840 100%); color: #3d2a08; }
.li-recent-card-ribbon.ribbon-rejected    { top: 22px; background: linear-gradient(135deg, #9b1c1c 0%, #dc2626 100%); }
/* "Set up now" — a Find Me scene that rendered but has no boxes placed yet.
   The hub's twin lives in activity-sheets.css (.shelf-card-ribbon.ribbon-setup),
   which home doesn't load; without a rule here the ribbon would inherit the base
   white-on-nothing and sit unreadable on a busy crowd scene. Same amber-on-dark
   as the hub so the two surfaces say "needs you" the same way, and the extra
   padding is deliberate: this is a CALL TO ACTION, not a status. */
.li-recent-card-ribbon.ribbon-setup {
    top: 24px;
    padding: 6px 0;
    background: linear-gradient(135deg, #b8770d 0%, #f5b840 100%);
    color: #2e1f05;
    font-size: 10px;
}
.li-recent-card-ribbon.ribbon-system      { background: linear-gradient(135deg, #6d28d9 0%, #a78bfa 100%); }
.li-recent-card-ribbon.ribbon-system.banner-feature { background: linear-gradient(135deg, #6d28d9 0%, #a78bfa 100%); }
.li-recent-card-ribbon.ribbon-system.banner-sample  { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.li-recent-card-ribbon.ribbon-system.banner-holiday { background: linear-gradient(135deg, #991b1b 0%, #f59e0b 100%); }
.li-recent-card-ribbon.ribbon-system.banner-free    { background: linear-gradient(135deg, #15803d 0%, #4ade80 100%); }

.li-recent-card:hover {
    border-color: var(--green-mid);
    box-shadow: 0 4px 16px rgba(30,102,68,0.1);
    transform: translateY(-2px);
}

.li-recent-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;   /* anchor for the audio badge */
}
/* "Has narration" indicator — shown on a storybook card when any page has a
   recording. Bottom-right, clear of the type badge / menu / kids CTA. */
.li-recent-audio-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    pointer-events: none;
}

.li-recent-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.li-recent-icon {
    font-size: 2.2rem;
}

.li-recent-body {
    padding: 10px 16px 32px; /* extra bottom padding leaves room for the absolute bottom row */
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.li-recent-type {
    /* Legacy text label — replaced by .li-recent-type-badge in the card
       markup. Kept defined so older renderers don't break. */
    display: none;
}

/* Small content-type icon in the top-left corner of the card. Mirrors the
   kids-card-badge pattern from /kids.html so the parent shelf reads the
   same visual language. The image area below provides the contrast it
   needs to be legible. */
/* Mini-thumbnail rendered inside .li-recent-img when the content type has
   no real cover image. Used by Flashcards (4 card emojis), Worksheets
   (4 representative items from the JSON — letters, digits, equations,
   emojis, or the practice word) and Word Searches (an actual letter grid
   slice — see .li-recent-preview-wordgrid below). The 2×2 grid layout
   reads as "deck of cards" / "worksheet items" at a glance compared to
   the lone fallback emoji. */
.li-recent-preview-grid {
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    padding: 4px;
    background: linear-gradient(135deg, #fdf6e8 0%, #f6e7d2 100%);
    box-sizing: border-box;
}
/* Single-cell preview (e.g. Worksheet "name_writing" with one practice
   word) renders as a full-size centered tile rather than a tiny 1/4. */
.li-recent-preview-grid--n1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
/* 2 cells: side-by-side row (avoids two empty bottom quadrants). */
.li-recent-preview-grid--n2 {
    grid-template-rows: 1fr;
}
.li-recent-preview-cell {
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;          /* card is ~220px wide → cell ~100px sq;
                                  ~3rem fills it like a real thumbnail */
    font-weight: 700;
    color: #5a3a14;
    line-height: 1;
    text-align: center;
    padding: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
/* Bigger cell for the single-cell case (e.g. the practice word). */
.li-recent-preview-grid--n1 .li-recent-preview-cell {
    font-size: 3.6rem;
    padding: 8px;
}

/* Worksheets pack short text (letters / numbers / equations) into the
   cells — at the bigger flashcard size, the cells looked overblown.
   Scope the cell sizing back down via the parent card's data-item-type. */
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-cell {
    font-size: 1.4rem;
}
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell {
    font-size: 4rem;
}

/* Keyed on data-item-SUBTYPE, not the display label. Worksheets are labelled by
   subtype on the card now ("Word Writing", "Letter Tracing"), so the old
   [data-item-type="Worksheet"] matched nothing and every rule in this group
   quietly stopped applying. The subtype is stable — it exists for the content
   menu's routing — so it is what these hang off. */
/* ...except the WORD-writing preview, which is the one worksheet cell whose
   content has no fixed length: it holds the whole practice word, where every
   other subtype holds a letter, a number or a short equation. At a flat 1.6rem
   anything past a short name wraps and then clips against `overflow: hidden`.
   Stepped down by length — the bucket is chosen in home-page.js because CSS
   cannot count characters, and the SIZES live here with every other size on
   this card. No data-fit attribute means no change, so nothing else moves. */
/* Bucket NAMES come from public/js/preview-cell-fit.js, which every shelf now
   shares — this card used to name them m/s/xs on its own thresholds. Four steps
   rather than three, because that module has a step for a 3-4 character word
   ("Sam") that this shelf did not. */
/* EACH STEP IS SIZED TO FILL THE CELL, not merely to survive it. The ladder
   used to be sized so that any word in a bucket would fit; since a bucket held
   a wide span of lengths, that meant sizing every word in it for the longest,
   and a four-letter name rendered at a third of the width it had available.
   Six steps now, and each is computed from the cell rather than eyeballed:
   the card is 220px, the grid pads 4px and the single cell 8px, so the word has
   ~194px; the dashed tracing face measures ~0.55em per character across real
   practice words (its widest, "Mommy", is 0.53), and the target is ~92% of the
   width so the word is not flush against the edge. 178 / (0.55 x chars). */
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell[data-fit="w4"] { font-size: 3.2rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell[data-fit="w6"] { font-size: 2.2rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell[data-fit="w9"] { font-size: 1.57rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell[data-fit="w12"] { font-size: 1.21rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell[data-fit="w16"] { font-size: 0.96rem; }
/* The floor: below this the word stops reading as the card's subject, which is
   worse than a slightly tight fit. Reached only at the 17-20 character end of
   what a Word Writing sheet accepts. */
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell[data-fit="wlong"] { font-size: 0.78rem; }
/* A name split in half reads as a rendering fault; the base cell turns on
   break-word for emoji rows, so any cell holding a WORD turns it back off. */
.li-recent-preview-cell[data-fit] { word-break: normal; overflow-wrap: normal; hyphens: none; }

/* A TRACING SHEET'S PREVIEW IS DRAWN IN THE SHEET'S OWN FACE.
   Print Clearly (dashed) is what the child traces over, so the card becomes a
   picture of the worksheet instead of the same word in a different alphabet —
   the page font has a two-storey `a` and a different `g`, which are exactly the
   letterforms the sheet is teaching.

   THE SIZE BUMP IS NOT DECORATION. This face carries far more of its em in
   ascender and descender headroom than a text face: x-height 0.330 of the em
   against ~0.503 for the page font. At the same font-size it renders about a
   third smaller, so without the ~1.5x it reads as a shrunken word in a big
   white cell. Applied to each step of the length ladder above rather than to a
   single size, because that ladder is what keeps a long name from wrapping.

   Weight 400: the face has one cut, and asking for 700 makes the browser
   synthesise a fake bold that thickens the dashes into a solid line — which
   loses the one thing the dashed variant exists to show. */
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-cell--trace {
    font-family: 'TraceGuideDashed', 'TraceGuide', system-ui, sans-serif;
    font-weight: 400;
    font-size: 2.1rem;
}
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace { font-size: 6.5rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace[data-fit="w4"]    { font-size: 5.2rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace[data-fit="w6"]    { font-size: 3.55rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace[data-fit="w9"]    { font-size: 2.53rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace[data-fit="w12"]   { font-size: 1.95rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace[data-fit="w16"]   { font-size: 1.55rem; }
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace[data-fit="wlong"] { font-size: 1.26rem; }
/* ── THE EXACT FIT, which is what actually fills the tile ─────────────────────
   The ladder above is still the fallback, and it is still the best a ladder can
   do: it knows roughly how LONG the word is, so each step has to be sized for
   its widest member and its narrowest member then renders at half the space it
   had. "Josephine" and "Mommy" are two steps apart and within 8 percent of the
   same width. That is the report — a practice word sitting small in a big tile.

   So the word is measured instead. The renderer sets --fit-em to its width in
   ems, read from the dashed face's own advance widths (preview-cell-fit.js);
   this divides the width the word may use by it. No layout pass: we know the
   face, so the width is arithmetic, not something to ask the browser for.

   The card is 220px and the word may use 178px, ~81% of it. The cap is the HEIGHT: this face puts ~1.15em in its line box, and a
   short word allowed to fill the width would overflow the tile's other axis. A
   two-letter word therefore does not reach the target, which is physics rather
   than a miss.

   Keyed on the attribute so a cell WITHOUT the property keeps the ladder —
   var()'s own fallback cannot do that job, since an invalid font-size does not
   fall back to the previous rule, it falls back to nothing. */
.li-recent-card[data-item-subtype="worksheet"] .li-recent-preview-grid--n1 .li-recent-preview-cell--trace[style*="--fit-em"] {
    font-size: min(9.5rem, calc(178px / var(--fit-em, 8)));
}

/* Word-search mini-grid — tiny monospace letter board so the card shows
   actual puzzle letters instead of a generic 🔤. Sized to fit any rows
   the API ships (clamped to 6×6 by buildWordSearchPreviewGrid). */
.li-recent-preview-wordgrid {
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    background: linear-gradient(135deg, #e8f2fd 0%, #d2e2f6 100%);
    box-sizing: border-box;
}
.li-recent-preview-wordrow {
    display: flex;
    flex: 1 1 0;
    gap: 2px;
    min-height: 0;
}
.li-recent-preview-letter {
    flex: 1 1 0;
    background: #fff;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.4rem;        /* 6×6 grid in ~210px → ~32px cells */
    text-transform: uppercase;
    color: #143a5a;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
/* Cells along the chosen "found" word in the shelf preview — same look as
   the parent word-search page's solved-word highlight, so the preview reads
   as a real solve in miniature. */
.li-recent-preview-letter--found {
    background: #facc15;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.li-recent-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    pointer-events: none;
}

.li-recent-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1.35;
    /* Clamp to 2 lines with an ellipsis so a long title can't push a card
       taller than its peers and ruin shelf alignment. The full title is
       carried in the element's `title` attribute for desktop hover; mobile
       users see it on the destination page. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.li-recent-date {
    font-size: 0.75rem;
    color: var(--green-muted);
}

/* Bottom row anchored at the same Y as the absolute hamburger menu
   (.ccm-wrap, bottom:6px right:6px on the card). Sharing the bottom anchor
   guarantees the date text and the ⋯ dots are vertically center-aligned. */
.li-recent-bottom {
    position: absolute;
    bottom: 6px;
    left: 16px;
    right: 48px;
    display: flex;
    align-items: center;
    height: 24px;
}

@media (max-width: 640px) {
    .li-greeting { font-size: 1.5rem; }
    .li-stats { grid-template-columns: repeat(2, 1fr); }
    .li-engagement { grid-template-columns: repeat(3, 1fr); }
    .li-recent-card { flex-basis: 70%; }
    .li-recent-prev, .li-featured-prev { left: 4px; }
    .li-recent-next, .li-featured-next { right: 4px; }
    .li-tools .li-tool-card { flex-basis: 85%; }
    .li-tools-prev { left: 4px; }
    .li-tools-next { right: 4px; }
    .li-top { flex-direction: column; }
    .li-dashboard-btn { width: 100%; justify-content: center; }
    .li-milestone-text { white-space: normal; }
    .li-next-milestone { flex-direction: column; align-items: flex-start; }
    .li-milestone-track { width: 100%; }
}

/* ============================================================================
   Toolkit grid — the "what's inside" section on the logged-out home.
   The carousel sells three ideas; this names the tools underneath them, so a
   first-time visitor can see the breadth instead of taking "multiple tools" on
   faith. Deliberately plain: it's a list to be scanned, not another card.
   ============================================================================ */
.toolkit-sec {
    padding: clamp(48px, 7vw, 84px) 20px;
    background: #FBFDFC;
}
.toolkit-inner {
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
}
.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(20px, 3vw, 40px);
    margin-top: clamp(28px, 4vw, 44px);
    text-align: left;
}
.toolkit-col-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1E6644;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 2px solid #DCEEE4;
}
.toolkit-col-emoji { font-size: 1.5rem; line-height: 1; }
.toolkit-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}
.toolkit-list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #4A6357;
}
.toolkit-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6FBF97;
}
.toolkit-list strong { color: #24493A; font-weight: 700; }
.toolkit-soon {
    margin: clamp(28px, 4vw, 40px) auto 0;
    max-width: 760px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #6C8A7B;
}

@media (max-width: 600px) {
    .toolkit-grid { text-align: left; }
}

/* ── An editor's one-line card blurb ──────────────────────────────────────
   Written in /admin/system-content, rendered under the title and above the
   "Customize for me" CTA. Deliberately quieter and lighter than the title — it
   is the second thing read on the card, never the first.
   RAISED FROM TWO LINES TO SIX when the limit went 85 -> 200. At roughly 33
   characters to a line on a 220px card, 85 was about two lines and 200 is about
   six — so left at two, the extra 115 characters an editor is now allowed to
   write would be invisible on every surface, which is the one way raising that
   limit could do nothing at all. Still CLAMPED rather than free-flowing: a card
   taller than its neighbours leaves a horizontal rail ragged, and the clamp is
   what keeps a one-word blurb and a full-length one in the same row. */
.li-recent-blurb {
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.35;
    color: var(--green-muted);
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
