/* sudoreboot theme: charcoal masthead, amber accent, dense news-style list. */
:root {
    --charcoal: #2c2c2a;
    --charcoal-2: #3a3a37;
    --amber: #ef9f27;
    --amber-ink: #854f0b;
    --bg: #ffffff;
    --bg-soft: #f5f4f0;
    --text: #1f1f1d;
    --text-2: #55554f;
    --muted: #888780;
    --line: #e2e0d8;
    --thumb: #d3d1c7;
    --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --amber-ink: #ef9f27;
        --bg: #1b1b1a;
        --bg-soft: #242422;
        --text: #ecebe6;
        --text-2: #b4b2a9;
        --muted: #888780;
        --line: #353532;
        --thumb: #3a3a37;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--sans); }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* masthead */
.masthead { background: var(--charcoal); color: #d3d1c7; border-bottom: 3px solid var(--amber); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.wordmark { font: 500 26px/1 var(--mono); color: var(--amber); text-decoration: none; letter-spacing: -0.5px; }
.cursor { color: #d3d1c7; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
.topnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.topnav a { font: 14px var(--mono); color: #d3d1c7; text-decoration: none; }
.topnav a:hover, .topnav .nav-current a { color: var(--amber); }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; padding-top: 28px; padding-bottom: 48px; }
@media (max-width: 860px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.kicker { margin: 0 0 6px; font: 12px var(--mono); color: var(--muted); text-transform: lowercase; }
.kicker a { text-decoration: none; color: var(--amber-ink); }
.meta { margin: 4px 0 8px; font: 12px var(--mono); color: var(--muted); }
.meta a { text-decoration: none; color: var(--amber-ink); }

/* post list */
.card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.card:first-child { padding-top: 0; }
.card-image { display: block; aspect-ratio: 3 / 2; text-decoration: none; border-radius: 4px; overflow: hidden; background: var(--thumb); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.card:hover .card-image img { transform: scale(1.03); }
.card-placeholder { display: flex; height: 100%; align-items: center; justify-content: center; font: 13px var(--mono); color: var(--text-2); }
.card-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--amber-ink); }
.card-excerpt { margin: 0 0 6px; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.more { font: 13px var(--mono); color: var(--amber-ink); text-decoration: none; }
@media (max-width: 560px) {
    .card { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .card-image:has(.card-placeholder) { aspect-ratio: auto; height: 34px; }
    .card-title { font-size: 20px; }
}

.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; font: 13px var(--mono); color: var(--muted); }
.pagination a { color: var(--amber-ink); text-decoration: none; }

.archive-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 3px solid var(--charcoal); }
.archive-head h1 { margin: 0; font-size: 30px; }
.archive-desc { margin: 6px 0 0; color: var(--text-2); }

/* sidebar */
.sidebar section { margin-bottom: 26px; }
.search-btn { width: 100%; text-align: left; padding: 8px 10px; font: 13px var(--mono); color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.search-btn:hover { border-color: var(--amber); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; line-height: 1.4; }
.side-list a { text-decoration: none; color: var(--text-2); }
.side-list a:hover, .tag-cloud a:hover, .side-text a:hover { color: var(--amber-ink); }
.tag-cloud { margin: 0; font: 13px/2 var(--mono); }
.tag-cloud a { text-decoration: none; color: var(--text-2); margin-right: 8px; }
.side-text { margin: 0; font-size: 15px; }
.side-text a { color: var(--text-2); }

/* article */
.article-head { margin-bottom: 20px; }
.article-title { margin: 0; font-size: 36px; line-height: 1.15; letter-spacing: -0.5px; }
@media (max-width: 560px) { .article-title { font-size: 28px; } }
.article-image { margin: 0 0 26px; }
.article-image img { border-radius: 4px; width: 100%; }
.article-image figcaption, .gh-content figcaption { font: 12px var(--mono); color: var(--muted); margin-top: 6px; }
.article-foot { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); }

.gh-content { font-size: 18px; line-height: 1.7; overflow-wrap: break-word; }
.gh-content > * + * { margin-top: 1.1em; margin-bottom: 0; }
.gh-content h2 { font-size: 26px; line-height: 1.25; margin-top: 1.8em; }
.gh-content h3 { font-size: 21px; margin-top: 1.5em; }
.gh-content a { color: var(--amber-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gh-content blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--amber); color: var(--text-2); font-style: italic; }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content li + li { margin-top: .35em; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.gh-content code { font: .86em var(--mono); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
.gh-content pre { background: var(--charcoal); color: #ecebe6; border-radius: 4px; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.55; border-left: 3px solid var(--amber); }
.gh-content pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.gh-content table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.gh-content th, .gh-content td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.gh-content th { font: 12px var(--mono); color: var(--muted); text-transform: lowercase; }

/* Ghost editor cards */
.kg-width-wide { position: relative; width: 85vw; min-width: 100%; max-width: 1040px; }
.kg-width-full { position: relative; width: 100%; }
.kg-image-card img, .kg-gallery-image img { border-radius: 4px; margin: 0 auto; }
.kg-callout-card { border-radius: 4px; }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.prevnext a { display: block; padding: 14px 16px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; text-decoration: none; font-weight: 600; line-height: 1.35; }
.prevnext a:hover { border-color: var(--amber); }
.prevnext .next { grid-column: 2; text-align: right; }
.prevnext .kicker { display: block; font-weight: 400; }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } .prevnext .next { grid-column: 1; } }

.footer { background: var(--charcoal); color: #888780; font: 12px var(--mono); }
.footer-inner { display: flex; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.footer a { color: #d3d1c7; text-decoration: none; }

.error-page { padding-top: 60px; padding-bottom: 80px; }
.error-page h1 { margin: 0 0 10px; font-size: 34px; }
.error-page a { color: var(--amber-ink); font-family: var(--mono); }
