/* ── Design Tokens (agent-evals family) ── */
:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #f0f0f5;
    --text-secondary: #9898a8;
    --text-muted: #5a5a6e;
    --accent-blue: #3b82f6;
    --accent-purple: #a78bfa;
    --accent-green: #10b981;
    --accent-yellow: #fbbf24;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    --accent-red: #ef4444;
    --accent-cyan: #22d3ee;
    --success-color: #10b981;
    --error-color: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.page-home {
    background: linear-gradient(180deg,
        #0a0a0f 0%,
        #0d1a2d 8%,
        #1a3a5c 18%,
        #5a3550 28%,
        #8b4a6b 35%,
        #5a3550 42%,
        #1a3a5c 55%,
        #0d1a2d 75%,
        #0a0a0f 90%
    );
}

body.page-planner {
    background: linear-gradient(180deg,
        #0a0a0f 0%,
        #0f1220 30%,
        #141a2e 55%,
        #0f1220 80%,
        #0a0a0f 100%
    );
}

body.page-planner .wizard-step:not(.hidden) {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-logo-icon {
    height: 18px;
    width: auto;
    margin-right: 2px;
}

.nav-logo a,
.nav-logo a:visited,
.nav-logo a:hover,
.nav-logo a:active {
    text-decoration: none !important;
}

.nav-logo-muted {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.nav-logo-muted:hover {
    color: white;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-link:hover { color: white; }

/* ── Main content ── */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding-top: 3.5rem;
}

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

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
    40% { opacity: 1; transform: scale(1.2); }
}

@keyframes softPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ========== PLANNER LAYOUT ========== */

.wizard-step { animation: fadeIn 0.3s ease; }
.wizard-step.hidden { display: none !important; }

/* --- Step 1: Describe --- */
.planner-controls { margin-top: 1rem; }
.planner-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
#describe-input { margin-top: 1rem; min-height: 140px; }

/* --- Textareas (shared) --- */
textarea {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

textarea::placeholder { color: var(--text-muted); }

/* --- Step 2: Refine (chat) --- */
.chat-messages {
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 0.75rem;
}

.chat-message {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.chat-message-loading {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 0.5rem 0;
    background: none !important;
    border: none !important;
    margin: 0 !important;
    animation: none !important;
}

.chat-message-loading .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent-blue); opacity: 0.3;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.chat-message-loading .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-message-loading .dot:nth-child(3) { animation-delay: 0.4s; }

.chat-message-user {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-primary);
    margin-left: 2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.chat-message-assistant {
    background: var(--bg-card);
    color: var(--text-primary);
    margin-right: 2rem;
    border: 1px solid var(--border-subtle);
}

.chat-message-system {
    background: none;
    color: var(--accent-blue);
    text-align: center;
    font-size: 0.8125rem;
}

.chat-message-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

#chat-input { margin-top: 0.75rem; }

.refine-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

/* --- Step 3: Generate --- */
#step-generate {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 14rem);
}

.spec-output {
    flex: 1;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1.25rem;
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-y: auto;
    color: var(--text-primary);
}

.spec-output .landmark-keyword {
    color: var(--accent-cyan);
    font-weight: 700;
    display: block;
    margin-top: 0.75rem;
}

.spec-output .bullet {
    color: var(--accent-yellow);
}

.spec-output.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
    animation: softPulse 2s ease-in-out infinite;
}

.spec-output.error {
    text-align: center;
    color: #fca5a5;
    padding: 3rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #2563eb;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* ── Responsive: Planner ── */
@media (max-width: 768px) {
    .wizard-container { padding: 1rem 1rem 5rem; }
    .wizard-step h2 { font-size: 16px; }
    .action-buttons { flex-direction: column; }
    .chat-input-container { flex-direction: column; }
    .nav-links { gap: 12px; }
    .nav-link { font-size: 13px; }
    .ref-modal { width: 95%; max-height: 85vh; }
}

/* ========== HOMEPAGE STYLES ========== */

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-new {
    background: var(--accent-blue);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Hero section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: transparent;
}

.hero-content {
    max-width: 900px;
    width: 100%;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-line { display: block; margin-bottom: 0.5rem; }
.static-text { display: inline-block; width: 5em; }
.rotating-text-wrapper { display: inline-block; width: 8em; }

.rotating-text {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.rotating-text::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0.8em;
    background: var(--accent-orange);
    animation: blink 1s infinite;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
    text-align: center;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-hover);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Sections */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-alt {
    background: rgba(255, 255, 255, 0.02);
}

.section-content {
    max-width: 1000px;
    margin: 0 auto;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Pillar grid */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.pillar-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 0.75rem;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.2s ease;
}

.pillar-card:hover {
    border-color: var(--border-hover);
}

.pillar-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.pillar-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Code examples */
.code-example {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    overflow: hidden;
    margin: 2.5rem 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-subtle);
}

.code-language {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    color: var(--accent-cyan);
    font-weight: 600;
}

.copy-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.code-example pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-example code {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Syntax highlighting */
.kw { color: var(--accent-cyan); }
.str { color: var(--accent-green); }
.type { color: var(--accent-purple); }
.flag { color: var(--accent-orange); }
.comment { color: var(--text-muted); font-style: italic; }

/* Collapsible code blocks */
.collapsible-code { position: relative; }

.collapsible-code .code-example pre {
    max-height: 280px !important;
    overflow: hidden !important;
}

.collapsible-code-fade {
    position: absolute;
    bottom: 42px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, #0d0d0d);
    pointer-events: none;
    border-radius: 0 0 0.75rem 0.75rem;
}

.collapsible-code.expanded .code-example pre { max-height: none; }
.collapsible-code.expanded .collapsible-code-fade { display: none; }

.collapsible-code-toggle {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: -1px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
}

.collapsible-code-toggle:hover {
    color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
}

.collapsible-code .code-example { border-radius: 0.75rem 0.75rem 0 0; }
.collapsible-code.expanded .code-example { border-radius: 0.75rem; }

.collapsible-code.expanded .collapsible-code-toggle {
    border-radius: 0.75rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-subtle);
}

/* Get started steps */
.get-started-steps { margin-top: 3rem; }

.step-item {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.step-item:last-child { border-bottom: none; }

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 48px 32px;
    text-align: center;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-secondary); }

.footer-brand {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== ARTICLE-STYLE HOMEPAGE ========== */

.article-home {
    max-width: 900px;
    margin: 0 auto;
}

.article-hero {
    text-align: left;
    margin-bottom: 3rem;
}

.article-hero .hero-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-subtitle {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.article-home .hero-actions {
    justify-content: flex-start;
    margin-bottom: 0;
}

/* Article section titles */
.article-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}

.section-icon svg { width: 16px; height: 16px; }

/* Article doc text */
.doc-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.doc-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.doc-text em { font-style: italic; }

.doc-text code {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--accent-pink);
}

/* Divider */
.doc-divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 48px 0;
}

/* Article-style doc sections */
.article-home .article-doc-section {
    margin-bottom: 0;
}

/* Article-style pillar cards */
.article-pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.article-pillar-card:hover {
    border-color: var(--border-hover);
}

.pillar-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 14px;
}

.pillar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

.pillar-icon svg { width: 18px; height: 18px; }

.pillar-header-text { flex: 1; }

.pillar-number {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.pillar-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.pillar-card-body { padding: 20px 24px; }
.pillar-card-body .doc-text { font-size: 14px; margin-bottom: 12px; }
.pillar-card-body .doc-text:last-child { margin-bottom: 0; }

/* Compact landmark cards (quickstart page) */
.landmark-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.landmark-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s;
}

.landmark-card:hover {
    border-color: var(--border-hover);
}

.landmark-card .pillar-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex-shrink: 0;
}

.landmark-card .pillar-icon svg { width: 15px; height: 15px; }

.landmark-card-text {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.landmark-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.landmark-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Reading list */
.reading-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reading-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.reading-item:hover {
    border-color: var(--border-hover);
}

.reading-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.reading-item-icon svg {
    width: 16px;
    height: 16px;
}

.reading-item-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.reading-item-text p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Article homepage responsive */
@media (max-width: 600px) {
    .article-hero .hero-title { font-size: 2.25rem; }
    .article-subtitle { font-size: 15px; }
    .article-section-title { font-size: 19px; }
    .pillar-card-header { padding: 16px 20px; }
    .pillar-card-body { padding: 16px 20px; }
}

/* ========== DOCUMENTATION PAGES ========== */

.doc-content {
    padding: 8rem 2rem 4rem;
    min-height: 100vh;
}

.doc-container {
    max-width: 900px;
    margin: 0 auto;
}

.doc-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.doc-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.doc-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -2.25rem;
    margin-bottom: 2.5rem;
}

.doc-section {
    margin-bottom: 4rem;
    scroll-margin-top: 5rem;
}

.doc-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.doc-section h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.doc-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.doc-section ul, .doc-section ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.doc-section li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.doc-list {
    list-style: none;
    padding: 0;
}

.doc-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
}

.doc-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: 700;
}

.doc-list li strong { color: var(--text-primary); }

/* Landmark detail boxes */
.landmark-detail {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.landmark-key {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-pink);
    border-radius: 0.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.landmark-detail p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.landmark-detail pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
}

.landmark-detail pre:last-child { margin-bottom: 0; }

.landmark-detail code {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Next steps */
.next-steps {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Examples grid */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.example-full-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.example-full-card:hover {
    border-color: var(--border-hover);
}

.example-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.example-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.example-full-card > p {
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.example-full-card details {
    border-top: 1px solid var(--border-subtle);
}

.example-full-card summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--accent-blue);
    font-weight: 600;
    transition: background 0.2s ease;
}

.example-full-card summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.example-full-card .code-example {
    margin: 0;
    border: none;
    border-radius: 0;
}

.example-full-card .code-example code {
    font-size: 0.75rem;
    line-height: 1.7;
}

.example-full-card .code-example pre {
    max-width: 100%;
    overflow-x: auto;
}

/* Step by step */
.step-by-step { margin-top: 1.25rem; }

.step-by-step .step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.step-by-step .step-item:last-child { border-bottom: none; }

.step-by-step .step-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    font-weight: 700;
    font-size: 0.8125rem;
}

.step-by-step .step-content { flex: 1; }

.step-by-step .step-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.step-by-step .step-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.step-by-step pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.step-by-step code {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Action box */
.action-box {
    text-align: center;
    margin-top: 2rem;
}

/* Table of contents */
.spec-toc {
    margin: 1rem 0 3.5rem;
}

.spec-toc strong {
    display: inline;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.spec-toc strong::after {
    content: " \00b7  ";
    color: var(--text-secondary);
    font-weight: 400;
}

.spec-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline;
}

.spec-toc li { display: inline; }

.spec-toc li:not(:last-child)::after {
    content: " \00b7  ";
    color: var(--text-secondary);
}

.spec-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}

.spec-toc a:hover { color: var(--accent-blue); }

/* ========== PLANNER: TYPE TOGGLE ========== */

.type-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 1.25rem;
}

.type-toggle-option {
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.type-toggle-option:hover { color: var(--text-primary); }

.type-toggle-option.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    font-weight: 600;
}

/* ========== PLANNER: EXAMPLE PILLS ========== */

.example-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.example-pills-label {
    font-size: 12px;
    color: var(--text-muted);
}

.example-pill {
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.example-pill:hover {
    color: var(--accent-blue);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ========== PLANNER: SKIP LINK ========== */

.skip-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.skip-link:hover { color: var(--accent-blue); }

/* ========== PLANNER: REFERENCE MODAL ========== */

.ref-trigger-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: color 0.15s ease;
}

.ref-trigger-inline:hover { color: var(--accent-blue); }

.ref-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.ref-modal-overlay.hidden { display: none; }

.ref-modal {
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.ref-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.ref-modal-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 3px;
}

.ref-tab {
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ref-tab:hover { color: var(--text-primary); }

.ref-tab.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    font-weight: 600;
}

.ref-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.ref-modal-close:hover { color: var(--text-primary); }

.ref-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.ref-tab-content { display: none; }
.ref-tab-content.active { display: block; }

.ref-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-top: 16px;
}

.ref-section-label:first-child { margin-top: 0; }

.ref-example {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ref-example:hover {
    border-color: var(--border-hover);
}

.ref-example-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ref-example-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.ref-example-tag {
    display: inline-block;
    margin-top: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border-radius: 4px;
}

/* ========== PLANNER: LINT RESULTS ========== */

.lint-results {
    margin-top: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.lint-results summary {
    cursor: pointer;
    list-style: none;
}

.lint-results summary::-webkit-details-marker { display: none; }

.lint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
}

.lint-results[open] .lint-header {
    border-bottom: 1px solid var(--border-subtle);
}

.lint-header-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.lint-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.lint-badge-pass {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.lint-badge-fail {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.lint-badge-warn {
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-yellow);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.lint-items {
    padding: 0.75rem 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.lint-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.lint-item:last-child { border-bottom: none; }

.lint-code {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 3.5rem;
}

.lint-code-error { color: var(--accent-red); }
.lint-code-warning { color: var(--accent-yellow); }

.lint-message { color: var(--text-secondary); }

.lint-location {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Animation classes */
.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Example tag colors */
.example-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.example-tag-minimal { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.example-tag-data { background: rgba(167, 139, 250, 0.15); color: var(--accent-purple); }
.example-tag-multi { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.example-tag-swarm { background: rgba(251, 191, 36, 0.15); color: var(--accent-yellow); }
.example-tag-evolution { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }

/* ── Responsive (global) ── */
@media (max-width: 768px) {
    .hero { padding: 7rem 1rem 2rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .features-grid { grid-template-columns: 1fr; }
    .section { padding: 4rem 1rem; }
    .section-title { font-size: 2rem; }
    .doc-content { padding: 7rem 1rem 2rem; }
    .doc-title { font-size: 2rem; }
    .examples-grid { grid-template-columns: 1fr; }
    .next-steps { flex-direction: column; }
    .nav-links { gap: 12px; }
    .nav-link { font-size: 13px; }
}
