/* MYSYSAD archive pages (posts from My SysAd Blog, 2006–2014).
   Colors come from /css/mysysad-tokens.css; the values here are fallbacks. */

:root {
    --bg: #0a0b0e;
    --surface: #111318;
    --surface2: #181c22;
    --border: #252930;
    --text: #edf2f7;
    --muted: #8a96aa;
    --accent: #00e5ff;
    --red: #ff4444;
    --green: #00e676;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --hl-red: #ff7a7a;
    --hl-orange: #ffb347;
    --hl-green: #5ee08a;
    --hl-blue: #7cb7ff;
}
html.light-mode {
    --hl-red: #c81e1e;
    --hl-orange: #b45309;
    --hl-green: #047857;
    --hl-blue: #1d4ed8;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
    position: absolute; left: -9999px; top: 0;
    background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* ── Top bar ─────────────────────────────────────────────── */
.arc-top {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.arc-brand { color: var(--accent); font-weight: 800; font-size: 16px; letter-spacing: 1px; text-decoration: none; }
.arc-top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.arc-top nav a {
    color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; padding: 6px 10px; border: 1px solid transparent; border-radius: 3px;
}
.arc-top nav a:hover { color: var(--accent); border-color: var(--border); }
.arc-top nav a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }

/* ── Layout ──────────────────────────────────────────────── */
.arc-wrap { max-width: 820px; margin: 0 auto; padding: 24px 20px 48px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 18px; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

h1 { font-size: 24px; line-height: 1.3; margin: 0 0 8px; color: var(--text); overflow-wrap: anywhere; }
.arc-meta { color: var(--muted); font-size: 12px; margin: 0 0 18px; }
.arc-meta a { color: var(--muted); }
.arc-meta a:hover { color: var(--accent); }

.arc-note {
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    background: var(--surface);
    border-radius: 4px;
    padding: 12px 14px;
    margin: 0 0 24px;
    font-size: 12.5px;
    line-height: 1.6;
}
.arc-note strong { color: var(--accent); }
.arc-note p { margin: 0; }
.arc-note .arc-check {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    font-weight: 700;
    color: var(--text);
}

/* ── Post body ───────────────────────────────────────────── */
.post-body { overflow-wrap: anywhere; }
.post-body p { margin: 0 0 12px; }
.post-body h2, .post-body h3, .post-body h4 { font-size: 16px; margin: 20px 0 8px; }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body code { font-family: var(--font-mono); background: var(--surface2); border-radius: 2px; padding: 0 3px; }
.post-body pre {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 12px;
    margin: 8px 0 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.post-body blockquote { border-left: 3px solid var(--border); margin: 8px 0; padding: 2px 12px; color: var(--muted); }
.post-body table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.post-body td, .post-body th { border: 1px solid var(--border); padding: 4px 8px; vertical-align: top; }
.post-body img { max-width: 100%; height: auto; display: block; margin: 8px 0 14px; border-radius: 3px; }
.post-body dl { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 10px; }
.post-body dt { font-weight: 700; color: var(--muted); margin-top: 10px; }
.post-body dd { margin: 4px 0 12px; padding-left: 12px; border-left: 2px solid var(--border); }
.hl-red { color: var(--hl-red); }
.hl-orange { color: var(--hl-orange); }
.hl-green { color: var(--hl-green); }
.hl-blue { color: var(--hl-blue); }

/* ── Related tools, prev/next ────────────────────────────── */
.arc-related {
    margin: 32px 0 0; padding: 14px; border: 1px dashed var(--border); border-radius: 4px; font-size: 13px;
}
.arc-related h2 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.arc-related ul { list-style: none; margin: 0; padding: 0; }
.arc-related li { margin: 4px 0; }

.arc-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: 12.5px; }
.arc-pager a { display: block; max-width: 48%; text-decoration: none; }
.arc-pager a span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.arc-pager .next { text-align: right; margin-left: auto; }

/* ── Archive lists ───────────────────────────────────────── */
.arc-intro { color: var(--text); margin: 0 0 14px; }
.arc-intro + .arc-intro { color: var(--muted); font-size: 12.5px; }

.arc-controls { display: none; flex-direction: column; gap: 10px; margin: 20px 0 8px; }
html.js .arc-controls { display: flex; }
.arc-search {
    width: 100%; font: inherit; font-size: 14px; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px; min-height: 44px;
}
.arc-search:focus { border-color: var(--accent); outline: none; }
.arc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.arc-chips button {
    font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
    color: var(--muted); background: var(--surface2); border: 1px solid var(--border); border-radius: 3px;
    padding: 6px 10px; min-height: 36px; cursor: pointer;
}
.arc-chips button:hover { color: var(--accent); border-color: var(--accent); }
.arc-chips button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.arc-label { font-size: 12px; color: var(--muted); margin: 0 0 -4px; }
.arc-count { font-size: 12px; color: var(--muted); margin: 0; min-height: 1.7em; }

.arc-popular { border: 1px solid var(--border); background: var(--surface); border-radius: 4px; padding: 12px 14px; margin: 18px 0 8px; }
.arc-popular h2 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.arc-popular ul { margin: 0; padding-left: 18px; }

.arc-year > h2 { font-size: 18px; margin: 28px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.arc-year > h2 a { color: var(--text); text-decoration: none; }
.arc-year > h2 a:hover { color: var(--accent); }
.arc-month h3 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; }
.arc-month h3 a { color: var(--muted); text-decoration: none; }
.arc-month h3 a:hover { color: var(--accent); }
.arc-posts { list-style: none; margin: 0; padding: 0; }
.arc-posts li { display: flex; gap: 12px; align-items: baseline; padding: 3px 0; }
.arc-posts time { color: var(--muted); font-size: 11.5px; flex: 0 0 auto; min-width: 48px; }
.arc-posts a { overflow-wrap: anywhere; }

/* ── Footer ──────────────────────────────────────────────── */
.arc-foot {
    border-top: 1px solid var(--border); background: var(--surface);
    padding: 28px 20px; text-align: center; font-size: 11.5px; color: var(--muted);
}
.arc-foot a { color: var(--muted); }
.arc-foot a:hover { color: var(--accent); }
.arc-foot p { margin: 4px 0; }

@media (max-width: 600px) {
    body { font-size: 13.5px; }
    h1 { font-size: 20px; }
    .arc-top { padding: 10px 16px; }
    .arc-wrap { padding: 18px 16px 40px; }
    .arc-top nav a { padding: 8px 8px; }
    .arc-pager { flex-direction: column; }
    .arc-pager a { max-width: 100%; }
    .arc-pager .next { text-align: left; margin-left: 0; }
}
