* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #FAF9F6;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animation Base Styles */
.reveal { opacity: 0; transform: translateY(20px); }
.stagger-item { opacity: 0; transform: translateY(10px); }

/* Masking for Text Reveals */
.line-mask {
    overflow: hidden;
    display: block;
}

.word {
    display: inline-block;
    transform-origin: left bottom;
}

/* Pulse Animation */
@keyframes pulse-ring {
    0% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pulse-active {
    animation: pulse-ring 2s infinite;
    border-radius: 50%;
}

.slide {
    min-height: 100vh;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e5e5e5 20%, #e5e5e5 80%, transparent 100%);
    opacity: 0;
    animation: slideRule 0.8s ease-out forwards;
    animation-play-state: paused;
}

.slide.animate-rule::after {
    animation-play-state: running;
}

@keyframes slideRule {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.slide-dark {
    background: #000;
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    color: #fafafa;
}

.slide-dark .label { color: #f59e0b; }
.slide-dark table { border-color: #333; }
.slide-dark th { background: #1a1a1a; }
.slide-dark td { border-color: #333; }
.slide-dark tr:nth-child(even) { background: #111; }

.container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #888;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.label::before {
    content: "";
    width: 20px;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
}

h1 {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: clamp(32px, 6.5vw, 64px);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

h1 strong {
    font-weight: 600;
}

h2 {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 32px 0 16px;
}

p {
    font-size: 18px;
    color: #555;
    max-width: 700px;
    margin-bottom: 24px;
}

.slide-dark p { color: #999; }

p strong { color: #1a1a1a; }
.slide-dark p strong { color: #fff; }

.accent { color: #f59e0b; }

.inference {
    font-size: 9px;
    font-weight: 600;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 1px;
    vertical-align: super;
    margin-left: 2px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: 40px 0;
}

.box {
    padding: 40px;
    background: #f8f8f8;
    border-radius: 8px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0,0,0,0.05);
    will-change: transform, box-shadow; /* Optimized for animation */
}

/* Secondary accent for safety/compliance elements */
.box[style*="3b82f6"], 
.callout[style*="3b82f6"],
[style*="color: #3b82f6"] {
    color: #64748b !important;
}

.box[style*="border-left: 2px solid #3b82f6"] {
    border-left-color: #64748b !important;
}

.box:hover {
    transform: translateY(-8px);
    background: #fff;
    border-color: #f59e0b;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.box-dark {
    background: #0a0a0a;
    color: #fff;
}

.box-accent {
    background: #f59e0b;
    color: #000;
}

.box-accent:hover {
    background: #d97706;
    color: #fff;
}

/* Light box specifically for dark slides */
.box-light {
    background: #f8f8f8;
    color: #1a1a1a;
    border-color: #e5e5e5;
}

.box-light .box-label {
    color: #333;
    opacity: 1;
}

.box-light p, .box-light strong {
    color: #111 !important;
}

.slide-dark .box-light:hover {
    background: #fff;
    border-color: #f59e0b;
    color: #1a1a1a !important;
}

.slide-dark .box-light:hover .box-label,
.slide-dark .box-light:hover p,
.slide-dark .box-light:hover strong {
    color: #1a1a1a !important;
}

.box-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 8px;
}

.box-value {
    font-size: 24px;
    font-weight: 500;
}

.box-small {
    font-size: 14px;
    margin-top: 8px;
    opacity: 0.8;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 14px;
}

th {
    text-align: left;
    padding: 12px 16px;
    background: #f0f0f0;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

tr:nth-child(even) { background: #FAF9F6; }

tr.highlight-row {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    color: #1a1a1a;
}

.highlight-cell {
    font-weight: 600;
    color: #1a1a1a;
}

.slide-dark .highlight-cell { color: #fff; }

/* Fix visibility for highlight rows in dark slides */
.slide-dark tr.highlight-row,
.slide-dark tr.highlight-row td,
.slide-dark tr.highlight-row .highlight-cell {
    color: #1a1a1a !important;
}

.slide-dark tr.highlight-row .muted-cell {
    color: #666 !important;
}

.slide-dark .box:hover {
    transform: translateY(-8px);
    background: #161616;
    border-color: #f59e0b;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    color: #fff;
}

.slide-dark .box:hover p {
    color: #fff !important;
}

.slide-dark .box:hover strong {
    color: #fff !important;
}

.slide-dark .box:hover li {
    color: #fff !important;
}

.slide-dark .box:hover .box-label {
    color: #fff !important;
    opacity: 1;
}

.slide-dark .box-dark:hover {
    background: #1a1a1a;
    color: #fff;
}

.slide-dark .box-dark:hover .box-label {
    opacity: 0.8;
}

.slide-dark .box-dark:hover li::before {
    color: #f59e0b;
}

/* Fix visibility for light boxes in dark slides */
.slide-dark .box:not(.box-dark):not(.box-accent) {
    color: #1a1a1a;
}

.muted-cell {
    color: #888;
    font-size: 12px;
}

.danger-cell {
    color: #dc2626;
    font-size: 12px;
}

.callout {
    padding: 32px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    margin: 32px 0;
}

.callout-dark {
    background: #1a1a1a;
    border-color: #f59e0b;
}

.quote {
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: #333;
    max-width: 800px;
}

.slide-dark .quote { color: #ccc; }

.source {
    font-size: 13px;
    color: #888;
    margin-top: 16px;
}

.source a {
    color: #f59e0b;
    text-decoration: none;
}

.source a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
    margin: 24px 0;
}

li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #f59e0b;
}

/* Fix for overlapping arrows in case studies */
.box ul li {
    padding-left: 32px !important;
}

.winners-losers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 48px 0;
}

.winners, .losers {
    padding: 40px;
    border-radius: 8px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.winners {
    background: #f0fdf4;
    border-color: #dcfce7;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.05);
}

.losers {
    background: #fef2f2;
    border-color: #fee2e2;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.05);
}

.winners:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.1);
    border-color: #059669;
}

.losers:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
}

.winners h4, .losers h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    font-weight: 700;
}

.winners h4 { color: #059669; }
.losers h4 { color: #dc2626; }

.prediction-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.prediction-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.prediction-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.prediction-desc {
    display: block;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.winners li::before { 
    content: "↑";
    font-weight: 700;
    color: #059669; 
}

.losers li::before { 
    content: "↓";
    font-weight: 700;
    color: #dc2626; 
}

.predictions-table td:first-child {
    font-weight: 500;
}

.confirm-cell {
    color: #059669;
    font-size: 12px;
}

.falsify-cell {
    color: #dc2626;
    font-size: 12px;
}

svg text {
    font-family: 'Inter', system-ui, sans-serif;
}

/* Monospace for code blocks */
pre, code, .gate-flow, .callout[style*="monospace"] {
    font-family: 'JetBrains Mono', 'Menlo', 'Monaco', 'Courier New', monospace !important;
}

.diagram-container {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 32px;
    margin: 32px 0;
}

.slide-dark .diagram-container {
    background: #111;
    border-color: #333;
}

.diagram-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 16px;
}

.ref-table {
    font-size: 14px;
}

.ref-table td {
    padding: 16px;
    vertical-align: top;
}

.ref-table td:first-child {
    font-weight: 600;
    color: #666;
    width: 200px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.slide-dark .ref-table td:first-child {
    color: #888;
}

.ref-table a {
    color: #f59e0b;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    display: inline-block;
    line-height: 1.6;
}

.ref-table a:hover {
    color: #d97706;
    border-bottom-color: #d97706;
    transform: translateX(2px);
}

.slide-dark .ref-table a {
    color: #f59e0b;
}

.slide-dark .ref-table a:hover {
    color: #fbbf24;
}

.nav {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 100;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    letter-spacing: 0.05em;
    display: none; /* Hidden by default, shown by JS */
}

.nav-counter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-counter .current {
    color: #f59e0b;
    font-size: 16px;
    font-weight: 600;
}

.nav-counter .divider {
    color: #444;
}

.nav-counter .total {
    color: #666;
}

/* Keep old nav links hidden but functional for anchor navigation */
.nav a {
    display: none;
}

/* Removed .final-claim styles - content now sits on dark slide background */

/* Laggard fade effect - applied after animation completes */
.laggard-fade {
    opacity: 0.6 !important;
}

/* Deliverables Section - Code Blocks */
.code-block {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e0e0e0;
    background: #1a1a1a;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
    border: 1px solid #333;
}

/* Deliverables Section - Lists */
.deliverables-list {
    font-size: 14px;
    color: #555;
    margin: 12px 0 0 20px;
    line-height: 1.7;
    list-style-type: none;
}

.deliverables-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
}

.deliverables-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #f59e0b;
}

.deliverables-list li strong {
    color: #000;
}

/* Validator Section - Technical Rigor */
.validator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.validator-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    gap: 16px;
    transition: border-color 0.3s ease;
}

.validator-card:hover {
    border-color: #f59e0b;
}

.validator-number {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    flex-shrink: 0;
}

.validator-content {
    flex: 1;
}

.validator-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.validator-metric {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.validator-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .slide { padding: 40px 24px; }
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    .two-col { grid-template-columns: 1fr; }
    .winners-losers { grid-template-columns: 1fr; }
    .deliverables-grid { grid-template-columns: 1fr !important; }
    .deliverables-grid > .box { grid-column: span 1 !important; }
    .code-examples-grid { grid-template-columns: 1fr !important; }
    .code-block { font-size: 12px; padding: 12px; }
    .validator-grid { grid-template-columns: 1fr; }
    .validator-card { padding: 20px; }
    .validator-number { font-size: 24px; }
}