body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f7f7f7;
    color: #222;
}
header {
    background: #2c3e50;
    color: #fff;
    padding: 0.75rem 1.25rem 1rem;
}
.site-header-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.site-logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.site-logo-img { height: 70px; width: auto; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35)); }
@media (max-width: 600px) { .site-logo-img { height: 56px; } }
.site-title-wrap { flex: 1 1 auto; }
.site-title { margin: 0; font-size: 1.9rem; line-height: 1.1; font-weight: 600; letter-spacing: .5px; color: #ffffff; }
.site-subtitle { margin: 4px 0 0; font-size: .95rem; font-weight: 400; letter-spacing: .5px; color: #dbe4ef; }
@media (max-width: 600px) { .site-subtitle { font-size: .85rem; } }
nav.primary-nav { margin-left: auto; display: flex; gap: 1rem; flex-wrap: wrap; }
nav.primary-nav a { color: #fff; text-decoration: none; font-weight: 500; padding: 0.35rem 0.6rem; border-radius: 4px; transition: background .2s; font-size: .95rem; }
nav.primary-nav a:hover, nav.primary-nav a:focus { background: rgba(255,255,255,0.12); outline: none; }
nav.primary-nav a.active { background: rgba(255,255,255,0.28); }
main {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
h1, h2, h3 {
    color: #2c3e50;
}
footer {
    text-align: center;
    padding: 1rem 0;
    background: #eee;
    color: #888;
    margin-top: 2rem;
}

/* Map & Locations */
#leaflet-map {
    width: 100%;
    height: 500px;
    border: 2px solid #2c3e50;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}
#venue-maps { margin: 2rem 0 2.5rem; }
#venue-maps h2 { margin-top: 0; }
.venue-maps-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 1.25rem; }
.venue-maps-grid figure { margin: 0; background: #1e2a38; border: 1px solid #2e3d4d; border-radius: 8px; padding: 0.75rem 0.75rem 1rem; box-shadow: 0 2px 4px rgba(0,0,0,0.25); }
.venue-maps-grid img { width: 100%; height: auto; display: block; border-radius: 4px; }
.venue-maps-grid figcaption { font-size: 0.85rem; text-align: center; margin-top: 0.55rem; color: #d0d8e0; letter-spacing: 0.4px; }
#locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 1rem;
}

/* Now & Next Section */
#now-next { margin: 2.5rem 0 2rem; }
#now-next h2 { margin-top: 0; }
.now-next-wrapper { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); }
.now-next-wrapper .now-card, .now-next-wrapper .next-card {
    background: #1e2a38;
    color: #f5f9fc;
    border: 1px solid #2d3a48;
    padding: 1rem 1.1rem 1.2rem;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    overflow: hidden;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.now-next-wrapper .now-card:hover, .now-next-wrapper .next-card:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,0.35); border-color: #376086; }
.now-next-wrapper .now-card:focus-visible, .now-next-wrapper .next-card:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.now-next-wrapper h3 { margin: 0 0 .6rem; font-size: 1rem; letter-spacing: .5px; text-transform: uppercase; opacity: 1; color: #ffffff; }
.nn-time { font-size: .85rem; font-weight: 500; letter-spacing: 1px; color: #d4dee7; margin-bottom: .35rem; }
.nn-title { font-size: 1.05rem; font-weight: 600; line-height: 1.25; margin-bottom: .4rem; }
.nn-type { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; background: #2d4b6f; display: inline-block; padding: 2px 6px 3px; border-radius: 4px; margin-bottom: .4rem; }
.nn-location { font-size: .8rem; color: #b5c3cf; }
.now-content[data-state=loading], .next-content[data-state=loading] { font-style: italic; color: #b5c3cf; }
.now-next-note { font-size: .75rem; color: #4a5a67; margin-top: .75rem; }
/* Chronometer meta line */
.nn-meta { margin-top: .55rem; font-size: .7rem; letter-spacing: .5px; font-weight: 500; color: #92a6b6; opacity: .95; }
@media (max-width:600px){ .nn-meta { font-size: .68rem; } }
/* Progress bar */
.nn-progress { margin-top: .55rem; height: 6px; width: 100%; background: #2b3a47; border-radius: 4px; overflow: hidden; position: relative; transition: background .3s; }
.nn-progress-bar { height: 100%; background: linear-gradient(90deg,#3ba7ff,#1d72d8); width: 0%; transition: width .6s cubic-bezier(.4,.0,.2,1); }
.nn-progress.critical { background: #3a1f1f; }
.nn-progress.critical .nn-progress-bar { background: linear-gradient(90deg,#ff4949,#dc2626); animation: pulseCritical 1.4s ease-in-out infinite; }
@keyframes pulseCritical { 0%,100%{ filter: brightness(1); } 50%{ filter: brightness(1.3); } }
@media (max-width: 600px){
    .now-next-wrapper { grid-template-columns: 1fr; }
}
.highlight-pulse {
    animation: highlightFlash 2.4s ease-in-out 1;
    box-shadow: 0 0 0 0 rgba(255,193,7,0.8);
    position: relative;
}
/* Stronger emphasis for schedule deep-link target */
.event.highlight-pulse {
    border: 2px solid #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.35), 0 4px 16px rgba(0,0,0,0.25);
}
.event-title.active { background: #cfd9e4; }
/* Filter match highlight */
.event.filter-match {
    outline: 2px solid #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.25);
}
mark.schedule-match {
    background: #ffe28a;
    padding: 0 2px;
    border-radius: 2px;
}
@keyframes highlightFlash {
    0% { box-shadow: 0 0 0 0 rgba(255,193,7,0.0); background-color: #fff8e1; }
    20% { box-shadow: 0 0 0 6px rgba(255,193,7,0.45); background-color: #fffae8; }
    60% { box-shadow: 0 0 0 3px rgba(255,193,7,0.25); }
    100% { box-shadow: 0 0 0 0 rgba(255,193,7,0); background-color: #ffffff; }
}
.location-item {
    background: #f5f8fa;
    padding: 0.75rem 1rem 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e2e8ef;
}
.location-item h3 { font-size: 1.05rem; margin-top: 0; }

/* Custom Map Markers */
.map-icon-wrapper { background: transparent; }
.map-icon-marker { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.45)); 
    transition: transform 0.18s ease, filter 0.18s ease; 
}
.map-icon-marker svg { display: block; pointer-events: none; }
.leaflet-marker-icon:hover .map-icon-marker, .leaflet-marker-icon:focus .map-icon-marker {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.55));
}
.venue-marker {
    position: relative;
    animation: venuePulse 2.4s ease-in-out infinite;
}
@keyframes venuePulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.12); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}
/* Ensure hover still overrides pulse peak for clarity */
.leaflet-marker-icon:hover .venue-marker { animation: none; transform: scale(1.18); }


/* Collapsible Day Button */
.collapsible {
    background: #34495e;
    color: #fff;
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1rem;
    border-radius: 6px;
    margin-top: 1.5rem;
    transition: background 0.2s;
    box-shadow: 0 1px 4px rgba(44,62,80,0.08);
}
.collapsible.active, .collapsible:hover {
    background: #2c3e50;
}

/* Collapsible Day Content */
.content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
    background: #f4f7fa;
    border-radius: 0 0 8px 8px;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}
.content.show {
    max-height: none;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(44,62,80,0.05);
}

/* Event (Task) Styling */
.event {
    background: #eaf0f6;
    margin: 1rem 0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(44,62,80,0.04);
    padding: 0.5rem 1rem;
}
.event-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #34495e;
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dbe4ee;
    transition: background 0.2s;
    border-radius: 4px;
}
.event-title:hover {
    background: #dbe4ee;
}
.event-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
    background: #f9f9f9;
    border-left: 3px solid #eee;
    border-radius: 0 0 6px 6px;
    margin-bottom: 10px;
    padding: 0 1rem;
}
.event-details.show {
    max-height: none;
    padding: 10px 1rem;
}

    /* Hide session details by default */
    .session-details {
        padding-left: 15px;
        background: #f3f3f3;
        border-left: 2px solid #ddd;
        margin-bottom: 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .session-details.show {
        max-height: none;
        padding: 10px 0 10px 15px;
    }

/* Session Styling */
.session {
    background: #f0f4f8;
    margin: 0.5rem 0;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    box-shadow: 0 1px 2px rgba(44,62,80,0.03);
}

/* Speaker List (other pages) */
.speaker-list {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.speaker {
    background: #f0f4f8;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    flex: 1 1 200px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
input, textarea {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
button {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}
button:hover {
    background: #34495e;
}

/* Logo Bar */
/* Legacy logo-bar removed in favor of unified header */

/* Filter styles */
.filter-container {
    margin-bottom: 1em;
}

#schedule-filter {
    width: 100%;
    padding: 8px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    main {
        padding: 1rem;
    }
    .collapsible {
        font-size: 1rem;
        padding: 0.75rem;
    }
    .content {
        padding: 0.5rem;
    }
    .event {
        padding: 0.5rem;
    }
}

/* Link overlay to make entire card clickable */
#now-next .now-card, #now-next .next-card { position: relative; }
.nn-link-overlay { position:absolute; inset:0; text-decoration:none; color:inherit; z-index:5; }
#now-next .now-card:focus-within, #now-next .next-card:focus-within, #now-next .now-card:focus, #now-next .next-card:focus { outline:2px solid #5a2; outline-offset:2px; }
