/* coopnet-terminal: a terminal-flavoured theme for CoopNET Blog.
   Fonts are served from the theme (OFL); nothing loads from a third party. */

/* ---------- fonts ---------- */
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

/* ---------- tokens ---------- */
:root {
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    /* Ghost's custom font settings (Design > Brand) override headings and body; code stays mono */
    --font-display: var(--gh-font-heading, var(--font-mono));
    --font-sans: var(--gh-font-body, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif);

    /* accent comes from Ghost Admin > Settings > Design > Brand */
    --accent: var(--ghost-accent-color, #22c55e);
    --on-accent: #06120a;

    /* code and terminal blocks stay dark in every scheme */
    --code-bg: #060907;
    --code-border: #22302a;
    --code-text: #d7e3da;
    --code-muted: #8fa395;
    --code-warn: #fbbf24;
    --code-key: #7dd3a8;
    --code-num: #93c5fd;
    --code-del: #fca5a5;
    --code-add: #86efac;

    --wrap: 1200px;
    --gutter: 24px;
}

.scheme-dark {
    --bg: #0a0e0b;
    --surface: #0f1511;
    --surface-2: #141c17;
    --border: #22302a;
    --border-2: #2f4237;
    --text: #d7e3da;
    --text-strong: #ecfdf3;
    --text-2: #b4c4b9;
    --muted: #93a69a;
    --dim: #8fa395;
    --faint: #5f7366;
    --accent-text: var(--accent);
    color-scheme: dark;
}

.scheme-light {
    --bg: #f6f9f6;
    --surface: #ecf2ed;
    --surface-2: #e2ebe4;
    --border: #cad8ce;
    --border-2: #b3c6b9;
    --text: #1c2a21;
    --text-strong: #08110b;
    --text-2: #33463a;
    --muted: #4b6153;
    --dim: #4f6758;
    --faint: #8aa093;
    --accent-text: color-mix(in srgb, var(--accent) 55%, #000);
    color-scheme: light;
}

.scheme-auto {
    --bg: #0a0e0b;
    --surface: #0f1511;
    --surface-2: #141c17;
    --border: #22302a;
    --border-2: #2f4237;
    --text: #d7e3da;
    --text-strong: #ecfdf3;
    --text-2: #b4c4b9;
    --muted: #93a69a;
    --dim: #8fa395;
    --faint: #5f7366;
    --accent-text: var(--accent);
    color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
    .scheme-auto {
        --bg: #f6f9f6;
        --surface: #ecf2ed;
        --surface-2: #e2ebe4;
        --border: #cad8ce;
        --border-2: #b3c6b9;
        --text: #1c2a21;
        --text-strong: #08110b;
        --text-2: #33463a;
        --muted: #4b6153;
        --dim: #4f6758;
        --faint: #8aa093;
        --accent-text: color-mix(in srgb, var(--accent) 55%, #000);
    }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

img { max-width: 100%; height: auto; }

/* Embedded frames (comments, portal, search) are light-scheme documents; matching their
   scheme stops the browser painting an opaque white backdrop behind them on dark pages */
iframe { color-scheme: normal; }

button { font: inherit; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.accent-text { color: var(--accent-text); }
.muted { color: var(--code-muted); }
.warn { color: var(--code-warn); }

.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 10;
    padding: 10px 14px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-weight: 700;
}
.skip-link:focus { top: 8px; }

/* ---------- header ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.4;
}

.site-brand {
    padding: 4px 10px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 800;
}
.site-brand:hover { text-decoration: none; filter: brightness(1.1); }

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item { color: var(--muted); }
.nav-item.is-current { color: var(--text-strong); }

.nav-spacer { flex: 1 1 auto; }

.nav-search {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
}
.nav-search:hover { border-color: var(--border-2); color: var(--text); }
.nav-search kbd {
    padding: 0 6px;
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
}

.nav-link { color: var(--muted); }

.nav-support {
    padding: 9px 14px;
    border: 1px solid var(--accent);
    color: var(--accent-text);
}
.nav-support:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }

/* ---------- shared bits ---------- */
.prompt {
    margin: 0 0 16px;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.prompt-user { color: var(--accent-text); }
.prompt-path { color: var(--text); }

.cmd, .box-cmd {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.box {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.box-text {
    margin: 0;
    font-size: 15px;
    color: var(--text-2);
}

.box-link { margin: 12px 0 0; font-family: var(--font-mono); font-size: 14px; }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-2);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
}
.button:hover { border-color: var(--accent); text-decoration: none; }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.button-primary:hover { filter: brightness(1.1); }

.tree {
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 2;
}
.tree li { display: flex; gap: 8px; }
.tree li a { flex: 1 1 auto; min-width: 0; }
.tree-branch { flex: 0 0 auto; color: var(--faint); }
.tree-count { color: var(--dim); font-family: var(--font-mono); font-size: 13px; }
.tree-summary { margin: 10px 0 0; font-family: var(--font-mono); font-size: 14px; color: var(--dim); }

.kv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 14px;
}
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: var(--text); }

/* ---------- home ---------- */
.hero { padding-top: 72px; padding-bottom: 48px; }

.hero-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}

.cursor { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.hero-text {
    max-width: 700px;
    margin: 20px 0 0;
    font-size: 20px;
    color: var(--text-2);
}

.grep {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    max-width: 760px;
    margin: 36px 0 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 15px;
    text-align: left;
    cursor: text;
}
.grep:hover { border-color: var(--border-2); }
.grep-cmd { display: flex; align-items: center; padding: 0 14px; color: var(--accent-text); white-space: nowrap; }
.grep-hint { flex: 1 1 240px; display: flex; align-items: center; min-height: 52px; padding-right: 14px; }
.grep-go {
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
}

.follow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    margin: 22px 0 0;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--muted);
}

.copy-handle {
    padding: 0;
    background: none;
    border: 0;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: copy;
}
.copy-handle:hover { text-decoration: underline; text-underline-offset: 3px; }

.layout {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    padding-top: 8px;
    padding-bottom: 80px;
}
.feed { flex: 999 1 560px; min-width: 0; }
.sidebar { flex: 1 1 300px; display: flex; flex-direction: column; gap: 28px; }
.box-support { background: transparent; border-color: var(--accent); }

.post-list { margin: 0; padding: 0; list-style: none; }

.post-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    padding: 22px 0;
    border-top: 1px dashed var(--border);
}
.post-row:last-child { border-bottom: 1px dashed var(--border); }

.row-date { flex: 0 0 110px; padding-top: 3px; font-family: var(--font-mono); font-size: 14px; color: var(--dim); }
.row-body { flex: 1 1 360px; min-width: 0; }
.row-title { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.35; }
.row-title a { color: var(--text-strong); }
.row-excerpt { margin: 6px 0 0; font-size: 16px; color: var(--text-2); }
.row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 8px 0 0;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--dim);
}
.row-meta a { color: var(--dim); }
.row-meta .row-topic { color: var(--accent-text); }

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--muted);
}

/* ---------- archive pages (topic, author, topics index, errors) ---------- */
.archive-head { padding-top: 64px; padding-bottom: 32px; }

.archive-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-strong);
    overflow-wrap: anywhere;
}

.archive-desc { max-width: 680px; margin: 14px 0 0; font-size: 19px; color: var(--text-2); }

.archive-list { padding-bottom: 80px; }

.topic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 80px;
}
.topic-card { flex: 1 1 340px; min-width: 0; padding: 22px 24px; }
.topic-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.topic-card-title { margin: 0; font-family: var(--font-mono); font-size: 20px; }
.topic-card .box-text { margin-bottom: 14px; }
.tree-posts { font-family: var(--font-sans); font-size: 15px; line-height: 1.45; display: flex; flex-direction: column; gap: 8px; }
.tree-posts .tree-branch { font-family: var(--font-mono); }
.tree-posts a { color: var(--text); }

.error-page { padding-top: 72px; padding-bottom: 96px; }
.error-term {
    margin: 0 0 28px;
    padding: 18px 20px;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.65;
    overflow-x: auto;
}
.error-actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; font-family: var(--font-mono); }
.link-button { padding: 0; background: none; border: 0; color: var(--accent-text); font-family: var(--font-mono); font-size: 17px; cursor: pointer; }
.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- post ---------- */
.post { padding-top: 56px; padding-bottom: 80px; }

.crumbs {
    margin: 0 0 22px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--dim);
    overflow-wrap: anywhere;
}

.post-title {
    max-width: 900px;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--text-strong);
    overflow-wrap: anywhere;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 20px;
    margin: 20px 0 0;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--dim);
}
.post-meta a { color: var(--dim); }
.badge { padding: 0 8px; background: var(--accent); color: var(--on-accent); font-weight: 700; }

.post-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 56px;
    margin-top: 44px;
}
.post-main { flex: 999 1 560px; min-width: 0; max-width: 760px; }
.post-aside { flex: 1 1 260px; display: flex; flex-direction: column; gap: 24px; }
.post-aside .tree a { overflow-wrap: anywhere; }

.related {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.45;
}

.tldr {
    margin-bottom: 28px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.tldr p { margin: 0; color: var(--text-2); font-size: 17px; }
.tldr .tldr-label { margin-bottom: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); }

.feature { margin: 0 0 36px; border: 1px solid var(--border); background: var(--surface); }
.feature-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
}
.feature-bar::before { content: ""; width: 34px; height: 8px; background: radial-gradient(circle, var(--faint) 3px, transparent 3.5px) 0 0 / 12px 8px repeat-x; }
.feature img { display: block; width: 100%; }
.feature figcaption { padding: 10px 14px; font-family: var(--font-mono); font-size: 13px; color: var(--dim); }

.ask {
    margin-top: 64px;
    padding: 24px;
    border: 1px solid var(--accent);
}
.ask p { margin: 0 0 14px; color: var(--text-2); }
.ask-title { margin: 0 0 8px; font-family: var(--font-mono); font-size: 18px; color: var(--text-strong); }
.ask-flags {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-2);
}
.ask-flags .accent-text { display: inline-block; min-width: 10ch; }
.ask .ask-note { margin: 0; font-size: 15px; color: var(--muted); }

.comments { margin-top: 32px; }

.post-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 56px; }
.post-nav-link {
    flex: 1 1 280px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
}
.post-nav-link:hover { border-color: var(--accent); text-decoration: none; }
.post-nav-next { text-align: right; }
.post-nav-cmd { display: block; color: var(--dim); }

/* ---------- post content ---------- */
.gh-content {
    font-size: 18px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.gh-content > * + * { margin-top: 22px; margin-bottom: 0; }
.gh-content > :first-child { margin-top: 0; }

.gh-content h2, .gh-content h3, .gh-content h4 {
    font-family: var(--font-display);
    line-height: 1.3;
    color: var(--text-strong);
    scroll-margin-top: 24px;
}
.gh-content h2 { margin-top: 48px; font-size: 26px; }
.gh-content h3 { margin-top: 36px; font-size: 21px; }
.gh-content h4 { margin-top: 28px; font-size: 18px; }
.gh-content h2::before { content: "## " / ""; color: var(--accent-text); }
.gh-content h3::before { content: "### " / ""; color: var(--accent-text); }

.gh-content a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.gh-content a:hover { text-decoration-color: var(--accent); }

.gh-content strong { color: var(--text-strong); font-weight: 600; }

.gh-content ul, .gh-content ol { padding-left: 1.6em; }
.gh-content li + li { margin-top: 6px; }
.gh-content ul > li::marker { content: "- "; color: var(--accent-text); font-family: var(--font-mono); }
.gh-content ol > li::marker { color: var(--accent-text); font-family: var(--font-mono); }

.gh-content blockquote {
    position: relative;
    margin-left: 0;
    padding-left: 28px;
    color: var(--text-2);
    font-style: italic;
}
.gh-content blockquote::before {
    content: ">" / "";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-style: normal;
}

.gh-content hr {
    height: 0;
    margin: 48px 0;
    border: 0;
    border-top: 1px dashed var(--border-2);
}

.gh-content :not(pre) > code, .tldr code, .row-excerpt code {
    padding: 1px 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-strong);
    font-family: var(--font-mono);
    font-size: 0.86em;
    overflow-wrap: anywhere;
}

.gh-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 16px;
}
.gh-content th, .gh-content td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.gh-content th { background: var(--surface); font-family: var(--font-mono); font-size: 14px; color: var(--text-strong); }

.gh-content figure { margin-left: 0; margin-right: 0; }
.gh-content figcaption {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--dim);
    text-align: center;
}

/* Koenig card widths: inside the reading column, wide and full cards use the column width */
.kg-width-wide, .kg-width-full { width: 100%; }
.kg-image-card img { display: block; margin: 0 auto; border: 1px solid var(--border); }

/* ---------- code blocks (wrapped by main.js) ---------- */
.gh-content pre {
    margin: 0;
    padding: 16px 18px;
    overflow-x: auto;
    background: var(--code-bg);
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.65;
    tab-size: 4;
}
.gh-content pre code { font-family: inherit; background: none; border: 0; padding: 0; color: inherit; }

.code-block { border: 1px solid var(--code-border); background: var(--code-bg); }
.gh-content .code-block + * , .gh-content * + .code-block { margin-top: 22px; }
.code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    padding-left: 14px;
    border-bottom: 1px solid var(--code-border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--code-muted);
}
.code-copy {
    min-height: 36px;
    padding: 0 14px;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--code-border);
    color: var(--code-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
}
.code-copy:hover { color: var(--code-text); }

.code-block.tested-on { border-style: dashed; border-color: #2f4237; }
.code-block.tested-on .code-head { border-bottom: 0; }
.code-block.tested-on pre { padding-top: 0; font-size: 14px; line-height: 1.9; }

/* Prism tokens: a small palette, readable on the dark code background */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #7f9487; font-style: italic; }
.token.punctuation, .token.operator { color: #a9bbae; }
.token.keyword, .token.function, .token.selector, .token.atrule, .token.key, .token.property, .token.tag, .token.builtin, .token.class-name { color: var(--code-key); }
.token.string, .token.char, .token.attr-value, .token.regex, .token.url { color: var(--code-warn); }
.token.number, .token.boolean, .token.constant, .token.symbol { color: var(--code-num); }
.token.variable, .token.parameter, .token.attr-name { color: #e5ece7; }
.token.deleted { color: var(--code-del); }
.token.inserted { color: var(--code-add); }
.token.important, .token.bold { font-weight: 700; }
.token.italic { font-style: italic; }
/* console blocks: prompt dim, command plain, output in amber */
.token.shell-symbol { color: var(--code-muted); }
.token.output { color: var(--code-warn); }

/* ---------- footer ---------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--dim);
}
.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
    padding-top: 28px;
    padding-bottom: 28px;
}
.nav-list-secondary .nav-item { text-transform: lowercase; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .site-nav { gap: 8px 16px; }
    .nav-search { width: 44px; justify-content: center; padding: 0; }
    .nav-search span, .nav-search kbd { display: none; }
    .nav-support { padding: 9px 10px; }
    .hero { padding-top: 48px; }
    .hero-text { font-size: 18px; }
    .grep-hint { font-size: 13px; }
    .post { padding-top: 36px; }
    .gh-content { font-size: 17px; }
    .gh-content pre { font-size: 13.5px; }
    .row-date { flex-basis: 100%; }
    .post-nav-next { text-align: left; }
}
