*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #f9f8f5; --surface: #fff; --surface2: #f1efe8;
    --border: rgba(0,0,0,0.1); --border-md: rgba(0,0,0,0.18);
    --text: #1a1a18; --text-muted: #6b6a64; --text-hint: #9c9a92;
    --accent: #185fa5; --green: #0f6e56; --red: #a32d2d;
    --radius: 8px; --font: system-ui, -apple-system, sans-serif;
    --max-w: 860px;
    --nav-bg: #ffffff; --nav-text: #6b6a64; --nav-accent: #1a1a18;
}
body { font-family: var(--font); font-size: 16px; color: var(--text); background: var(--bg); line-height: 1.6; }
/* ── Header base ─────────────────────────────────────────────────────────── */
.site-header { background: var(--nav-bg); border-bottom: 0.5px solid var(--border); position: sticky; top: 0; z-index: 100; }
.site-header-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; height: 56px; gap: 24px;
}
.site-brand {
    font-weight: 600; font-size: 17px; text-decoration: none;
    color: var(--nav-accent); white-space: nowrap; flex-shrink: 0;
    display: flex; align-items: center; gap: 8px;
}
.site-logo-img { height: 32px; width: auto; display: block; }
/* ── Nav links ───────────────────────────────────────────────────────────── */
.site-nav {
    display: flex; align-items: center; gap: 4px;
    margin-left: auto;
}
.site-nav a {
    font-size: 14px; color: var(--nav-text); text-decoration: none;
    padding: 6px 10px; border-radius: 6px; transition: color .15s, background .15s;
    white-space: nowrap;
}
.site-nav a:hover  { color: var(--nav-accent); background: rgba(0,0,0,.04); }
.site-nav a.active { color: var(--nav-accent); font-weight: 500; }
/* ── Centred layout ──────────────────────────────────────────────────────── */
.site-header--centered .site-header-inner {
    flex-direction: column; height: auto; padding: 14px 24px 0; gap: 0;
}
.site-header--centered .site-brand { margin-bottom: 10px; }
.site-header--centered .site-nav   { margin-left: 0; border-top: 0.5px solid var(--border); width: 100%; justify-content: center; padding: 6px 0; }
/* ── Minimal left layout ─────────────────────────────────────────────────── */
.site-header--minimal { border-bottom-color: transparent; }
.site-header--minimal .site-header-inner { max-width: 100%; padding: 0 32px; }
.site-header--minimal .site-nav { margin-left: 12px; }
/* ── Hamburger button ────────────────────────────────────────────────────── */
.hamburger {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px; background: none; border: none; cursor: pointer;
    padding: 6px; border-radius: 6px; margin-left: auto; flex-shrink: 0;
}
.hamburger:hover { background: rgba(0,0,0,.05); }
.hamburger span {
    display: block; height: 2px; width: 22px;
    background: var(--nav-text); border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
/* ── Responsive — hamburger below 640px ──────────────────────────────────── */
@media (max-width: 640px) {
    .hamburger { display: flex; }
    .site-nav {
        display: none; flex-direction: column; align-items: flex-start;
        gap: 2px; margin-left: 0;
        position: absolute; top: 56px; left: 0; right: 0;
        background: var(--nav-bg); border-bottom: 0.5px solid var(--border);
        padding: 8px 16px 12px; z-index: 200;
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
    }
    .site-nav.open { display: flex; }
    .site-nav a { width: 100%; padding: 10px 12px; font-size: 15px; }
    .site-header--centered .site-nav {
        position: absolute; top: 80px;
    }
}
/* ── Main ────────────────────────────────────────────────────────────────── */
.site-main { min-height: calc(100vh - 56px - 48px); }
.site-body { max-width: var(--max-w); margin: 0 auto; padding: 40px 24px; }
/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { border-top: 0.5px solid var(--border); background: var(--surface); }
.site-footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 14px 24px; font-size: 13px; color: var(--text-muted); }
/* ── Page plugin ──────────────────────────────────────────────────────────── */
.page-plugin h1 { font-size: 28px; font-weight: 600; margin-bottom: 20px; }
.page-content { font-size: 16px; line-height: 1.7; }
.page-content h2 { font-size: 22px; font-weight: 600; margin: 24px 0 12px; }
.page-content p { margin-bottom: 14px; }
.page-content a { color: var(--accent); }
.embed-slot { margin-top: 32px; }
/* ── List plugin ──────────────────────────────────────────────────────────── */
.list-plugin h1, .list-plugin-detail h1 { font-size: 28px; font-weight: 600; margin-bottom: 20px; }
.list-items { display: flex; flex-direction: column; gap: 16px; }
.list-item-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 16px; align-items: flex-start; }
.list-item-img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.list-item-title { font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.list-item-title a { color: var(--text); text-decoration: none; }
.list-item-title a:hover { color: var(--accent); }
.list-item-desc { font-size: 14px; color: var(--text-muted); }
/* ── List embed ───────────────────────────────────────────────────────────── */
.list-embed { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.list-embed h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.list-embed-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.list-embed-item { font-size: 15px; padding: 4px 0; border-bottom: 0.5px solid var(--border); }
.list-embed-item:last-child { border-bottom: none; }
.list-embed-item a { color: var(--text); text-decoration: none; }
.list-embed-item a:hover { color: var(--accent); }
.list-embed a.link-btn { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--accent); text-decoration: none; }
/* ── Slug detail ──────────────────────────────────────────────────────────── */
.list-plugin-detail .breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.list-plugin-detail .breadcrumb a { color: var(--text-muted); }
.detail-img { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }
.detail-desc { font-size: 16px; line-height: 1.7; margin: 16px 0 24px; color: var(--text-muted); }
/* ── Shared ───────────────────────────────────────────────────────────────── */
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.empty-state { padding: 60px 0; text-align: center; color: var(--text-hint); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: var(--radius); border: 0.5px solid var(--border-md); background: var(--surface); color: var(--text); font-size: 14px; font-family: var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface2); }
.btn-primary { background: var(--text); color: var(--surface); border-color: var(--text); }
.btn-primary:hover { opacity: .85; }
/* ── List custom fields ──────────────────────────────────────────────────────── */
.list-item-field { display: flex; gap: 6px; align-items: baseline; font-size: 13px; margin-top: 4px; }
.list-item-field-name { font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.list-item-field-value { color: var(--text); }
/* ── Page hero image ─────────────────────────────────────────────────────────── */
.page-hero { margin: -28px -24px 28px; overflow: hidden; max-height: 360px; }
.page-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
