/* Notes page. Shared nav/reveal/overlay rules live in style.css; buttons in components.css. */
.featured-section { padding: 2rem 10%; max-width: 1200px; margin: 0 auto; }
.featured-heading {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}
.notes-filters-section { padding: 2rem 10% 0; }
.notes-list-section { padding: 4rem 10% 8rem; max-width: 1200px; margin: 0 auto; }

.category-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.category-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.month-filter-group { display: flex; gap: 0.5rem; align-items: center; }
.month-filter {
    min-height: 44px;
    padding: 0.4rem 2.5rem 0.4rem 1.1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    /* Native control with our own chevron so it reads as a picker on every platform. */
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--surface-field);
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 1.15rem center, right 0.8rem center;
    background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
    background-repeat: no-repeat;
    color: var(--text);
    color-scheme: dark;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}
.month-filter:hover { border-color: rgba(255, 255, 255, 0.32); }
.month-clear { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.filter-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--p-base), var(--b-base));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.notes-empty {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px dashed var(--border-strong);
    border-radius: 24px;
    background: var(--surface-1);
}
.notes-empty:not([hidden]) { animation: notes-empty-in var(--dur-med) var(--ease-out); }
.notes-empty__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
.notes-empty__body { color: var(--text-muted); margin-bottom: 1.5rem; }
@keyframes notes-empty-in { from { opacity: 0; transform: translateY(6px); } }

/* ADMIN INLINE NOTES DELETION */
        .admin-delete-btn {
            position: absolute;
            top: 2rem;
            right: 2rem;
            background: rgba(255, 0, 85, 0.1);
            border: 1px solid rgba(255, 0, 85, 0.3);
            color: #ff0055;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.3s var(--ease-out);
            font-size: 0.85rem;
            z-index: 10;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }
        .admin-delete-btn:hover {
            background: rgba(255, 0, 85, 1);
            color: white;
            border-color: rgba(255, 0, 85, 1);
            transform: scale(1.1);
            box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
        }
        .admin-only-btn {
            display: none !important;
        }
        body.is-admin .admin-only-btn {
            display: inline-flex !important;
        }

        /* SPACIOUS SINGLE-COLUMN EDITORIAL LAYOUT */
        .notes-timeline {
            display: flex;
            flex-direction: column;
            gap: 4rem;
            max-width: 800px;
            margin: 0 auto;
        }

        .note-row {
            display: flex;
            flex-direction: column;
            padding: 3.5rem 4rem;
            background: rgba(255,255,255,0.015);
            border: 1px solid var(--glass-border);
            border-radius: 24px;
            transition: transform 0.4s var(--ease-out);
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(20px);
        }

        .note-row:hover {
            transform: translateY(-5px);
            background: rgba(255,255,255,0.03);
            border-color: rgba(255,255,255,0.1);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        }

        .note-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            padding-bottom: 1.5rem;
        }

        .note-date {
            font-size: 0.85rem;
            letter-spacing: 2px;
            color: rgba(255,255,255,0.4);
            font-weight: 600;
        }

        .note-category {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .note-category .label {
            margin: 0;
            line-height: 1;
            display: flex;
            align-items: center;
        }

        .category-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            box-shadow: 0 0 15px currentColor;
            opacity: 0.9;
            flex-shrink: 0;
        }

        /* 3D FEATURED CAROUSEL */
        .carousel-wrapper {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            position: relative;
            margin: 1rem 0 3rem 0;
            width: 100%;
        }

        .carousel-arrow {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform var(--dur-fast) var(--ease-out);
            z-index: 10;
        }

        .carousel-arrow:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: scale(1.1);
        }

        .carousel-container {
            position: relative;
            width: 800px;
            max-width: 100%;
            height: 350px;
            display: flex;
            align-items: center;
            justify-content: center;
            perspective: 1200px;
        }

        .carousel-card {
            position: absolute;
            width: 400px;
            max-width: 80%;
            height: 280px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 24px;
            padding: 2.5rem;
            transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
            display: flex;
            flex-direction: column;
            gap: 1rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            backdrop-filter: blur(10px);
            opacity: 0;
            pointer-events: none;
            z-index: 1;
            overflow: hidden;
        }

        .carousel-card.card-center {
            transform: translateX(0) translateZ(0) scale(1);
            opacity: 1;
            z-index: 5;
            pointer-events: auto;
            border-color: rgba(255, 255, 255, 0.2);
            box-shadow: 0 20px 50px rgba(0,0,0,0.6);
        }

        .carousel-card.card-left {
            transform: translateX(-55%) translateZ(-200px) scale(0.85);
            opacity: 0.4;
            z-index: 3;
            cursor: pointer;
            pointer-events: auto;
        }

        .carousel-card.card-right {
            transform: translateX(55%) translateZ(-200px) scale(0.85);
            opacity: 0.4;
            z-index: 3;
            cursor: pointer;
            pointer-events: auto;
        }

        .carousel-card:hover {
            border-color: rgba(255,255,255,0.2);
        }

        .carousel-card .note-title {
            font-size: 1.5rem;
            margin-bottom: 0;
            line-height: 1.2;
        }

        .carousel-card .note-body {
            font-size: 0.95rem;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        @media (max-width: 768px) {
            .carousel-card {
                width: 320px;
                padding: 1.5rem;
                height: 250px;
            }
            .carousel-card .note-title {
                font-size: 1.25rem;
            }
            .carousel-card .note-body {
                font-size: 0.85rem;
                -webkit-line-clamp: 3;
                line-clamp: 3;
            }
            .carousel-card.card-left {
                transform: translateX(-30%) translateZ(-200px) scale(0.8);
            }
            .carousel-card.card-right {
                transform: translateX(30%) translateZ(-200px) scale(0.8);
            }
        }

        .note-title {
            font-family: var(--font-display);
            font-size: 2.2rem;
            font-weight: 800;
            margin-bottom: 1.5rem;
            line-height: 1.2;
            letter-spacing: -0.5px;
            transition: text-shadow 0.4s;
        }

        .note-row:hover .note-title {
            text-shadow: 0 0 20px currentColor;
        }

        .note-body {
            font-size: 1.1rem;
            line-height: 1.8;
            color: rgba(255,255,255,0.6);
        }

        @media (max-width: 768px) {
            .note-row {
                padding: 2.5rem 1.5rem;
            }
            .note-title {
                font-size: 1.8rem;
            }
            .note-meta { flex-wrap: wrap; gap: 0.75rem; }
            .featured-section, .notes-filters-section { padding-left: 1.25rem; padding-right: 1.25rem; }
            .notes-list-section { padding: 3rem 1.25rem 6rem; }
            .carousel-wrapper { flex-wrap: wrap; gap: 0.75rem; }
            .carousel-container { order: 0; flex: 1 0 100%; height: 300px; }
            .carousel-arrow { order: 1; width: 44px; height: 44px; flex: none; }
            .carousel-card { max-width: 86%; }
        }
        .note-row[hidden], .carousel-arrow[hidden] { display: none; }
        @media (prefers-reduced-motion: reduce) {
            .note-row, .carousel-card, .carousel-arrow { transition: none; }
            .note-row:hover { transform: none; }
            .notes-empty:not([hidden]) { animation: none; }
        }
/* ---------- What's new (newest note leads the page) ----------
   The hero is shorter here so the lead sits in the first screen. The lead box reserves its height
   (title and body are clamped) while notes load, so filling it never pushes the page down. */
.hero.notes-hero { min-height: 0; padding-bottom: 2.5rem; }
.notes-lead-section { padding: 0 10% 2rem; max-width: 1000px; margin: 0 auto; }
.notes-admin-badge {
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto 1rem;
    width: fit-content;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 93, 115, 0.45);
    background: rgba(255, 93, 115, 0.1);
    color: var(--danger-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}
body.is-admin .notes-admin-badge { display: flex !important; }
.notes-lead {
    position: relative;
    /* Fits the tallest filled state (2-line title, 3-line text), so filling it never moves the page. */
    min-height: 22.5rem;
    padding: 2.25rem 2.5rem;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(199, 0, 255, 0.10), rgba(42, 101, 229, 0.08)), var(--dark);
    border: 1px solid var(--border-strong);
    overflow: hidden;
}
.notes-lead__kicker {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-text);
    margin-bottom: 1rem;
}
.notes-lead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.75rem; font-size: 0.8rem; color: var(--text-muted); }
.notes-lead__meta .category-indicator { display: inline-block; margin-right: 0.4rem; vertical-align: middle; }
.notes-lead__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notes-lead__text {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notes-lead__more { display: inline-block; margin-top: 1rem; color: var(--accent-text); font-weight: 700; font-size: 0.9rem; text-underline-offset: 3px; }
/* Placeholder lines while the newest note is being fetched (static: no shimmer loop). */
.notes-lead__skeleton { display: grid; gap: 0.8rem; }
.notes-lead__skeleton span { display: block; height: 1rem; border-radius: 6px; background: rgba(255, 255, 255, 0.06); }
.notes-lead__skeleton span:first-child { height: 1.8rem; width: 70%; }
.notes-lead__skeleton span:last-child { width: 55%; }
/* Entrance: once, on load, when the lead is filled (js adds .is-in on the next frame). It slides only: the text is
   the page's largest, and a fade from 0 held its first paint (LCP) back until the fade had run. */
@media (prefers-reduced-motion: no-preference) {
    .notes-lead__body.is-entering { transform: translateY(-14px); }
    .notes-lead__body.is-entering.is-in {
        transform: none;
        transition: transform 520ms cubic-bezier(0.23, 1, 0.32, 1);
    }
}
@media (max-width: 768px) {
    .notes-lead-section { padding: 0 1.25rem 1.5rem; }
    .notes-lead { padding: 1.75rem 1.5rem; min-height: 22.5rem; }
}

/* Featured carousel: cards are opaque so a side card never shows through the centre one. */
.carousel-card { background: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)), var(--dark); backdrop-filter: none; }
.carousel-card.card-left, .carousel-card.card-right { opacity: 0.45; }
/* Three lines fit the fixed card height (four were cut off mid-line). */
.carousel-card .note-body { -webkit-line-clamp: 3; line-clamp: 3; }
.carousel-card .note-meta { margin-bottom: 1rem; padding-bottom: 1rem; }
