
:root {
    --ink: #15263f;
    --ink-2: #223a58;
    --paper: #ffffff;
    --soft: #f4f6f8;
    --muted: #657386;
    --line: #dce2e8;
    --accent: #f39a1e;
    --green: #487b42;
    --radius: 12px;
    --shadow: 0 18px 46px rgba(21, 38, 63, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--paper) !important;
    color: #17202a !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.65;
}
body img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4, h5, h6,
h1 a, h2 a, h3 a, h4 a, h5 a {
    font-family: Georgia, "Times New Roman", serif !important;
    color: #17202a;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Shared modern shell */
.site-shell { width: min(1360px, calc(100% - 48px)); margin: 0 auto; }
.site-topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 1200; }
.site-topbar__inner { min-height: 78px; display: flex; align-items: center; gap: 28px; }
.site-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.site-brand img { width: 290px; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 10px; }
.site-nav { display: flex; align-items: center; justify-content: center; gap: 6px; margin-left: auto; }
.site-nav a { color: #fff; font-size: 14px; font-weight: 800; padding: 10px 11px; border-radius: 8px; }
.site-nav a:hover, .site-nav a:focus-visible { background: rgba(255,255,255,.1); }
.site-nav .accent-link { background: var(--accent); color: #17202a; padding-inline: 16px; }
.site-menu-button { display: none; margin-left: auto; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 9px; padding: 9px 12px; font-size: 22px; cursor: pointer; }

.home-main { padding: 40px 0 72px; }
.section-heading { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; }
.section-heading h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1; }
.section-heading::after { content: ""; height: 2px; background: var(--accent); flex: 1; }
.section-heading a { font-size: 13px; font-weight: 800; white-space: nowrap; }

.lead-grid { display: grid; grid-template-columns: .78fr 1.6fr .86fr; gap: 28px; align-items: start; }
.story-stack { display: grid; gap: 24px; }
.story-card { min-width: 0; }
.story-card img { width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); background: var(--soft); }
.story-card .kicker, .lead-story .kicker, .compact-story .kicker { color: #d77400; font-weight: 800; font-size: 13px; margin-top: 12px; }
.story-card .date, .lead-story .date, .compact-story .date { color: #536173; font-size: 13px; font-weight: 700; }
.story-card h3 { margin: 5px 0 0; font-size: 24px; line-height: 1.12; }
.story-card p { color: var(--muted); margin: 9px 0 0; }
.lead-story img { width: 100%; aspect-ratio: 16/10.4; object-fit: cover; border-radius: var(--radius); display: block; }
.lead-story h1 { margin: 6px 0 10px; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.02; }
.lead-story .standfirst { font-family: Georgia, "Times New Roman", serif; color: #394554; font-size: 19px; line-height: 1.5; margin: 0; }
.latest-list { display: grid; gap: 0; }
.compact-story { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.compact-story:last-child { border-bottom: 0; margin-bottom: 0; }
.compact-story img { width: 88px; height: 72px; object-fit: cover; border-radius: 8px; }
.compact-story h3 { margin: 2px 0 0; font-size: 18px; line-height: 1.15; }
.compact-story .kicker { margin-top: 2px; }

.feature-band { margin-top: 58px; padding: 36px 0 4px; border-top: 1px solid var(--line); }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 26px; }
.card-grid .story-card h3 { font-size: 23px; }
.card-grid .story-card img { aspect-ratio: 4/3; }

.guide-band { margin-top: 56px; background: var(--ink); color: #fff; padding: 50px 0 58px; }
.guide-band .section-heading h2 { color: #fff; }
.guide-band .section-heading a { color: #fff; }
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.guide-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.guide-card img { width: 100%; aspect-ratio: 4/2.7; object-fit: cover; display: block; }
.guide-card__body { padding: 18px; }
.guide-card h3 { color: #fff; font-size: 24px; line-height: 1.12; margin: 6px 0 0; }
.guide-card p { color: #d8e0ea; margin: 10px 0 0; font-size: 14px; }
.guide-card .kicker { color: #ffb94f; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }

.site-footer { background: #101c2d; color: #dbe4ee; padding: 34px 0 26px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: end; }
.site-footer p { margin: 0; max-width: 720px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px 20px; justify-content: flex-end; }
.site-footer a { color: #fff; font-size: 14px; font-weight: 700; }
.site-footer small { display: block; color: #9ba9bb; margin-top: 16px; }

/* New article pages */
.article-main { padding: 48px 0 72px; }
.article-wrap { width: min(1040px, calc(100% - 48px)); margin: 0 auto; }
.article-head { max-width: 900px; margin-bottom: 28px; }
.article-head .eyebrow { color: #d77400; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.article-head h1 { font-size: clamp(40px, 6vw, 70px); line-height: .98; margin: 8px 0 16px; }
.article-head .dek { font-family: Georgia, "Times New Roman", serif; color: #4a5664; font-size: 21px; line-height: 1.5; max-width: 820px; }
.article-meta { color: #6e7986; font-size: 14px; font-weight: 700; }
.article-hero { width: 100%; max-height: 620px; object-fit: cover; border-radius: 16px; display: block; margin: 28px 0 36px; }
.article-body { width: min(760px, 100%); margin: 0 auto; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.78; }
.article-body h2 { margin: 42px 0 12px; font-size: 34px; line-height: 1.12; }
.article-body h3 { margin: 30px 0 10px; font-size: 25px; }
.article-body p { margin: 0 0 20px; }
.article-body ul { margin: 0 0 24px; padding-left: 24px; }
.article-body li { margin: 0 0 10px; }
.article-note { background: #f6f7f8; border-left: 4px solid var(--accent); padding: 18px 20px; font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #495463; margin: 30px 0; }

/* Legacy WordPress pages: override the old fixed 800px theme */
body:not(.modern-home):not(.modern-article) #header {
    width: 100% !important;
    float: none !important;
    background: var(--ink) !important;
    box-shadow: none !important;
}
body:not(.modern-home):not(.modern-article) #login { display: none !important; }
body:not(.modern-home):not(.modern-article) #header .headerimage {
    display: block;
    width: min(1260px, calc(100% - 40px));
    margin: 0 auto;
    padding: 14px 0 6px;
}
body:not(.modern-home):not(.modern-article) #header .headerimage img {
    width: 300px !important;
    height: 58px !important;
    object-fit: contain;
    margin: 0 !important;
    padding: 4px 10px;
    background: #fff;
    border-radius: 8px;
}
body:not(.modern-home):not(.modern-article) #description {
    width: min(1260px, calc(100% - 40px));
    margin: 0 auto 12px !important;
    text-align: left !important;
    color: #d5deea !important;
    font-size: 13px !important;
}
body:not(.modern-home):not(.modern-article) .main-navigation,
body:not(.modern-home):not(.modern-article) .sub-navigation {
    float: none !important;
    width: 100% !important;
    background: transparent !important;
    border-top: 1px solid rgba(255,255,255,.1);
}
body:not(.modern-home):not(.modern-article) .sf-menu {
    width: min(1260px, calc(100% - 40px));
    margin: 0 auto !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
body:not(.modern-home):not(.modern-article) .sf-menu li { float: none !important; }
body:not(.modern-home):not(.modern-article) .sf-menu > li > a {
    color: #fff !important;
    font: 700 13px/1.2 Arial, Helvetica, sans-serif !important;
    padding: 11px 12px !important;
}
body:not(.modern-home):not(.modern-article) .sf-menu > li > a:hover { background: rgba(255,255,255,.09); }
body:not(.modern-home):not(.modern-article) .sub-navigation { background: #fff !important; border-bottom: 1px solid var(--line); }
body:not(.modern-home):not(.modern-article) .sub-navigation .sf-menu > li > a { color: var(--ink) !important; font-size: 12px !important; }
body:not(.modern-home):not(.modern-article) .sf-menu ul { background: #fff !important; box-shadow: var(--shadow); border-radius: 8px; overflow: hidden; }
body:not(.modern-home):not(.modern-article) .sf-menu ul li { background: #fff !important; }
body:not(.modern-home):not(.modern-article) .sf-menu ul a { color: var(--ink) !important; font: 700 12px/1.3 Arial, Helvetica, sans-serif !important; padding: 10px !important; }

body:not(.modern-home):not(.modern-article) #mainwrapper {
    width: min(1260px, calc(100% - 40px)) !important;
    margin: 38px auto 72px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 38px;
    float: none !important;
}
body:not(.modern-home):not(.modern-article) #leftcontent,
body:not(.modern-home):not(.modern-article) #twocol,
body:not(.modern-home):not(.modern-article) #threecol,
body:not(.modern-home):not(.modern-article) #threecol2,
body:not(.modern-home):not(.modern-article) .commentlist {
    width: auto !important;
    float: none !important;
}
body:not(.modern-home):not(.modern-article) #sidebar {
    width: auto !important;
    float: none !important;
    order: 2;
}
body:not(.modern-home):not(.modern-article) #leftcontent { order: 1; }
body:not(.modern-home):not(.modern-article) .side-widget {
    width: auto !important;
    background: #f6f7f8;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px !important;
    margin: 0 0 18px !important;
    overflow: hidden;
}
body:not(.modern-home):not(.modern-article) .side-widget h2 { font-size: 20px !important; margin: 0 0 12px !important; }
body:not(.modern-home):not(.modern-article) .side-widget ul { padding-left: 18px; }
body:not(.modern-home):not(.modern-article) .side-widget li { margin-bottom: 7px; }
body:not(.modern-home):not(.modern-article) .post,
body:not(.modern-home):not(.modern-article) .page {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0 0 34px !important;
    margin: 0 0 34px !important;
}
body:not(.modern-home):not(.modern-article) .post h1,
body:not(.modern-home):not(.modern-article) .post h2,
body:not(.modern-home):not(.modern-article) .page h1 {
    font-size: clamp(34px, 4.8vw, 58px) !important;
    line-height: 1.04 !important;
    margin: 0 0 12px !important;
}
body:not(.modern-home):not(.modern-article) .meta { color: #697586 !important; font: 700 13px/1.5 Arial, Helvetica, sans-serif !important; margin-bottom: 24px !important; }
body:not(.modern-home):not(.modern-article) .entry { font-family: Georgia, "Times New Roman", serif !important; font-size: 18px !important; line-height: 1.75 !important; color: #232b34 !important; }
body:not(.modern-home):not(.modern-article) .entry p { margin: 0 0 20px !important; }
body:not(.modern-home):not(.modern-article) .entry img,
body:not(.modern-home):not(.modern-article) #leftcontent img,
body:not(.modern-home):not(.modern-article) .wp-caption {
    max-width: 100% !important;
    width: auto;
    height: auto;
    border-radius: 10px;
}
body:not(.modern-home):not(.modern-article) .entry table { display: block; width: 100%; overflow-x: auto; }
body:not(.modern-home):not(.modern-article) #footer,
body:not(.modern-home):not(.modern-article) .footer { width: 100% !important; }

@media (max-width: 1050px) {
    .lead-grid { grid-template-columns: 1fr 1.35fr; }
    .latest-list { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
    .card-grid, .guide-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    body:not(.modern-home):not(.modern-article) #mainwrapper { grid-template-columns: 1fr; }
    body:not(.modern-home):not(.modern-article) #sidebar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
    body:not(.modern-home):not(.modern-article) .side-widget { margin: 0 !important; }
}

@media (max-width: 800px) {
    .site-shell { width: min(100% - 28px, 1360px); }
    .site-topbar__inner { min-height: 68px; }
    .site-brand img { width: 220px; height: 48px; }
    .site-menu-button { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav { display: none; position: absolute; left: 14px; right: 14px; top: 68px; background: var(--ink-2); padding: 12px; border-radius: 0 0 12px 12px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 12px 14px; }
    .home-main { padding-top: 28px; }
    .lead-grid { grid-template-columns: 1fr; }
    .lead-story { grid-row: 1; }
    .story-stack { grid-row: 2; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .latest-list { grid-row: 3; grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .site-footer nav { justify-content: flex-start; }
    .article-wrap { width: min(100% - 28px, 1040px); }
    body:not(.modern-home):not(.modern-article) #mainwrapper { width: min(100% - 28px, 1260px) !important; margin-top: 28px !important; }
    body:not(.modern-home):not(.modern-article) #sidebar { grid-template-columns: 1fr; }
    body:not(.modern-home):not(.modern-article) #header .headerimage,
    body:not(.modern-home):not(.modern-article) #description,
    body:not(.modern-home):not(.modern-article) .sf-menu { width: min(100% - 28px, 1260px); }
    body:not(.modern-home):not(.modern-article) .sf-menu { overflow-x: auto; flex-wrap: nowrap; }
    body:not(.modern-home):not(.modern-article) .sf-menu > li { flex: 0 0 auto; }
}

@media (max-width: 560px) {
    .site-brand img { width: 188px; }
    .section-heading { align-items: flex-end; }
    .section-heading h2 { font-size: 30px; }
    .story-stack, .card-grid, .guide-grid { grid-template-columns: 1fr; }
    .lead-story h1 { font-size: 39px; }
    .story-card h3, .card-grid .story-card h3 { font-size: 25px; }
    .compact-story { grid-template-columns: 104px 1fr; }
    .compact-story img { width: 104px; height: 82px; }
    .article-head h1 { font-size: 42px; }
    .article-head .dek { font-size: 19px; }
    .article-body { font-size: 18px; }
    body:not(.modern-home):not(.modern-article) .post h1,
    body:not(.modern-home):not(.modern-article) .post h2,
    body:not(.modern-home):not(.modern-article) .page h1 { font-size: 38px !important; }
}
/* Unified legacy-page redesign v2 */
body.legacy-modern .site-topbar,
body.modern-archive .site-topbar {
    width: 100%;
}

body.legacy-modern #mainwrapper {
    width: min(1180px, calc(100% - 48px)) !important;
    margin: 46px auto 76px !important;
    display: block !important;
    min-height: 52vh;
}

body.legacy-modern #sidebar {
    display: none !important;
}

body.legacy-modern #leftcontent,
body.legacy-modern #twocol,
body.legacy-modern #threecol,
body.legacy-modern #threecol2 {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.legacy-content #leftcontent {
    width: min(900px, 100%) !important;
    margin: 0 auto !important;
}

body.legacy-content .post,
body.legacy-content .page {
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.legacy-content .post > h1,
body.legacy-content .page > h1,
body.legacy-content .post > h2:first-child,
body.legacy-content .page > h2:first-child {
    margin: 0 0 16px !important;
    font-size: clamp(42px, 5.5vw, 68px) !important;
    line-height: 1.01 !important;
    letter-spacing: -0.035em !important;
}

body.legacy-content .post > h1::before,
body.legacy-content .page > h1::before,
body.legacy-content .post > h2:first-child::before,
body.legacy-content .page > h2:first-child::before {
    content: "Archivio";
    display: block;
    margin-bottom: 12px;
    color: #d77400;
    font: 800 12px/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
}

body.legacy-content .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding-bottom: 22px;
    margin: 0 0 30px !important;
    border-bottom: 1px solid var(--line);
    color: #657386 !important;
}

body.legacy-content .meta .date {
    font-weight: 800 !important;
    color: #455365 !important;
}

body.legacy-content .entry {
    width: min(760px, 100%);
    margin: 0 auto;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 19px !important;
    line-height: 1.78 !important;
    color: #242d37 !important;
}

body.legacy-content .entry > p,
body.legacy-content .entry > div,
body.legacy-content .entry > blockquote,
body.legacy-content .entry > ul,
body.legacy-content .entry > ol,
body.legacy-content .entry > table,
body.legacy-content .entry > h2,
body.legacy-content .entry > h3,
body.legacy-content .entry > h4 {
    max-width: 760px;
}

body.legacy-content .entry h2 {
    margin: 44px 0 14px !important;
    font-size: 34px !important;
    line-height: 1.12 !important;
}

body.legacy-content .entry h3 {
    margin: 34px 0 12px !important;
    font-size: 26px !important;
    line-height: 1.2 !important;
}

body.legacy-content .entry a {
    color: #174f82;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

body.legacy-content .entry img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    margin-top: 24px;
    margin-bottom: 24px;
    border-radius: 14px;
}

body.legacy-content .wp-caption {
    max-width: 100% !important;
    width: auto !important;
    margin: 28px auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

body.legacy-content .wp-caption img {
    margin: 0 auto 9px !important;
}

body.legacy-content .wp-caption-text {
    margin: 0 !important;
    color: #6b7786 !important;
    font: 13px/1.5 Arial, Helvetica, sans-serif !important;
    text-align: center !important;
}

body.legacy-content blockquote {
    margin: 28px 0 !important;
    padding: 18px 22px !important;
    border-left: 4px solid var(--accent);
    background: #f6f8fa;
    color: #3c4856;
}

body.legacy-content #comments {
    width: min(760px, 100%);
    margin: 56px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

body.legacy-content #comments h3 {
    font-size: 28px !important;
    margin: 0 0 18px !important;
}

body.legacy-content #commentform label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 800;
}

body.legacy-content #commentform input[type="text"],
body.legacy-content #commentform textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 14px !important;
    border: 1px solid #cfd7df !important;
    border-radius: 8px !important;
    background: #fff !important;
    font: inherit !important;
}

body.legacy-content #commentform input[type="submit"] {
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--accent) !important;
    color: #17202a !important;
    padding: 12px 18px !important;
    font-weight: 800 !important;
    cursor: pointer;
}

/* Category, month, author and paged archive screens */
body.legacy-list #mainwrapper {
    width: min(1260px, calc(100% - 48px)) !important;
}

body.legacy-list #leftcontent {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

body.legacy-list .catheader {
    grid-column: 1 / -1;
    margin: 0 0 2px !important;
    padding: 0 0 14px !important;
    border-bottom: 2px solid var(--accent);
    font-size: clamp(30px, 3.2vw, 42px) !important;
    line-height: 1.05 !important;
}

body.legacy-list .post {
    min-width: 0;
    margin: 0 !important;
    padding: 0 0 20px !important;
    border-bottom: 1px solid var(--line) !important;
}

body.legacy-list .post h2 {
    margin: 0 0 7px !important;
    font-size: clamp(18px, 1.65vw, 23px) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.012em !important;
}

body.legacy-list .post .meta {
    margin: 0 0 9px !important;
    color: #657386 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
}

body.legacy-list .post .entry {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #45515e !important;
}

body.legacy-list .post .entry > a:first-child img,
body.legacy-list .post .entry img.alignleft {
    float: none !important;
    display: block !important;
    width: 100% !important;
    height: 150px !important;
    object-fit: cover !important;
    margin: 0 0 11px !important;
    border-radius: 10px !important;
}

body.legacy-list .post .excerpt {
    margin: 0 0 8px !important;
}

body.legacy-list .more-link {
    display: inline-flex;
    align-items: center;
    margin-top: 2px;
    color: #17202a !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

body.legacy-list .more-link::after {
    content: " →";
}

body.legacy-list .pagination {
    grid-column: 1 / -1;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    width: 100% !important;
    float: none !important;
    margin: 6px 0 0 !important;
    padding: 12px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
}

body.legacy-list .pagination .pages {
    border: 0 !important;
    background: transparent !important;
    color: #657386 !important;
    margin: 0 8px 0 0 !important;
    padding: 0 !important;
    font: 700 11px/1.2 Arial, Helvetica, sans-serif !important;
}

body.legacy-list .pagination a,
body.legacy-list .pagination .current,
body.legacy-list .pagination .extend {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #314156 !important;
    font: 800 11px/1 Arial, Helvetica, sans-serif !important;
    text-decoration: none !important;
}

body.legacy-list .pagination .current {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: #fff !important;
}

body.legacy-list .pagination a:hover {
    border-color: var(--accent) !important;
    color: #17202a !important;
}

/* Modern archive */
.archive-main {
    padding: 48px 0 74px;
}

.archive-hero {
    max-width: 880px;
    margin-bottom: 48px;
}

.archive-hero .kicker {
    color: #d77400;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
}

.archive-hero h1 {
    margin: 5px 0 10px;
    font-size: clamp(48px, 7vw, 82px);
    line-height: .98;
}

.archive-hero p {
    max-width: 740px;
    margin: 0;
    color: #536173;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
}

.archive-section {
    margin-top: 46px;
}

.archive-link-grid,
.archive-year-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.archive-link-card,
.archive-year-card {
    display: block;
    min-height: 150px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(21, 38, 63, .045);
}

.archive-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.archive-link-card strong {
    display: block;
    margin-bottom: 7px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    line-height: 1.1;
}

.archive-link-card span,
.archive-year-card p {
    color: #657386;
}

.archive-year-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-year-card h3 {
    margin: 0 0 14px;
    font-size: 32px;
}

.archive-year-card p {
    margin: 8px 0;
    line-height: 1.45;
}

.archive-year-card a:hover {
    color: #d77400;
}

@media (max-width: 900px) {
    body.legacy-list #leftcontent,
    .archive-link-grid,
    .archive-year-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    body.legacy-modern #mainwrapper,
    body.legacy-list #mainwrapper {
        width: min(100% - 28px, 1180px) !important;
        margin-top: 30px !important;
    }

    body.legacy-content .post > h1,
    body.legacy-content .page > h1,
    body.legacy-content .post > h2:first-child,
    body.legacy-content .page > h2:first-child {
        font-size: 42px !important;
    }

    body.legacy-content .entry {
        font-size: 18px !important;
    }
}

@media (max-width: 620px) {
    body.legacy-list #leftcontent,
    .archive-link-grid,
    .archive-year-grid {
        grid-template-columns: 1fr;
    }

    body.legacy-list .post h2 {
        font-size: 20px !important;
        line-height: 1.12 !important;
    }

    body.legacy-list .post .entry {
        font-size: 13px !important;
    }

    body.legacy-list .post .entry > a:first-child img,
    body.legacy-list .post .entry img.alignleft {
        height: 155px !important;
    }

    .archive-main {
        padding-top: 32px;
    }

    body.legacy-list .pagination {
        justify-content: center;
    }

    body.legacy-list .pagination .pages {
        flex-basis: 100%;
        margin: 0 0 4px !important;
        text-align: center;
    }
}

/* Compact legacy listing cards — final overrides */
body.legacy-list #leftcontent .post > h2,
body.archive #leftcontent .post > h2,
body.category #leftcontent .post > h2 {
    margin: 0 0 6px !important;
    font-size: clamp(16px, 1.35vw, 20px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.01em !important;
}

body.legacy-list #leftcontent .post > h2 > a,
body.archive #leftcontent .post > h2 > a,
body.category #leftcontent .post > h2 > a {
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    font-weight: 700 !important;
}

/* Pagination reset: keep every item on the same baseline */
body.legacy-list .pagination,
body.archive .pagination,
body.category .pagination {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    height: auto !important;
    margin: 10px 0 0 !important;
    padding: 12px 0 0 !important;
    float: none !important;
    clear: both !important;
    background: transparent !important;
    border: 0 !important;
    line-height: 1 !important;
}

body.legacy-list .pagination > *,
body.archive .pagination > *,
body.category .pagination > * {
    float: none !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

body.legacy-list .pagination .pages,
body.archive .pagination .pages,
body.category .pagination .pages {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: 28px !important;
    padding: 0 4px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #657386 !important;
    font: 700 10px/28px Arial, Helvetica, sans-serif !important;
    white-space: nowrap !important;
}

body.legacy-list .pagination a,
body.legacy-list .pagination .current,
body.legacy-list .pagination .extend,
body.archive .pagination a,
body.archive .pagination .current,
body.archive .pagination .extend,
body.category .pagination a,
body.category .pagination .current,
body.category .pagination .extend {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #314156 !important;
    font: 800 10px/1 Arial, Helvetica, sans-serif !important;
    text-decoration: none !important;
}

body.legacy-list .pagination .current,
body.archive .pagination .current,
body.category .pagination .current {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: #fff !important;
}

@media (max-width: 620px) {
    body.legacy-list #leftcontent .post > h2,
    body.archive #leftcontent .post > h2,
    body.category #leftcontent .post > h2 {
        font-size: 17px !important;
        line-height: 1.08 !important;
    }

    body.legacy-list .pagination,
    body.archive .pagination,
    body.category .pagination {
        justify-content: flex-start !important;
    }

    body.legacy-list .pagination .pages,
    body.archive .pagination .pages,
    body.category .pagination .pages {
        flex-basis: auto !important;
        width: auto !important;
        margin: 0 !important;
        text-align: left !important;
    }
}
