/* ============================================================
   WHITEOUT SURVIVAL — EVENT TRACKER v2
   Frozen Military Command Center aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&family=Barlow+Condensed:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    /* dark mode (default) */
    --bg-base:        #080b12;
    --bg-surface:     #0e1420;
    --bg-elevated:    #141c2e;
    --bg-card:        #111827;
    --bg-modal:       rgba(8, 11, 18, 0.96);

    --border:         rgba(110, 198, 240, 0.12);
    --border-accent:  rgba(110, 198, 240, 0.35);

    --text-primary:   #e8edf5;
    --text-secondary: #8da3bc;
    --text-muted:     #81ffe1;
    --text-heading:   #ffffff;

    --ice:            #6ec6f0;
    --ice-dim:        rgba(110, 198, 240, 0.15);
    --amber:          #e9a83c;
    --amber-dim:      rgba(233, 168, 60, 0.15);
    --green:          #4ade80;
    --green-dim:      rgba(74, 222, 128, 0.12);
    --red:            #f87171;

    --clip-corner:    polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
    --clip-corner-sm: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);

    --shadow-card:    0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(110,198,240,0.08);
    --shadow-modal:   0 24px 80px rgba(0,0,0,0.8);

    --font-display:   'Rajdhani', sans-serif;
    --font-mono:      'Share Tech Mono', monospace;
    --font-body:      'Barlow Condensed', sans-serif;

    --radius:         4px;
    --transition:     150ms ease;
}

/* ── Light Mode ─────────────────────────────────────────────── */
html.light {
    --bg-base:        #eef2f8;
    --bg-surface:     #f7f9fc;
    --bg-elevated:    #ffffff;
    --bg-card:        #ffffff;
    --bg-modal:       rgba(247, 249, 252, 0.98);

    --border:         rgba(15, 30, 60, 0.10);
    --border-accent:  rgba(15, 30, 60, 0.25);

    --text-primary:   #0f1e3c;
    --text-secondary: #3a5278;
    --text-muted:     #8099b8;
    --text-heading:   #080e1f;

    --ice:            #1e74b8;
    --ice-dim:        rgba(30, 116, 184, 0.10);
    --amber:          #c47f10;
    --amber-dim:      rgba(196, 127, 16, 0.10);
    --green:          #1a7a3e;
    --green-dim:      rgba(26, 122, 62, 0.10);
    --red:            #c93030;

    --shadow-card:    0 2px 12px rgba(15, 30, 60, 0.08), 0 0 0 1px rgba(15, 30, 60, 0.07);
    --shadow-modal:   0 16px 60px rgba(15, 30, 60, 0.20);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    min-height: 100dvh;
    transition: background var(--transition), color var(--transition);
}

/* Frost noise texture in dark mode */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 256px;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

html.light body::before { opacity: 0; }

/* ── Layout ─────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100dvh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    z-index: 200;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-brand-icon { font-size: 1.4rem; }

.sidebar-brand-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ice);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    flex: 1;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    position: relative;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 0;
    background: var(--ice);
    border-radius: 0 2px 2px 0;
    transition: width var(--transition);
}

.sidebar-nav-link:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.sidebar-nav-link.active {
    background: var(--ice-dim);
    color: var(--ice);
}

.sidebar-nav-link.active::before { width: 3px; }

.nav-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Sidebar Backdrop (mobile overlay) ─────────────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ── Hamburger Toggle ───────────────────────────────────────── */
.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition);
}

.sidebar-toggle:hover {
    border-color: var(--border-accent);
    color: var(--ice);
    background: var(--ice-dim);
}

/* ── Main Area ──────────────────────────────────────────────── */
.main-area {
    flex: 1;
    margin-left: 220px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.main-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.header-brand {}

.header-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-heading);
    line-height: 1;
}

.header-title span {
    color: var(--ice);
}

.header-sub {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    flex-shrink: 0;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    border: none;
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}

.theme-btn.active {
    background: var(--ice-dim);
    color: var(--ice);
}

.theme-btn:hover:not(.active) {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* ── Event Cards ────────────────────────────────────────────── */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-card {
    background: var(--bg-card);
    clip-path: var(--clip-corner);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.event-card:hover {
    border-color: var(--border-accent);
}

.event-card.status-active {
    border-color: rgba(233, 168, 60, 0.3);
}

.event-card.status-active:hover {
    border-color: rgba(233, 168, 60, 0.55);
}

.event-card.status-ended {
    opacity: 0.55;
}

/* Accent line at top */
.event-card-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--ice) 0%, transparent 100%);
    opacity: 0.5;
}

.event-card.status-active .event-card-accent {
    background: linear-gradient(90deg, var(--amber) 0%, transparent 100%);
    opacity: 1;
}

.event-card.status-ended .event-card-accent {
    background: var(--text-muted);
    opacity: 0.3;
}

.event-card-body {
    padding: 20px 24px 0;
}

/* ── Card Header Row ────────────────────────────────────────── */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.card-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.card-meta {
    flex: 1;
    min-width: 0;
}

.card-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-heading);
    line-height: 1.1;
}

.card-desc {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 3px;
}

.card-status-area {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

/* ── Status Badges ──────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
}

.status-badge-active {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(233, 168, 60, 0.3);
}

.status-badge-upcoming {
    background: var(--ice-dim);
    color: var(--ice);
    border: 1px solid rgba(110, 198, 240, 0.25);
}

.status-badge-ended {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    animation: pulse-anim 1.5s ease-in-out infinite;
}

@keyframes pulse-anim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* ── Category Badge Pills ───────────────────────────────────── */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.badge-pill {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* ── Countdown Clock ────────────────────────────────────────── */
.countdown-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.countdown-clock {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-mono);
    line-height: 1;
    flex-wrap: wrap;
}

.countdown-clock.size-lg { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.countdown-clock.size-md { font-size: clamp(1.1rem, 3.5vw, 1.4rem); }
.countdown-clock.size-sm { font-size: 0.95rem; }

.clock-segment {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
}

.clock-num {
    color: var(--text-heading);
    font-weight: 400;
    min-width: 2ch;
    text-align: right;
}

.event-card.status-active .clock-num {
    color: var(--amber);
    text-shadow: 0 0 12px rgba(233, 168, 60, 0.4);
}

.clock-unit {
    font-size: 0.55em;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-right: 6px;
}

.countdown-ended {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Progress Bar ───────────────────────────────────────────── */
.progress-wrap {
    margin: 14px 0 0;
    padding-bottom: 0;
}

.progress-track {
    height: 3px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--amber) 0%, #f0c060 100%);
    border-radius: 2px;
    transition: width 1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -1px;
    width: 4px;
    height: 5px;
    background: #fff8e0;
    border-radius: 1px;
    box-shadow: 0 0 6px var(--amber);
}

.event-card.status-ended .progress-fill {
    background: var(--text-muted);
}

.event-card.status-ended .progress-fill::after { display: none; }

/* ── Card Footer (actions row) ──────────────────────────────── */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px 16px;
    margin-top: 14px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.card-action-btn:hover {
    border-color: var(--border-accent);
    color: var(--ice);
    background: var(--ice-dim);
}

.card-action-btn.expand-active {
    border-color: rgba(110, 198, 240, 0.3);
    color: var(--ice);
    background: var(--ice-dim);
}

.btn-icon {
    display: inline-block;
    transition: transform 200ms ease;
    font-style: normal;
}

.btn-icon.rotated {
    transform: rotate(180deg);
}

/* ── Collapsed Subevent Summary ─────────────────────────────── */
.collapsed-summary {
    border-top: 1px solid var(--border);
    padding: 6px 0 2px;
}

.csummary-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 24px;
    font-family: var(--font-body);
    font-size: 0.8rem;
}

@media (max-width: 500px) {
    .csummary-row { padding: 6px 16px; }
}

.csummary-active  { color: var(--amber); }
.csummary-upcoming { color: var(--text-secondary); }

.csummary-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.csummary-name {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.csummary-sep {
    flex: 1;
    height: 1px;
    background: var(--border);
    min-width: 12px;
}

.csummary-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.csummary-clock {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.csummary-active  .csummary-clock { color: var(--amber); text-shadow: 0 0 10px rgba(233,168,60,0.35); }
.csummary-upcoming .csummary-clock { color: var(--ice); }

/* ── Subevents ──────────────────────────────────────────────── */
.subevents-outer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.subevents-outer.open {
    max-height: 2400px;
}

.subevents-inner {
    border-top: 1px solid var(--border);
    padding: 4px 0;
}

.subevent-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.subevent-row::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--ice);
    border-radius: 2px;
    transition: height var(--transition);
}

.subevent-row:hover::before { height: 60%; }
.subevent-row:hover { background: var(--bg-elevated); }

.subevent-row.status-active::before {
    height: 60%;
    background: var(--amber);
}
.subevent-row.status-active:hover { background: var(--amber-dim); }
.subevent-row.status-ended { opacity: 0.5; }

.subevent-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.subevent-meta {
    flex: 1;
    min-width: 0;
}

.subevent-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subevent-desc {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subevent-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.subevent-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Divider between rows */
.subevent-row + .subevent-row {
    border-top: 1px solid var(--border);
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: overlay-in 200ms ease;
    padding: 0;
}

@media (min-width: 640px) {
    .modal-overlay {
        align-items: center;
        padding: 24px;
    }
}

@keyframes overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-panel {
    background: var(--bg-modal);
    border: 1px solid var(--border-accent);
    clip-path: var(--clip-corner);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 580px;
    max-height: 90dvh;
    overflow-y: auto;
    animation: modal-in 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: var(--radius) var(--radius) 0 0;
}

@media (min-width: 640px) {
    .modal-panel {
        border-radius: var(--radius);
    }
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--ice) 0%, var(--amber) 60%, transparent 100%);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-icon { font-size: 2rem; flex-shrink: 0; }

.modal-title-wrap { flex: 1; }

.modal-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-heading);
    line-height: 1.1;
}

.modal-subtitle {
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.modal-close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
    margin-top: 2px;
}

.modal-close:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
    background: var(--bg-surface);
}

.modal-body {
    padding: 20px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-section-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.modal-overview {
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.modal-list li::before {
    content: '—';
    color: var(--ice);
    flex-shrink: 0;
    margin-top: 0;
}

.modal-list.tips li::before {
    content: '▸';
    color: var(--amber);
}

/* Scrollbar */
.modal-panel::-webkit-scrollbar { width: 4px; }
.modal-panel::-webkit-scrollbar-track { background: transparent; }
.modal-panel::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 2px; }

/* ── Countdown inside subevent row ──────────────────────────── */
.subevent-clock {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.subevent-row.status-active .subevent-clock {
    color: var(--amber);
}

/* ── Empty / ended state ────────────────────────────────────── */
.no-events {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* ── Page Heading ───────────────────────────────────────────── */
.page-heading {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Timeline Page ──────────────────────────────────────────── */
.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline-card {
    background: var(--bg-card);
    clip-path: var(--clip-corner-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
    border-color: var(--border-accent);
}

.timeline-card.status-past {
    opacity: 0.5;
}

.timeline-card-body {
    padding: 16px 20px 18px;
}

.timeline-card-header {
    margin-bottom: 12px;
}

/* ── Tips Page ──────────────────────────────────────────────── */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-card {
    background: var(--bg-card);
    clip-path: var(--clip-corner-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color var(--transition);
}

.tip-card:hover,
.tip-card.tip-card-open {
    border-color: var(--border-accent);
}

.tip-card-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--amber) 0%, transparent 100%);
    opacity: 0.5;
}

.tip-card-open .tip-card-accent {
    opacity: 1;
}

.tip-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-heading);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}

.tip-card-header:hover {
    background: var(--bg-elevated);
}

.tip-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-heading);
    transition: color var(--transition);
}

.tip-card-open .tip-card-title {
    color: var(--amber);
}

.tip-card-body-outer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tip-card-body-outer.open {
    max-height: 1400px;
}

.tip-card-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.tip-paragraph {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.tip-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 0;
}

.tip-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.45;
}

.tip-list li::before {
    content: '▸';
    color: var(--amber);
    flex-shrink: 0;
    margin-top: 1px;
}

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

/* Sidebar drawer (mobile) */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.sidebar-open { transform: translateX(0); }
    .sidebar-backdrop { display: block; }
    .sidebar-toggle { display: flex; }
    .main-area { margin-left: 0; }
}

@media (max-width: 500px) {
    .header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .card-header { flex-wrap: wrap; }
    .card-status-area { flex-direction: row; align-items: center; }
    .card-footer { gap: 8px; }
    .card-action-btn { font-size: 0.7rem; padding: 5px 10px; }
    .subevent-row { padding: 10px 16px 10px 20px; }
    .modal-header, .modal-body { padding-left: 16px; padding-right: 16px; }
    .event-card-body { padding: 16px 16px 0; }
}

/* ── Utility ────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}
