:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-alt: #f8f9fa;
    --text: #191919;
    --muted: #888888;
    --line: #e5e7eb;
    --brand: #1d4d8d;
    --brand-dark: #14345d;
    --accent: #bd6c38;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-content, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Apple SD Gothic Neo", "나눔고딕", NanumGothic, "맑은 고딕", "Malgun Gothic", "돋움", Dotum, sans-serif);
    color: var(--text);
    background: #fff;
    letter-spacing: -0.03em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.inner { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.site-header .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    gap: 16px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-dark);
}
.brand.is-image { gap: 0; }
.brand-image-wrap {
    display: inline-flex;
    align-items: center;
}
.brand-image {
    display: block;
    width: auto;
    max-width: min(280px, 48vw);
    max-height: 46px;
    object-fit: contain;
}
.brand-mark {
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}
.main-nav a {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--muted);
    transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--brand); background: var(--surface-alt); }
.nav-util { font-size: 13px !important; }
.nav-admin { font-size: 13px !important; opacity: 0.5; }
.search-form { display: flex; gap: 6px; }
.search-form input {
    width: 180px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}
.search-form button {
    padding: 7px 14px;
    border: 1px solid var(--brand);
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

/* ── Main ───────────────────────────────────────────────── */
.site-main { padding-bottom: 80px; }

/* ── Hero Hub ───────────────────────────────────────────── */
.hero-hub {
    position: relative;
    overflow: hidden;
    padding: 64px 0 52px;
    border-bottom: 1px solid var(--line);
    background-color: var(--hero-bg-color, transparent);
}
.hero-hub.has-background-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--hero-bg-overlay, transparent), var(--hero-bg-overlay, transparent)), var(--hero-bg-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
}
.hero-hub > .inner {
    position: relative;
    z-index: 1;
}
.hub-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    margin: 0 0 14px;
    letter-spacing: 0.05em;
}
.hub-title {
    margin: 0 0 16px;
    font-size: clamp(26px, 3.5vw, 46px);
    line-height: 1.25;
    font-weight: 800;
    color: var(--text);
}
.hub-desc {
    margin: 0 0 28px;
    font-size: 16px;
    color: var(--muted);
    line-height: 1.8;
    max-width: 600px;
}
.hero-layout {
    display: grid;
    gap: 36px;
    align-items: center;
}
.hero-layout.has-media {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
}
.hero-copy { min-width: 0; }
.hero-media {
    display: flex;
    justify-content: flex-end;
}
.hero-media-card {
    width: min(420px, 100%);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}
.hero-media-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.hub-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.hub-chip {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid #c7d9f0;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    background: #edf3fb;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hub-chip:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.hub-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 11px 22px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.15s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 11px 22px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

/* ── Section ────────────────────────────────────────────── */
.section-block { padding: 48px 0 0; }
.section-head { margin-bottom: 20px; }
.section-head h1,
.section-head h2 { margin: 4px 0 8px; font-size: clamp(20px, 2.5vw, 28px); font-weight: 700; }
.section-head p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 15px; }
.eyebrow {
    display: inline-block;
    margin: 0;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    font-weight: 700;
}

/* ── Featured Posts ─────────────────────────────────────── */
.featured-list { display: grid; gap: 12px; }
.featured-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: start;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.featured-item:hover {
    border-color: #b0c8e8;
    box-shadow: 0 2px 16px rgba(29, 77, 141, 0.07);
}
.featured-thumb {
    display: block;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--surface-alt);
}
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-body h3 { margin: 8px 0 8px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.featured-body h3 a:hover { color: var(--brand); }
.featured-body p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ── Home Popular Posts Thumbnails ─────────────────────── */
.home-popular-section { padding-top: 30px; }
.home-popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.home-popular-item { display: flex; flex-direction: column; gap: 10px; }
.home-popular-thumb {
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--surface-alt);
    transition: box-shadow 0.2s;
}
.home-popular-thumb:hover {
    box-shadow: 0 2px 12px rgba(29, 77, 141, 0.09);
}
.home-popular-thumb img { width: 100%; height: 100%; object-fit: cover; }
.home-popular-no-thumb { display: block; width: 100%; height: 100%; background: var(--surface-alt); }
.home-popular-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-popular-title a { color: inherit; }
.home-popular-title a:hover { color: var(--brand); }
/* home popular: thumb mode — hide chip/date */
.home-popular-grid:not(.is-text-style) .home-popular-title-line { display: contents; }
.home-popular-grid:not(.is-text-style) .home-popular-row .post-chip { display: none; }
.home-popular-grid:not(.is-text-style) .home-popular-date { display: none; }
/* home popular: text mode — single-column list, same structure as latest posts */
.home-popular-grid.is-text-style { grid-template-columns: minmax(0, 1fr) !important; gap: 0; }
.home-popular-grid.is-text-style .home-popular-item { padding: 18px 0; min-width: 0; }
.home-popular-grid.is-text-style .home-popular-item:not(:last-child) { border-bottom: 2px dotted #c0c4cc; }
.home-popular-grid.is-text-style .home-popular-row { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.home-popular-grid.is-text-style .home-popular-title-line { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.home-popular-grid.is-text-style .home-popular-title-line .post-chip { flex-shrink: 0; background: none; border: none; border-radius: 0; padding: 0; margin-bottom: 0; font-size: var(--font-size-popular-title, 16px); font-weight: 700; line-height: 1.4; color: var(--brand); }
.home-popular-grid.is-text-style .home-popular-title-line .post-chip::before { content: '['; margin-right: 4px; }
.home-popular-grid.is-text-style .home-popular-title-line .post-chip::after { content: ']'; margin-left: 4px; }
.home-popular-grid.is-text-style .home-popular-title-line .home-popular-title { display: block !important; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-popular-date { font-size: 13px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
/* thumbnail position: bottom — text row stays on top, thumb sinks to bottom */
.home-popular-item.thumb-bottom .home-popular-row     { order: 1; }
.home-popular-item.thumb-bottom .home-popular-excerpt { order: 2; }
.home-popular-item.thumb-bottom .home-popular-thumb   { order: 3; }
/* title line clamp overrides (default is 2 in .home-popular-title) */
.home-popular-item.title-1line .home-popular-title { -webkit-line-clamp: 1; }
.home-popular-item.title-3line .home-popular-title { -webkit-line-clamp: 3; }
.home-popular-item.title-4line .home-popular-title { -webkit-line-clamp: 4; }
/* excerpt */
.home-popular-excerpt {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}
.home-popular-excerpt:hover { color: var(--brand); }
/* latest / related excerpt link */
.post-row-excerpt a,
.related-post-excerpt a {
    display: block;
    color: inherit;
    text-decoration: none;
}
.post-row-excerpt a:hover,
.related-post-excerpt a:hover { color: var(--brand); }

/* ── Post List (latest posts rows) ─────────────────────── */
.post-list {
}
.post-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 18px 0;
    background: #fff;
    transition: background 0.15s;
}
.post-row:not(:last-child) { border-bottom: 2px dotted #c0c4cc; }
.post-row:hover { background: var(--surface-alt); }
.post-row.is-no-thumb { grid-template-columns: 1fr; }
.post-row.is-no-thumb .post-row-body { display: flex; align-items: center; gap: 12px; }
.post-row.is-no-thumb .post-row-title-line { flex: 1; min-width: 0; margin-bottom: 0; }
.post-row.is-no-thumb .post-row-body > p { display: none; }
.post-row.is-no-thumb .meta-row { flex-shrink: 0; white-space: nowrap; }
.post-row-thumb {
    display: block;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--surface-alt);
}
.post-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-row-body { min-width: 0; }
.post-row-title-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin-bottom: 6px; }
.post-row-title-line .post-chip { flex-shrink: 0; margin-bottom: 0; background: none; border: none; border-radius: 0; padding: 0; font-size: var(--font-size-post-row-title, 16px); font-weight: 700; line-height: 1.4; }
.post-row-title-line .post-chip::before { content: '['; margin-right: 4px; }
.post-row-title-line .post-chip::after { content: ']'; margin-left: 4px; }
.post-row-title-line h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.post-row-body h2 { margin: 6px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.4; }
.post-row-body h2 a:hover { color: var(--brand); }
.post-row-body p { margin: 0 0 6px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.related-post-list { border-top: 1px solid var(--line); }
.related-post-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}
.related-post-row.is-no-thumb { grid-template-columns: 1fr; }
.related-post-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--surface-alt);
}
.related-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-post-body { min-width: 0; overflow: hidden; max-height: calc(220px * 10 / 16); }
.related-post-title-line { min-width: 0; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-post-title-line .post-chip { display: inline; margin-bottom: 0; background: none; border: none; border-radius: 0; padding: 0; font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--brand); margin-right: 6px; }
.related-post-title-line .post-chip::before { content: '['; margin-right: 4px; }
.related-post-title-line .post-chip::after { content: ']'; margin-left: 4px; }
.related-post-title-line h3 { display: inline; margin: 0; }
.related-post-body h3 {
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}
.related-post-body h3 a:hover { color: var(--text); }
.related-post-body p {
    margin: 0 0 6px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
/* related posts: text mode — one-line format */
.related-post-row.is-no-thumb .related-post-body { display: flex; align-items: baseline; gap: 12px; max-height: none; overflow: visible; }
.related-post-row.is-no-thumb .related-post-title-line { flex: 1; min-width: 0; margin-bottom: 0; }
.related-post-row.is-no-thumb .related-post-title-line h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-post-row.is-no-thumb .related-post-body > p { display: none; }
.related-post-row.is-no-thumb .meta-row { flex-shrink: 0; white-space: nowrap; }

/* ── Thumbnail right position ──────────────────────────── */
.post-row.thumb-right { grid-template-columns: minmax(0, 1fr) 220px; }
.post-row.thumb-right .post-row-thumb { order: 2; }
.post-row.thumb-right .post-row-body { order: 1; }
.related-post-row.thumb-right { grid-template-columns: minmax(0, 1fr) 220px; }
.related-post-row.thumb-right .related-post-thumb { order: 2; }
.related-post-row.thumb-right .related-post-body { order: 1; }

/* ── Multi-column list layout ──────────────────────────── */
.post-list.is-col-2 { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
.post-list.is-col-3 { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
.post-list.is-col-4 { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; }
.post-list[class*="is-col-"] .post-row { border-bottom: 2px dotted #c0c4cc; }
.related-post-list.is-col-2 { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
.related-post-list.is-col-3 { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
.related-post-list.is-col-4 { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; }

/* ── Card Grid (list.html) ──────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.post-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    border-color: #b0c8e8;
    box-shadow: 0 2px 16px rgba(29, 77, 141, 0.07);
}
.post-thumb {
    display: block;
    margin: -20px -20px 16px;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-alt);
    border-radius: 10px 10px 0 0;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-chip {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf3fb;
    border: 1px solid #c7d9f0;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
}
.post-card h2,
.post-card h3 { margin: 0 0 10px; font-size: 17px; line-height: 1.4; font-weight: 700; }
.post-card h2 a:hover,
.post-card h3 a:hover { color: var(--brand); }
.post-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.meta-row { font-size: 13px; color: var(--muted); }

/* ── Bottom section (categories + service) ──────────────── */
.section-bottom { padding-bottom: 0; }
.two-col-alt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.category-hub h2,
.service-hub h2 { margin: 4px 0 14px; font-size: 20px; font-weight: 700; }
.category-list { list-style: none; margin: 0; padding: 0; }
.category-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.category-list li:last-child { border-bottom: 0; }
.category-list a { display: block; }
.category-list a:hover strong { color: var(--brand); }
.category-list strong { font-size: 20px; font-weight: 600; }
.category-count { display: block; margin-top: 8px; padding-left: 10px; font-size: 16px; color: var(--muted); }
.category-description { display: block; margin-top: 3px; padding-left: 10px; font-size: 16px; color: var(--muted); }
.muted-text { color: var(--muted); font-size: 14px; }
.service-hub p { margin: 0 0 18px; font-size: 15px; color: var(--muted); line-height: 1.7; }
.service-links { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.service-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-dark);
    background: var(--surface-alt);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.service-link:hover { border-color: var(--brand); background: #edf3fb; color: var(--brand); }
.utility-links { display: flex; gap: 14px; }
.utility-links a { font-size: 13px; color: var(--muted); text-decoration: underline; }
.utility-links a:hover { color: var(--brand); }

/* ── Empty states ───────────────────────────────────────── */
.empty-notice {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
}
.empty-box {
    padding: 24px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 10px;
}

/* ── Article (view.html) ────────────────────────────────── */
.article-shell { padding-top: 30px; }
.article-view .eyebrow {
    font-size: 16px;
}
.article-view h1 {
    margin: 8px 0 18px;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 700;
}
.article-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 22px;
}
.article-admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
}
.article-admin-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.article-admin-meta strong {
    font-size: 14px;
    color: var(--text);
}
.article-admin-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.article-admin-status.is-publish {
    color: var(--text);
    border-color: var(--line);
    background: transparent;
}
.article-admin-status.is-draft {
    color: var(--text);
    border-color: var(--line);
    background: transparent;
}
.article-admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.article-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.15s;
}
.article-admin-link:hover {
    color: var(--text);
    border-color: #c9cdd3;
}
.article-admin-link.is-primary {
    color: var(--text);
    border-color: #c9cdd3;
    background: transparent;
}
.article-admin-link.is-primary:hover {
    color: var(--text);
    background: transparent;
    border-color: #bfc4cb;
}
.article-admin-link.is-danger {
    color: var(--text);
    border-color: var(--line);
    background: transparent;
}
.article-admin-link.is-danger:hover {
    color: var(--text);
    border-color: #c9cdd3;
    background: transparent;
}
.article-admin-notice {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}
.summary-box,
.cover-box {
    padding: 20px;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-alt);
}
.summary-box p { margin: 10px 0 0; line-height: 1.8; color: var(--muted); }
.article-content {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 32px;
    line-height: 1.9;
    font-size: 17px;
    background: #fff;
}
.article-content p { margin: 0 0 18px; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.tag-row a,
.pagination a {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--brand-dark);
    font-size: 14px;
    transition: border-color 0.15s, color 0.15s;
}
.tag-row a:hover,
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.pagination .is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    padding-bottom: 28px;
    color: var(--muted);
    margin-top: 60px;
}
.site-footer .inner {
    font-size: 14px;
    border-top: 1px solid var(--line);
    padding-top: 28px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
    .site-header .inner { flex-wrap: wrap; }
    .nav-tools { flex-direction: column; align-items: flex-start; width: 100%; }
    .main-nav { flex-wrap: wrap; }
    .search-form { width: 100%; }
    .search-form input { flex: 1; width: auto; }
    .article-admin-bar { flex-direction: column; align-items: flex-start; }
    .article-admin-actions { width: 100%; justify-content: flex-start; }
    .article-admin-link { flex: 1 1 180px; }
    .hero-hub { padding: 40px 0 36px; }
    .hub-desc { max-width: 100%; }
    .hero-layout.has-media { grid-template-columns: 1fr; }
    .hero-media { justify-content: flex-start; }
    .hero-media-card { max-width: 360px; }
    .card-grid,
    .two-col-alt { grid-template-columns: 1fr; }
    .featured-item { grid-template-columns: 1fr; }
    .featured-thumb { aspect-ratio: 16/9; }
    .post-row { grid-template-columns: 1fr; }
    .post-row.thumb-right { grid-template-columns: 1fr; }
    .post-row.thumb-right .post-row-thumb,
    .post-row.thumb-right .post-row-body { order: unset; }
    .home-popular-grid:not(.is-text-style) { grid-template-columns: repeat(2, 1fr); }
    .home-popular-grid:not(.is-text-style) .home-popular-title { display: none; }
    .post-row-thumb { max-width: 320px; margin: 0 auto; }
    .related-post-row { grid-template-columns: 1fr; gap: 16px; }
    .related-post-row.thumb-right { grid-template-columns: 1fr; }
    .related-post-row.thumb-right .related-post-thumb,
    .related-post-row.thumb-right .related-post-body { order: unset; }
    .related-post-thumb { max-width: 320px; margin: 0 auto; }
    .related-post-body { max-height: none; overflow: visible; }
    .related-post-body h3 { font-size: 18px; }
    .post-list[class*="is-col-"],
    .related-post-list[class*="is-col-"] { grid-template-columns: 1fr; column-gap: 0; }
}

@media (max-width: 600px) {
    .hub-actions { flex-direction: column; }
    .btn-primary,
    .btn-secondary { text-align: center; justify-content: center; }
    .home-popular-grid:not(.is-text-style) { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ── Legacy / article image helpers ─────────────────────── */
.article-content::after { content: ''; display: block; clear: both; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; }
.article-content img.align-left,
.article-content img[style*="float:left"],
.article-content img[style*="float: left"] { float: left; max-width: 50%; margin: 0 1em 0.5em 0; }
.article-content img.align-center,
.article-content img[style*="0 auto"] { float: none; display: block; margin: 0 auto 18px; }
.article-content img.align-right,
.article-content img[style*="float:right"],
.article-content img[style*="float: right"] { float: right; max-width: 50%; margin: 0 0 0.5em 1em; }

/* ── Archive head ───────────────────────────────────────── */
.archive-head h1 { font-size: clamp(22px, 3vw, 36px); }

/* ── Checkbox content ───────────────────────────────────── */
.article-content input[type="checkbox"] { margin-right: 6px; }

.hub-eyebrow .hero-fs-xs,
.hub-title .hero-fs-xs,
.hub-desc .hero-fs-xs {
    font-size: 0.82em;
}

.hub-eyebrow .hero-fs-sm,
.hub-title .hero-fs-sm,
.hub-desc .hero-fs-sm {
    font-size: 0.92em;
}

.hub-eyebrow .hero-fs-md,
.hub-title .hero-fs-md,
.hub-desc .hero-fs-md {
    font-size: 1em;
}

.hub-eyebrow .hero-fs-lg,
.hub-title .hero-fs-lg,
.hub-desc .hero-fs-lg {
    font-size: 1.14em;
}

.hub-eyebrow .hero-fs-xl,
.hub-title .hero-fs-xl,
.hub-desc .hero-fs-xl {
    font-size: 1.28em;
}

.hero-color-default {
    color: inherit;
}

.hero-color-muted {
    color: var(--muted);
}

.hero-color-brand {
    color: var(--brand);
}

.hero-color-accent {
    color: var(--accent);
}

.hero-color-inverse {
    color: #ffffff;
}
/* ── View page sidebar layout ────────────────────────────── */
.view-page-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 40px;
    align-items: start;
}
.view-main { min-width: 0; }
.article-view .article-shell { padding-top: 30px; }
.view-sidebar {
    position: sticky;
    top: 76px;
    padding-top: 30px;
}
.sidebar-popular {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.sidebar-heading {
    margin: 0;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    background: var(--surface-alt);
}
.sidebar-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-post-item { border-bottom: 1px solid var(--line); }
.sidebar-post-item:last-child { border-bottom: none; }
.sidebar-post-item a {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    transition: background 0.15s;
}
.sidebar-post-item a:hover { background: var(--surface-alt); }
.sidebar-post-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    flex-shrink: 0;
}
.sidebar-post-no-thumb {
    display: block;
    background: var(--surface-alt);
    border: 1px solid var(--line);
}
.sidebar-post-title {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* sidebar: chip/date hidden in thumb mode */
.sidebar-post-chip { display: none; }
.sidebar-post-date { display: none; }
/* sidebar: text mode — one-line format */
.sidebar-post-list.is-text-style .sidebar-post-item a { align-items: baseline; }
.sidebar-post-list.is-text-style .sidebar-post-chip { display: inline; flex-shrink: 0; font-size: var(--font-size-sidebar-post-title, 13px); font-weight: 700; color: var(--brand); white-space: nowrap; }
.sidebar-post-list.is-text-style .sidebar-post-chip::before { content: '['; margin-right: 2px; }
.sidebar-post-list.is-text-style .sidebar-post-chip::after { content: ']'; margin-left: 2px; }
.sidebar-post-list.is-text-style .sidebar-post-title { flex: 1; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-line-clamp: unset; }
.sidebar-post-list.is-text-style .sidebar-post-date { display: none; }
@media (max-width: 1060px) {
    .view-page-layout { grid-template-columns: 1fr; }
    .view-sidebar { display: none; }
}
.view-page-layout.no-sidebar { grid-template-columns: 1fr; }
/* non-hero-font-runtime */
.brand {
    font-family: var(--font-brand);
    font-size: var(--font-size-header-brand);
    font-weight: var(--font-weight-header-brand, 400);
    color: var(--font-color-header-brand);
}

.main-nav a,
.search-form input,
.search-form button,
.post-chip,
.service-link,
.tag-row a,
.pagination a,
.site-footer .inner,
.article-admin-notice,
.article-admin-link,
.article-admin-meta strong,
.article-admin-status {
    font-family: var(--font-ui);
}

.nav-util,
.nav-admin {
    font-family: var(--font-ui);
}

.section-head h1,
.section-head h2,
.featured-body h3,
.post-row-body h2,
.home-popular-title,
.related-post-body h3,
.post-card h2,
.post-card h3,
.category-hub h2,
.service-hub h2,
.article-view h1,
.archive-head h1,
.sidebar-heading,
.sidebar-post-title,
.summary-box strong,
.category-list strong {
    font-family: var(--font-title);
}

.section-head p,
.featured-body p,
.post-row-body p,
.related-post-body p,
.post-card p,
.service-hub p,
.summary-box p,
.category-description,
.empty-notice,
.empty-box,
.muted-text {
    font-family: var(--font-summary);
}

.article-content {
    font-family: var(--font-content);
}

.eyebrow,
.article-meta,
.meta-row,
.related-post-meta,
.category-count,
.utility-links a {
    font-family: var(--font-meta);
}

.main-nav a {
    font-size: var(--font-size-header-nav);
}

.nav-util,
.nav-admin {
    font-size: var(--font-size-header-nav-secondary) !important;
}

.search-form input,
.search-form button {
    font-size: var(--font-size-header-search);
}

.eyebrow {
    font-size: var(--font-size-section-label);
}

.section-head h1,
.section-head h2 {
    font-size: var(--font-size-section-title);
    font-weight: var(--font-weight-section-title, 700);
    color: var(--font-color-section-title);
}

.section-head p {
    font-size: var(--font-size-section-description);
}

.post-chip {
    font-size: var(--font-size-post-chip);
}

.featured-body h3 {
    font-size: var(--font-size-featured-title);
}

.featured-body p {
    font-size: var(--font-size-featured-summary);
}

.post-row-body h2 {
    font-size: var(--font-size-post-row-title);
    font-weight: var(--font-weight-post-row-title, 700);
    color: var(--font-color-post-row-title);
}

.home-popular-title {
    font-size: var(--font-size-popular-title);
    font-weight: var(--font-weight-popular-title, 400);
    color: var(--font-color-popular-title);
}

.post-row-body p {
    font-size: var(--font-size-post-row-summary);
}

.meta-row,
.related-post-meta {
    font-size: var(--font-size-list-meta);
    font-weight: var(--font-weight-list-meta, 400);
    color: var(--font-color-list-meta, var(--muted));
}

.related-post-body h3 {
    font-size: var(--font-size-related-title);
    font-weight: var(--font-weight-related-title, 700);
    color: var(--font-color-related-title);
}

.related-post-body p {
    font-size: var(--font-size-related-summary);
}

.post-card h2,
.post-card h3 {
    font-size: var(--font-size-card-title);
    font-weight: var(--font-weight-card-title, 700);
    color: var(--font-color-card-title);
}

.post-card p {
    font-size: var(--font-size-card-summary);
}

.archive-head h1 {
    font-size: var(--font-size-archive-title);
    font-weight: var(--font-weight-archive-title, 700);
    color: var(--font-color-archive-title);
}

.category-hub h2,
.service-hub h2 {
    font-size: var(--font-size-bottom-title);
}

.category-list strong {
    font-size: var(--font-size-category-title);
}

.category-count,
.category-description {
    font-size: var(--font-size-category-meta);
}

.service-hub p {
    font-size: var(--font-size-service-summary);
}

.service-link {
    font-size: var(--font-size-service-link);
}

.utility-links a {
    font-size: var(--font-size-utility-link);
}

.article-view .eyebrow {
    font-size: var(--font-size-article-category);
}

.article-view h1 {
    font-size: var(--font-size-article-title);
    font-weight: var(--font-weight-article-title, 700);
    color: var(--font-color-article-title);
}

.article-meta {
    font-size: var(--font-size-article-meta);
}

.summary-box strong {
    font-size: var(--font-size-article-summary-title);
}

.summary-box p {
    font-size: var(--font-size-article-summary);
    font-weight: var(--font-weight-article-summary, 400);
    color: var(--font-color-article-summary, var(--muted));
}

.article-content {
    font-size: var(--font-size-article-content);
    font-weight: var(--font-weight-article-content, 400);
    color: var(--font-color-article-content);
}

.tag-row a,
.pagination a {
    font-size: var(--font-size-tag-link);
}

.article-admin-notice,
.article-admin-link,
.article-admin-meta strong {
    font-size: var(--font-size-article-admin);
}

.article-admin-status {
    font-size: var(--font-size-article-admin-status);
}

.sidebar-heading {
    font-size: var(--font-size-sidebar-title);
}

.sidebar-post-title {
    font-size: var(--font-size-sidebar-post-title);
    font-weight: var(--font-weight-sidebar-post-title, 400);
    color: var(--font-color-sidebar-post-title, var(--text));
}

.empty-notice {
    font-size: var(--font-size-empty-notice);
}

.empty-box {
    font-size: var(--font-size-empty-box);
}

.site-footer .inner {
    font-size: var(--font-size-footer);
}

/* Tag cloud page */
.tag-cloud-wrap {
    line-height: 2.2;
    word-break: keep-all;
    margin-top: 8px;
}
.tag-cloud-link {
    display: inline-block;
    margin: 3px 5px;
    text-decoration: none;
    color: var(--text);
    transition: color 0.15s;
}
.tag-cloud-link:hover { color: var(--brand); text-decoration: underline; }
.tag-cloud-link.cloud1 { font-size: 13px; opacity: 0.65; }
.tag-cloud-link.cloud2 { font-size: 15px; opacity: 0.75; }
.tag-cloud-link.cloud3 { font-size: 18px; font-weight: 500; }
.tag-cloud-link.cloud4 { font-size: 22px; font-weight: 600; color: var(--brand); }
.tag-cloud-link.cloud5 { font-size: 27px; font-weight: 700; color: var(--brand); }
