@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Newsreader:opsz,wght@6..72,500;6..72,600;6..72,700&family=Plus+Jakarta+Sans:wght@700;800&display=swap');

:root {
  --forest: #173d2a;
  --forest-soft: #28563c;
  --gold: #c89a32;
  --cream: #f4efe4;
  --paper: #fffdf8;
  --ink: #1f2922;
  --muted: #667168;
  --line: #ded7c9;
  --rust: #a64f2a;
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --brand-font: "Plus Jakarta Sans", sans-serif;
  --brand-forest: #1e4620;
  --brand-gold: #c59b27;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid rgba(200, 154, 50, .6); outline-offset: 4px; }

.site-shell { overflow: hidden; min-height: 100vh; }
.container { width: min(1280px, calc(100% - 48px)); margin-inline: auto; }
.eyebrow { margin: 0 0 12px; color: var(--rust); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-150%); padding: 10px 14px; border-radius: 6px; background: var(--paper); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #efeae0; background: rgba(252,241,219,.95); box-shadow: 0 1px 3px rgba(45,36,27,.1); backdrop-filter: blur(12px); }
.header-shell { width: min(1280px, 100%); height: 80px; margin-inline: auto; padding-inline: 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-brand { min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.header-brand-logo { width: 64px; height: 64px; min-width: 64px; max-width: 64px; min-height: 64px; max-height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 16px; background: white; }
.header-brand-logo img { width: 64px; height: 64px; max-width: 64px; max-height: 64px; object-fit: cover; transition: transform .3s ease; }
.header-brand:hover .header-brand-logo img { transform: scale(1.05); }
.header-brand-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; font-family: var(--brand-font); }
.header-brand-name { font-family: "Plus Jakarta Sans", sans-serif !important; font-weight: 800 !important; letter-spacing: -.025em !important; }
.site-header .header-brand-name { display: block; color: var(--brand-forest); font-family: var(--brand-font); font-feature-settings: normal; font-variation-settings: normal; font-size: .875rem; font-style: normal; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; text-transform: uppercase; }
.site-header .header-brand-tagline { margin-top: 1px; color: var(--brand-gold); font-family: var(--brand-font); font-size: .625rem; font-style: normal; font-weight: 700; letter-spacing: .05em; line-height: 1.15; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.header-return-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 14px; border: 1px solid #efeae0; border-radius: 999px; background: rgba(255,255,255,.62); color: rgba(45,36,27,.72); font-family: "Plus Jakarta Sans", sans-serif; font-size: .72rem; font-weight: 700; line-height: 1; text-decoration: none; transition: color .18s ease, background-color .18s ease, transform .18s ease; }
.header-return-link:hover { color: #1e4620; background: rgba(197,155,39,.18); transform: translateY(-1px); }
.header-language-switcher { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #efeae0; border-radius: 999px; background: rgba(255,255,255,.8); box-shadow: 0 1px 2px rgba(45,36,27,.08); }
.lang-btn { width: 40px; height: 32px; display: flex; align-items: center; justify-content: center; padding: 6px; border-radius: 999px; text-decoration: none; transition: background-color .18s ease, transform .18s ease; }
.lang-btn:hover { background: rgba(30,70,32,.08); transform: translateY(-1px); }
.lang-btn[aria-current="page"] { background: rgba(197,155,39,.2); box-shadow: inset 0 0 0 1px rgba(197,155,39,.28); }
.lang-btn svg { display: block; width: 24px; height: 16px; overflow: hidden; border-radius: 2px; box-shadow: 0 1px 2px rgba(45,36,27,.2); }
.return-short { display: none; }

.blog-intro { position: relative; padding: 52px 0 30px; background: var(--forest); color: white; }
.blog-intro::after { content: ""; position: absolute; right: -8vw; bottom: -180px; width: 390px; height: 390px; border: 1px solid rgba(200,154,50,.25); border-radius: 50%; box-shadow: 0 0 0 50px rgba(200,154,50,.04), 0 0 0 105px rgba(200,154,50,.025); pointer-events: none; }
.intro-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr .6fr; align-items: end; gap: 64px; }
.blog-intro h1 { max-width: 680px; margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 600; line-height: .94; letter-spacing: -.045em; }
.blog-intro h1 em { color: #e6c673; font-style: italic; font-weight: 500; }
.intro-note { max-width: 330px; margin: 0 0 5px; color: rgba(255,255,255,.72); font-size: .94rem; line-height: 1.65; }

.featured-section { position: relative; z-index: 2; padding: 30px 0 56px; }
.featured-card { position: relative; max-width: 920px; min-height: 220px; overflow: hidden; border-left: 5px solid var(--gold); border-radius: 3px; background: var(--paper); box-shadow: 0 18px 50px rgba(23,61,42,.1); }
.featured-card::after { content: ""; position: absolute; right: -70px; bottom: -105px; width: 240px; height: 240px; border: 1px solid rgba(200,154,50,.2); border-radius: 50%; }
.featured-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; min-height: 220px; padding: 30px 36px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--rust); font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.post-meta span + span::before { content: "•"; margin-right: 8px; color: var(--gold); }
.featured-copy h2 { margin: 16px 0 10px; font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1; letter-spacing: -.03em; }
.featured-copy p { max-width: 690px; margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.62; }
.text-link { display: inline-flex; align-items: center; gap: 12px; width: fit-content; margin-top: 20px; color: var(--forest); font-size: .72rem; font-weight: 700; letter-spacing: .11em; text-decoration: none; text-transform: uppercase; }
.text-link::after { content: "→"; font-size: 1.1rem; transition: transform .25s ease; }
.text-link:hover::after { transform: translateX(5px); }

.latest-section { padding: 8px 0 64px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 3.2rem); font-weight: 600; letter-spacing: -.035em; }
.section-heading p { max-width: 440px; margin: 0 0 5px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.catalog-toolbar { display: grid; grid-template-columns: minmax(240px, 1.65fr) repeat(3, minmax(150px, .75fr)); gap: 14px; margin-top: 28px; padding: 18px; border: 1px solid var(--line); background: rgba(255,253,248,.82); }
.catalog-field { display: grid; gap: 7px; min-width: 0; }
.catalog-field span { color: var(--forest); font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.catalog-field input, .catalog-field select { width: 100%; min-height: 44px; border: 1px solid #d5cdbf; border-radius: 0; background: white; color: var(--ink); padding: 10px 12px; font: 500 .86rem/1.2 var(--sans); }
.catalog-field input::placeholder { color: #8a918b; }
.catalog-field input:focus, .catalog-field select:focus { border-color: var(--gold); outline: 3px solid rgba(200,154,50,.16); }
.catalog-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 34px; margin-top: 12px; }
.catalog-summary p { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.clear-filters { border: 0; background: transparent; color: var(--rust); padding: 6px 0; font-size: .76rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.clear-filters[hidden] { display: none; }
.post-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; padding-top: 30px; }
.post-card { min-width: 0; padding: 22px; border: 1px solid var(--line); background: rgba(255,253,248,.78); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.post-card:hover { transform: translateY(-4px); border-color: rgba(200,154,50,.65); box-shadow: 0 16px 36px rgba(23,61,42,.08); }
.post-card h3 { margin: 13px 0 10px; font-family: var(--serif); font-size: 1.42rem; line-height: 1.08; letter-spacing: -.02em; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--rust); }
.post-card > p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.58; }
.card-link { display: inline-flex; margin-top: 18px; color: var(--forest); font-size: .69rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.card-link:hover { color: var(--rust); }
.catalog-empty { margin-top: 28px; padding: 42px 24px; border: 1px dashed #c9bfaf; background: rgba(255,253,248,.52); text-align: center; }
.catalog-empty[hidden] { display: none; }
.catalog-empty h3 { margin: 0 0 8px; color: var(--forest); font-family: var(--serif); font-size: 1.7rem; }
.catalog-empty p, .catalog-error { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.catalog-error { grid-column: 1 / -1; padding: 32px; border: 1px solid #d9b0a7; background: #fff5f2; color: #8c3326; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; margin-top: 38px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.pagination[hidden] { display: none; }
.pagination button, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; padding: 7px 9px; border: 0; background: transparent; font: inherit; text-decoration: none; }
.pagination button { color: var(--forest); cursor: pointer; }
.pagination button:hover:not(:disabled) { background: rgba(200,154,50,.14); }
.pagination button:disabled { color: #aaa395; cursor: not-allowed; }
.pagination [aria-current="page"] { background: var(--forest); color: white; }
.pagination-separator { min-width: auto !important; padding-inline: 0 !important; color: #b4aa99; }

.tools-cta { padding: 0 0 68px; }
.cta-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 30px 34px; overflow: hidden; background: var(--forest); color: white; }
.cta-panel::after { content: "CJ"; position: absolute; right: 5%; bottom: -72%; color: rgba(255,255,255,.035); font-family: var(--serif); font-size: 16rem; line-height: 1; pointer-events: none; }
.cta-panel h2 { position: relative; z-index: 1; max-width: 720px; margin: 0; color: white; font-family: var(--serif); font-size: clamp(1.65rem, 2.5vw, 2.35rem); font-weight: 600; line-height: 1.05; }
.cta-panel p { position: relative; z-index: 1; max-width: 620px; margin: 10px 0 0; color: rgba(255,255,255,.72); font-size: .88rem; line-height: 1.55; }
.journey-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-width: 164px; padding: 14px 18px; border: 1px solid var(--gold); background: var(--gold); color: #1b2b20; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; transition: transform .25s ease, background .25s ease; }
.button:hover { transform: translateY(-3px); background: #e1bd62; }
.button-secondary { border-color: rgba(255,255,255,.5); background: transparent; color: white; }
.button-secondary:hover { background: white; color: var(--forest); }

.site-footer { padding: 34px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; }

/* Article */
.article-page-main { margin: 0; padding: 0; }
.article-header { margin: 0; padding: 54px 0 46px; background: var(--forest); color: white; }
.article-header-inner { max-width: 880px; }
.article-header h1 { max-width: 820px; margin: 16px 0 18px; font-family: var(--serif); font-size: clamp(2.45rem, 5vw, 4.35rem); font-weight: 600; line-height: .98; letter-spacing: -.04em; }
.article-dek { max-width: 720px; margin: 0; color: rgba(255,255,255,.73); font-family: var(--serif); font-size: clamp(1.12rem, 2vw, 1.45rem); line-height: 1.5; }
.article-header .post-meta { margin-top: 24px; color: #e7c46c; }
.article-layout { display: grid; grid-template-columns: 230px minmax(0, 760px); justify-content: center; gap: 70px; padding: 68px 0 92px; }
.toc { position: sticky; top: 108px; align-self: start; padding-top: 8px; }
.toc h2 { margin: 0 0 18px; color: var(--rust); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.toc ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 26px 1fr; color: var(--muted); font-size: .82rem; line-height: 1.45; text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--gold); font-size: .68rem; font-weight: 700; }
.toc a:hover { color: var(--forest); }
.article-body { min-width: 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.8; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2, .article-body h3 { scroll-margin-top: 108px; color: var(--forest); font-family: var(--serif); line-height: 1.08; letter-spacing: -.025em; }
.article-body h2 { position: relative; margin: 2.6em 0 .7em; padding-top: .55em; font-size: clamp(2rem, 4vw, 2.65rem); }
.article-body h2::before { content: ""; position: absolute; top: 0; left: 0; width: 58px; height: 3px; background: var(--gold); }
.article-body h3 { margin: 2em 0 .6em; font-size: 1.7rem; }
.article-body p { margin: 0 0 1.45em; }
.article-body a { color: var(--rust); font-weight: 600; text-decoration-color: rgba(166,79,42,.35); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .2s ease, text-decoration-color .2s ease; }
.article-body a:hover { color: var(--forest); text-decoration-color: var(--gold); }
.article-body strong { color: var(--forest); font-weight: 700; }
.article-body em { color: #405147; }
.article-body hr { width: 100%; height: 1px; margin: 3.2em 0; border: 0; background: linear-gradient(90deg, transparent, var(--line) 14%, var(--gold) 50%, var(--line) 86%, transparent); }
.article-body blockquote { margin: 2.2em 0; padding: 10px 0 10px 30px; border-left: 3px solid var(--gold); color: var(--forest-soft); font-size: 1.35rem; font-style: italic; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body .article-callout { position: relative; margin: 2.8em 0; padding: 38px 38px 28px; border: 1px solid #d8ccb3; border-left: 6px solid var(--gold); background: linear-gradient(135deg, rgba(255,253,248,.96), rgba(239,231,212,.76)); box-shadow: 0 20px 50px rgba(48,57,48,.08); color: var(--forest); font-style: normal; }
.article-body .article-callout::before { content: attr(data-label); position: absolute; top: 0; left: 32px; transform: translateY(-50%); padding: 7px 12px 6px; background: var(--forest); color: white; font-family: var(--sans); font-size: .65rem; font-weight: 700; letter-spacing: .12em; line-height: 1; text-transform: uppercase; }
.article-body .article-callout strong { font-family: var(--sans); font-size: .9em; letter-spacing: -.01em; }
.article-body ul, .article-body ol { margin: 0 0 1.8em; padding-left: 1.35em; }
.article-body li { margin-bottom: .7em; padding-left: .35em; }
.article-body li::marker { color: var(--gold); font-family: var(--sans); font-weight: 800; }
.article-body .article-table-wrap { width: 100%; margin: 2.4em 0; overflow-x: auto; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 16px 40px rgba(45,61,48,.07); -webkit-overflow-scrolling: touch; }
.article-body table { width: 100%; min-width: 640px; border-collapse: collapse; font-family: var(--sans); font-size: .82rem; line-height: 1.5; }
.article-body th { padding: 15px 18px; border-bottom: 2px solid var(--gold); background: var(--forest); color: white; font-size: .7rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.article-body td { padding: 15px 18px; border-bottom: 1px solid #e8e0d2; vertical-align: top; }
.article-body tbody tr:nth-child(even) { background: rgba(239,231,212,.45); }
.article-body tbody tr:last-child td { border-bottom: 0; }
.article-body table strong { color: var(--forest); }
.article-body code { padding: .16em .38em; border: 1px solid #ddd3bf; border-radius: 4px; background: #eee7da; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82em; }
.article-body pre { margin: 2em 0; padding: 24px; overflow-x: auto; background: #142a1d; color: #f7f1e5; font-size: .86rem; line-height: 1.65; }
.article-body pre code { padding: 0; border: 0; background: transparent; color: inherit; }
.article-body img { width: 100%; height: auto; margin: 2.5em 0; border-radius: 2px; box-shadow: 0 18px 48px rgba(31,41,34,.12); }
.article-body > p:first-child { color: #34473a; font-size: 1.32rem; line-height: 1.72; }
.author-card { display: grid; grid-template-columns: 96px 1fr; gap: 24px; margin-top: 68px; padding-top: 34px; border-top: 1px solid var(--line); font-family: var(--sans); }
.author-card img { width: 96px; height: 96px; margin: 0; border-radius: 50%; object-fit: cover; background: var(--paper); }
.author-card h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.7rem; }
.author-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.article-status { min-height: 320px; display: grid; place-items: center; color: var(--muted); font-family: var(--sans); font-size: .95rem; }
.article-status.is-error { color: #8c3326; }
.skeleton { display: grid; gap: 18px; }
.skeleton span { display: block; height: 18px; border-radius: 5px; background: linear-gradient(90deg, #e5dfd3, #f7f2e9, #e5dfd3); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skeleton span:nth-child(2) { width: 82%; }
.skeleton span:nth-child(3) { width: 92%; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 900px) {
  .intro-grid, .cta-panel { grid-template-columns: 1fr; }
  .intro-grid { gap: 28px; }
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-actions { justify-content: flex-start; }
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .toc { position: static; padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1280px); }
  .header-shell { gap: 8px; padding-inline: 12px; }
  .header-brand-logo { width: 48px; height: 48px; min-width: 48px; max-width: 48px; min-height: 48px; max-height: 48px; flex-basis: 48px; border-radius: 14px; }
  .header-brand-logo img { width: 48px; height: 48px; max-width: 48px; max-height: 48px; }
  .header-brand-copy { display: none; }
  .header-actions { gap: 6px; }
  .header-return-link { min-height: 38px; padding-inline: 11px; }
  .return-long { display: none; }
  .return-short { display: inline; }
  .header-language-switcher { gap: 0; padding: 3px; }
  .lang-btn { width: 36px; height: 36px; padding: 6px; }
  .blog-intro { padding: 42px 0 26px; }
  .blog-intro h1 { font-size: clamp(2.7rem, 13vw, 3.8rem); }
  .featured-section { padding-top: 28px; }
  .featured-card { min-height: 0; }
  .featured-copy { min-height: 0; padding: 26px 22px 30px; }
  .featured-copy h2 { font-size: 2rem; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 14px; }
  .catalog-toolbar { grid-template-columns: 1fr; padding: 14px; }
  .post-grid { grid-template-columns: 1fr; }
  .cta-panel { padding: 28px 22px; }
  .journey-actions { display: grid; width: 100%; }
  .button { width: 100%; min-width: 0; }
  .footer-row { display: grid; }
  .article-header { padding: 42px 0 38px; }
  .article-header h1 { font-size: clamp(2.35rem, 12vw, 3.25rem); }
  .article-layout { padding: 42px 0 72px; }
  .article-body { font-size: 1.1rem; line-height: 1.76; }
  .article-body h2 { font-size: 2rem; }
  .article-body .article-callout { padding: 34px 24px 24px; }
  .article-body .article-callout::before { left: 20px; }
  .article-body .article-table-wrap { margin-inline: -4px; width: calc(100% + 8px); }
  .author-card { grid-template-columns: 72px 1fr; }
  .author-card img { width: 72px; height: 72px; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .header-shell { padding-inline: 24px; }
  .header-brand-logo { width: 64px; height: 64px; min-width: 64px; max-width: 64px; min-height: 64px; max-height: 64px; flex-basis: 64px; border-radius: 16px; }
  .header-brand-logo img { width: 64px; height: 64px; max-width: 64px; max-height: 64px; }
  .header-brand-copy { display: flex; }
  .header-return-link { min-height: 42px; padding-inline: 14px; }
  .return-long { display: inline; }
  .return-short { display: none; }
  .header-language-switcher { gap: 4px; padding: 4px; }
  .lang-btn { width: 40px; height: 32px; padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
