/* Shared journal cards also appear on the landing page. */
.articles-section, .article-page { --journal-ink: #142e49; --journal-muted: #58697c; --journal-line: #dfe6ec; --journal-orange: #ffad68; background: #f7f8f7; color: var(--journal-ink); }
.articles-section { padding: 5rem 0; }
.article-page { min-height: 70vh; padding-bottom: 5rem; }
.article-page *, .article-page *::before, .article-page *::after { box-sizing: border-box; }
.journal-shell { width: min(1196px, calc(100% - 64px)); margin-inline: auto; }
.journal-hero { background: radial-gradient(ellipse at 18% 35%, #244f72 0, transparent 54%), #102e4d; color: #fff; padding: 26px 0 84px; }
.article-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #cad8e6; font-size: .875rem; margin-bottom: 38px; }
.article-breadcrumb a { padding-block: 8px; }
.article-breadcrumb a:hover { color: #ffca9d; }
.article-breadcrumb i { font-size: .65rem; }
.journal-hero-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr); gap: 80px; align-items: center; }
.journal-eyebrow { display: inline-flex; align-items: center; gap: 9px; border: 1px solid #ffffff30; background: #ffffff0d; padding: 7px 14px; border-radius: 30px; color: #f6c69d; font-size: .875rem; font-weight: 700; }
.journal-hero h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1.6; letter-spacing: -.035em; margin: 20px 0 16px; }
.journal-hero h1 span { color: #ffad68; }
.journal-hero-layout > div > p { color: #d0dce8; max-width: 650px; line-height: 2; font-size: 1rem; }
.journal-hero-note { border: 1px solid #ffffff26; background: #ffffff08; border-radius: 22px; padding: 28px; }
.journal-note-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #ffffff30; border-radius: 14px; color: #ffad68; font-size: 1.5rem; margin-bottom: 20px; }
.journal-hero-note strong { font-size: 1.2rem; }
.journal-hero-note p { margin: 10px 0 16px; }
.journal-hero-note a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: #ffca9d; font-weight: 700; }
.journal-library { position: relative; margin-top: -34px; }
.journal-discovery { padding: 26px; background: #fff; border: 1px solid var(--journal-line); border-radius: 20px; box-shadow: 0 12px 40px #142e490a; }
.article-filters { display: flex; align-items: flex-end; gap: 14px; }
.article-filters label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 10px; }
.journal-search-field { flex: 1; min-width: 0; }
.journal-input-wrap { position: relative; }
.journal-input-wrap > i { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: #65778b; pointer-events: none; }
.article-filters input[type="search"], .article-filters select { width: 100%; min-height: 54px; font: inherit; font-size: .9375rem; color: #243c55; padding: 12px 16px; background: #f8fafb; border: 1px solid #cfd9e2; border-radius: 11px; }
.article-filters input[type="search"] { padding-right: 44px; }
.article-filters input::placeholder { color: #65758a; opacity: 1; }
.journal-sort-field { flex: 0 0 200px; }
.articles-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 12px 22px; border: 0; border-radius: 11px; background: #173f66; color: #fff; font: inherit; font-size: .9375rem; font-weight: 700; text-align: center; cursor: pointer; transition: background .18s; }
.articles-button:hover { background: #245a87; color: #fff; }
.journal-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding-top: 20px; margin-top: 22px; border-top: 1px solid var(--journal-line); }
.journal-categories > span { color: var(--journal-muted); font-size: .875rem; margin-left: 5px; }
.journal-categories a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 17px; border: 1px solid #e0e7ed; border-radius: 30px; color: #425970; font-size: .875rem; background: #fff; }
.journal-categories a:hover { background: #f0f4f8; border-color: #a9bed0; }
.journal-categories a[aria-current] { background: #173f66; border-color: #173f66; color: #fff; }
.journal-featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; border: 1px solid var(--journal-line); border-radius: 22px; overflow: hidden; margin-top: 40px; }
.journal-featured-image { display: block; min-height: 330px; background: #e9f0f6; }
.journal-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.journal-featured-placeholder { height: 100%; min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 25% 25%, #326181, transparent 70%), #163d60; color: #f3c196; }
.journal-featured-placeholder i { font-size: 5rem; }
.journal-featured-placeholder > span { color: #e3edf5; font-size: 1.1rem; }
.journal-featured-body { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; }
.journal-label { display: inline-flex; gap: 8px; padding: 6px 12px; color: #974916; background: #fff0e3; border-radius: 8px; font-size: .8125rem; font-weight: 700; margin-bottom: 20px; }
.journal-featured h2 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); line-height: 1.7; margin: 12px 0; overflow-wrap: anywhere; }
.journal-featured-body > p { color: var(--journal-muted); font-size: .9375rem; line-height: 1.95; margin-bottom: 16px; }
.journal-results { margin-top: 52px; }
.journal-results, #article-search, #article-body { scroll-margin-top: 145px; }
.journal-results-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.journal-overline { color: #98521f; font-size: .8125rem; font-weight: 700; }
.journal-results-header h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 8px 0; }
.journal-results-header p { color: var(--journal-muted); font-size: .9rem; overflow-wrap: anywhere; }
.journal-reset { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; color: #36566f; text-decoration: underline; text-underline-offset: 5px; font-size: .875rem; flex-shrink: 0; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.article-card { min-width: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid #dfe6ec; border-radius: 18px; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.article-card:hover { border-color: #c4d2de; box-shadow: 0 14px 36px #142e4910; }
.article-card-cover { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eaf1f6; }
.article-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover-placeholder { height: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; color: #315b7c; background: radial-gradient(ellipse at 20% 25%, #fdf0e4, transparent 70%), #e7eff5; }
.article-cover-placeholder i { font-size: 3rem; }
.article-cover-placeholder > span { font-size: .875rem; }
.article-featured-badge { position: absolute; top: 16px; right: 16px; background: #fff3e8; color: #8c4413; padding: 6px 10px; font-size: .75rem; border-radius: 7px; }
.article-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: #58697c; font-size: .8125rem; }
.article-meta > span, .article-meta > time { display: inline-flex; align-items: center; gap: 6px; }
.article-category-label { color: #28577a; font-weight: 700; }
.article-card h3 { font-size: 1.15rem; line-height: 1.85; margin: 14px 0 10px; overflow-wrap: anywhere; }
.article-card h3 a:hover, .journal-featured h2 a:hover { color: #ad531a; }
.article-card-body > p { color: #58697c; font-size: .9375rem; line-height: 1.95; margin-bottom: 20px; }
.article-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #e5ebf0; padding-top: 14px; margin-top: auto; }
.article-card-footer time { color: #58697c; font-size: .75rem; }
.article-read { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #194e7d; font-weight: 700; font-size: .875rem; }
.article-read:hover { color: #a54e18; }
.articles-more { text-align: center; margin-top: 32px; }
.articles-empty { padding: 56px 24px; text-align: center; background: #fff; border: 1px dashed #ccd8e2; border-radius: 20px; }
.journal-empty-icon { display: grid; place-items: center; margin: 0 auto 20px; width: 64px; height: 64px; border-radius: 20px; background: #edf3f8; color: #315b7c; font-size: 1.8rem; }
.articles-empty h3 { font-size: 1.25rem; margin-bottom: 12px; line-height: 1.8; }
.articles-empty p { color: #58697c; margin-bottom: 24px; }
.article-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin-top: 36px; }
.article-pagination a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border: 1px solid #cfdae3; background: #fff; color: #194e7d; border-radius: 11px; font-size: .9rem; }
.article-pagination a:hover { background: #edf3f8; }
.article-pagination > span { color: #58697c; font-size: .875rem; }
.journal-help { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 36px; margin-top: 64px; border-radius: 20px; background: #102e4d; color: #fff; }
.journal-help .journal-overline { color: #ffbd88; }
.journal-help h2 { font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.8; margin: 8px 0; }
.journal-help p { color: #cad8e6; font-size: .9375rem; }
.journal-help .articles-button { background: #ffad68; color: #172e49; flex-shrink: 0; }
.journal-help .articles-button:hover { background: #ffc18e; }
/* Reading layout */
.journal-detail-hero { padding-bottom: 48px; }
.article-header { max-width: 850px; }
.article-header h1 { font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.7; overflow-wrap: anywhere; }
.article-header > p { color: #d0dce8; font-size: 1.0625rem; line-height: 2; margin: 16px 0 24px; }
.article-header .article-meta { color: #d0dce8; font-size: .875rem; }
.journal-start { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; color: #ffca9d; margin-top: 22px; font-size: .9375rem; }
.journal-reading-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 36px; padding-top: 48px; }
.journal-reading-sidebar { position: sticky; top: 140px; }
.journal-toc { background: #fff; border: 1px solid #dfe6ec; border-radius: 16px; padding: 22px; }
.journal-toc[hidden] { display: none; }
.journal-toc h2 { font-size: 1rem; line-height: 1.8; margin: 8px 0 14px; }
.journal-toc ol { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; max-height: calc(100svh - 330px); overflow-y: auto; }
.journal-toc a { display: block; padding: 10px 12px; min-height: 44px; font-size: .875rem; color: #52677b; border-right: 2px solid #e3eaf0; overflow-wrap: anywhere; }
.journal-toc a:hover, .journal-toc a[aria-current] { color: #183d60; background: #eef4f9; border-color: #d87730; }
.journal-toc .toc-subheading a { padding-right: 24px; font-size: .8125rem; }
.journal-back-link { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 16px; color: #315b7c; font-size: .875rem; }
.article-reading { min-width: 0; padding: 32px; border: 1px solid #dfe6ec; border-radius: 20px; background: #fff; }
.article-hero-image { width: 100%; max-height: 500px; object-fit: contain; background: #f3f6f8; border-radius: 13px; margin-bottom: 32px; }
.article-content { overflow-wrap: anywhere; color: #2e4359; font-size: 1.0625rem; line-height: 2.2; }
.article-content > * { margin-bottom: 1.4rem; }
.article-content h2, .article-content h3, .article-content h4 { color: #173552; line-height: 1.8; margin: 2rem 0 1rem; scroll-margin-top: 150px; }
.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.25rem; }
.article-content ul, .article-content ol { padding-right: 1.5rem; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-block: .5rem; }
.article-content a { color: #194e7d; text-decoration: underline; text-underline-offset: 4px; }
.article-content img, .article-content video, .article-content iframe { max-width: 100%; }
.article-content img { height: auto; }
.article-content figure { max-width: 100%; margin: 1.5rem auto; }
.article-content figcaption { text-align: center; color: #58697c; font-size: .875rem; line-height: 1.8; }
.article-content blockquote { border-right: 4px solid #e68136; padding: 16px 24px; background: #fff6ed; border-radius: 10px 0 0 10px; }
.article-content pre { direction: ltr; text-align: left; overflow-x: auto; padding: 20px; background: #142e49; color: #fff; border-radius: 12px; font-size: .875rem; }
.article-content table { width: 100%; border-collapse: collapse; }
.article-content td, .article-content th { border: 1px solid #d9e3eb; padding: 12px; min-width: 100px; }
.article-content th { background: #eef4f9; }
.article-content .table { overflow-x: auto; }
.journal-reading-end { margin-top: 40px; padding-top: 28px; border-top: 1px solid #dfe6ec; }
.journal-reading-end h2 { font-size: 1.25rem; margin: 10px 0; }
.journal-reading-end p { color: #58697c; margin-bottom: 20px; font-size: .9375rem; }
.article-related { margin-top: 64px; }
.article-page a:focus-visible, .article-page button:focus-visible, .article-page input:focus-visible, .article-page select:focus-visible, .articles-section a:focus-visible { outline: 3px solid #bc5c1a; outline-offset: 4px; }
.journal-hero a:focus-visible, .journal-help a:focus-visible { outline-color: #ffca9d; }
@media (max-width: 1000px) {
  .journal-hero-layout { gap: 36px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-reading-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
  .article-reading { padding: 24px; }
  .journal-help { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .journal-shell { width: calc(100% - 32px); }
  .journal-hero { padding: 16px 0 60px; }
  .article-breadcrumb { margin-bottom: 22px; font-size: .8125rem; }
  .journal-hero-layout { grid-template-columns: 1fr; }
  .journal-hero-note { display: none; }
  .journal-hero h1 { font-size: 2.1rem; }
  .journal-discovery { padding: 20px; }
  .article-filters { flex-wrap: wrap; gap: 12px; }
  .journal-search-field { flex: 1 1 100%; }
  .journal-sort-field { flex: 1 1 150px; }
  .article-filters .articles-button { flex: 1 1 110px; }
  .journal-featured { grid-template-columns: 1fr; margin-top: 28px; }
  .journal-featured-image { min-height: 0; aspect-ratio: 16 / 9; }
  .journal-featured-placeholder { min-height: 0; }
  .journal-featured-body { padding: 24px; }
  .journal-results { margin-top: 36px; }
  .journal-results-header { flex-wrap: wrap; gap: 8px; }
  .journal-reading-layout { grid-template-columns: 1fr; padding-top: 24px; gap: 20px; }
  .journal-reading-sidebar { position: static; }
  .journal-toc ol { max-height: 260px; }
  .journal-detail-hero { padding-bottom: 28px; }
  .article-header h1 { font-size: 1.9rem; }
  .article-reading { padding: 22px; }
  .journal-help { padding: 24px; margin-top: 40px; }
  .article-related { margin-top: 40px; }
}
@media (max-width: 520px) {
  .article-grid { grid-template-columns: 1fr; gap: 20px; }
  .article-card-cover { aspect-ratio: 16 / 9; }
  .article-page { padding-bottom: 40px; }
  .journal-hero h1 { font-size: 1.85rem; }
  .journal-categories { gap: 7px; }
  .journal-categories a { padding-inline: 13px; }
  .article-reading { padding: 20px 16px; }
  .article-content { font-size: 1rem; }
  .article-pagination { gap: 10px; }
  .article-pagination a { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { .article-card, .articles-button { transition: none; } }
