/* Ancestor Math Explorer — slideshow teaching tool for LDS youth */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.85);
    --border: #2a2a4e;
    --text: #e0e0e0;
    --text-dim: #8888aa;
    --accent: #c9a96e;
    --accent-dim: #8a7d5a;
    --tree-green: #4a8c6f;
    --highlight: #e6c87d;
    --pop-red: #c9556e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ═══ ANIMATED BACKGROUND ═══ */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ═══ SLIDE CONTAINER ═══ */
.slide-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

.slide {
    display: none;
    animation: fadeIn 0.4s ease;
}

.slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes dotAppear {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

/* ═══ STAGGERED REVEAL ═══ */
.stagger-hide {
    opacity: 0;
    transform: translateY(12px);
}

.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ═══ SLIDE HEADER ═══ */
.slide-header {
    text-align: center;
    margin-bottom: 2rem;
}

.slide-number {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.slide-header h2 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.slide-header h2 strong {
    font-weight: 700;
    color: var(--accent);
}

.slide-header .lead {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

/* Title slide */
.title-slide .slide-header {
    margin-bottom: 1rem;
}

.title-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: popIn 0.6s ease 0.2s both;
}

.title-slide h1 {
    font-size: 2.6rem;
    font-weight: 300;
    margin-bottom: 0.35rem;
}

.title-slide h1 strong {
    font-weight: 700;
    color: var(--accent);
}

.title-slide .subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.title-slide .start-hint,
.start-hint {
    font-size: 0.8rem;
    color: var(--accent-dim);
    margin-top: 2rem;
}

.start-hint kbd {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.1rem 0.5rem;
    font-family: inherit;
    font-size: 0.75rem;
}

/* ═══ NAVIGATION ═══ */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(8px);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.nav-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(201, 169, 110, 0.08);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.nav-btn:disabled:hover {
    color: var(--text-dim);
    border-color: var(--border);
    background: none;
}

.nav-dots {
    display: flex;
    gap: 6px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.nav-dot:hover {
    background: var(--accent-dim);
    transform: scale(1.3);
}

.nav-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

.nav-dot.visited {
    background: var(--accent-dim);
}

/* ═══ CARDS ═══ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
}

.card-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

/* ═══ BIG NUMBER ═══ */
.big-reveal {
    text-align: center;
    padding: 2rem 1rem;
}

.big-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    text-shadow: 0 0 40px rgba(201, 169, 110, 0.2);
}

.big-label {
    font-size: 1rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* ═══ TEACHING TEXT ═══ */
.teach {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    max-width: 650px;
    margin: 0 auto;
}

.teach p {
    margin-bottom: 1rem;
}

.teach strong {
    color: var(--accent);
}

.teach .scripture {
    display: block;
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: rgba(201, 169, 110, 0.06);
    border-left: 3px solid var(--accent-dim);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--text);
}

.teach .scripture cite {
    display: block;
    font-style: normal;
    font-size: 0.8rem;
    color: var(--accent-dim);
    margin-top: 0.5rem;
}

.teach .question {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin: 1.5rem 0;
}

/* Fun fact callout */
.fun-fact {
    background: rgba(74, 140, 111, 0.1);
    border: 1px solid rgba(74, 140, 111, 0.25);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Faith-fact (timeline sidebar) */
.faith-fact {
    display: block;
    font-size: 0.7rem;
    color: var(--accent);
    font-style: italic;
    margin-top: 0.25rem;
    opacity: 0.85;
}

/* ═══ STEPPER BUTTONS ═══ */
.stepper-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1;
    padding: 0;
}

.stepper-btn:hover {
    background: rgba(201, 169, 110, 0.15);
    border-color: var(--accent);
    transform: scale(1.1);
}

.stepper-btn:active {
    transform: scale(0.95);
}

.stepper-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ═══ ACTIVITY BREAK (Slide 7) ═══ */
.activity-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem auto;
    max-width: 400px;
    text-align: left;
}

.activity-step {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.activity-step:hover {
    border-color: var(--accent-dim);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.12);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Activity timer */
.activity-timer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem auto;
    max-width: 280px;
    text-align: center;
}

.timer-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.timer-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.timer-display.timer-warn {
    color: var(--pop-red);
    animation: timerPulse 1s ease infinite;
}

.timer-display.timer-done {
    color: var(--tree-green);
    animation: none;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.timer-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.timer-btn {
    background: rgba(201, 169, 110, 0.1);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    padding: 0.4rem 1.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.timer-btn:hover {
    background: rgba(201, 169, 110, 0.2);
    border-color: var(--accent);
}

/* Slider hint (shared) */
.slider-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* Legend swatch */
.legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    vertical-align: middle;
}

/* ═══ INTERACTIVE ELEMENTS ═══ */
.slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-row input[type="range"] {
    flex: 1;
}

.slider-readout {
    min-width: 3rem;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    font-size: 1.2rem;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 3px solid var(--bg);
    transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 3px solid var(--bg);
}

input[type="number"] {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    width: 80px;
    font-variant-numeric: tabular-nums;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.15);
}

/* Result grid */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.result-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.result-box:hover {
    border-color: var(--accent-dim);
}

.result-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    display: block;
}

.result-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: block;
    margin-top: 0.25rem;
}

/* Tree visualization */
.tree-viz {
    margin-top: 1.5rem;
    text-align: center;
    overflow-x: auto;
}

.tree-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.tree-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--tree-green);
    display: inline-block;
    transition: background 0.2s;
    animation: dotAppear 0.3s ease both;
}

.tree-dot.you {
    background: var(--accent);
    width: 18px;
    height: 18px;
    box-shadow: 0 0 8px rgba(201, 169, 110, 0.4);
}

.tree-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}

/* ═══ COUSIN PRESETS ═══ */
.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.cousin-preset {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cousin-preset:hover {
    border-color: var(--accent-dim);
    color: var(--text);
    background: rgba(201, 169, 110, 0.08);
}

.cousin-preset.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(201, 169, 110, 0.12);
}

/* ═══ COUSIN DECODER ═══ */
.cousin-inputs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cousin-inputs .input-group {
    flex: 1;
    min-width: 180px;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
}

.cousin-result {
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid var(--accent-dim);
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
    margin-top: 1rem;
}

.cousin-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.cousin-explain {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ═══ COLLAPSE CHART ═══ */
.collapse-chart {
    margin-top: 1rem;
    max-height: 360px;
    overflow-y: auto;
}

.collapse-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(42, 42, 78, 0.5);
}

.collapse-row:last-child {
    border-bottom: none;
}

.collapse-gen {
    min-width: 3.5rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.collapse-year {
    min-width: 4rem;
    color: var(--accent-dim);
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem;
}

.collapse-bar-wrap {
    flex: 1;
    height: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 3px;
    overflow: hidden;
}

.collapse-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.collapse-bar.under { background: var(--tree-green); }
.collapse-bar.over { background: var(--pop-red); }

.collapse-count {
    min-width: 6rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.collapse-count.exceeded { color: var(--pop-red); }

/* Timeline toggle */
.timeline-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ═══ POPULATION TIMELINE (Slide 5) ═══ */
.pop-timeline {
    position: relative;
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.pop-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-dim), var(--tree-green), var(--accent));
}

.pop-event {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.6rem 0;
}

.pop-event::before {
    content: attr(data-year);
    position: absolute;
    right: 0;
    top: 0.6rem;
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.pop-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-dim);
    flex-shrink: 0;
    margin-top: 0.35rem;
    margin-left: -1.65rem;
    position: relative;
    z-index: 1;
    transition: transform 0.2s;
}

.pop-event:hover .pop-marker {
    transform: scale(1.4);
}

.pop-marker.flood { background: #5b9bd5; box-shadow: 0 0 6px rgba(91, 155, 213, 0.4); }
.pop-marker.star { background: var(--highlight); box-shadow: 0 0 8px rgba(230, 200, 125, 0.5); }
.pop-marker.collapse { background: var(--pop-red); }
.pop-marker.gold { background: var(--accent); box-shadow: 0 0 8px rgba(201, 169, 110, 0.4); }
.pop-marker.you {
    background: var(--tree-green);
    width: 14px;
    height: 14px;
    margin-left: -1.72rem;
    box-shadow: 0 0 10px rgba(74, 140, 111, 0.5);
}

.pop-detail {
    flex: 1;
    padding-right: 4.5rem;
}

.pop-detail strong {
    display: block;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.pop-detail span {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.pop-event[data-pop]::after {
    content: attr(data-pop);
    position: absolute;
    right: 0;
    bottom: 0.6rem;
    font-size: 0.6rem;
    color: var(--accent-dim);
    font-variant-numeric: tabular-nums;
}

/* ═══ PROPHET TIMELINE (Slide 6) ═══ */
.prophet-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 1rem 0;
}

.prophet-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.prophet-row:hover {
    border-color: var(--accent-dim);
    background: rgba(201, 169, 110, 0.04);
}

.prophet-row.highlight-row {
    border-color: var(--accent-dim);
    background: rgba(201, 169, 110, 0.06);
}

.prophet-row.adam-row {
    border-color: var(--tree-green);
    background: rgba(74, 140, 111, 0.06);
}

.prophet-gen {
    min-width: 3.2rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.prophet-info {
    flex: 1;
}

.prophet-info strong {
    display: block;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.prophet-info span {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.prophet-year {
    min-width: 4.5rem;
    text-align: right;
    font-size: 0.7rem;
    color: var(--accent-dim);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ═══ MINI STATS (Slide 10: Your 64) ═══ */
.mini-stat {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    text-align: center;
    min-width: 65px;
    transition: all 0.2s;
}

.mini-stat:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}

.mini-stat.highlight {
    border-color: var(--accent);
    background: rgba(201, 169, 110, 0.1);
}

.mini-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.mini-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
    line-height: 1.3;
}

/* ═══ ACTION CARDS (Slide 9) ═══ */
.action-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

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

.action-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.12);
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ═══ LINKS SECTION (Slide 9) ═══ */
.links-section {
    margin-top: 2rem;
}

.links-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 1rem;
}

.links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.75rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    gap: 0.25rem;
}

.link-card:hover {
    border-color: var(--accent);
    background: rgba(201, 169, 110, 0.06);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.link-card strong {
    color: var(--accent);
    font-size: 0.85rem;
}

.link-card span {
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Print button */
.print-btn {
    display: inline-block;
    background: rgba(201, 169, 110, 0.1);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.print-btn:hover {
    background: rgba(201, 169, 110, 0.2);
    border-color: var(--accent);
}

/* ═══ INFO / DISCLAIMER ═══ */
.info {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-top: 1rem;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 600px) {
    .slide-container { padding: 1rem; }
    .title-slide h1 { font-size: 2rem; }
    .title-icon { font-size: 2.5rem; }
    .slide-header h2 { font-size: 1.4rem; }
    .big-number { font-size: 2.5rem; }
    .teach { font-size: 0.95rem; }
    .teach .question { font-size: 1.1rem; }
    .result-grid { grid-template-columns: 1fr; }
    .links-grid { grid-template-columns: 1fr; }
    .cousin-inputs { flex-direction: column; gap: 0.75rem; }
    .tree-dot { width: 10px; height: 10px; }
    .tree-dot.you { width: 14px; height: 14px; }
    .nav-bar { padding: 0.5rem 1rem; }
    .pop-detail { padding-right: 3.5rem; }
    .pop-event::before { font-size: 0.55rem; }
    .action-card { padding: 0.75rem; }
    .mini-stat { min-width: 55px; padding: 0.4rem 0.5rem; }
    .mini-num { font-size: 1.1rem; }
    .stepper-btn { width: 28px; height: 28px; font-size: 0.9rem; }
    .timer-display { font-size: 2.5rem; }
    .activity-step { font-size: 0.85rem; }
    .slider-row { gap: 0.5rem; }
    .cousin-preset { font-size: 0.65rem; padding: 0.3rem 0.6rem; }
    .prophet-gen { font-size: 1rem; min-width: 2.5rem; }
    .prophet-info strong { font-size: 0.85rem; }
    .prophet-info span { font-size: 0.72rem; }
    .prophet-year { min-width: 3.5rem; font-size: 0.6rem; }
    .prophet-row { padding: 0.5rem 0.6rem; gap: 0.6rem; }
    .collapse-year { min-width: 3rem; font-size: 0.6rem; }
}

/* Projector-friendly: larger text on wide screens */
@media (min-width: 1200px) {
    .slide-header h2 { font-size: 2.2rem; }
    .title-slide h1 { font-size: 3rem; }
    .title-icon { font-size: 4rem; }
    .teach { font-size: 1.15rem; }
    .teach .question { font-size: 1.5rem; }
    .big-number { font-size: 4.5rem; }
    .result-number { font-size: 1.8rem; }
    .slider-readout { font-size: 1.5rem; }
    input[type="range"] { height: 10px; }
    input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
    input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; }
    .pop-detail strong { font-size: 1.1rem; }
    .pop-detail span { font-size: 0.9rem; }
    .action-card { padding: 1.25rem; font-size: 1.1rem; }
    .stepper-btn { width: 36px; height: 36px; font-size: 1.3rem; }
    .timer-display { font-size: 4rem; }
    .activity-step { font-size: 1.1rem; }
    .prophet-gen { font-size: 1.5rem; }
    .prophet-info strong { font-size: 1.1rem; }
    .prophet-info span { font-size: 0.88rem; }
}

/* ═══ PRINT STYLES ═══ */
.print-only {
    display: none;
}

@media print {
    /* Hide screen elements */
    body > *:not(.print-only) {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    body {
        background: white;
        color: #222;
        font-family: 'Georgia', 'Times New Roman', serif;
    }

    .print-page {
        padding: 0.5in;
        max-width: 10in;
        margin: 0 auto;
    }

    .print-title {
        text-align: center;
        font-size: 1.6rem;
        font-weight: 700;
        color: #222;
        margin-bottom: 0.15rem;
    }

    .print-subtitle {
        text-align: center;
        font-size: 0.75rem;
        color: #666;
        margin-bottom: 0.75rem;
    }

    /* Pedigree chart */
    .pedigree-chart {
        display: flex;
        gap: 0.25rem;
        align-items: stretch;
        min-height: 5.5in;
        margin-bottom: 0.5rem;
    }

    .ped-col {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        gap: 0.15rem;
    }

    .ped-col-0 { flex: 1.4; }
    .ped-col-1 { flex: 1.2; }
    .ped-col-2 { flex: 1; }
    .ped-col-3 { flex: 0.8; }
    .ped-col-4 { flex: 0.7; }

    .ped-box {
        border: 1.5px solid #999;
        border-radius: 4px;
        padding: 0.3rem 0.4rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
        page-break-inside: avoid;
    }

    .ped-me {
        border-color: #333;
        border-width: 2px;
        background: #f5f5f0;
    }

    .ped-label {
        font-size: 0.55rem;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .ped-line-write {
        border-bottom: 1px solid #ccc;
        height: 1.2rem;
        margin-top: 0.15rem;
    }

    .ped-line-write-sm {
        border-bottom: 1px solid #ccc;
        height: 0.8rem;
    }

    .ped-info {
        font-size: 0.5rem;
        color: #999;
        margin-top: 0.1rem;
    }

    .ped-sm .ped-label { font-size: 0.5rem; }
    .ped-xs { padding: 0.15rem 0.25rem; }
    .ped-xs .ped-label { font-size: 0.45rem; }
    .ped-xxs { padding: 0.1rem 0.2rem; }

    .print-gen-labels {
        display: flex;
        justify-content: space-between;
        font-size: 0.55rem;
        color: #999;
        text-align: center;
        margin-bottom: 0.5rem;
        padding: 0 0.15rem;
    }

    .print-gen-labels span {
        flex: 1;
    }

    .print-footer {
        border-top: 1px solid #ccc;
        padding-top: 0.4rem;
        margin-top: 0.25rem;
    }

    .print-challenge {
        font-size: 0.7rem;
        color: #444;
        text-align: center;
        margin-bottom: 0.3rem;
        line-height: 1.5;
    }

    .print-scripture {
        font-size: 0.65rem;
        font-style: italic;
        color: #666;
        text-align: center;
        margin-bottom: 0.2rem;
    }

    .print-stats {
        font-size: 0.6rem;
        color: #999;
        text-align: center;
    }

    @page {
        size: landscape;
        margin: 0.25in;
    }
}
