:root {
  --bg-canvas: #172d27;
  --bg-surface: rgba(38, 62, 53, 0.78);
  --bg-surface-hover: rgba(48, 78, 66, 0.92);
  --text-primary: #f0f2e5;
  --text-muted: #c2cbb8;
  --accent-primary: #ff6f59;
  --accent-secondary: #d4e0c3;
  --border-subtle: rgba(240, 242, 229, 0.16);
  --shadow-hard: 4px 4px 0 #0b1714;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(11, 23, 20, 0.5);
  --glow-accent: 0 0 24px -4px rgba(255, 111, 89, 0.35);
  --glass-backdrop: blur(16px) saturate(160%);
  --radius: 20px;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background-color: #10211c; color: var(--text-primary); font-family: var(--font-body); line-height: 1.6; }
body { background-color: var(--bg-canvas); margin: 24px; border: 1px solid var(--border-subtle); border-radius: var(--radius); min-height: calc(100vh - 48px); position: relative; overflow-wrap: anywhere; hyphens: auto; background-image: radial-gradient(circle at 85% 12%, rgba(255, 111, 89, 0.12), transparent 35%), radial-gradient(circle at 15% 75%, rgba(56, 94, 79, 0.4), transparent 45%); }

a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s ease; }
a:hover { color: var(--text-primary); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); object-fit: cover; }

.site-header { position: relative; border-bottom: 1px solid var(--border-subtle); padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(23, 45, 39, 0.65); border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; margin-right: auto; }
.brand-mark { width: 14px; height: 14px; background: var(--accent-primary); border-radius: 4px; display: inline-block; box-shadow: 2px 2px 0 #0b1714; }
.nav-desktop { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav-desktop a { text-decoration: none; color: var(--text-primary); font-family: var(--font-mono); font-size: 0.9rem; padding: 6px 10px; border-radius: 8px; transition: background 0.2s, color 0.2s; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { background: var(--bg-surface); color: var(--accent-primary); }

.nav-toggle { display: none; background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 6px 12px; font-size: 1.25rem; cursor: pointer; font-family: var(--font-mono); line-height: 1; }
.nav-mobile { display: none; position: absolute; top: 100%; right: 20px; left: 20px; z-index: 50; background: #1d362f; border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-elevation); backdrop-filter: var(--glass-backdrop); }
.nav-mobile.is-open { display: block; }
.nav-mobile ul { list-style: none; display: grid; gap: 10px; }
.nav-mobile a { display: block; padding: 10px 14px; color: var(--text-primary); text-decoration: none; font-family: var(--font-mono); border-radius: 10px; background: rgba(255,255,255,0.03); }
.nav-mobile a:hover { background: var(--accent-primary); color: #10211c; }

.container { max-width: 1200px; margin: 0 auto; padding: 36px 28px; }
.prose { max-width: 70ch; margin: 0 auto; }
.prose h2, .prose h3 { margin-top: 1.8em; margin-bottom: 0.6em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }

.mono-label { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-primary); display: inline-block; margin-bottom: 8px; background: rgba(255, 111, 89, 0.12); padding: 4px 10px; border-radius: 99px; border: 1px solid rgba(255, 111, 89, 0.3); }
h1, h2, h3, h4 { color: var(--text-primary); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -0.02em; margin-bottom: 16px; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
h3 { font-size: 1.2rem; font-family: var(--font-mono); margin-bottom: 10px; }
p { color: var(--text-muted); margin-bottom: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent-primary); color: #12221d; font-family: var(--font-mono); font-weight: 700; font-size: 0.92rem; text-decoration: none; padding: 12px 22px; border-radius: 14px; border: 1px solid #0b1714; box-shadow: var(--shadow-hard); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translate(4px, 4px); box-shadow: 0 0 0 #0b1714; color: #0b1714; background: #ff8573; }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-subtle); }
.btn-secondary:hover { background: var(--bg-surface-hover); color: var(--text-primary); }

.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center; padding: 20px 0 44px; border-bottom: 1px solid var(--border-subtle); }
.hero-stack { position: relative; min-height: 390px; display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; }
.hero-stack .stack-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--border-subtle); box-shadow: var(--shadow-elevation); background: var(--bg-surface); transition: transform 0.3s var(--ease-kinetic); }
.hero-stack .stack-card:nth-child(1) { grid-column: 1 / 9; grid-row: 1; z-index: 2; transform: rotate(-2deg); }
.hero-stack .stack-card:nth-child(2) { grid-column: 5 / 13; grid-row: 1; z-index: 3; margin-top: 110px; transform: rotate(2deg); border-color: var(--accent-primary); }
.hero-stack .stack-card:nth-child(3) { grid-column: 2 / 10; grid-row: 1; z-index: 1; margin-top: -120px; margin-left: 40px; opacity: 0.9; }
.hero-stack .stack-card img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.stack-caption { font-family: var(--font-mono); font-size: 0.72rem; padding: 6px 12px; background: rgba(15, 31, 27, 0.9); color: var(--text-primary); }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 28px 0; }
.stat-box { background: var(--bg-surface); backdrop-filter: var(--glass-backdrop); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 18px 20px; }
.stat-val { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); display: block; }
.stat-desc { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0 0; }

.section-block { padding: 44px 0; border-bottom: 1px solid var(--border-subtle); }
.section-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }

.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--bg-surface); backdrop-filter: var(--glass-backdrop); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 24px; transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic); display: flex; flex-direction: column; justify-content: space-between; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elevation), var(--glow-accent); background: var(--bg-surface-hover); }
.card img { aspect-ratio: 16 / 9; margin-bottom: 16px; width: 100%; }
.card-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-secondary); margin-bottom: 8px; }

.tabs-console { background: rgba(18, 35, 30, 0.75); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 24px; }
.tab-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 16px; }
.tab-btn { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 10px 16px; font-family: var(--font-mono); font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.tab-btn[aria-selected="true"] { background: var(--accent-primary); color: #10211c; font-weight: 700; box-shadow: 3px 3px 0 #0b1714; }
.tab-panel { display: none; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.tab-panel.active { display: grid; }

.recipe-list { list-style: none; display: grid; gap: 14px; counter-reset: step-counter; }
.recipe-item { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start; }
.recipe-item::before { counter-increment: step-counter; content: "0" counter(step-counter); font-family: var(--font-mono); font-weight: 700; color: var(--accent-primary); background: rgba(255, 111, 89, 0.14); padding: 6px 10px; border-radius: 10px; font-size: 0.9rem; flex-shrink: 0; }

.waveform-box { background: #11221d; border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 22px; margin: 20px 0; }
.waveform-bars { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 74px; padding: 10px 0; }
.waveform-bars span { flex: 1; background: var(--accent-secondary); border-radius: 4px; opacity: 0.65; }
.waveform-bars span.peak { background: var(--accent-primary); opacity: 1; }
.waveform-legend { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); border-top: 1px dashed var(--border-subtle); padding-top: 8px; }

details.expand-panel { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px 22px; margin-bottom: 14px; }
details.expand-panel summary { font-family: var(--font-mono); font-weight: 700; cursor: pointer; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.expand-panel summary::after { content: "+"; color: var(--accent-primary); font-size: 1.2rem; }
details.expand-panel[open] summary::after { content: "−"; }
details.expand-panel .panel-body { padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--border-subtle); }

.check-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; background: rgba(15, 30, 25, 0.8); padding: 20px; border-radius: var(--radius); border: 1px solid var(--border-subtle); }
.check-item { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.85rem; }
.check-badge { width: 22px; height: 22px; border-radius: 6px; background: var(--accent-primary); color: #10211c; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }

.table-wrap { overflow-x: auto; margin: 22px 0; border-radius: var(--radius); border: 1px solid var(--border-subtle); }
table { width: 100%; border-collapse: collapse; background: var(--bg-surface); font-size: 0.92rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { font-family: var(--font-mono); color: var(--accent-primary); background: rgba(15, 30, 25, 0.6); }

.form-grid { display: grid; gap: 18px; background: var(--bg-surface); padding: 26px; border-radius: var(--radius); border: 1px solid var(--border-subtle); }
.field-group { display: grid; gap: 6px; }
.field-group label { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-primary); }
.field-group input, .field-group select, .field-group textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-subtle); background: #12241f; color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem; }
.preview-box { background: #0f1e1a; border: 1px solid var(--border-subtle); border-radius: 14px; padding: 16px; font-family: var(--font-mono); font-size: 0.85rem; white-space: pre-wrap; color: var(--accent-secondary); min-height: 120px; }

.site-footer { border-top: 1px solid var(--border-subtle); padding: 36px 28px; background: rgba(16, 33, 28, 0.85); border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); font-size: 0.9rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
.footer-links { list-style: none; display: grid; gap: 8px; font-family: var(--font-mono); font-size: 0.85rem; }
.footer-bottom { max-width: 1200px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 860px) {
  body { margin: 10px; min-height: calc(100vh - 20px); }
  .hero-grid, .tab-panel.active, .footer-grid { grid-template-columns: 1fr; }
  .hero-stack { min-height: auto; display: grid; grid-template-columns: 1fr; gap: 14px; }
  .hero-stack .stack-card:nth-child(1), .hero-stack .stack-card:nth-child(2), .hero-stack .stack-card:nth-child(3) { grid-column: auto; grid-row: auto; margin: 0; transform: none; }
}
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .container { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
