/* ========================================
   CSS RESET & VARIABLES
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-2: #21262d;
    --surface-3: #30363d;
    --text: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --accent: #da7756;
    --accent-dim: #da775633;
    --blue: #58a6ff;
    --purple: #bc8cff;
    --green: #3fb950;
    --red: #f85149;
    --orange: #d29922;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --font-heading: "EB Garamond", Georgia, serif;
    --font-mono: "JetBrains Mono", "Fira Code", monospace;
    --sidebar-w: 260px;
    --content-max: 900px;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;

    /* Typography scale */
    --text-2xs: 0.625rem;
    --text-xs: 0.6875rem;
    --text-sm: 0.75rem;
    --text-base-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-md: 0.9375rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.625rem;
    --text-3xl: 1.75rem;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
html {
    overflow-x: hidden;
}
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--purple);
}
img {
    max-width: 100%;
    display: block;
}
::selection {
    background: var(--accent);
    color: var(--bg);
}
h1,
h2 {
    font-family: var(--font-heading);
    font-weight: 400;
}
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* ========================================
   LAYOUT
   ======================================== */
.layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--surface-3);
    padding: 24px 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--surface-3);
    margin-bottom: 16px;
}
.sidebar-logo {
    font-family: var(--font-mono);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-logo .prompt {
    color: var(--green);
}
.lang-toggle {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition);
}
.lang-toggle:hover {
    color: var(--accent);
    background: var(--accent-dim);
}
.sidebar-nav {
    list-style: none;
    padding: 0 12px;
}
.sidebar-nav li {
    margin-bottom: 2px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: var(--text-base);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.sidebar-nav a:hover {
    color: var(--text);
    background: var(--surface-2);
}
.sidebar-nav a.active {
    color: var(--accent);
    background: var(--accent-dim);
}
.sidebar-nav .nav-number {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-muted);
}
.sidebar-nav a.active .nav-number {
    background: var(--accent);
    color: var(--bg);
}

/* Progress */
.sidebar-progress {
    padding: 16px 20px;
    border-top: 1px solid var(--surface-3);
    margin-top: 16px;
}
.progress-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.progress-bar {
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Main content */
.main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    padding: 40px 48px 80px;
    max-width: calc(var(--content-max) + 96px);
}

/* Footer */
.site-footer {
    margin-top: 64px;
    padding: 24px 0;
    border-top: 1px solid var(--surface-3);
    text-align: center;
}
.site-footer p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.site-footer a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer a:hover {
    color: var(--accent);
}

/* Mobile hamburger */
.hamburger {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--surface-3);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    margin-bottom: 64px;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}
.section.visible {
    opacity: 1;
    transform: translateY(0);
}
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--surface-3);
}
.section-number {
    font-family: var(--font-mono);
    font-size: var(--text-base-sm);
    font-weight: 700;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent);
    color: var(--bg);
    flex-shrink: 0;
}
.section-title {
    font-size: var(--text-2xl);
    letter-spacing: -0.02em;
}
.section-link {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--surface-3);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
    opacity: 0;
    position: relative;
}
.section-link svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    transition: fill var(--transition);
}
.section-header:hover .section-link {
    opacity: 0.6;
}
.section-link:hover {
    opacity: 1 !important;
    border-color: var(--accent);
}
.section-link:hover svg {
    fill: var(--accent);
}
.section-link-toast {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.25rem;
    border-radius: 4px;
    color: var(--accent);
    background: var(--surface);
    border: 1px solid var(--surface-2);
    white-space: nowrap;
    pointer-events: none;
    animation: toast-fade 1.5s ease forwards;
}
@keyframes toast-fade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
.section-check {
    margin-left: auto;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--surface-3);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}
.section-check:hover {
    border-color: var(--accent);
}
.section-check.checked {
    background: var(--accent);
    border-color: var(--accent);
}
.section-check.checked::after {
    content: "✓";
    color: var(--bg);
    font-size: var(--text-base);
    font-weight: 700;
}

/* ========================================
   HERO
   ======================================== */
.hero {
    margin-bottom: 64px;
    padding-top: 20px;
    opacity: 1;
    transform: none;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--accent-dim);
    color: var(--accent);
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--accent);
}
.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Terminal animation */
.terminal {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
    max-width: 700px;
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--surface-3);
}
.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.terminal-dot.r {
    background: #f85149;
}
.terminal-dot.y {
    background: #d29922;
}
.terminal-dot.g {
    background: #3fb950;
}
.terminal-title {
    margin-left: auto;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: var(--text-base-sm);
    line-height: 1.8;
    height: 28rem;
    overflow-y: auto;
    color: var(--text-secondary);
}

/* Custom scrollbar — scoped to sidebar and terminal */
.sidebar,
.terminal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}
.sidebar::-webkit-scrollbar,
.terminal-body::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track,
.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb,
.terminal-body::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover,
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
.terminal-line {
    white-space: pre-wrap;
    word-break: break-word;
}
.terminal-line .prompt-symbol {
    color: var(--green);
}
.terminal-line .cmd {
    color: var(--text);
}
.terminal-line .comment {
    color: var(--text-muted);
    font-style: italic;
}
.terminal-line .output {
    color: var(--text-secondary);
}
.terminal-line .highlight {
    color: var(--accent);
}
.terminal-line .tool {
    color: var(--purple);
}
.terminal-banner {
    border: 1px solid var(--text-muted);
    border-radius: 8px;
    padding: 1rem 2rem;
    /*margin: 2px 0 2px 16px;*/
    margin-inline: 2rem;
    margin-block: 1rem;
    display: inline-block;
    color: var(--text-secondary);
    white-space: pre;
}
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--accent);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}
@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Value cards */
.value-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.value-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--surface-3);
    transition: all 0.3s ease;
}
.value-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}
.value-card-icon {
    font-size: var(--text-3xl);
    margin-bottom: 12px;
}
.value-card h3 {
    font-size: var(--text-xl);
    margin-bottom: 8px;
}
.value-card p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   TYPOGRAPHY & CONTENT
   ======================================== */
.content-block {
    margin-bottom: 24px;
}
.content-block p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: var(--text-md);
    line-height: 1.7;
}
.content-block h3 {
    font-size: var(--text-xl);
    margin-bottom: 12px;
    color: var(--text);
}
.content-block ul,
.content-block ol {
    color: var(--text-secondary);
    font-size: var(--text-md);
    padding-left: 24px;
    margin-bottom: 16px;
}
.content-block li {
    margin-bottom: 8px;
    line-height: 1.6;
}
.content-block strong {
    color: var(--text);
    font-weight: 600;
}

/* ========================================
   CODE BLOCKS
   ======================================== */
.code-block {
    position: relative;
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}
.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-3);
}
.code-block-lang {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
}
.copy-btn {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}
.copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.copy-btn.copied {
    color: var(--green);
    border-color: var(--green);
}
.code-block pre {
    padding: 16px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--text-base-sm);
    line-height: 1.7;
    color: var(--text);
}
.code-block code {
    font-family: inherit;
}
code.inline {
    font-family: var(--font-mono);
    font-size: var(--text-base-sm);
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--accent);
}
.tool-name {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ========================================
   CALLOUTS
   ======================================== */
.callout {
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 20px;
    font-size: var(--text-base);
    line-height: 1.6;
}
.callout-title {
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.callout.tip {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--text);
}
.callout.tip .callout-title {
    color: var(--accent);
}
.callout.info {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--blue);
    color: var(--text);
}
.callout.info .callout-title {
    color: var(--blue);
}
.callout.warning {
    background: rgba(210, 153, 34, 0.1);
    border-color: var(--orange);
    color: var(--text);
}
.callout.warning .callout-title {
    color: var(--orange);
}

/* ========================================
   DIAGRAM
   ======================================== */
.diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 32px 24px;
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-lg);
}
.diagram-node {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-weight: 600;
    text-align: center;
    min-width: 120px;
}
.diagram-node.user {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent);
}
.diagram-node.claude {
    background: rgba(88, 166, 255, 0.15);
    color: var(--blue);
    border: 1px solid var(--blue);
}
.diagram-node.tool {
    background: rgba(188, 140, 255, 0.15);
    color: var(--purple);
    border: 1px solid var(--purple);
}
.diagram-arrow {
    color: var(--text-muted);
    font-size: var(--text-xl);
    flex-shrink: 0;
}
.diagram-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========================================
   ACCORDIONS
   ======================================== */
.accordion {
    margin-bottom: 12px;
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    overflow: hidden;
}
.accordion summary {
    padding: 16px 20px;
    cursor: pointer;
    font-size: var(--text-md);
    font-weight: 600;
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    transition: background var(--transition);
}
.accordion summary::-webkit-details-marker {
    display: none;
}
.accordion summary::before {
    content: "▶";
    font-size: var(--text-2xs);
    color: var(--text-muted);
    transition: transform 0.3s ease;
    display: inline-block;
}
.accordion[open] summary::before {
    transform: rotate(90deg);
}
.accordion summary:hover {
    background: var(--surface-2);
}
.accordion-step {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--accent);
    color: var(--bg);
}
.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.4s ease,
        padding 0.3s ease;
}
.accordion[open] .accordion-content {
    padding: 20px;
    max-height: 2000px;
}

/* ========================================
   CARDS EXPANDIBLES
   ======================================== */
.concept-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.concept-card {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition);
}
.concept-card:hover {
    border-color: var(--surface-3);
}
.concept-card-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
}
.concept-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}
.concept-card-icon.accent {
    background: var(--accent-dim);
}
.concept-card-icon.blue {
    background: rgba(88, 166, 255, 0.15);
}
.concept-card-icon.purple {
    background: rgba(188, 140, 255, 0.15);
}
.concept-card-icon.green {
    background: rgba(63, 185, 80, 0.15);
}
.concept-card h3 {
    font-size: var(--text-xl);
    margin-bottom: 2px;
}
.concept-card .card-desc {
    font-size: var(--text-base-sm);
    color: var(--text-secondary);
}
.concept-card-toggle {
    margin-left: auto;
    color: var(--text-muted);
    font-size: var(--text-lg);
    transition: transform 0.3s ease;
}
.concept-card.open .concept-card-toggle {
    transform: rotate(180deg);
}
.concept-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.concept-card.open .concept-card-body {
    max-height: 3000px;
}
.concept-card-body-inner {
    padding: 0 24px 24px;
    border-top: 1px solid var(--surface-3);
    padding-top: 20px;
}

/* ========================================
   COMPARISON
   ======================================== */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.comparison-col {
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--surface-3);
}
.comparison-col.bad {
    background: rgba(248, 81, 73, 0.06);
    border-color: rgba(248, 81, 73, 0.3);
}
.comparison-col.good {
    background: rgba(63, 185, 80, 0.06);
    border-color: rgba(63, 185, 80, 0.3);
}
.comparison-label {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}
.comparison-col.bad .comparison-label {
    color: var(--red);
}
.comparison-col.good .comparison-label {
    color: var(--green);
}
.comparison-col pre {
    font-family: var(--font-mono);
    font-size: var(--text-base-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ========================================
   TABLE
   ======================================== */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}
.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}
.table-wrapper th {
    text-align: left;
    padding: 12px 16px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    border-bottom: 2px solid var(--surface-3);
}
.table-wrapper td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--surface-3);
    color: var(--text-secondary);
}
.table-wrapper tr:hover td {
    background: var(--surface);
}

/* ========================================
   TABS
   ======================================== */
.tabs {
    margin-bottom: 24px;
}
.tab-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 2px solid var(--surface-3);
    margin-bottom: 0;
    padding-bottom: 0;
}
.tab-list[role="tablist"] {
    padding: 0;
}
.tab-btn {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all var(--transition);
}
.tab-btn:hover {
    color: var(--text);
}
.tab-btn[aria-selected="true"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab-panel {
    display: none;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}
.tab-panel.active {
    display: block;
}

/* ========================================
   RECIPE CARDS
   ======================================== */
.recipe-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.recipe-search {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--surface-3);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: border-color var(--transition);
}
.recipe-search:focus {
    outline: none;
    border-color: var(--accent);
}
.recipe-search::placeholder {
    color: var(--text-muted);
}
.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--surface-3);
    color: var(--text-secondary);
    font-size: var(--text-base-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.recipe-card {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}
.recipe-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}
.recipe-card-top {
    padding: 20px;
}
.recipe-card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.recipe-tag {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.recipe-tag.beginner {
    background: rgba(63, 185, 80, 0.15);
    color: var(--green);
}
.recipe-tag.intermediate {
    background: rgba(210, 153, 34, 0.15);
    color: var(--orange);
}
.recipe-tag.advanced {
    background: rgba(248, 81, 73, 0.15);
    color: var(--red);
}
.recipe-tag.time {
    background: var(--surface-2);
    color: var(--text-secondary);
}
.recipe-card h4 {
    font-size: var(--text-lg);
    margin-bottom: 6px;
}
.recipe-card .recipe-desc {
    font-size: var(--text-base-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}
.recipe-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.recipe-card.open .recipe-card-body {
    max-height: 5000px;
}
.recipe-card-body-inner {
    padding: 20px;
    border-top: 1px solid var(--surface-3);
}
.recipe-step {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.recipe-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent);
    color: var(--bg);
    font-size: var(--text-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.recipe-step-content {
    flex: 1;
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
}
.recipe-step-content strong {
    color: var(--text);
}

/* ========================================
   DECISION TREE
   ======================================== */
.decision-tree {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.dt-node {
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    text-align: center;
    font-size: var(--text-base);
    font-weight: 600;
}
.dt-question {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--surface-3);
}
.dt-yes {
    background: rgba(63, 185, 80, 0.12);
    color: var(--green);
    border: 1px solid rgba(63, 185, 80, 0.3);
}
.dt-no {
    background: rgba(248, 81, 73, 0.12);
    color: var(--red);
    border: 1px solid rgba(248, 81, 73, 0.3);
}
.dt-result {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent);
}
.dt-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.dt-row > * {
    flex: 1;
}
.dt-arrow {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-lg);
    margin-bottom: 8px;
}

/* ========================================
   CHEATSHEET
   ======================================== */
.cheatsheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.cheat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
}
.cheat-key {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--accent);
    white-space: nowrap;
}
.cheat-desc {
    font-size: var(--text-base-sm);
    color: var(--text-secondary);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open {
        display: block;
    }
    .sidebar-header {
        margin-top: 3rem;
    }
    .hamburger {
        display: flex;
    }
    .main {
        margin-left: 0;
        padding: 24px 16px 60px;
        padding-top: 64px;
    }
    .hero-title {
        font-size: 3rem;
    }
    .comparison {
        grid-template-columns: 1fr;
    }
    .tab-btn {
        padding: 10px 14px;
        font-size: var(--text-base-sm);
    }
    .diagram {
        flex-direction: column;
    }
    .diagram-arrow {
        transform: rotate(90deg);
    }
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    .cheatsheet {
        grid-template-columns: 1fr;
    }
    .value-cards {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 1.375rem;
    }
    .dt-row {
        flex-direction: column;
    }
    .terminal-body {
        height: 20rem;
        padding: 16px;
        font-size: 0.75rem;
    }
    .table-wrapper thead {
        display: none;
    }
    .table-wrapper tr {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--surface-3);
    }
    .table-wrapper td {
        display: block;
        padding: 4px 0;
        border-bottom: none;
    }
    .table-wrapper td:first-child {
        color: var(--text);
        font-weight: 600;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .section {
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}
