/* Only the news page and imported-post fallback. No header/footer or global palette changes. */
.ag-news-page {
  --ag-news-accent: #42ad4b;
  --ag-news-ink: #12351f;
  --ag-news-link: #247c2c;
  --ag-news-soft: #edf7ee;
  --ag-news-line: #d4e8d6;
  color: var(--ag-news-ink);
  padding: 38px 20px 50px;
  background: #fff;
}
.ag-news-shell { max-width: 1120px; margin: 0 auto; }
.ag-news-heading { margin-bottom: 28px; }
.ag-news-heading h1 { margin: 0; font-size: clamp(30px, 3.5vw, 42px); line-height: 1.15; font-weight: 700; color: var(--ag-news-ink); letter-spacing: -.025em; }
.ag-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 18px; }
.ag-news-tile { min-width: 0; margin: 0; }
.ag-news-tile-link { display: block; color: inherit; text-decoration: none; }
.ag-news-tile-link:hover { color: inherit; }
.ag-news-tile-image { aspect-ratio: 4 / 5; background: #f5f7f3; border: 1px solid #e4ebe2; border-radius: 5px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ag-news-tile-image img { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .15s ease; }
.ag-news-tile-link:hover .ag-news-tile-image img { opacity: .92; }
.ag-news-placeholder { padding: 20px; font-size: 20px; font-weight: 700; color: var(--ag-news-link); text-align: center; }
.ag-news-tile-caption { padding: 10px 1px 0; }
.ag-news-tile-caption time, .ag-news-dialog-copy > time { display: block; margin: 0 0 5px; font-size: 12px; line-height: 1.5; color: #526056; }
.ag-news-tile-caption h2 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 700; color: var(--ag-news-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ag-news-page :where(a, button):focus-visible { outline: 3px solid var(--ag-news-link); outline-offset: 4px; }
.ag-news-pagination { margin-top: 34px; }
.ag-news-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; }
.ag-news-pagination .page-numbers { padding: 7px 13px; border: 1px solid var(--ag-news-line); border-radius: 6px; color: var(--ag-news-link); }
.ag-news-pagination .page-numbers.current { background: var(--ag-news-accent); color: var(--ag-news-ink); border-color: var(--ag-news-accent); }

html.ag-news-lock { overflow: hidden; }
.ag-news-dialog:not([open]) { display: none; }
.ag-news-dialog { position: fixed; inset: 0; padding: 0; margin: auto; width: min(1040px, calc(100% - 40px)); max-width: none; max-height: min(84vh, 850px); max-height: min(84dvh, 850px); border: 0; border-radius: 12px; background: #fff; color: var(--ag-news-ink); box-shadow: 0 24px 80px #0004; overflow: hidden; }
.ag-news-dialog::backdrop { background: #102217b8; }
.ag-news-dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; margin: 0; border: 1px solid #d4e8d6; border-radius: 50%; background: #fff; color: #12351f; font-size: 30px; font-weight: 400; line-height: 1; letter-spacing: 0; box-shadow: 0 2px 10px #12351f1a; }
.ag-news-dialog-close:hover { background: #edf7ee; color: #12351f; box-shadow: none; }
.ag-news-dialog-close span { line-height: 1; }
.ag-news-dialog-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-height: min(84vh, 850px); max-height: min(84dvh, 850px); }
.ag-news-dialog-image { min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f5f7f3; }
.ag-news-dialog-image img { display: block; width: 100%; height: 100%; min-height: 0; max-height: min(84vh, 850px); max-height: min(84dvh, 850px); object-fit: contain; }
.ag-news-dialog-copy { min-height: 0; padding: 64px 30px 30px; overflow: auto; overscroll-behavior: contain; }
.ag-news-dialog-copy h2 { margin: 0 0 22px; color: var(--ag-news-ink); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ag-news-copy { font-size: 16px; line-height: 1.65; color: #283c2e; overflow-wrap: anywhere; }
.ag-news-copy p { margin: 0 0 16px; }
.ag-news-copy a { color: var(--ag-news-link); text-decoration: underline; }
.ag-news-page .ag-news-source-button,
.ag-news-single .entry-content .ag-news-source { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 44px; max-width: 100%; margin-top: 10px; padding: 12px 18px; border: 1px solid #247c2c; border-radius: 7px; background: #247c2c; color: #fff; font-size: 14px; font-weight: 700; line-height: 1.45; text-decoration: none; }
.ag-news-page .ag-news-source-button:hover,
.ag-news-single .entry-content .ag-news-source:hover { background: #1d6625; border-color: #1d6625; color: #fff; }
.ag-news-single .entry-image { background: #f5f7f3; }
.ag-news-single .entry-image img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
.ag-news-single .entry-content .ag-news-source:focus-visible { outline: 3px solid #247c2c; outline-offset: 4px; }

@media (max-width: 700px) {
  .ag-news-page { padding: 28px 12px 36px; }
  .ag-news-heading { margin-bottom: 22px; }
  .ag-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 8px; }
  .ag-news-tile-caption h2 { font-size: 13px; }
  .ag-news-tile-caption time { font-size: 11px; }
  .ag-news-dialog { width: calc(100% - 20px); max-height: 92vh; max-height: 92dvh; border-radius: 10px; }
  .ag-news-dialog-layout { display: block; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; }
  .ag-news-dialog-image { height: 48vh; height: 48dvh; }
  .ag-news-dialog-image img { width: 100%; height: 100%; max-height: none; }
  .ag-news-dialog-copy { padding: 24px 22px 28px; overflow: visible; }
  .ag-news-dialog-copy h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .ag-news-tile-image img { transition: none; } }
