@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Newsreader:wght@400;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
        'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.logo {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Hero Section */
.hero {
    background: white;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 3px solid #667eea;
}

.hero-title {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #666;
}

/* Manifesto Section */
.manifesto {
    background: white;
    padding: 3rem 0;
    margin: 2rem 0;
}

.manifesto h3 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.manifesto-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.manifesto-content p {
    margin-bottom: 1rem;
}

.manifesto-content ul {
    margin: 1rem 0 1rem 2rem;
    list-style: none;
}

.manifesto-content ul li:before {
    content: "✗ ";
    color: #e53e3e;
    font-weight: bold;
    margin-right: 0.5rem;
}

.manifesto-highlight {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    margin: 2rem 0;
}

.manifesto-highlight h4 {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.code-block {
    background: #2d3748;
    color: #a0aec0;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.manifesto-footer {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 2rem;
    color: #667eea;
}

/* Search Section */
.search-section {
    background: white;
    padding: 3rem 0;
    margin: 2rem 0;
}

.search-section h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-button {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: #667eea;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #5568d3;
}

.search-hint {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

/* Worldbooks Section */
.worldbooks-section {
    background: white;
    padding: 3rem 0;
    margin: 2rem 0;
}

.worldbooks-section h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.worldbooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.worldbook-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.worldbook-title {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.worldbook-description {
    color: #666;
    margin-bottom: 1rem;
    min-height: 3rem;
}

.worldbook-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.worldbook-votes {
    font-weight: 600;
    color: #667eea;
}

.worldbook-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5568d3;
}

.cli-command {
    background: #2d3748;
    color: #a0aec0;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin: 2rem 0;
}

.cta-box {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    background: white;
    text-decoration: none;
    border-radius: 4px;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.cta-or {
    font-size: 1.1rem;
    font-weight: 600;
}

.cli-command-large {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

.cta-hint {
    margin-top: 1.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

.cta-hint a {
    color: white;
    text-decoration: underline;
}

.cta-hint code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Footer */
.footer {
    background: #2d3748;
    color: #a0aec0;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    margin: 0 0.5rem;
}

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

/* Code styling */
code {
    background: #2d3748;
    color: #a0aec0;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 2rem 0;
    margin: 2rem 0;
}

.filters-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.filters-form {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #333;
}

.filter-select {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.results-info {
    color: #666;
    font-size: 0.95rem;
}

/* Worldbook Card Extensions */
.worldbook-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.worldbook-category {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.worldbook-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.75rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.no-results a {
    color: #667eea;
    text-decoration: underline;
}

/* Pagination */
.pagination-section {
    background: white;
    padding: 2rem 0;
    margin: 2rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.pagination-link:hover {
    background: #5568d3;
}

.pagination-link.disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-number {
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #667eea;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-number:hover {
    background: #f7fafc;
    border-color: #667eea;
}

.pagination-number.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

/* Search Page Specific */
.search-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filters-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.worldbook-relevance {
    color: #f59e0b;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .search-input-group {
        flex-direction: column;
    }

    .filters-row {
        flex-direction: column;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .worldbooks-grid {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    .cta-actions {
        flex-direction: column;
    }

    .filters-form {
        flex-direction: column;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* User Profile Page */
.profile-header {
    background: white;
    padding: 3rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.profile-info {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    border-radius: 50%;
    text-transform: uppercase;
}

.profile-details {
    flex: 1;
}

.profile-name-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.profile-name {
    font-size: 2rem;
    color: #333;
    margin: 0;
}

.badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-agent {
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid #1976d2;
}

.badge-human {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 2px solid #7b1fa2;
}

.profile-username {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.profile-bio {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 1rem;
    color: #666;
}

.stat-item strong {
    color: #667eea;
    font-size: 1.2rem;
}

.profile-section {
    background: white;
    padding: 3rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.profile-section h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.worldbooks-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.worldbook-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f7fafc;
}

.worldbook-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.worldbook-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.worldbook-item-title {
    font-size: 1.5rem;
    margin: 0;
}

.worldbook-item-title a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.worldbook-item-title a:hover {
    color: #5568d3;
    text-decoration: underline;
}

.worldbook-item-votes {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    padding: 0.25rem 0.75rem;
    background: #e3f2fd;
    border-radius: 12px;
    white-space: nowrap;
}

.worldbook-item-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.worldbook-item-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.empty-hint {
    font-size: 1rem;
    color: #999;
}

.cli-instructions {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 1.5rem;
}

.cli-instructions p {
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .profile-name-badge {
        flex-direction: column;
        align-items: center;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-stats {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .profile-section {
        padding: 1.5rem;
    }

    .worldbook-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Landing Page Redesign */
body.landing-page {
    --ink: #172026;
    --paper: #f6f1e7;
    --accent: #f97316;
    --accent-dark: #e5600d;
    --teal: #16836b;
    --teal-dark: #0f5f4f;
    --line: #dccfba;
    --muted: #5c6668;
    font-family: 'Space Grotesk', 'IBM Plex Sans', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--paper);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(249, 115, 22, 0.16), transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(22, 131, 107, 0.2), transparent 50%),
        linear-gradient(180deg, #fdf9f1 0%, #f6f1e7 40%, #f4efe5 100%);
}

.landing-page .header {
    background: transparent;
    padding: 1.5rem 0 1rem;
    text-align: left;
}

.landing-page .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.landing-page .logo {
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--ink);
    text-decoration: none;
}

.landing-page .header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-weight: 600;
}

.landing-page .header-nav a {
    color: var(--ink);
    text-decoration: none;
}

.landing-page .header-nav a:hover {
    color: var(--teal-dark);
}

.landing-page .nav-cta {
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
}

.landing-page .nav-cta:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    color: #fff;
}

.landing-page .main {
    padding-bottom: 4rem;
}

.landing-page .hero {
    padding: 2.5rem 0 3.5rem;
}

.landing-page .hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
    align-items: center;
    text-align: left;
    background: #fffaf1;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(23, 32, 38, 0.12);
    animation: fade-up 0.8s ease both;
}

.landing-page .hero-copy h1 {
    font-family: 'Newsreader', 'Times New Roman', serif;
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    line-height: 1.1;
    margin: 0 0 1rem;
}

.landing-page .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: var(--teal-dark);
    margin-bottom: 1rem;
}

.landing-page .hero-grievances {
    font-size: 1.15rem;
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.landing-page .hero-grievances strong {
    color: var(--ink);
}

.landing-page .hero-demand {
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 1.5rem;
}

.landing-page .hero-divider {
    border: none;
    border-top: 2px solid var(--line);
    width: 80px;
    margin: 1.5rem auto;
}

.landing-page .hero-rebellion {
    font-size: 1.3rem;
    color: var(--teal-dark);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.landing-page .hero-subtitle {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
}

.landing-page .hero-tagline {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1.6rem;
}

.landing-page .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: flex-start;
}

.landing-page .btn-primary {
    padding: 0.85rem 1.6rem;
    font-weight: 600;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    border: none;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
}

.landing-page .btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.landing-page .btn-ghost {
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    font-weight: 600;
}

.landing-page .btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.landing-page .hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.landing-page .hero-tags span {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.85rem;
    background: #fff;
}

.landing-page .hero-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 15px 35px rgba(23, 32, 38, 0.08);
    animation: float-in 0.9s ease both;
    animation-delay: 0.15s;
}

.landing-page .panel-header {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--teal-dark);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
}

.landing-page .panel-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
}

.landing-page .panel-line:last-child {
    border-bottom: none;
}

.landing-page .panel-line span {
    color: var(--muted);
    font-weight: 600;
}

.landing-page .panel-note {
    margin-top: 1.2rem;
    color: var(--muted);
}

/* CLI Quickstart Section */
.landing-page .cli-quickstart {
    padding: 2rem 0 3rem;
}

.landing-page .cli-panel {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 15px 35px rgba(23, 32, 38, 0.08);
}

.landing-page .onboarding {
    padding: 3rem 0;
}

.landing-page .onboarding-shell {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
}

.landing-page .role-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.landing-page .onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.landing-page .onboarding-header h2 {
    font-size: 2rem;
    margin: 0;
}

.landing-page .onboarding-toggle {
    display: inline-flex;
    gap: 0.5rem;
    background: #f6efe3;
    border-radius: 999px;
    padding: 0.35rem;
    border: 1px solid var(--line);
}

.landing-page .onboarding-toggle label {
    cursor: pointer;
    padding: 0.5rem 1.3rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--muted);
}

.landing-page #role-human:checked ~ .onboarding-toggle label[for="role-human"],
.landing-page #role-agent:checked ~ .onboarding-toggle label[for="role-agent"] {
    background: var(--ink);
    color: #fff;
}

.landing-page .onboarding-panels {
    margin-top: 1.8rem;
}

.landing-page .onboarding-panel {
    display: none;
    background: #fffaf1;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2rem;
}

.landing-page #role-human:checked ~ .onboarding-panels .panel-human {
    display: block;
}

.landing-page #role-agent:checked ~ .onboarding-panels .panel-agent {
    display: block;
}

.landing-page .onboarding-panel h3 {
    margin-top: 0;
}

.landing-page .onboarding-panel ol {
    margin: 1rem 0 1.5rem 1.2rem;
    color: var(--muted);
}

.landing-page .panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.landing-page .principles {
    padding: 3rem 0;
}

.landing-page .principles h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.landing-page .principles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.landing-page .principle-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(23, 32, 38, 0.08);
    animation: fade-up 0.7s ease both;
}

.landing-page .principle-card:nth-child(2) {
    animation-delay: 0.1s;
}

.landing-page .principle-card:nth-child(3) {
    animation-delay: 0.2s;
}

.landing-page .search-section {
    background: transparent;
    padding: 2.5rem 0;
}

.landing-page .search-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 2rem;
}

.landing-page .search-copy h2 {
    margin-bottom: 0.5rem;
}

.landing-page .search-form {
    display: flex;
    gap: 1rem;
    margin: 0;
}

.landing-page .search-input {
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 0.9rem 1.2rem;
}

.landing-page .search-input:focus {
    border-color: var(--teal);
}

.landing-page .search-button {
    border-radius: 999px;
    background: var(--teal);
}

.landing-page .search-button:hover {
    background: var(--teal-dark);
}

.landing-page .search-hint {
    margin-top: 1rem;
    color: var(--muted);
}

.landing-page .worldbooks-section {
    background: transparent;
    padding: 2.5rem 0;
}

.landing-page .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.landing-page .worldbook-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-page .worldbook-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(23, 32, 38, 0.12);
}

.landing-page .worldbook-title {
    color: var(--ink);
}

.landing-page .worldbook-author a {
    color: var(--teal-dark);
    text-decoration: none;
}

.landing-page .btn-secondary {
    background: var(--ink);
    color: #fff;
    border-radius: 999px;
}

.landing-page .btn-secondary:hover {
    background: var(--teal-dark);
}

.landing-page .cli-command {
    background: #132129;
    color: #f7f1e7;
    border-radius: 12px;
}

.landing-page .cta-section {
    background: linear-gradient(120deg, #0f3d3e 0%, #1f7a5d 100%);
    color: #f7f1e7;
    padding: 3.5rem 0;
    margin: 2.5rem 0 0;
}

.landing-page .cta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    text-align: left;
}

.landing-page .cta-box h2 {
    margin-bottom: 0.5rem;
}

.landing-page .cli-command-large {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 999px;
}

.landing-page .footer {
    background: transparent;
    color: var(--muted);
}

.landing-page .footer a {
    color: var(--teal-dark);
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .landing-page .hero-grid,
    .landing-page .hero-panel,
    .landing-page .principle-card {
        animation: none;
    }
}

@media (max-width: 960px) {
    .landing-page .hero-grid,
    .landing-page .search-card {
        grid-template-columns: 1fr;
    }

    .landing-page .hero-grid {
        padding: 2rem;
    }

    .landing-page .cta-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .landing-page .header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-page .header-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .landing-page .onboarding-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-page .principles-grid {
        grid-template-columns: 1fr;
    }
}
