* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #fdfcf7;
    --color-text: #2d2d2d;
    --color-text-light: #6b6b6b;
    --color-accent: #d97706;
    --color-line: #3d3d3d;
    --color-border: #e5e3db;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', 'Arial', sans-serif;
    background-color: var(--color-bg);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0,0,0,.015) 1px, rgba(0,0,0,.015) 2px),
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0,0,0,.015) 1px, rgba(0,0,0,.015) 2px);
    background-size: 100% 100%;
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.015) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 0, 0, 0.01) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 1;
}

#background-doodle {
    position: absolute;
    top: 140px;
    right: 40px;
    opacity: 0.3;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
    transform: rotate(8deg);
}

#background-doodle-left {
    position: absolute;
    top: 120px;
    left: 40px;
    opacity: 0.3;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
    transform: rotate(-12deg);
}

/* Main Navigation */
.main-nav {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 20px;
    z-index: 100;
}

.nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-decoration: none;
    border-bottom: none;
    transition: none;
    opacity: 0.6;
}

.nav-link:hover {
    color: var(--color-accent);
    background: none;
    border-bottom: none;
    opacity: 1;
}

header {
    text-align: center;
    position: relative;
    padding: 20px 40px 20px 40px;
}

#header-canvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 0;
}

header h1 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
    color: var(--color-text);
    position: relative;
    z-index: 1;
    line-height: 1.1;
}

.header-subtitle {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 18px;
    color: var(--color-text-light);
    font-weight: 400;
    margin: 0 auto 8px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.rl-subtitle {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    justify-items: center;
    gap: 12px;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: #d97706;
    margin: 0 auto 24px;
    max-width: 400px;
}

.rl-text-header {
    white-space: nowrap;
    grid-column: 2;
}

.rl-line-left-header {
    grid-column: 1;
    display: block !important;
    width: 40px;
    height: 40px;
}

.rl-line-right-header {
    grid-column: 3;
    display: block !important;
    width: 40px;
    height: 40px;
}

.subtitle {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 24px;
    color: var(--color-text-light);
    font-weight: 400;
    line-height: 1.4;
    margin: 16px auto 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.scroll-prompt {
    text-align: center;
    margin: 30px auto 60px;
    position: relative;
    z-index: 1;
}

.scroll-prompt p {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
}

.badges {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin: 20px auto 20px;
}

.badge {
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    background: #fffbeb;
}

/* Full-screen section wrapper */
.section-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px; /* Reduced from 60px to help fit arrow in viewport */
    box-sizing: border-box;
    scroll-margin-top: 40px;
}

/* Reusable scroll arrow container */
.scroll-arrow-container {
    text-align: center;
}

/* Position arrow at bottom when inside a section-screen */
.section-screen > .scroll-arrow-container {
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 20px;
}

.scroll-arrow-container .scroll-arrow {
    display: inline-block;
    animation: bounce 2s infinite;
}

/* Back to top arrow (different style) */
.scroll-arrow-container.back-to-top {
    margin-top: 60px;
    margin-bottom: 40px;
}

.scroll-arrow-container .scroll-arrow-up {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scroll-arrow-container .scroll-arrow-up:hover {
    opacity: 1;
}

/* Big RL text with decorative lines */
.rl-big {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    justify-items: center;
    gap: 20px;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    color: #d97706;
    margin: 30px auto;
    max-width: 600px;
}

.rl-text {
    white-space: nowrap;
    grid-column: 2;
}

.rl-line-left {
    grid-column: 1;
    display: block !important;
    width: 60px;
    height: 60px;
}

.rl-line-right {
    grid-column: 3;
    display: block !important;
    width: 60px;
    height: 60px;
}

.badge:nth-child(1) {
    transform: rotate(-2deg);
}

.badge:nth-child(3) {
    transform: rotate(2.5deg);
}

.badge canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.badge span {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-accent);
    position: relative;
    z-index: 1;
    text-transform: lowercase;
}

/* SVG Flip Card Component */
.svg-flip-card {
    width: 100%;
    max-width: 600px;
    margin: 24px auto;
    perspective: 1000px;
    cursor: pointer;
}

.svg-flip-card-inner {
    position: relative;
    width: 100%;
    min-height: 300px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.svg-flip-card.flipped .svg-flip-card-inner {
    transform: rotateY(180deg);
}

.svg-flip-card-front,
.svg-flip-card-back {
    position: absolute;
    width: 100%;
    min-height: 300px;
    backface-visibility: hidden;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.svg-flip-card-front {
    display: flex;
    flex-direction: column;
}

.svg-flip-card-back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.svg-flip-card-label {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 14px;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.svg-flip-card-code {
    flex: 1;
    background: #fafaf9;
    border-radius: 4px;
    padding: 16px;
    overflow: auto;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.svg-flip-card-code pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.svg-flip-card-render {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-flip-card-render svg {
    max-width: 100%;
    max-height: 400px;
}

.svg-flip-card-hint {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 12px;
    color: var(--color-text-light);
    text-align: center;
    margin-top: 8px;
}

/* Simple syntax highlighting */
.svg-code-tag { color: #0066cc; }
.svg-code-attr { color: #d97706; }
.svg-code-value { color: #22863a; }
.svg-code-comment { color: #6b6b6b; font-style: italic; }

.scroll-arrow-link {
    display: block;
    cursor: pointer;
    text-decoration: none;
    margin-top: 40px;
}

#scroll-arrow {
    display: block;
    margin: 0 auto;
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Global link styles */
a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
    transition: all 0.2s;
}

a:hover {
    background: var(--color-accent);
    color: white;
}

a:visited {
    color: var(--color-accent);
}

/* Remove underline from scroll arrows */
.scroll-arrow-container a,
a:has(.scroll-arrow) {
    border-bottom: none;
    background: none;
}

.scroll-arrow-container a:hover,
a:has(.scroll-arrow):hover {
    background: none;
}

/* Custom focus styles - match the hand-drawn aesthetic */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px dashed var(--color-accent);
    outline-offset: 4px;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px dashed var(--color-accent);
    outline-offset: 4px;
}

/* SVG drawing animation */
.target-svg-display .svg-draw-element {
    opacity: 0;
    transform: scale(0.8);
}

.target-svg-display.in-view .svg-draw-element {
    animation: drawElement 0.6s ease-out forwards;
}

@keyframes drawElement {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animated-sheep {
    width: 100%;
    height: 100%;
}

#timeline-canvas {
    position: absolute;
    top: 500px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
    display: none; /* Hidden for centered vertical layout */
}

.timeline {
    position: relative;
    padding: 0 0;
    z-index: 1;
}

/* Base entry styles */
.entry {
    max-width: 700px;
    width: 100%;
    margin: 0 auto 20px;
    position: relative;
    background: white;
    padding: 32px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* List styles within entries */
.entry ol,
.entry ul {
    margin: 20px 0;
    padding-left: 40px;
    line-height: 1.8;
}

.entry ol {
    list-style-type: decimal;
}

.entry ul {
    list-style-type: disc;
}

.entry ol li,
.entry ul li {
    margin-bottom: 12px;
    color: var(--color-text);
}

.entry ol ol,
.entry ul ul,
.entry ol ul,
.entry ul ol {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Layout type: card (default) */
.entry.layout-card {
    max-width: 700px;
    background: white;
    padding: 32px;
}

/* Layout type: hero - full-width with accent background */
.entry.layout-hero {
    max-width: 100%;
    background: #ffffff;
    padding: 30px 40px;
    box-shadow: none;
    transform: none !important;
}

.entry.layout-hero .date {
    text-align: center;
}

.entry.layout-hero h2 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 24px;
}

.entry.layout-hero p {
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: center;
    font-size: 20px;
}

.entry.layout-hero a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
    transition: all 0.2s;
}

.entry.layout-hero a:hover {
    background: var(--color-accent);
    color: white;
}

/* Layout type: minimal - clean text, no card */
.entry.layout-minimal {
    background: transparent;
    box-shadow: none;
    padding: 20px 40px;
    max-width: 650px;
    transform: none !important;
}

.entry canvas {
    display: none;
}

/* Override: show character canvases */
.character-wrapper canvas {
    display: block !important;
    position: static !important;
}

/* Override: show robot canvas */
#robot-figure {
    display: block !important;
    position: static !important;
}

/* Layout type: wide - wider card for important content */
.entry.layout-wide {
    max-width: 900px;
    padding: 24px;
    transform: none !important;
}

/* Styled ordered list in wide cards */
.entry.layout-wide ol {
    background: rgba(217, 119, 6, 0.05);
    border-left: 4px solid #d97706;
    padding: 30px 30px 30px 50px;
    margin: 30px 0;
    border-radius: 8px;
    position: relative;
}

.entry.layout-wide ol li {
    margin: 16px 0;
    padding-left: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.entry.layout-wide ol li::marker {
    color: #d97706;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Model label tag */
.model-label {
    background: var(--color-accent);
    color: white;
    padding: 6px 14px;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.2rem;
    width: 300px;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    margin-left:140px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LLM Output Card Styling - matches hand-drawn aesthetic */
.llm-output-card {
    background: #fafaf9 !important;
    position: relative;
    padding: 10px !important;
}

/* LLM output text styling - simple monospace typewriter look */
.llm-output-text {
    font-family: 'Courier New', 'Monaco', monospace !important;
    font-size: 1.2rem !important;
    line-height: 1.7 !important;
    color: #3d3d3d !important;
    background: white !important;
    padding: 30px !important;
    border: 2px dashed #d4d4d4 !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    border-radius: 4px !important;
}

/* LLM review with image layout */
.llm-review-with-image {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.review-sheep-image {
    width: 120px;
    height: auto;
    flex-shrink: 0;
    margin-top: 10px;
}

.model-label .chat-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.model-label .chat-link::after {
    content: '↗';
    font-size: 0.8rem;
}

.model-label .chat-link:hover {
    text-decoration: underline;
}

/* Intro card specific styling */
.entry.intro-card {
    position: relative;
    padding: 60px 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.entry.intro-card .intro-text {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.entry.first-card .intro-date {
    font-size: 1.4rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.entry.first-card p {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2rem;
}

.entry.first-card .question {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-accent);
    padding-bottom: 20px;
    padding-left: 20px;
    text-align: center;
}

.entry.intro-card .highlight {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 2rem;
}

.entry.intro-card a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
    transition: all 0.2s;
}

.entry.intro-card a:hover {
    background: var(--color-accent);
    color: white;
}

/* Comic panel layout */
.comic-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 60px;
    margin: 3rem 0;
    padding: 2rem 3rem;
    border-radius: 8px;
    position: relative;
}

.character-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.character-section canvas {
    display: block;
    flex-shrink: 0;
}

.character-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.character-label {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text-light);
    text-align: center;
}

/* Comic text styling */
.comic-text {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    text-align: left;
}

/* Dialogue card - contains both request and response */
article.entry.dialogue-card {
    padding: 0 20px 20px 0;
    margin: 40px 0 0 100px;
    text-align: center;
}

/* Thought bubble card */
.thought-card {
    padding: 40px 20px;
}

.thought-bubble-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    position: relative;
}

.thought-bubble-container canvas#yoav-thinking {
    position: relative;
    top: -20px;
    left: -120px;
    z-index: 2;
}

.entry.thought-card .thought-bubble-container canvas {
    display: block !important;
    flex-shrink: 0;
}

.thought-bubble {
    position: relative;
    padding: 0;
    max-width: 800px;
    width: 800px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thought-bubble canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 0;
    display: block !important;
    pointer-events: none;
}

.thought-bubble p {
    margin: 0;
    padding: 50px;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.5;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Yoav request section (in minimal card) */
.yoav-request {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

/* Qwen response section (bigger, side-by-side) */
.qwen-response {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 50px;
    margin-top: 20px;
}

.qwen-response .character-wrapper {
    flex-shrink: 0;
}

/* Robot with output box layout */
.robot-with-output {
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0;
}

.robot-output-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    min-height: 300px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Dialogue section with vertical layout */
.dialogue-section {
    max-width: 100%;
}

.dialogue-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-right: 50px;
    margin-bottom: 20px;
}

/* Compact dialogue - smaller size */
.compact-dialogue .yoav-request {
    gap: 15px;
    margin-bottom: 0;
}

.compact-dialogue .comic-text {
    font-size: 0.95rem;
}

.entry.compact-robot,
.entry.comparison-cards {
    max-width: 100%;
    margin-bottom: 10px; /* Reduced spacing for sheep comparison */
}

.compact-robot .robot-output-wrapper {
    gap: 30px;
    max-width: 950px;
    min-height: 200px;
    display: flex;
    align-items: center;
}

.compact-robot .output-box {
    width: auto;
    flex: 1;
    height: 320px;
    display: flex;
    align-items: stretch;
    padding: 20px 30px;
    gap: 0;
}

/* Split output box for target vs result */
.split-output-box {
    position: relative;
}

.output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.result-panel {
    flex: 1;
}

.panel-label {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 10px;
    padding: 0 10px;
}

.target-svg-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.target-svg-display img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
}

/* Target panel as separate white card */
.target-panel-outside {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 50%;
    position: relative;
}

/* Removed opacity transition effect
.target-panel-outside::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
    border-radius: 16px;
    box-shadow:
        inset 0 0 30px 10px rgba(253, 252, 247, 0.8),
        inset 0 0 20px 5px rgba(253, 252, 247, 0.5);
}
*/

.target-panel-outside .panel-label {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.target-panel-outside .target-svg-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Add canvas for sketchy border on target panel */
.target-panel-outside canvas.target-box-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: 16px;
    display: block !important;
}

/* Sheep comparison section */
.sheep-comparison {
    max-width: 100%;
}

.sheep-comparison-container {
    display: flex;
    gap: 50px;
    justify-content: center;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.robot-watching {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheep-comparison-wrapper {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
}

.sheep-comparison-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 320px;
    max-width: 400px;
    height: 350px;
    background: rgba(255, 255, 255, 0.7);
    padding: 30px 25px;
    border-radius: 16px;
    position: relative;
}

/* Removed opacity transition effect
.sheep-comparison-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
    border-radius: 16px;
    box-shadow:
        inset 0 0 30px 10px rgba(253, 252, 247, 0.8),
        inset 0 0 20px 5px rgba(253, 252, 247, 0.5);
}
*/

.sheep-comparison-card canvas.sheep-card-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: 16px;
    display: block !important;
}

.comparison-sheep-image {
    width: auto;
    max-width: 200px; /* Reduced from 250px for desktop */
    height: 160px; /* Reduced from 200px for desktop */
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.sheep-panel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Reduced from 15px */
}

.sheep-label {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.5rem;
    line-height: 1.4;
    text-align: center;
    color: var(--color-accent) !important;
    margin: 0 !important;
    font-weight: 600;
}

.sheep-vs {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.2rem;
    color: var(--color-accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    margin: 0 20px;
}

/* Image description row layout styles */
.entry.image-description-rows {
    max-width: 880px !important;
    margin: 0 auto;
    padding: 0 20px;
}

.image-description-row {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    position: relative;
}

.image-side {
    flex-shrink: 0;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-side img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.description-side {
    flex: 1;
    display: flex;
    align-items: center;
}

.description-side .sheep-description {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    text-align: left;
    margin: 0;
}

/* Intro content section below dialogue */
.intro-content {
    text-align: center;
    max-width: 800px;
    margin: 15px auto 20px; /* Reduced spacing to help fit content */
    padding: 0 20px;
}

.intro-content .date {
    text-align: center;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.intro-content .intro-text {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
    text-wrap: pretty; /* Prevents widows by balancing line breaks */
}

.outro-text {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2rem;
    line-height: 1.5;
    color: var(--color-text);
    font-weight: 500;
}

/* Utility classes to replace inline styles */
.intro-content-spaced {
    margin-bottom: 25px; /* Reduced from 40px to help fit content in viewport */
}

.intro-text-large {
    font-size: 2rem;
    font-weight: 600;
}

.intro-text-hero {
    font-weight: 700;
    margin-top: 30px;
}

.accent-bold {
    color: var(--color-accent);
    font-weight: 600;
}

.nowrap {
    white-space: nowrap;
}

.highlight-box {
    font-size: 1.3rem;
    text-align: center;
    margin: 40px 0 20px 0;
    padding: 30px;
    background: rgba(217, 119, 6, 0.05);
}

.centered-text {
    max-width: 800px;
    margin: 20px auto 0;
}

/* The End Section */
.the-end {
    text-align: center;
    padding: 40px 20px 80px;
}

.the-end p {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-accent);
    margin: 0;
    line-height: 1.2;
}

.the-end-note {
    font-size: 1.3rem !important;
    font-weight: 400 !important;
    color: var(--color-text-light) !important;
    margin-top: 20px !important;
}

.the-end-note a {
    color: var(--color-text-light);
    text-decoration: none;
    border-bottom: none;
    transition: none;
}

.the-end-note a:hover {
    background: none;
    border-bottom: none;
}

.robot-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Output box - chat bubble style */
.output-box {
    position: relative;
    width: 650px;
    height: 350px;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    order: 1;
    overflow: hidden;
    border-radius: 16px;
}

/* Fade out borders using mask */
.output-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
    border-radius: 16px;
    box-shadow:
        inset 0 0 30px 10px rgba(253, 252, 247, 0.8),
        inset 0 0 20px 5px rgba(253, 252, 247, 0.5);
}

/* Subtle chat bubble tail pointing to robot */
.output-box::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid rgba(255, 255, 255, 0.7);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Remove tail for compact robot (robot is inside) */
.compact-robot .output-box::after {
    display: none;
}

.output-box-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: 16px;
}

/* Code display - typewriter effect */
.code-display {
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.compact-robot .code-display {
    flex: 1;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.result-panel .code-display {
    flex: 1;
}

.streaming-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.65rem;
    line-height: 1.6;
    color: #3d3d3d;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* SVG display - shows after code */
.svg-display {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.svg-display svg {
    max-width: 100%;
    height: auto;
}

.compact-robot .svg-display {
    flex: 1;
    min-height: auto;
    padding: 10px;
}

.compact-robot .svg-display svg {
    width: 100%;
    height: 100%;
    max-height: 200px;
}

.result-panel .svg-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide SVG source code storage */
.svg-source {
    display: none;
}

/* Reaction heading */
.entry.intro-card p.reaction {
    font-size: 3rem;
    font-weight: 700;
    text-align: left;
    margin: 2rem 0 1.5rem;
    line-height: 1.1;
    color: var(--color-text);
}

.entry.intro-card .review-intro {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

/* Model review blockquote */
.entry.intro-card blockquote.model-review {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(217, 119, 6, 0.05);
    border-left: 4px solid var(--color-accent);
    transform: rotate(0.3deg);
    font-style: italic;
}

.entry.intro-card blockquote em {
    font-style: italic;
}

/* Punchline */
.entry.intro-card .punchline {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-text);
    margin-top: 2rem;
    letter-spacing: 0.1em;
}

/* Layout type: fullbleed - full-width image/content section */
.entry.layout-fullbleed {
    max-width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
    margin: 0 auto 100px;
    transform: none !important;
}

.entry.layout-fullbleed .date {
    padding: 0 40px;
}

.entry.layout-fullbleed h2 {
    padding: 0 40px;
}

.entry.layout-fullbleed > p {
    padding: 0 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.entry.layout-fullbleed .samples {
    margin: 40px 0 0;
    max-width: 100%;
    gap: 0;
}

.entry.layout-fullbleed canvas {
    display: none;
}

/* Layout type: callout - accent box */
.entry.layout-callout {
    background: #fffbeb;
    border-left: 6px solid var(--color-accent);
    max-width: 650px;
    padding: 32px 40px;
}

/* Layout type: plan - flip chart style */
.entry.layout-plan {
    background: white;
    max-width: 600px;
    padding: 40px 40px 40px;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: rotate(-1deg) !important;
}

.entry.layout-plan h2 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}

.entry.layout-plan ol {
    list-style: none;
    counter-reset: plan-counter;
    padding: 0;
    margin: 0;
}

.entry.layout-plan ol li {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.4rem;
    line-height: 1.8;
    margin-bottom: 20px;
    position: relative;
    padding-left: 50px;
    counter-increment: plan-counter;
}

.entry.layout-plan ol li::before {
    content: counter(plan-counter) ".";
    position: absolute;
    left: 0;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--color-accent);
}

.entry.layout-plan canvas {
    display: none;
}

/* Layout type: failure - for showing broken attempts */
.entry.layout-failure {
    background: #fff5f5;
    border: 3px dashed #dc2626;
    max-width: 800px;
    padding: 40px;
    position: relative;
}

.entry.layout-failure h2 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2rem;
    color: #dc2626;
    margin-bottom: 20px;
}

.entry.layout-failure h3 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.5rem;
    color: var(--color-text);
    margin-top: 30px;
    margin-bottom: 15px;
}

.entry.layout-failure .failure-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.entry.layout-failure .failure-item {
    background: white;
    padding: 15px;
    border: 2px solid #fee2e2;
    border-radius: 8px;
    text-align: center;
}

.entry.layout-failure .failure-item img,
.entry.layout-failure .failure-item svg {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.entry.layout-failure .failure-caption {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 0.95rem;
    color: #991b1b;
    font-style: italic;
}

.entry.layout-failure canvas {
    display: none;
}

/* Layout type: comparison - before/after split */
.entry.layout-comparison {
    background: white;
    max-width: 900px;
    padding: 40px;
    transform: rotate(-0.5deg) !important;
}

.entry.layout-comparison h2 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

.entry.layout-comparison .comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin: 30px 0;
}

.entry.layout-comparison .comparison-side {
    text-align: center;
}

.entry.layout-comparison .comparison-label {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.entry.layout-comparison .comparison-label.before {
    color: #dc2626;
}

.entry.layout-comparison .comparison-label.after {
    color: #16a34a;
}

.entry.layout-comparison .comparison-arrow {
    font-size: 3rem;
    color: var(--color-accent);
    font-weight: 700;
}

.entry.layout-comparison .comparison-content {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    min-height: 200px;
}

.entry.layout-comparison .comparison-content img,
.entry.layout-comparison .comparison-content svg {
    max-width: 100%;
    height: auto;
}

/* Layout type: results-gallery - showcase grid */
.entry.layout-results-gallery {
    max-width: 100%;
    background: transparent;
    padding: 60px 40px;
    box-shadow: none;
    transform: none !important;
}

.entry.layout-results-gallery h2 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--color-text);
}

.entry.layout-results-gallery .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.entry.layout-results-gallery .result-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.entry.layout-results-gallery .result-item:hover {
    transform: translateY(-5px);
}

.entry.layout-results-gallery .result-image {
    width: 100%;
    aspect-ratio: 1;
    background: #fafafa;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.entry.layout-results-gallery .result-image img,
.entry.layout-results-gallery .result-image svg {
    max-width: 100%;
    max-height: 100%;
}

.entry.layout-results-gallery .result-caption {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.1rem;
    text-align: center;
    color: var(--color-text-light);
}

.entry.layout-results-gallery .result-score {
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-top: 8px;
}

.entry.layout-results-gallery canvas {
    display: none;
}

/* Layout type: text-only - clean centered text */
.entry.layout-text-only {
    background: transparent;
    box-shadow: none;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    transform: none !important;
}

.entry.layout-text-only canvas {
    display: none;
}

.entry.layout-text-only h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

/* Layout type: split - two columns */
.entry.layout-split {
    max-width: 900px;
    padding: 40px;
}

.entry.layout-split .entry-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.entry.layout-split .split-column {
    padding: 20px;
}

.entry.layout-split .split-column h3 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--color-accent);
}

.entry canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

/* Override for intro card character canvases */
.entry.intro-card .character-section canvas {
    position: static;
    pointer-events: auto;
}

.entry > * {
    position: relative;
    z-index: 1;
}

/* Hover states for tilted entries */
.entry.layout-card:nth-child(1):hover,
.entry.layout-wide:nth-child(1):hover,
.entry.layout-callout:nth-child(1):hover { transform: rotate(-1.2deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(2):hover,
.entry.layout-wide:nth-child(2):hover,
.entry.layout-callout:nth-child(2):hover { transform: rotate(0.8deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(3):hover,
.entry.layout-wide:nth-child(3):hover,
.entry.layout-callout:nth-child(3):hover { transform: rotate(1.5deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(4):hover,
.entry.layout-wide:nth-child(4):hover,
.entry.layout-callout:nth-child(4):hover { transform: rotate(-0.9deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(5):hover,
.entry.layout-wide:nth-child(5):hover,
.entry.layout-callout:nth-child(5):hover { transform: rotate(1.1deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(6):hover,
.entry.layout-wide:nth-child(6):hover,
.entry.layout-callout:nth-child(6):hover { transform: rotate(-1.6deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(7):hover,
.entry.layout-wide:nth-child(7):hover,
.entry.layout-callout:nth-child(7):hover { transform: rotate(0.7deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(8):hover,
.entry.layout-wide:nth-child(8):hover,
.entry.layout-callout:nth-child(8):hover { transform: rotate(-1.3deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(9):hover,
.entry.layout-wide:nth-child(9):hover,
.entry.layout-callout:nth-child(9):hover { transform: rotate(1.4deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(10):hover,
.entry.layout-wide:nth-child(10):hover,
.entry.layout-callout:nth-child(10):hover { transform: rotate(-0.6deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(11):hover,
.entry.layout-wide:nth-child(11):hover,
.entry.layout-callout:nth-child(11):hover { transform: rotate(1.0deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(12):hover,
.entry.layout-wide:nth-child(12):hover,
.entry.layout-callout:nth-child(12):hover { transform: rotate(-1.1deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(13):hover,
.entry.layout-wide:nth-child(13):hover,
.entry.layout-callout:nth-child(13):hover { transform: rotate(0.9deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(14):hover,
.entry.layout-wide:nth-child(14):hover,
.entry.layout-callout:nth-child(14):hover { transform: rotate(-1.4deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry.layout-card:nth-child(15):hover,
.entry.layout-wide:nth-child(15):hover,
.entry.layout-callout:nth-child(15):hover { transform: rotate(1.3deg) translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.entry .date {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.entry .date .anchor-link {
    color: var(--color-accent);
    text-decoration: none;
    position: relative;
    transition: opacity 0.2s ease;
}

.entry .date .anchor-link:hover {
    opacity: 0.7;
}

.entry .date .anchor-link::before {
    content: '#';
    position: absolute;
    left: -18px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.entry .date .anchor-link:hover::before {
    opacity: 0.5;
}

/* Smooth scroll offset for anchor links */
.entry {
    scroll-margin-top: 100px;
}

.entry h2 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0;
    text-align: center;
}

.entry p {
    margin-bottom: 12px;
    color: var(--color-text);
    line-height: 1.7;
}

.entry p:last-of-type {
    margin-bottom: 20px;
}

.entry em {
    font-style: italic;
    color: var(--color-text-light);
}

.strikethrough {
    text-decoration: line-through;
    color: var(--color-text-light);
    opacity: 0.7;
}

.meta {
    display: inline-block;
    font-size: 13px;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    margin-top: 8px;
    width: 100%;
}

.samples {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.inline-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 30px auto;
    max-width: 500px;
}

@media (max-width: 768px) {
    /* Hide desktop-only content on mobile */
    .desktop-only {
        display: none;
    }

    /* Make sections fill viewport on mobile */
    .section-screen {
        min-height: 100dvh; /* Dynamic viewport height - adapts to mobile browser chrome */
        padding: 15px 20px 5px; /* Minimal padding to ensure arrow stays visible */
        justify-content: flex-start; /* Content starts at top instead of centered */
    }

    .scroll-arrow-container {
        padding-top: 0;
        padding-bottom: 5px;
        margin-top: 0 !important;
    }

    .section-screen > .scroll-arrow-container {
        padding-top: 0;
        padding-bottom: 5px;
        margin-top: 35px !important;
    }

    /* Reduce all intro-content margins globally on mobile */
    .intro-content {
        margin: 10px auto !important;
    }

    .intro-content .intro-text {
        margin-bottom: 10px !important;
    }

    /* Hide previous arrow when scrolling to anchors */
    #whoa-moment {
        margin-top: 20px; /* Reduced from 40px */
    }

    #sheep-eval,
    #the-plan,
    #generator-sft,
    #rl-run,
    #final-gallery {
        padding-top: 0px;
    }

    /* Compress first screen with sheep comparison */
    .comparison-cards {
        margin-bottom: 15px !important;
    }

    .compact-robot .robot-output-wrapper {
        min-height: 140px !important;
        gap: 15px !important;
    }

    #intro {
        margin: 5px auto 0 !important;
    }

    #intro .intro-text {
        font-size: 1.4rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0 !important;
    }

    /* Reduce spacing on whoa-moment screen to fit everything */
    #whoa-moment {
        margin-top: 0 !important;
        padding: 15px 20px !important;
        margin-bottom: 10px !important;
    }

    #whoa-moment .intro-text-hero {
        margin-top: 0 !important;
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
    }

    .mind-blown-container {
        max-height: 180px !important;
        margin: 10px auto !important;
    }

    #mind-blown-canvas {
        width: 280px !important;
        height: auto !important;
    }

    #whoa-moment + .intro-content {
        margin: 10px auto 10px !important;
    }

    #whoa-moment + .intro-content .intro-text {
        font-size: 1.4rem !important;
    }

    /* Compact plan section on mobile */
    .entry.layout-plan {
        padding: 30px 20px;
        margin:40px 0 40px;
    }

    .entry.layout-plan h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .entry.layout-plan ol li {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 12px;
        padding-left: 35px;
    }

    .inline-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .inline-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* SFT Section Styles */
.sft-text {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.4rem;
    text-align: center;
    margin: 20px auto;
}

.sft-note {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1rem;
    text-align: center;
    margin-top: 30px;
    color: var(--color-text-light);
}

.sample-placeholder {
    aspect-ratio: 1;
    background: var(--color-bg);
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--color-text-light);
    text-align: center;
    padding: 20px;
}

.sample-item {
    aspect-ratio: 1;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.sample-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover zoom only on desktop */
@media (min-width: 769px) {
    .sample-item:hover {
        transform: scale(1.5);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 2;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    width: 60px;
    height: 80px;
    line-height: 1;
    transition: background 0.2s ease;
    backdrop-filter: blur(5px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    left: -80px;
}

.lightbox-nav.next {
    right: -80px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
}

footer {
    text-align: center;
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 14px;
}

footer a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 40px 16px;
    }

    .section-screen {
        padding: 20px 10px;
    }

    .intro-content {
        margin: 10px;
        padding: 0;
        
        .intro-text {
            font-size: 1.5rem;
        }

    }

    .outro-text {
        text-align: center;
        font-size: 1.5rem;
    }

    /* Show only right doodles on mobile, side by side under RL subtitle */
    #background-doodle {
        top: 270px;
        right: 50%;
        left: auto;
        transform: translateX(50%) rotate(3deg) scale(0.85);
        transform-origin: center top;
        opacity: 0.25;
    }

    #background-doodle-left {
        display: none;
    }

    /* Hide timeline canvas on mobile - single column doesn't need it */
    #timeline-canvas {
        display: none;
    }

    header {
        padding: 40px 16px;
        margin-bottom: 60px;
    }

    header h1 {
        font-size: 48px;
    }

    .subtitle {
        font-size: 20px;
    }

    .scroll-prompt {
        margin: 40px auto 80px;
    }

    .scroll-prompt p {
        font-size: 24px;
    }

    .badges {
        gap: 12px;
        margin: 24px auto 32px;
    }

    .badge {
        padding: 6px 12px;
    }

    .badge span {
        font-size: 14px;
    }

    .svg-flip-card {
        max-width: 100%;
    }

    .svg-flip-card-front,
    .svg-flip-card-back {
        padding: 16px;
    }

    .svg-flip-card-back {
        padding: 20px;
    }

    .svg-flip-card-code {
        font-size: 11px;
    }

    .timeline {
        padding: 20px 0;
    }

    .entry {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 40px;
        padding: 24px;
        transform: none !important; /* Remove tilts on mobile */
    }

    .entry:hover {
        transform: translateY(-2px) !important; /* Simple hover on mobile */
    }

    /* Mobile adjustments for layout types */
    .entry.layout-hero {
        padding: 20px 0 0;
        margin-bottom: 20px;
    }

    .entry.layout-hero h2 {
        font-size: 32px;
    }

    .entry.layout-hero p {
        font-size: 22px;
    }

    .entry.layout-wide {
        max-width: 100%;
        padding: 24px;
    }

    /* Intro card mobile adjustments */
    .entry.intro-card {
        padding: 40px 30px;
    }

    .entry.intro-card .intro-text {
        font-size: 1.2rem;
    }


    .entry.intro-card .intro-subtext {
        font-size: 1.1rem;
    }

    .comic-panel {
        flex-direction: column;
        gap: 30px;
        padding: 1.5rem;
    }

    .speech-bubble {
        font-size: 1.1rem;
        padding: 12px 20px;
        max-width: 180px;
    }

    .robot-output {
        max-width: 120px;
    }

    .entry.intro-card h2.reaction {
        font-size: 2.2rem;
    }

    .entry.intro-card .review-intro {
        font-size: 1.1rem;
    }

    .entry.intro-card blockquote.model-review {
        font-size: 1rem;
        padding: 1.5rem;
    }

    .entry.intro-card .punchline {
        font-size: 1.3rem;
    }

    .entry.layout-fullbleed .date,
    .entry.layout-fullbleed h2,
    .entry.layout-fullbleed > p {
        padding: 0 20px;
    }

    .entry.layout-split .entry-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .entry.layout-text-only h2 {
        font-size: 28px;
    }

    .entry h2 {
        font-size: 24px;
    }

    .samples {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }

    .lightbox-counter {
        bottom: 10px;
    }

    /* Mobile: adjust robot with output layout */
    .robot-with-output {
        padding: 20px 10px !important;
    }

    .robot-output-wrapper {
        flex-direction: column-reverse;
        gap: 20px;
        min-height: auto;
    }

    .robot-container {
        order: 1;
    }

    .output-box {
        order: 2;
        width: 100%;
        height: 280px;
        padding: 15px;
    }

    .streaming-code {
        font-size: 0.75rem;
    }

    #robot-figure {
        transform: scale(0.8);
    }

    /* Mobile: adjust LLM output cards */
    .llm-output-card {
        padding: 30px 20px !important;
    }

    .llm-output-text {
        font-size: 0.85rem !important;
        padding: 16px !important;
    }

    footer {
        margin-top: 60px;
        padding-top: 30px;
        font-size: 13px;
    }

    footer a {
        display: inline-block;
        padding: 4px 0;
        min-height: 44px;
        line-height: 36px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 30px 12px;
    }
    
    #background-doodle {
        top: 220px;
    }

    header {
        padding: 30px 12px;
        margin-bottom: 40px;
    }

    header h1 {
        font-size: 36px;
    }

    .subtitle {
        font-size: 18px;
    }

    .scroll-prompt {
        margin: 30px auto 60px;
    }

    .scroll-prompt p {
        font-size: 20px;
    }

    .entry {
        padding: 20px;
        margin-bottom: 0px;
    }

    .entry .date {
        font-size: 14px;
    }

    .entry h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .entry p {
        font-size: 15px;
    }

    .meta {
        font-size: 12px;
    }

    footer {
        margin-top: 50px;
    }
}

/* Improve touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    footer a {
        min-height: 44px;
        display: inline-block;
        padding: 8px 4px;
    }
}

/* Model Comparison Table */
.model-comparison-compact {
    margin: 30px 0;
}

.eval-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.eval-table th {
    background: var(--color-accent);
    color: white;
    padding: 12px 8px;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eval-table th:first-child {
    background: transparent;
    border: none;
}

.eval-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e5e5e5;
}

.eval-table .metric-label {
    font-weight: 700;
    text-align: left;
    padding-left: 15px;
    color: var(--color-text);
    background: #fafafa;
}

.eval-table .score-cell {
    font-weight: 700;
    font-size: 1.1rem;
    cursor: help;
    position: relative;
    transition: background-color 0.2s;
}

.eval-table .score-cell:hover {
    background: #fff5f5;
}

/* Tooltip on hover */
.eval-table .score-cell::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 45, 45, 0.95);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: 250px;
    max-width: 250px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.eval-table .score-cell:hover::after {
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .eval-table {
        font-size: 0.85rem;
    }

    .eval-table th,
    .eval-table td {
        padding: 8px 4px;
    }

    .eval-table th {
        font-size: 0.8rem;
    }

    .eval-table .score-cell {
        font-size: 0.95rem;
    }

    .eval-table .score-cell::after {
        width: 200px;
        font-size: 0.75rem;
    }
}

/* Mind Blown Animation */
.mind-blown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto ;
    width: 100%;
    max-height: 240px;
}

#mind-blown-canvas {
    display: block;
    margin: 0 auto;
    position: static !important;
    width: 420px;
}

.entry.layout-minimal.first-card:has(.mind-blown-container) {
    margin-top: -60px;
    margin-bottom: 0px;
}

/* Expandable Failures Section */
.failures-section {
    margin-top: 40px;
    border-top: 2px dashed #ddd;
    padding-top: 0;
}

.failures-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.failures-toggle:hover {
    transform: scale(1.05);
}

.failures-label {
    font-family: 'Gaegu', 'Comic Sans MS', cursive;
    font-size: 28px;
    font-weight: 700;
    color: #dc2626;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    transform: rotate(-2deg);
}

.failures-label::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: #dc2626;
    transform: skewY(-1deg);
}

.failures-toggle::after {
    content: '▼';
    margin-left: 15px;
    font-size: 16px;
    color: #dc2626;
    transition: transform 0.3s ease;
}

.failures-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.failures-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
}

.failures-section.expanded .failures-content {
    max-height: 2000px;
    padding: 20px;
    margin-top: 10px;
}

.failures-content h3 {
    color: #dc2626;
    margin-bottom: 15px;
}

/* Disable hover effects */
.entry.no-hover:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Expandable Section */
.expandable-section {
    margin-top: 30px;
}

.expandable-toggle {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.expandable-section:not(.expanded) .expandable-toggle::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

.entry.layout-failure .expandable-section:not(.expanded) .expandable-toggle::before {
    background: linear-gradient(to bottom, transparent, #fff5f5);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--color-accent);
    font-family: 'Gaegu', 'Comic Sans MS', cursive;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    transform: rotate(-1deg);
}

.read-more-btn::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(217, 119, 6, 0.15);
    transform: skewY(-1deg);
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    transform: rotate(-1deg) translateY(-2px);
}

.read-more-btn:hover::before {
    height: 12px;
    background: rgba(217, 119, 6, 0.25);
}

.read-more-btn .read-less-text {
    display: none;
}

.read-more-btn[aria-expanded="true"] .read-more-text {
    display: none;
}

.read-more-btn[aria-expanded="true"] .read-less-text {
    display: inline;
}

.expand-icon {
    transition: transform 0.3s ease;
}

.read-more-btn[aria-expanded="true"] .expand-icon {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.expandable-section.expanded .expandable-content {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.7s ease-in, opacity 0.4s ease-in 0.1s;
}

/* Before/After Comparison */
.before-after-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
    border-radius: 8px;
}

.before-after-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
}

.before-after-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.before-after-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.before-section,
.after-section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--color-border);
}

.after-section {
    border-left-color: #16a34a;
}

.before-section h4,
.after-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
}

.after-section h4 {
    color: #16a34a;
}

.model-output {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
}

.model-output pre {
    margin: 0;
    white-space: pre;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
}

.model-output p {
    margin: 0;
}

@media (max-width: 768px) {
    .before-after-container {
        grid-template-columns: 1fr;
    }

    .before-after-image {
        max-width: 250px;
        margin: 0 auto;
    }
}

/* Reward Function Split Layout */
.reward-function-split {
    margin-top: 20px;
}

.reward-function-text {
    margin-bottom: 30px;
}

.reward-function-text p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.reward-function-criteria {
    background: rgba(217, 119, 6, 0.05);
    border-left: 4px solid #d97706;
    padding: 25px 20px;
    border-radius: 8px;
    transform: rotate(-0.8deg);
    max-width: 450px;
    margin: 0 auto;
}

.criteria-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
}

.criteria-list li {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 10px !important;
    padding-left: 35px !important;
    position: relative;
    color: var(--color-text);
}

.criteria-list li::marker {
    content: none !important;
    display: none !important;
}

/* Show checkmark canvases */
.checkmark-canvas {
    display: block !important;
}

.criteria-note {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 4px;
    font-style: italic;
}

@media (max-width: 768px) {
    .reward-function-criteria {
        transform: rotate(-0.5deg);
        max-width: 100%;
    }
}

/* ============================================
   RL Training Section - Clean Rebuild
   ============================================ */

/* Section wrapper - two columns on desktop */
.rl-section-wrapper {
    display: block;
}

/* Description at top */
.rl-description {
    margin-bottom: 30px;
}

.rl-description p {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 15px 0;
}

.rl-description p:last-child {
    margin-bottom: 0;
}

.rl-hint {
    font-size: 0.95rem !important;
    color: var(--color-text-light) !important;
    margin-top: 20px !important;
}

/* Training rows container */
.rl-training-rows {
    position: relative;
    cursor: pointer;
}

/* Individual training row - compact by default */
.rl-training-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rl-training-row:last-child {
    margin-bottom: 0;
}

/* Prompt - hidden by default */
.row-prompt {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    text-align: center;
    line-height: 1.4;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Samples container - horizontal flex */
.rl-row-samples {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: flex-start;
}

/* Individual sample */
.rl-mini-sample {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Image - small by default */
.rl-mini-sample img {
    width: 60px;
    height: 60px;
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg);
    padding: 4px;
    object-fit: contain;
}

.rl-mini-best img {
    border-color: var(--color-accent);
    border-width: 2px;
}

/* Score - always visible */
.mini-score {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text);
}

.rl-mini-best .mini-score {
    color: var(--color-accent);
}

/* ============================================
   DESKTOP: Click to zoom entire grid
   ============================================ */
@media (min-width: 769px) {
    .rl-training-rows.expanded {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1000;
        background: var(--color-bg);
        padding: 80px 60px;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        max-width: 95vw;
        max-height: 95vh;
        overflow-y: auto;
        width: auto;
    }

    /* Expand rows when grid is expanded */
    .rl-training-rows.expanded .rl-training-row {
        margin-bottom: 60px;
        gap: 20px;
    }

    /* Show prompts */
    .rl-training-rows.expanded .row-prompt {
        opacity: 1;
        height: auto;
        margin-bottom: 10px;
    }

    /* Expand samples with proper spacing */
    .rl-training-rows.expanded .rl-row-samples {
        gap: 40px;
    }

    /* Larger images */
    .rl-training-rows.expanded .rl-mini-sample {
        gap: 12px;
    }

    .rl-training-rows.expanded .rl-mini-sample img {
        width: 140px;
        height: 140px;
        padding: 8px;
    }

    .rl-training-rows.expanded .rl-mini-best img {
        box-shadow: 0 4px 16px rgba(217, 119, 6, 0.4);
    }

    /* Larger scores when expanded */
    .rl-training-rows.expanded .mini-score {
        font-size: 1rem;
    }
}

/* ============================================
   MOBILE: Static layout, always visible
   ============================================ */
@media (max-width: 768px) {
    /* Stack the two-column layout vertically */
    .rl-section-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .rl-description {
        text-align: center;
        position: sticky;
        top: 0;
        z-index: 10;
        background: white;
        padding: 25px 20px 20px;
        margin: -20px -20px 20px -20px;
        border-radius: 8px;
    }

    .rl-description p {
        font-size: 0.9rem !important;
        line-height: 1.4;
    }

    .rl-hint {
        display: none !important;
    }

    .rl-training-rows {
        width: 100%;
        cursor: default;
    }

    .rl-training-row {
        margin-bottom: 40px;
        gap: 15px;
    }

    /* Make prompt always visible on mobile */
    .row-prompt {
        opacity: 1 !important;
        height: auto !important;
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    /* Show samples in 2x2 grid */
    .rl-row-samples {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 15px !important;
        justify-items: center;
    }

    .rl-mini-sample {
        width: 100%;
        max-width: 150px;
        gap: 8px !important;
    }

    /* Larger images on mobile */
    .rl-mini-sample img {
        width: 120px !important;
        height: 120px !important;
    }

    /* Larger scores on mobile */
    .mini-score {
        font-size: 1rem;
    }
}

/* Sheep comparison - keep side-by-side but smaller on mobile */
@media (max-width: 768px) {
    .robot-output-wrapper {
        flex-direction: row !important;
        gap: 10px !important;
    }

    .sheep-panel-container {
        width: 100%;
        max-width: 140px;
    }

    .target-panel-outside {
        width: 160px !important;
        height: 140px !important;
        padding: 8px !important;
    }

    .sheep-label {
        font-size: 0.85rem !important;
    }

    .sheep-vs {
        font-size: 0.9rem;
        margin: 0 5px;
    }
}

/* Image description rows - compact layout on mobile */
@media (max-width: 768px) {
    .image-description-row {
        gap: 15px !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
    }

    .image-side {
        width: 70px !important;
    }

    .image-side img {
        max-height: 70px !important;
    }

    .description-side .sheep-description {
        font-size: 0.85rem !important;
        line-height: 1.3;
    }
}

/* Feature Wall Gallery */
.gallery-intro {
    text-align: center;
    margin-bottom: 20px;
}

.gallery-intro h2 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2.5rem;
    color: var(--color-text);
    margin-bottom: 20px;
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}

.gallery-intro p {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 40px;
}

.feature-wall {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.wall-item {
    position: relative;
    background: white;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Apply rotation from data attribute */
.wall-item[data-rotation] {
    transform: rotate(var(--rotation, 0deg));
}

.wall-item[data-rotation="-4"] { --rotation: -4deg; }
.wall-item[data-rotation="-3"] { --rotation: -3deg; }
.wall-item[data-rotation="-2"] { --rotation: -2deg; }
.wall-item[data-rotation="-1"] { --rotation: -1deg; }
.wall-item[data-rotation="1"] { --rotation: 1deg; }
.wall-item[data-rotation="2"] { --rotation: 2deg; }
.wall-item[data-rotation="3"] { --rotation: 3deg; }
.wall-item[data-rotation="4"] { --rotation: 4deg; }

.wall-item:hover,
.wall-item.mobile-active {
    transform: rotate(0deg) scale(1.8);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Size variants - mixed wall of photos */
.wall-item.small {
    grid-column: span 1;
    grid-row: span 1;
}

.wall-item.medium {
    grid-column: span 1;
    grid-row: span 1;
    transform: scale(1.08) rotate(var(--rotation, 0deg));
}

.wall-item.medium:hover,
.wall-item.medium.mobile-active {
    transform: rotate(0deg) scale(1.8);
}

.wall-item-title {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: span 1;
    grid-row: span 1;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    text-align: center;
    padding: 20px;
}

.wall-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    display: block;
}

/* Prompt overlay - hidden by default */
.wall-prompt {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    line-height: 1.3;
}

.wall-item:hover .wall-prompt {
    opacity: 1;
    font-size: 0.5rem;
    padding: 4px 6px;
}

@media (max-width: 768px) {
    .feature-wall {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px 10px;
    }

    .wall-item.featured {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .rl-training-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .row-prompt {
        font-size: 0.9rem;
        text-align: center;
    }

    .rl-row-samples {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .rl-mini-sample img {
        width: 80px;
        height: 80px;
    }
}

/* Step Viewer Component */
.step-viewer {
    position: relative;
    margin: 30px 0 0 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.step-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    border: none
}

.step-counter {
    text-align: center;
    font-family: 'Gaegu', 'Comic Sans MS', cursive;
    flex-grow: 1;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
}

.step-counter .current-step,
.step-counter .total-steps {
    color: var(--color-accent);
    font-weight: bold;
}

.step-content-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.4s ease;
}

.step-nav-btn {
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--color-accent);
    transition: all 0.2s ease;
    font-family: 'Gaegu', 'Comic Sans MS', cursive;
    font-weight: bold;
}

.step-nav-btn:hover:not(:disabled) {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: scale(1.1);
}

.step-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.step-content {
    min-height: 200px;
}

.step-samples-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.step-sample {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.step-sample:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.step-sample-svg {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.step-sample-svg img,
.step-sample-svg svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.step-sample-info {
    font-family: 'Gaegu', 'Comic Sans MS', cursive;
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-align: center;
}

.step-sample-score {
    font-weight: bold;
    color: var(--color-accent);
}

.step-prompt {
    margin-top: 15px;
    margin-bottom: 0;
    padding: 12px 20px;
    background: #fffbeb;
    border: none;
    border-radius: 6px;
    font-family: 'Gaegu', 'Comic Sans MS', cursive;
    font-size: 1.1rem;
    color: var(--color-text);
    text-align: center;
}

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

@media (max-width: 768px) {
    .step-viewer {
        padding: 20px 15px;
    }

    .step-viewer-header {
        margin-bottom: 20px;
    }

    .step-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .step-counter > span:first-child {
        font-size: 1.5rem;
    }

    .step-samples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .step-sample-svg {
        height: 150px;
    }
}

/* FAQ Page Styles */
.faq-page {
    padding: 40px 0;
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-content h2 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.faq-intro {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.faq-item h3 {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.faq-item p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.faq-item p:last-child {
    margin-bottom: 0;
}

.faq-item ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.faq-item ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.faq-item a {
    color: var(--color-accent);
    text-decoration: none;
}

.faq-item a:hover {
    text-decoration: underline;
}

.faq-item code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Consolas', monospace;
}

.faq-item strong {
    color: var(--color-text);
}

.faq-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.faq-footer p {
    font-family: 'Gaegu', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1.3rem;
}

.faq-footer a {
    color: var(--color-text-light);
    text-decoration: none;
    border-bottom: none;
    transition: none;
}

.faq-footer a:hover {
    background: none;
    border-bottom: none;
}

.faq-note {
    margin-top: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Mobile adjustments for FAQ */
@media (max-width: 768px) {
    .faq-content h2 {
        font-size: 2rem;
    }

    .faq-item {
        padding: 1.25rem;
    }

    .faq-item h3 {
        font-size: 1.15rem;
    }
}

/* Compact header for non-homepage pages */
.section-screen.compact-header {
    min-height: auto;
    padding-top: 20px;
    padding-bottom: 40px;
}
