:root {
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-body: #c8c8d0;
    --accent: #d97736;
    --accent-glow: rgba(217, 119, 54, 0.15);
    --line: rgba(255, 255, 255, 0.08);
    --panel: rgba(8, 8, 10, 0.86);
    --code-bg: #0d0d10;
}

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

html { scroll-behavior: smooth; }

body {
    background: #050505;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
}

::selection { background: rgba(217, 119, 54, 0.35); color: #fff; }

canvas#canvas {
    display: block;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    cursor: grab;
}
canvas#canvas:active { cursor: grabbing; }

.page {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.page > * { pointer-events: auto; }

.top-bar {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 40px 10% 0;
}
.brand {
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    letter-spacing: 0.1em;
    font-size: 1.54rem;
    color: var(--accent);
    text-decoration: none;
}
.status {
    font-family: 'Space Mono', monospace;
    font-size: 1.05rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.05em;
}
.dot {
    width: 6px; height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

main { flex: 1; padding: 60px 10% 40px; }

.breadcrumb {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 780px;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.5; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.panel {
    max-width: 780px;
    padding: 48px;
    border-left: 2px solid var(--accent);
    background:
        linear-gradient(90deg, rgba(217, 119, 54, 0.05) 0%, transparent 60%),
        var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.eyebrow {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.article h1 {
    font-size: 2.6rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}
.article h2 {
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 3rem 0 1rem;
    scroll-margin-top: 24px;
}
.article h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    scroll-margin-top: 24px;
}
.article p,
.article li {
    font-size: 1.075rem;
    line-height: 1.75;
    color: var(--text-body);
    font-weight: 400;
}
.article p { margin-bottom: 1.25rem; }
.article strong { color: var(--text-primary); font-weight: 600; }
.article a { color: var(--accent); text-underline-offset: 3px; }
.article a:hover { color: #e88a4a; }
.article ul,
.article ol { padding-left: 1.4rem; margin-bottom: 1.25rem; }
.article li { margin-bottom: 0.5rem; }
.article li::marker { color: var(--accent); }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.meta {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    margin-bottom: 2rem;
}

.lede { font-size: 1.2rem !important; color: var(--text-primary) !important; font-weight: 300 !important; }

.callout {
    border: 1px solid rgba(217, 119, 54, 0.35);
    background: rgba(217, 119, 54, 0.06);
    border-radius: 8px;
    padding: 18px 22px;
    margin: 1.75rem 0;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    display: block;
}

.toc {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px 22px;
    margin: 1.5rem 0 0.5rem;
}
.toc ol { margin-bottom: 0; }
.toc li { font-size: 0.98rem; margin-bottom: 0.25rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.article code {
    font-family: 'Space Mono', monospace;
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    color: #f0f0f3;
    word-break: break-word;
}
.code-block { position: relative; margin: 1.25rem 0 1.75rem; }
.code-block pre {
    background: var(--code-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px 20px;
    overflow-x: auto;
    line-height: 1.6;
    tab-size: 2;
}
.code-block pre code {
    background: none;
    padding: 0;
    font-size: 0.86rem;
    color: #e6e6ea;
    word-break: normal;
    white-space: pre;
}
.code-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
    display: block;
}
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}
.copy-btn:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.3); }

.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.75rem; border: 1px solid var(--line); border-radius: 8px; }
.article table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.article th, .article td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.article th { font-family: 'Space Mono', monospace; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); font-weight: normal; }
.article td { color: var(--text-body); line-height: 1.55; }
.article tr:last-child td { border-bottom: 0; }
.status-yes { color: #7dd956; font-weight: 600; }
.status-no { color: #ff7b72; font-weight: 600; }
.status-maybe { color: #e3b341; font-weight: 600; }

.changelog { list-style: none; padding-left: 0 !important; }
.changelog li { padding-left: 0; }
.changelog time { font-family: 'Space Mono', monospace; font-size: 0.85rem; color: var(--accent); margin-right: 0.6rem; }

.post-list { list-style: none; padding: 0; margin-top: 2rem; }
.post-item { border-top: 1px solid var(--line); padding: 1.6rem 0; }
.post-item:last-child { border-bottom: 1px solid var(--line); }
.post-item h2 { font-size: 1.4rem; margin: 0 0 0.5rem; }
.post-item h2 a { color: var(--text-primary); text-decoration: none; }
.post-item h2 a:hover { color: var(--accent); }
.post-item p { margin-bottom: 0.5rem; }
.post-item .meta { margin-bottom: 0; }

.credit {
    padding: 30px 10% 40px;
    font-family: 'Space Mono', monospace;
    font-size: 0.56rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.credit a { color: var(--accent); text-decoration: none; transition: opacity 0.3s ease; }
.credit a:hover { opacity: 0.7; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 900px) {
    .top-bar { padding: 20px 5% 0; }
    main { padding: 40px 5% 30px; }
    .panel { padding: 28px 20px; }
    .article h1 { font-size: 2rem; }
    .article h2 { font-size: 1.4rem; margin-top: 2.5rem; }
    .article p, .article li { font-size: 1rem; }
    .lede { font-size: 1.08rem !important; }
    .credit { padding: 24px 5% 30px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
